|
Using BMS facility |
|
|
The first method to print data under XCICS is to use BMS commands (SEND, SEND TEXT, SEND MAP, etc.) in a transaction started on a terminal defined as "printer" in the XCICS configuration file (xcics.conf). This transaction, once started, will issue BMS commands to write the print file, which is a standard UNIX flat file containing control characters as new-line, carriage-return an new-page. This file is temporary stored in the path defined in the configuration parameter spool_path. When transaction completes XCICS will provide to spool the generated file through the command specified in the configuration parameter print_command. The print_command is a user defined script/executable which takes care of forwarding the file to the printing subsystem or to do whatever the user needs. XCICS invokes the print_command providing the following arguments:
An example We suppose to have an XCICS printer terminal named PRT0 and a print_command named tplp. The xcics.conf will contain the following lines: define terminal name=PRT0, type=printer, device=PRINTER0; When the transaction started on PRT0 completes its work, XCICS will issue the command: $HOME/bin/tplp $HOME/tmp/PRT0_<PID>.dat PRT0 PRINTER0 The "tplp" script could be defined as follow (an example): #!/bin/ksh |