Batch access to HFS data
Accessing HFS files from Batch Jobs
HFS files live in the Unix System Services environment included with the more recent
versions of OS/390. Visit the the OpenEdition page here for more
Here is an example of reading and writing HFS files with a utility that knows
nothing about them:
//COPY EXEC PGM=IEBGENER,REGION=1M
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD PATHOPTS=(ORDONLY),RECFM=VB,LRECL=255,BLKSIZE=32760,
//SYSUT2 DD PATHOPTS=(ORDWR,OTRUNC,OCREAT),PATHMODE=SIRWXU,
//SYSIN DD DUMMY
The JCL for SYSUT1 specifies
The JCL for SYSUT2 specifies
- the PATH parameter which names the input HFS file, which is expected to exist.
- the PATHOPTS parameter which says we only intend to read it.
- reasonably compatible DCB information since these files have their own
The utility in question will copy the DCB information from input to output.
Some "smarter" utilities may refuse to have anything to do with HFS
files. However, support for HFS files has been added to the DFSORT product.
Note that you must be defined as an OMVS user to access HFS files.
The most current versions of OS/390 enable the use of a
default OMVS profile.
- the PATH parameter for the output HFS file.
- the PATHOPTS parameter which says we intend to read/write it, we will create
it if it doesn't exist and we will overwrite it if it does.
- the PATHMODE parameter which says to indicate that the user who created it
should be permitted to read, write and execute it.
- the PATHDISP parameter which says to delete the dataset on abnormal
termination and keep it otherwise. If this parameter was not specified, the dataset
would always be kept.
When copying data between HFS files and MVS files, a useful option
is FILEDATA=TEXT which converts between HFS records separated by "new line"
characters and MVS records.
See Spooling output from OMVS processes for information about
how OMVS work interacts with JES2.