Skip to main content

A font command is missing from the first line of the online print.

  • October 28, 2014
  • 0 replies
  • 0 views

The Issue:

We have the following block of code for our online print:

WS-GOTHIC-FONT-COMMAND 
        FILLER      X01         VALUE X'1B'                      
          FILLER      X04         VALUE '(10U'
          FILLER      X01         VALUE X'1B'                      
    FILLER      X19         VALUE '(s0p13.80h0s3b4102T'   

The font is being set correctly while viewing through the variables window during debug.  It appears to be set correctly within the spool file coming directly out of the CICS print queue.  .  However, when it is picked up by the LRS print exit, the font command in the first line is missing, or has been stripped out, causing the format of the print job to be incorrect.

The following commands are used to print the report:

CICS SPOOLOPEN OUTPUT
           ... TOKEN(WS-SPOOL-TOKEN) USERID(WS-SPOOL-DEST)
           ... NODE('*') CLASS('A') MCC PRINT NOHANDLE

CICS SPOOLWRITE
               ... FROM (WS-LSR-BILL-PRINT-LINES-OFFICE)
               ... TOKEN (WS-SPOOL-TOKEN)
               ... NOHANDLE

X’1B’ is in the first column of the print line and the file is coming into VPSX via an online APS program exit.


How can the format of the report be corrected?


The Resolution:

This issue refers to using Machine Control Characters, specifically when using the EXEC CICS SPOOLOPEN facility and how this will interoperate with the batch print exit.

It transpires that the first byte of the print line that should contain the carriage control byte is a X'1B'. This is the  printer PCL escape character. It tells the printer that the data that follows is PCL. Unfortunately, X'1B' is also the MCC (machine carriage control) for 'space three lines immediate'. The batch print exit code detects the X'1B' and then performs the operation associated with the line (space three lines immediate). It's an immediate command and therefore any data on the line is ignored because it simply shouldn't be there for an immediate command.

The simplest solution is to change the print line so that it contains:

 WS-GOTHIC-FONT-COMMAND
               FILLER      X01         VALUE X'09'
               FILLER      X01         VALUE X'1B'
               FILLER      X04         VALUE '(10U'
               FILLER      X01         VALUE X'1B'
               FILLER      X19         VALUE '(s0p13.80h0s3b4102T'

The X'09' is a Machine carriage control 'space one line after write'  that will cause  the remaining text on the line to be written. This should fix the problem.


#CICSMCCLRS
#MFDS
#EnterpriseDeveloper

0 replies

Be the first to reply!