LOAD EP=IGZXAPI
..
LA R1,[parm area] see note below
BALR R14,R15
..
void IGZXAPI
To query file information of a running COBOL program (language member identifier 4).
--------------------------------------------------------------------------------
* 1 2 3 4 5 6 7
*
* 345678901234567890123456789012345678901234567890123456789012345678901
*
XINFO DSECT
XFNCODE DS F Input: Function code, =1 for file information
XFILLER0 DS A reserved
XSIG DS F X'C0B00501'
XVER DS H Version of this information structure block
XLEN DS H Input: Length of this data structure, 120
XDSA DS A Input: DSA of COBOL program to be querired
*
XNFILES DS H Total number of files
*
* BNREST is input field during the first call, set it to zero;
* on return, contains the remaing number of files to go
*
XNREST DS H Input in first call, set to zero
*
XDCB DS A Address of DCB or ACB
XDDNAME DS A Address of DDNAME (8 characters)
XFNAME DS A Address of file name (30 characters)
*
XCFLAG1 DS X Compile time information flags
XSOPTNL EQU X'80' SELECT OPTIONAL
XRCDSPN EQU X'40' Record format spanned
XBLKED EQU X'20' Record format blocked
XLINAGE EQU X'10' Linage is specified
XLINFOOT EQU X'08' Linage FOOTING is specified
XLINTOP EQU X'04' Linage TOP is specified
XLINBOT EQU X'02' Linage BOTTOM is specified
XBUFUSE EQU X'01' Buffer usage indicator
*
XCFLAG2 DS X Compile time information flags
XEXTFILE DS X'80' External file
FILLER2 DS X Reserved
FILLER3 DS X Reserved
*
XORG1 DS X File Type
XVSAM EQU X'01' VSAM
XLSEQ EQU X'02' Line Sequential
XQSAM EQU X'03' QSAM
*
XORG2 DS X File Organization
XORGSEQ EQU X'01' Sequential
XORGIND EQU X'02' Indexed
XORGREL EQU X'03' Relative
*
XACCESS DS X File Access Mode
XACCSEQ EQU X'01' Sequential
XACCRAN EQU X'02' Random
XACCDYN EQU X'03' Dynamic
*
XRECFM DS X Record Format
XRECFIX EQU X'01' Fixed
XRECVAR EQU X'02' Variable
XRECUND EQU X'03' Undefined
*
XRFLAG1 DS X Run time information flags 1
XOPOPT EQU X'80' OPEN, missing optional file
XOPREV EQU X'40' OPEN REVERSED (valid when XOPENED)
XOPNOREW EQU X'20' OPEN, NO REWIND (valid when XOPENED)
XCLNOREW EQU X'10' CLOSE, NO REWIND (valid when XCLOSED)
XCLLOCK EQU X'08' CLOSE, LOCK (valid when XCLOSED)
XCLREMOV EQU X'04' CLOSE FOR REMOVAL (valid when XCLOSED)
XSOKACT EQU X'02' A successful action since OPEN
*
XRFLAG2 DS X Run time information flags 2
XPEND EQU X'20' OPEN or CLOSE pending
XSEOF EQU X'10' Previous READ hit end of file
XEOP EQU X'08' End of page
XMOPTNL EQU X'04' OPTIONAL FILE MISSING
XADVAFT EQU X'02' WRITE AFTER ADVANCING x LINES
XADVBEF EQU X'01' WRITE BEFORE ADVANCING x LINES
FILLER4 DS H Reserved
*
XFMODE DS X Current file mode
XOPENED EQU X'01' Opened
XCLOSED EQU X'02' Closed
XNEVERO EQU X'03' Never opened
*
XOMODE DS X Information about OPEN (valid when XOPENED)
XOPIN EQU X'01' OPEN INPUT
XOPOUT EQU X'02' OPEN OUTPUT
XOPIO EQU X'03' OPEN IO
XOPEXT EQU X'04' OPEN EXTENDED
*
XCMODE DS X Information about CLOSE (valid when XCLOSED)
XCLFILE EQU X'01' CLOSE
XCLUNIT EQU X'02' CLOSE REEL/UNIT
*
XLASTREQ DS X Last operation on file
XLASTRD EQU X'01' READ
XLASTWRT EQU X'02' WRITE
XLASTRWT EQU X'03' REWRITE
XLASTSTR EQU X'04' START
XLASTDLT EQU X'05' DELETE
XLASTOPN EQU X'06' OPEN
XLASTCLO EQU X'07' CLOSE
*
* Various LINAGE values
*
XLNLING DS F Linage
XLNFOOT DS F Linage footing
XLNTOP DS F Linage top
XLNBOT DS F Linage bottom
XLNCTR DS F Linage counter
*
* File Status
*
XFSTAT DS X File status, in 2 hex bytes
XVSMCOD DS X VSAM feedback code
XVSMRET DS X VSAM return code
XVSMFUNC DS X VSAM function code
*
XADVVAL DS F Write after/before advancing value
*
XRECLEN DS F Record length; max length for variable rec
XBLKLEN DS F Block size
XRECLAD DS A Address of address of record
XBUFAD DS A Address of buffer provided by DFSMS
*
XPNAME DS A Address of program name
XPNAMLEN DS H Program name length
FILLER5 DS H Reserved
*
FILLER6 DS 4F Reserved
*
* 1 2 3 4 5 6 7
*
* 345678901234567890123456789012345678901234567890123456789012345678901
*
--------------------------------------------------------------------------------
*
* 1 2 3 4 5 6 7
*
* 345678901234567890123456789012345678901234567890123456789012345678901
*
XINFO2 DSECT
XFNCODE2 DS F Input: Function code, =2 for RT information
FILLER10 DS A reserved
XSIG2 DS F X'C0B00501'
XVER2 DS H Version of this information structure block
XLEN2 DS H Input: Length of this data structure, 48
XDSA2 DS A Input: DSA of COBOL program to be querired
*
FILLER11 DS X Reserved
FILLER12 DS X Reserved
FILLER13 DS X Reserved
*
XRFLAG4 DS X Run Time Flags
XINSORT EQU X'02' Sort is active
XISMAIN EQU X'01' Program is main
*
XSDREC DS A Address of active sort record
XSDLEN DS F Sort record len
FILLER14 DS 4F Reserved
*
*
* 1 2 3 4 5 6 7
*
* 345678901234567890123456789012345678901234567890123456789012345678901
*
--------------------------------------------------------------------------------
*
* 1 2 3 4 5 6 7
*
* 345678901234567890123456789012345678901234567890123456789012345678901
*
XINFO3 DSECT
XFNCODE3 DS F Input: Function code, =3 for WSA address query
FILLER30 DS A reserved
XSIG3 DS F X'C0B00501'
XVER3 DS H Version of this information structure block
XLEN3 DS H Input: Length of this data structure, 40
*
XEP3 DS A Input: Entry point address of COBOL program
XWSA DS A Address of WSA
*
FILLER31 DS 4F Reserved
*
*
--------------------------------------------------------------------------------
*
* 1 2 3 4 5 6 7
*
* 345678901234567890123456789012345678901234567890123456789012345678901
*
XINFO4 DSECT
XFNCODE4 DS F Input: Function code, =4 for file status update
FILLER40 DS A reserved
XSIG4 DS F X'C0B00501'
XVER4 DS H Version of this information structure block
XLEN4 DS H Input: Length of this data structure, 76
*
XDSA4 DS A Input: DSA address of COBOL program
XFILENM DS CL30 File Name. COBOL FD name of the file.
FILLER42 DS CL2
XFSTATUS DS A Addr of buff containing new File Status data
XFSLEN DS F Length of XFSTATUS buffer
*
FILLER31 DS 4F Reserved
*
*
* 1 2 3 4 5 6 7
*
* 345678901234567890123456789012345678901234567890123456789012345678901
*
--------------------------------------------------------------------------------