Previous Topic: Sample DD StatementNext Topic: Sample Fragment


Calling CA XCOM Data Transport from a COBOL Program

Use the COBOL CALL verb to load and execute XCOMJOB in your address space. The XCOMJOB LOAD module may be statically linked into your COBOL program, if desired. However, care must be used to avoid loading mixed versions of other CA XCOM Data Transport modules at run time if more than one release is resident in your system. Before making the call to CA XCOM Data Transport, make sure that the files SYSIN01 and LCLDS01 have been allocated to the job step that executes your application program (unless the local file was defined with the LFILE parameter).

You do not have to load the parameters in SYSIN01 before the job starts. Instead, you can OPEN the file for output and write the parameters to it one 80-character output record at a time. This way, the application program determines the parameter values.

Code a working storage data item for the Batch Interface routine XCOMJOB. This should be an eight-character alphanumeric with a VALUE clause set to XCOMJOB. Call CA XCOM Data Transport dynamically.

Make your PICTURE clause large enough to accommodate the total length of your parameter data. Move the length of the XCOM-PARM-DATA field into the XCOM‑PARM-LEN.