How to use UNIX files in Mainframe Batch job

HFS files are designed to run in a UNIX environment, you can still access them through a batch job. The JCL you use is a little different, though, than for standard data sets. Zo/s provides some additional parameters for the DD statement that allow you to create, access, and delete HFS files.

A pathname must…

  • Begin with a slash.
  • Include all directory and subdirectory names that lead to the file itself.
  • Be from 1 to 255 characters long.
  • Be enclosed in single quotes if it contains any lowercase letters.
  • Be enclosed in single quotes if it is continued on more than one line.

A PATH parameter that’s used to access a master file in HFS format
//DD1 DD PATH=’/usr/data1/r1/ab0020/MASTER.file’

A PATH parameter with a long file name
//DD1 DD PATH=’/USR/DATA1/R1/CA0020/ACCOUNTING/REP
ORTS/FEB01/INVENTORY.RPT’

Do not code the PATH parameter on any of the following DD statements
JOBCAT
STEPCAT
SYSABEND
SYSUDUMP
JOBLIB
STEPLIB
SYSMDUMP

  • The PATH parameter on a DD statement is used in place of a DSN or DSNAME parameter to identify a file in HFS format.
  • Symbolic parameters can be used within the PATH parameter.
  • Backward references to a DD statement with a PATH parameter are not allowed and are treated as errors. In some cases, you also need to include the PATHOPTS parameter in order to successfully access an HFS file.
Advertisements

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.