How To Route My Reports to a File instead of a Printer with CA XCOM Data Transport for Windows

Document ID : KB000028285
Last Modified Date : 14/02/2018
Show Technical Document Details


By default, reports sent to a CA-XCOM for Windows system are printed on the Destination printer specified in the send report request. You may change which printer the output goes to by editing a specialized post-processing script file in CA-XCOM for NT, named XCOMLP.BAT. Such scripts are used to handle processing after CA-XCOM for Windows receives a file. XCOMLP is specifically intended for controlling print spooling. XCOMLP.BAT is invoked for PSO transfers and send reports. But what if you want those reports routed to files so they could be printed in a separate operation at some other time?


Before making any changes to the system, you should be aware that changes you make to the XCOMLP.BAT file will affect the way all reports are handled on the CA XCOM for Windows system, regardless of from where they originate. It is also important to note that because the batch file does not supply a return code to XCOM, CA-XCOM considers a report transfer to be successful even if the script command to copy (or print for that matter) fails.


1) Edit the XCOM for Windows file named XCOMLP.BAT. The line that tells Windows Services to print the report is:
         print /d:%dest% %file%
2) Comment out the above line and insert a new line that reads:
        copy %file% c:\directory_name\%file%.rpt

This example copies the report being transferred to a file whose file name is based on the name of the temporary file into which XCOM placed the report.

You might also review the XCOMLP.BAT script itself to see other parameters might be employed in the copy statement in place of %file% in order to derive a better file name. Perhaps
        copy %file% c:\directory_name\%jobnumber%.rpt basing the file name on the job number field from JES          or
        copy %file% c:\directory_name\%title%.rpt basing the file name on the report title is more appropriate for your site.

Additional Information:

Please see the CA XCOM™ Data Transport® for Windows Server/Professional Administration Guide r11.6  Modifying the Printing Script.