call "CBL_GET_PROGRAM_INFO" using by value function by reference param-block by reference return-buf by reference return-buf-len returning status-code
01 cblt-prog-info-params typedef. 03 cblte-gpi-size cblt-x4-comp5. *> pic x(4) comp-5. 03 cblte-gpi-flags cblt-x4-comp5. *> pic x(4) comp-5.2. 03 cblte-gpi-handle cblt-pointer. *> usage pointer. 03 cblte-gpi-prog-id cblt-pointer. *> usage pointer. 03 cblte-gpi-attrs cblt-x4-comp5. *> pic x(4) comp-5.
0 | Return status information for the current program. If you want to retrieve further information on this program, then bit 0 of the
cblte-gpi-flags parameter must be set to indicate that this function should return
cblte-gpi-handle, which will be used as an input to
function 2 through 8. The initial program associated with
cblte-gpi-handle is the current program.
When other functions that use cblte-gpi-handle have completed, you must use CBL_GET_PROGRAM_INFO again, with function set to 3, to deallocate the handle. |
1 | Return status information for named program. If you want to retrieve further information on this program, then bit 0 of the
cblte-gpi-flags parameter must be set to indicate that this function should return
cblte-gpi-handle, which will be used as an input to
function 2 through 8. The initial program associated with
cblte-gpi-handle is the named program.
When other functions that use cblte-gpi-handle have completed, you must use CBL_GET_PROGRAM_INFO again, with function set to 3, to deallocate the handle. |
2 | Return status information for the program that called the program currently associated with
cblte-gpi-handle. This function requires that
cblte-gpi-handle has been set up using functions 0 or 1. The program associated with
cblte-gpi-handle is updated to the calling program.
When other functions that use cblte-gpi-handle have completed, you must use CBL_GET_PROGRAM_INFO again, with function set to 3, to deallocate the handle. |
3 | Close a previously created cblte-gpi-handle. This function requires a valid cblte-gpi-handle to have been created using function 0 or 1. A call with this function must be made when cblte-gpi-handle is finished with. |
4 | Find the first entry point of the program currently associated with cblte-gpi-handle. cblte-gpi-handle must have been set up using function 0 or 1. Once a call with this function has been made, you can repeatedly use this routine with function set to 5 to retrieve all remaining entry points in the program. Once all of the required entry points have been returned, you can use this routine with function set to 6 to terminate the entry-point search. |
5 | Find the next entry point of the program currently associated with cblte-gpi-handle. This function requires a valid cblte-gpi-handle to have been set up using function 0 or 1, and for function 4 to have been used to initiate the find first/next entry-point sequence. |
6 | Terminate the entry-point search. It requires a valid cblte-gpi-handle to have been set up using function 0 or 1, and for function 4 to have been called to initiate the find first/next entry-point sequence. |
7 | Return the full program-name of the program currently associated with cblte-gpi-handle. This function requires a valid cblte-gpi-handle to have been set up using function 0 or 1. |
8 | Return the number of arguments the program currently associated with cblte-gpi-handle was called with. This information can only be returned if the program is on the current call stack. |
0 | The basename of the program for which information is required. |
8 | A group predefined as
01 RETURN-BUF. 05 cblte-gpiai-size pic x(4) comp-5 value zeroes. 05 cblte-gpiai-argc pic x(4) comp-5 value zeroes. 05 cblte-gpiai-reserved1 pointer value null. 05 cblte-gpiai-reserved2 pointer value null. cblte-gpiai-size must be set to either 16 on 32-bit systems or 24 on 64-bit systems. |
0, 2 | The basename that was requested. |
4, 5 | The entry point name that was requested. |
7 | The full program name that was requested. |
8 | The call parameter information that was requested, where
cblte-gpiai-argc contains the number of arguments the program was called with.
cblte-gpiai-reserved1 and cblte-gpiai-reserved2 remain set to NULL. |
0 | Success. |
500 | End of information (returned by function 2 when there is no caller of the currently associated program, or by function 5 when no more entry points exist). |
1000 | Memory allocation error. |
1001 | Invalid cblte-gpi-handle input. |
1006 | Invalid operation on handle (returned by function 8 if the program associated with cblte-gpi-handle is not on the call stack). |
1009 | Invalid parameter. |
1011 | Program or entry name not found. |
1013 | Buffer too small for information to be returned. |