Joined: 03 Oct 2009 Posts: 1789 Location: Bloomington, IL
In addition to Mr. Sample's link, I'd mention that the z/OS C library has I/O functions that treat data sets as data sets (as opposed to the streams common under LUW). I don't believe that the library functions will allow a data set to be treated as a stream, although I concede that I never tried.
For interest, I struck and issue with it where the datasets created by a C++ program on Z/OS cannot exceed 65535 tracks. Not sure if it is still the case:
188.8.131.52 Large format sequential data sets
z/OS V1R7 introduced support for large format sequential data sets. A large format sequential data set is a modification to traditional sequential data sets that allows for more than 65535 tracks of data per volume. Large format sequential data sets can be single or multivolume, and can reside on SMS managed or non-SMS managed direct access storage devices.
A large format sequential data set is specified using the DSNTYPE=LARGE keyword on a JCL DD statement or using the dynamic allocation equivalent. z/OS XL C/C++ does not support the allocation of a large format sequential data set using fopen() or freopen().
As of z/OS V1R7, z/OS XL C/C++ supports processing of large format sequential data sets opened for read (r, rb), and concatenated large format sequential data sets opened for read (r, rb) or read/update (r+, rb+), provided that the data sets have no more than 65535 tracks of data on each volume.
As of z/OS V1R8, z/OS XL C/C++ provides complete read and write support for large format sequential data sets when noseek is requested and honored. See "Access method selection" in topic 184.108.40.206 for more information on when noseek is requested but not honored.
Within the same C process, attempting to open a large format sequential data set for read with repositioning (not specifying the noseek keyword), while the data set is already opened for write (or append) with noseek, is not supported. The fopen() or freopen() will fail. This failure occurs because the writer could extend the data set beyond 65535 tracks, but the reader is restricted to data sets no larger than 65535 tracks.
When a C standard stream is allocated to a large format sequential data set, the stream will be opened without repositioning (noseek). The C standard streams can also be redirected to large format sequential data sets. If this occurs, the stream will be reopened without repositioning (noseek). In both of these situations, the open (or reopen) is initially attempted with repositioning (seek), fails with an ABEND 213-14 or 213-16, and the stream is then opened (or reopened) without repositioning