Make your own free website on

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 information.

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, // PATH='/u/omvsuid/' //SYSUT2 DD PATHOPTS=(ORDWR,OTRUNC,OCREAT),PATHMODE=SIRWXU, // PATHDISP=(KEEP,DELETE), // PATH='/u/omvsuid/test.out' //SYSIN DD DUMMY // The JCL for SYSUT1 specifies The JCL for SYSUT2 specifies 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.

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.
Big Iron