The XML description employee.xml
can be generated in the BS2000 system with Cobol2XML on the basis of the COBOL program employee.cbl
. The file employee.xml
must then be transferred to the Unix, Linux or Windows system.
Detailed information on Cobol2XML is provided in Creating an XML description for a COBOL program in a BS2000 system .
Transferring the LMS library COB2XML.LIB to a BS2000 system
Send the file COB2XML.LIB
to the BS2000 system (see Transferring the LMS library to a BS2000 system ).
Converting the data structures from the COBOL program to XML
Log on to the BS2000 system under the user ID where the files
COB2XML.LIB
andEMPLOYEE.CBL
are located.Assign the link name
COBLIB<n>
(<n>
= 1, .., 9) to the COPY libraries required for converting the source:/ADD-FILE-LINK COBLIB1, $TSOS.SYSLIB.UTM.<version>.COB
Start the
D.XMLPROG
procedures from theCOB2XML.LIB
library:CALL-PROC FROM-FILE=*LIBRARY-ELEMENT(LIBRARY=COB2XML.LIB,ELEM =D.XMLPROG) ,PROCEDURE-PARAMETERS=( SRC=FILE,TSTNAM=employee.cbl, XMLOUT=employee.xml)
The
D.XMLPROG
procedure generates the XML description of the data structures used in the COBOL program in the fileemployee.cbl
. The XML description is stored in the fileemployee.xml
.
Transferring the XML descriptions to the Unix, Linux or Windows system
Transfer the XML description employee.xml
in text format to the Unix, Linux or Windows system, for example to the samples
subdirectory of Cobol2Java, for further processing.