Allocating line-sequential files

You can allocate a line-sequential file in the z/OS® UNIX file system by using either a DD statement or an environment variable. Allocation of line-sequential files follows the general rules for allocating COBOL files.

About this task

To allocate a line-sequential file, code a DD allocation or an environment variable that has a name that matches the external name in the ASSIGN clause:

  • A DD allocation:
    • A DD statement that specifies PATH='absolute-path-name'
    • A TSO allocation that specifies PATH('absolute-path-name')

    You can optionally also specify these options:

    • PATHOPTS
    • PATHMODE
    • PATHDISP
  • An environment variable that has a value of PATH(absolute-path-name). No other values can be specified.

    For example, to have your program use z/OS UNIX file /u/myfiles/commuterfile for a COBOL file that has an assignment-name of COMMUTR, you can use the following command:

    
    export COMMUTR="PATH(/u/myfiles/commuterfile)"