IBM Support

Remove CR and LF From Print Driver to Print More Than 378 Characters

Question & Answer


Question

How do I print more than 378 characters on a line? I am printing a PDF417 bar code via printer control codes embedded in the spooled file and the data for the bar code requires more than 378 characters.

Cause

The maximum width of a spooled file is 378 characters. A Line Feed ( LF ) and/or Carriage Return ( CR ) is being sent at the end of the line. In this case, it is causing the bar code to be generated incorrectly. The requirement is that all of the data for the bar code must be on one line.

Answer

Remove the CR and LF control codes from the print driver being used for the printer device. In this particular case, QWPDEFAULT Workstation Customization Object (WSCST) is being used.


Reference document N1010129: Retrieving and Modifying the WSCST Source for QWPDEFAULT for information on modifying the QWPDEFAULT WSCST object. Remove the 0D and 0A for the CARRTN and LINEFEED tags. For example:
    :CARRTN
     DATA =''X.
   :LINEFEED
     DATA =''X.

If not running in a S36 environment (S36E), changing the FOLD parameter of the printer file to *YES may also work without having to modify a WSCST object.

In this specific situation, the spooled file contains all of the printer control codes to print the file. The printer control codes define what font to use, the characters per inch, lines per inch, bar code specifications, etc. In addition, it is also being generated via OPM RPG in a S36E, in which FOLD is not an option for printer OCL statements. The spooled file is being printed to a Sato printer using a PC5250 printer session.

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.1.0"}]

Document Information

Modified date:
18 December 2019

UID

nas8N1022456