/asmdio

Dataset I/O in assembler

Primary LanguageCApache License 2.0Apache-2.0

asmdio

Dataset I/O in assembler

This repository provides core I/O services in C, for use in both 31-bit and 64-bit code. The services provide the full set of capabilities that an assembler programmer would have at their disposal. As such, the interfaces tend to have complex structures defining the interface.

The intent of these services are to enable C programmers to use the full capability of the z/OS core I/O services without having to write assembler code, and that these services are available in both 31-bit and 64-bit mode.

For applications that need to perform common I/O operations, the Language Environment C services may be a better option.

References

DSECT Layouts

I/O SVCs

  • SVC 99: Dynamic Allocation of DCB
  • SVC 19: Open a DCB
  • SVC 21: STOW (update directory entry for member)
  • SVC 20: Close a DCB.

I/O Macros

Key Points

CCSID for PDSE Members

  • The DESERV GET service returns the System Managed Directory Entry (SMDE) for the member requested
  • The SMDE includes a section called the SMDE Extended Attributes
  • The Extended Attributes has a 2 byte CCSID in it (among other things)
  • The STOW service lets you modify member entries, which lets you SET the CCSID (see the IFF function)

Terminology

  • PDSE: Partitioned Data set Extended.
  • TTR: Token that simulates the track and record location. Similar to a file offset off_t.