Programming Language Binding Files

For each supported programming language (C, assembler, and REXX), CMS provides a set of programming language binding files that declare external functions, constants, and return and reason codes. These are included in the C program source through the #include statement, in the assembler language source by a macro invocation, or in a REXX exec by a call to the APILOAD function. (For information about APILOAD, see the z/VM: REXX/VM Reference.)

The following header files are provided for C programs:
Table 1. Header Files for C Programs
Header File Contents
VMCPRO Process Management
VMCIPC Interprocess Communication
VMCSYN Synchronization
VMCEVN Event Services
VMCCPU Processor Configuration
VMCTRC Trace Services
VMCACT Accounting Services
VMCTMR Timer Services
VMCABN Abend Services
VMCMON CMS Monitor Data
VMCMTR Return and Reason Codes
VMCMT Includes all of the above header files
The following macros are provided for assembler programs:
Table 2. Macros for Assembler Programs
Macro Contents
VMASMPRO Process Management
VMASMIPC Interprocess Communication
VMASMSYN Synchronization
VMASMEVN Event Services
VMASMCPU Processor Configuration
VMASMTRC Trace Services
VMASMACT Accounting Services
VMASMTMR Timer Services
VMASMABN Abend Services
VMASMMON CMS Monitor Data
VMASMMTR Return and Reason Codes
VMASMMT Includes all of the above macros
The following COPY files are provided for REXX programs:
Table 3. COPY Files for REXX Programs
COPY File Contents
VMREXPRO Process Management
VMREXIPC Interprocess Communication
VMREXSYN Synchronization
VMREXEVN Event Services
VMREXCPU Processor Configuration
VMREXTRC Trace Services
VMREXACT Accounting Services
VMREXTMR Timer Services
VMREXABN Abend Services
VMREXMON CMS Monitor Data
VMREXMTR Return and Reason Codes
VMREXMT Includes all of the above COPY files

The program source must include at least one of the language binding files for multitasking services to be usable from the application. You must ensure that all the function definitions used are included in the program. A safe approach is to include VMCMT, VMASMMT, or VMREXMT, which defines all the functions at once. If you include function definitions selectively, you must also explicitly include the return and reason code definitions (VMCMTR, VMASMMTR, or VMREXMTR).