The C program interface provides the same functionality as the Assembler interface. For each macro there is a corresponding header files (imokit.h, imokia.h and imokis.h) in the library SYSLIB.IMON-SIC.<version>. The corresponding header file is used when a macro function is called via the C program interface.
Each header file contains:
the declarations of the C functions required for IMON-SIC
the declarations of the parameter list and the return information for the C functions
internal types and definitions of constants.
Unlike the Assembler interface, the C interface requires the user to fill the parameter list before calling the corresponding functions.
If an optional operand is omitted, fill the corresponding field in the parameter list with blanks or null bytes.
The basic C function call is described in the following. The C functions, divided according to the corresponding macro calls, are described after that with their call parameters and parameter lists.
C function calls
The C functions are called according to the following schema:
#define <macro>PLVERSION —————————————————————————————————————————— (1) #define <macro_fct> —————————————————————————————————————————— (2) void SIIENTR(struct <macro>_pl *); ————————————————————————————————— (3)
(1) | Set the symbolic constant for the version of the parameter list. |
(2) | Set the symbolic constant for the macro function to be called in the parameter list. |
(3) | Function call with the corresponding parameter list. Additional input parameters may need to be supplied with data using the parameter list before the function is called. These parameters are listed in the description of the function. |
Meaning
<macro> designates the corresponding macro call that provides the function. Possible values are imokit, imokia and imokis.
<macro>_pl designates the parameter list defined in the header file for this macro call (e.g. IMOKIT_pl for functions of the IMOKIT macro).
<macro_fct> designates one of the following macro functions:
<macro_fct> | Function of the macro | Meaning |
IMOKIT_OPEN | SIIOPEN | Open SYSSII file |
IMOKIT_READ | SIIREAD | Read information from the SYSSII file |
IMOKIT_CLOSE | SIICLOSE | Close SYSSII file |
IMOKIA_RCOM | SIIRCOM | Read comments on release unit or release item from the SYSSII file |
IMOKIA_RDEP | SIIRDEP | Read old dependencies of the release unit from the SYSSII file |
IMOKIA_RKON | SIIRKON | Read new dependencies of the release unit from the SYSSII file |
IMOKIA_RPAR | SIIRPAR | Read parameter text of a release item from the SYSSII file |
IMOKIS_SHOW | SIISHOW | Display contents of SYSSII file |
The function call uses the following standard header:
struct std_hdr_t { short unit ; char function; char version; char subcode2; char subcode1; short maincode; };
Notes
Internal data fields (e.g. the file descriptor sii_fd) are prepared for additional function calls and may not be deleted or overwritten.
When strings are explicitly specified in the parameter list (e.g. a SYSSII file name), then at least one space character (X’40’) or X’00’ must be added at the end of the valid string as the last character of the string.
X’00’ is the preset value for the last character of the string when outputting strings in the parameter list (e.g. unit name) for the IMOKIT and IMOKIA macro functions SIIOPEN, SIIREAD, SIIRCOM, SIIRDEP, IMOKIA_RKON and SIIRPAR. The last character of the string can be explicitly set to the space character (X’40’) in the corresponding parameter lists (IMOKIT_pl or IMOKIA_pl) in the “delimiter” variable.