Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Creating the XML description

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

  1. Log on to the BS2000 system under the user ID where the files COB2XML.LIB and EMPLOYEE.CBL are located.

  2. 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

  3. Start the D.XMLPROG procedures from the COB2XML.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 file employee.cbl. The XML description is stored in the file employee.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.