GETC returns data which is mapped to a new CUI buffer format (Version 6). The COMPILEUNITLIST parameter determines which data is returned.
The syntax of the GETC call is:
[symbol] | IEWBIND | FUNC=GETC ,VERSION=version |
Count DC F'5' List with 5 entries
List DS 5F Returned by GETN
When INTENT=ACCESS is specified in the CREATEW API call, information about the input module (the target module of the GETC call) is placed in the header record. This information includes the program object version and the source of the input module (data set name or path name, ddname, and member name).
When no compile unit list is provided, the cursor is an index into an ordered list of all CUI entries that can be returned. If the application does not modify the cursor during the retrieval process, multiple calls return all CUI records in the order by CU number because the buffer is full. When a compile unit list is provided, the cursor is an index into that application-provided list. CUI records are returned in the order specified in the CU list. If the application still does not modify the cursor during the retrieval process, multiple calls continue with subsequent entries in the list because the buffer is full. End of data is signalled when the end of the application-provided list is reached.
The CURSOR value identifies an offset into the requested data beginning with 0. It is both an input and output parameter. On input to the service, the cursor specifies the first byte to return. On exit from the service, it is updated to the next byte for continued sequential retrieval if not all data has yet been retrieved.
For load modules and program object formats at a compatability level prior to z/OS® V1R5 , a compile unit is the same as a section. For z/OS V1R5 compatible modules, a compile unit corresponds to a single object module. Each compile unit in a workmod is assigned a unique number; however, this assigned number may change when a module is rebound. Furthermore, the compile unit number will be zero for all binder generated sections (IEWBLIT or section 1, for example).
The common binder API reason codes are shown in Table 1.
Return Code | Reason Code | Explanation |
---|---|---|
00 | 00000000 | Normal completion. There might be additional data that did not fit in the buffer. |
04 | 83000800 | End of data. Some data might have been returned in the buffer, but no more is available. |
04 | 83000801 | No section names exist. No data was returned. |
04 | 83000810 | Cursor is negative or beyond the end of the specified item. No data was returned. |
08 | 83002342 | Some of the passed compile unit numbers do not exist in workmod. Data for the valid compile units is returned. |
12 | 83000102 | Workmod was in an unbound state. |
If your program does not use the IEWBIND macro, place the address of the GETC parameter list in general purpose register 1.
PARMLIST | DS | 0F | |
DC | A(GETC) | Function code | |
DC | A(RETCODE) | Return code | |
DC | A(RSNCODE) | Reason code | |
DC | A(WORKMOD) | Workmod token | |
DC | A(CULIST) | Compile unit list | |
DC | A(BUFFER) | Data buffer | |
DC | A(CURSOR) | Starting position | |
DC | A(COUNT+X'80000000') | Data count | |
GETC | DC | H'64' | GETC function code |
DC | H'6' | Interface version number | |