XINFO

The XINFO option specifies that the compiler should generate additional files with extra information about the current compilation unit.

Read syntax diagramSkip visual syntax diagramXINFO( ,NODEFDEFNOMSGMSGNOSYMSYMNOSYNSYNNOXMLXML(NOHASHHASH) )
DEF
A definition side-deck file is created. This file lists the following information for the compilation unit:
  • All defined EXTERNAL procedures
  • All defined EXTERNAL variables
  • All statically referenced EXTERNAL routines and variables
  • All dynamically called fetched modules

Under batch, this file is written to the file specified by the SYSDEFSD DD statement. Under z/OS® UNIX System Services, this file is written to the same directory as the object deck and has the extension def.

For instance, given the program:
     defs: proc;
        dcl (b,c) ext entry;
        dcl x ext fixed bin(31) init(1729);
        dcl y ext fixed bin(31) reserved;
        call b(y);
        fetch c;
        call c;
     end;
The following def file would be produced:
   EXPORTS CODE
     DEFS
   EXPORTS DATA
     X
   IMPORTS
     B
     Y
   FETCH
     C

The def file can be used to be build a dependency graph or cross-reference analysis of your application.

Note: The EXPORTALL option should be in effect for the XINFO(DEF) option to produce the above information.
NODEF
No definition side-deck file is created.
MSG
Message information is generated to the ADATA file.

Under batch, the ADATA file is generated to the file specified by the SYSADATA DD statement. Under z/OS UNIX, the ADATA is generated in the same directory as the object file and has the extension adt.

NOMSG
No message information is generated to the ADATA file. If neither MSG nor SYM is specified, no ADATA file is generated.
SYM
Symbol information is generated to the ADATA file.

Under batch, the ADATA file is generated to the file specified by the SYSADATA DD statement. Under z/OS UNIX, the ADATA file is generated in the same directory as the object file and has the extension adt.

NOSYM
No symbol information is generated to the ADATA file.
SYN
Syntax information is generated to the ADATA file. Specifying the XINFO(SYN) option can greatly increase the amount of storage, both in memory and for the file produced, required by the compiler.

Under batch, the ADATA file is generated to the file specified by the SYSADATA DD statement. Under z/OS UNIX, the ADATA file is generated in the same directory as the object file and has the extension adt.

NOSYN
No syntax information is generated to the ADATA file.
XML( HASH | NOHASH )
An XML side-file is created. This XML file includes the following:
  • The file reference table for the compilation
  • The block structure of the program compiled
  • The messages produced during the compilation

Under batch, this file is written to the file specified by the SYSXMLSD DD statement. Under z/OS UNIX System Services, this file is written to the same directory as the object deck and has the extension xml.

The DTD file for the XML produced is as follows:
 <?xml encoding="UTF-8"?>

 <!ELEMENT PACKAGE ((PROCEDURE)*,(MESSAGE)*,FILEREFERNCETABLE)>
 <!ELEMENT PROCEDURE (BLOCKFILE,BLOCKLINE,(PROCEDURE)*,(BEGINBLOCK)*)>
 <!ELEMENT BEGINBLOCK (BLOCKFILE,BLOCKLINE,(PROCEDURE)*,(BEGINBLOCK)*)>
 <!ELEMENT MESSAGE (MSGNUMBER,MSGLINE?,MSGFILE?,MSGTEXT)>
 <!ELEMENT FILE (FILENUMBER,INCLUDEDFROMFILE?,INCLUDEDONLINE?,FILENAME)>
 <!ELEMENT FILEREFERENCETABLE (FILECOUNT,FILE+)>

 <!ELEMENT BLOCKFILE (#PCDATA)>
 <!ELEMENT BLOCKLINE (#PCDATA)>
 <!ELEMENT MSGNUMBER (#PCDATA)>
 <!ELEMENT MSGLINE (#PCDATA)>
 <!ELEMENT MSGFILE (#PCDATA)>
 <!ELEMENT MSGTEXT (#PCDATA)>
 <!ELEMENT FILECOUNT (#PCDATA)>
 <!ELEMENT FILENUMBER (#PCDATA)>
 <!ELEMENT FILENAME (#PCDATA)>
 <!ELEMENT INCLUDEFROMFILE (#PCDATA)>
 <!ELEMENT INCLUDEDONLINE (#PCDATA)>

The HASH suboption of the XINFO(XML) option specifies that for each FILENAME line, the generated XML file is followed by a line containing the hex value of a 256-bit SHA-2 hash of that file enclosed in the <CONTENTHASH> and </CONTENTHASH> tags.

The compiler will perform this hash by invoking the SHA2INIT256 built-in function when it opens a file. It will then use the token returned by that function to invoke the SHA2UPDATE256 built-in function after it reads each line in the file and to invoke the SHA2FINAL256 built-in function after it closes the file.

When hashing the file, the compiler will widen any line shorter than the right margin by filling it with blanks.

This hash value is the same value that will appear in the listing if the FILEREF(HASH) option is specified.

NOXML
No XML side-file is created.