You can process byte-stream files in the hierarchical file system (HFS) as ORGANIZATION SEQUENTIAL files using QSAM. To do this, specify as the assignment-name in the ASSIGN clause either a ddname or an environment-variable name.
Observe the following restrictions:
Usage notes
For example, suppose that a file definition has level-01 record descriptions of 3, 5, and 10 bytes long, and you write the following three records: 'abc', 'defgh', and 'ijklmnopqr', in that order. The first READ of this file returns 'abcdefghij', the second READ returns 'klmnopqr ', and the third READ results in the AT END condition.
For compatibility with releases of IBM COBOL before COBOL for OS/390 & VM Version 2 Release 2, you can also specify FILEDATA=TEXT when using a DD allocation for HFS files, but this use is not recommended. To process text files in the HFS, use LINE SEQUENTIAL organization. If you use QSAM to process text files in the HFS, you cannot use environment variables to define the files.
related tasks
Allocating files
Defining and allocating QSAM files
z/OS DFSMS: Using Data Sets (Using HFS data sets)