Here is the code snippet that we use in our legacy application. Returns no result in JVM-Cobol. The function returns with status 181.
77 Prog-Info-Funktion pic x(4) comp-5.
01 Prog-Info-Param-block.
03 Prog-Info-size pic x(4) comp-5 value 20.
03 Prog-Info-flags pic x(4) comp-5 value 1.
03 Prog-Info-hWind pointer.
03 Prog-Info-prog-handle pointer.
03 Prog-Info-attributes pic x(4) comp-5.
77 Prog-Info-name-buf pic x(100).
77 Prog-Info-name-len pic x(4) comp-5 value 100.
77 Prog-Info-status-code PIC X(2) COMP-5.
CALL-GET-PROGRAM-INFO SECTION.
move 0 to Prog-Info-Funktion
call "CBL_GET_PROGRAM_INFO" using by value Prog-Info-funktion
by reference Prog-Info-param-block
by reference Prog-Info-Name-buf
by reference Prog-Info-Name-len
returning Prog-Info-Status-Code
move 7 to Prog-Info-Funktion
call "CBL_GET_PROGRAM_INFO" using by value Prog-Info-funktion
by reference Prog-Info-param-block
by reference Prog-Info-Name-buf
by reference Prog-Info-Name-len
returning Prog-Info-Status-Code.