IBM AS/400 Service


Technical Document



Document Number - 8060018
____________________________________________________________

Functional Area:

Print

Product:

Operating System/400 - OS/400 - PRINT/SPOOL (5716SS1SP)
Operating System/400 - OS/400 - PRINT/SPOOL (5763SS1SP)

Release:

ALL

Last Update:

10/06/97

____________________________________________________________

TITLE: ... Using SCS Transparency Controls to Pass Unprintable Characters to a Printer



Using SCS Transparency Controls to Pass Unprintable Characters to a Printer

Caution: The information contained in this document has not been submitted to any formal review and is distributed on an as is basis without any warranty either expressed or implied. The use of this information or the implementation of any of these techniques is a customer's responsibility and depends on the customer's operational environment. While each item may have been reviewed by IBM for accuracy in a specific situation, there is no guarantee that the same or similar results may be obtained elsewhere. Customers attempting to adapt these techniques to their own environment do so at their own risk.

If using COBOL programming:

The transparency data can be defined in the Data Section using the PIC structures. The hex value is represented in X"03xxxxx" (double quotes). The can be done at any level of data definition.

This is an example of how to code an RPG/400 program to send ASCII transparency using BIT ON/BIT OFF function. This program allows hex values to be input to a printer. Make sure that the print file is set up for RPLUNPRT(*NO).

Note: This example works only for internally described PRTFs. External PRTFs should be able to work if the field can accept hex control code values.

An alternative to Biton/Bitoff functions are to set up data structures with hex (X' ') values and move them into a data field.

Review an example RPG program in the
Redbook Printing II, Section 12.6.2 Coding Font Changes for the 4019. It is using transparency and RPG CVTHXX subroutine.

         ****************************************************************
         FQSYSPRT O   F      19            PRINTER
         F* A program to send a data stream to set a D/T4019 such that
         F* it will carry out 'BEST FIT' font without giving an
         F* operator 'Font Check' error.
         F*
         F* The data stream must be an ASCII data stream. The structure
         F* is defined in the Laser Printer Technical Reference
         F* (S5444226), P/N 1039154.
         F*
         F* As the AS400 is an EBCDIC system, we must precede the ASCII
         F* stream by a sequence which instructs the D/T3477 to send the
         F* following string un-converted: (X'03LL', where LL is the
         F* length of the following string, in binary).
         F* the RPLUNPRT parameter set to *NO.
         F*
         F* The full data stream will be:
         F* X'03 11 1B 5B 4B 0C 00 FE 31 01 80 A1 01 8A 04 04 04 04 04'
         E                    CHR        19  1               DATA STREAM
         C* Setup binary zeros variable.
         C                     BITOF'0123'    CHAR1   1
         C* Initialize array to binary zeroes.
         C                     MOVE CHAR1     CHR
         C* 1st 2 chars tell D/T3477 that this is an ASCII stream, to be
         C* sent to the printer un-converted.
         C* Note:  the bits are numbered 01234567 and read from left to
         C*        right.  So turning on bits 6 & 7 => 11 => X'03',
         C*        turning on 3 & 7 => 10001 => X'11', etc..
         C                     BITON'67'      CHR,1
         C                     BITON'37'      CHR,2
         C* ESC . K
         C                     BITON'3467'    CHR,3
         C                     BITON'13467'   CHR,4
         C                     BITON'1467'    CHR,5
         C* Length of following string.
         C                     BITON'45'      CHR,6
         C* MODEQ
         C                     BITON'0123456' CHR,8
         C* 49
         C                     BITON'237'     CHR,9
         C* DSM
         C                     BITON'7'       CHR,10
         C* DSOPT1
         C                     BITON'0'       CHR,11
         C* DSOPT2 - Default font source. Bit (LAST) sets D/T4019 to
         C*          ignore font errors.
         C*
         C                     BITON'027'     CHR,12
         C* DSOPT3 - Default font source.
         C                     BITON'7'       CHR,13
         C* DSOPT4 - Default paper source drawer 2 (BITS 3 and 4).
         C* Lower paper tray is tray 1 (BIT 6).
         C                     BITON'046'     CHR,14
         C* DSOPT5 - Default forms type for manual paper feed
         C*          (value 4 = A4).
         C                     BITON'5'       CHR,15
         C* DSOPT6 - Default forms tray 1 (value 4 = A4)
         C                     BITON'5'       CHR,16
         C* DSOPT7 - Default forms, tray 2 (value 4 = A4)
         C                     BITON'5'       CHR,17
         C* DSOPT8 - Default forms, auto env feed (value 4 =
         C*          DL - 4.33 * 8.66)
         C                     BITON'5'       CHR,18
         C* DSOPT9 - Default forms, man env feed (value 4 =
         C*          DL - 4.33 * 8.66)
         C                     BITON'5'       CHR,19
         C* Write to file, and end program
         C                     EXCPTCONDIT
         C                     SETON                    LR
         C            EOJ      TAG                            +++ EOJ
         OQSYSPRT E                CONDIT
         O                         CHR
         ****************************************************************




Document Info

Related APARs/PMRs:

Keywords:

____________________________________________________________
IBM disclaims all warranties, whether express or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. By furnishing this document, IBM grants no licenses to any related patents or copyrights. Copyright (c) 1994, 1995, 1996, 1997 IBM Corporation. Any trademarks and product or brand names referenced in this document are the property of their respective owners. Consult your product manuals for complete trademark information.