Link to home
Start Free TrialLog in
Avatar of cbray
cbray

asked on

Information on ETRN and ATRN

Where is the best place to find information on ETRN and ATRN application in Exchange?
Avatar of cbray
cbray

ASKER

I have customers of my messaging service that are using Exchange and would the functionality of ETRN and ATRN?  I don't know enough about the two subjects to answer their questions.  Any help is appreciated.
Check out...>

http://support.microsoft.com/support/kb/articles/q184/1/85.asp
http://support.microsoft.com/support/kb/articles/q184/0/51.asp
http://support.microsoft.com/support/kb/articles/q175/4/94.asp

ETRN
====
An ESMTP command that alerts one ESMTP gateway or mail host to process e-mail waiting delivery to another SMTP mail handling system.

Hope this helps.
For ETRN

PSS ID Number: Q184051
Article last modified on 04-17-1998
 
5.0 5.5
 
WINDOWS
 

======================================================================
---------------------------------------------------------------------------
The information in this article applies to:
 
- Microsoft Exchange Server versions 5.0 and 5.5
---------------------------------------------------------------------------
 
SYMPTOMS
========
 
Normally, when a message sent from a client is undelivered after the
scheduled time (message time-out value), the Microsoft Exchange Internet
Mail Service expires the message on the Internet Mail Service outbound
queue and returns a non-delivery report (NDR) to the sender. However, when
this problem occurs, the queued message, which is waiting for the ETRN
command, remains in the outgoing queue and never expires after the
scheduled time. The sender never receives an NDR.
 
CAUSE
=====
 
Microsoft Exchange Server supports the use of an SMTP extension called
ETRN. An Exchange Server computer can be used as a host SMTP server and
will respond to ETRN commands from the remote host. After the remote host
submits the ETRN command to the Exchange Server computer, a new connection
is established from the Exchange Server computer to the remote host. The
Exchange Server computer keeps a message until it receives the ETRN command
from the remote host. If the queued message is waiting for the ETRN
command, the message never expires even after the scheduled time. Then the
sender never receives an NDR. The scheduled time is 48 hours for Normal
Message by default.
 
STATUS
======
 
Microsoft has confirmed this to be a problem in Microsoft Exchange Server,
versions 5.0 and 5.5.
A supported fix is now available, but has not been fully regression-tested
and  should be applied only to systems experiencing this specific problem.
Unless you are severely impacted by this specific problem, Microsoft
recommends that you wait for the next Service Pack that contains this fix.
Contact Microsoft Technical Support for more information.
 
Additional query words: ISP RFC1985 SBS dialup DNS
======================================================================
Keywords          : XFOR kbusage
Version           : 5.0 5.5
Platform          : WINDOWS
Issue type        : kbbug
Solution Type     : kbfix
=============================================================================
Copyright Microsoft Corporation 1998.


 
For ATRN

White Paper
SNA Server version 4.0
By Chris Houser, Support Engineer for SNA Server, Premier Enterprise Support, Microsoft Corporation.
and
Darin Green, Supportability Program Manager for SNA Server, Critical Problem Resolution, Microsoft Corporation.
November 13, 1997
Introduction
With the release of version 3.0 of Microsoft SNA Server a new feature called SNA Print Service was added to provide host print emulation. The SNA Print Service provides print emulation for LU type 1, 3, and LU6.2 (APPC) devices, routing print data to any printer available to Microsoft Windows NT. The destination printer may be any printer that is supported by Windows NT, including:
·      Locally attached or remotely attached Windows NT printers.
·      Novell NetWare Printers (using the Microsoft NetWare Client for Windows NT)
·      TCP/IP attached printers (using the Windows NT LPR or LPD services)
 
The SNA Print Service is designed to handle emulation of hundreds of print sessions in any combination of LU1, LU3, and LU6.2 session types. Each of these printer sessions is associated with a Windows NT printer.
The information in this document is based on SNA Server version 4.0. The notation ‘0x’ proceeding a number indicates this is a hexadecimal value.
Overview of Data Streams
SNA Print service provides print emulation for three LU types: LU3, LU1, and LU6.2 (APPC). The LU type defines the characteristic of the Host data stream. LU3 and LU1 printing use a 3270 data stream over a session to a Mainframe. APPC printing uses a LU6.2 data stream over a session to an IBM AS/400. The following sections provide an overview of these three LU types.
LU3
LU3 printing is the simplest of the three types of host printing. These print jobs contain only printable characters and simple formatting orders (new line, form feed, carriage return, etc.). This form of printing is similar to printing a text only file from a PC. The output can specify carriage returns or form feeds, but has no control over the formatting of the print job. It is preferable to use LU1 print if more extensive formatting is required. The data stream closely resembles that for 3270-display emulation. It consists of a write command code and a write control character (WCC) followed by orders and data.
Command Code
The write command codes are not unique values, but are identified by their occupying the first byte in the Request Unit (RU). In addition there can be only one command code per RU. Read command codes, which would be normal for display sessions, are not valid for LU3 printing and will be rejected with a sense code of ‘1003’. For LU3 printing the most commonly used command code is Erase/Write ‘0xF5’.
Write Control Character (WCC)
Following the write command code is the write control character (WCC). This byte is also identified by its position, second byte in the RU. With LU3 printing bits 2 and 3 of the WCC define the printout format.
Bit      Explanation
0,1      Ignored by the printer
2,3      Defines printout format
      00 NL or CR orders define the print line length, EM indicates the end of the message
      01 Indicates 40-character lines
      10 Indicates 64-character lines
      11 Indicates 80-character lines
4          Start-printer bit.
5          Sound-alarm bit
6          Keyboard reset
7          Reset MDT bit
Format Control Orders
There are four control codes used only for printing known as Format Control Codes.
Abbr.     Order                    EBCDIC
NL          New Line               ‘0x15’
EM         End of Medium      ‘0x19’
FF          Form Feed            ‘0x0C’
CR         Carriage Return      ‘0x0D’
NL, CR, and EM are valid only when the write operation does not specify a line length format in the WCC byte. FF is valid in any write operation.
3270 Orders
The 3270 data stream can contain Orders that provide additional control functions. These orders are also valid for LU3 printing. The two most commonly used in LU3 printing are “Set Buffer Address” and “Repeat to Address”. Note that the buffer address used in these commands is relative to each write. The print buffer in LU3 allows a maximum of 4K of data, and often only 2K. This may require multiple write commands to be sent for a full page of text. The first write command will start at the top of the page. Its first buffer address will also be at the top of the page. Subsequent writes will continue where the first left off. Their first buffer address will also start where the previous write ended, unless it was ended with a form feed. For the examples below it is assumed that these are the first write commands.
Set Buffer Address (SBA) is indicated by a ‘0x11’ followed by a two byte buffer address. This order sets the cursor position to the location specified in the two byte buffer address. In LU3 printing this sets the print position. The data following the SBA will be printed starting from this location.
Example: 114040     This will set the print position to row 1 and column 1.
Repeat to Address (RA) is indicated by a ‘0x3C’ followed by a two byte stop buffer position and the character to be repeated. This order causes a character to be repeated from the current buffer address up to but not including the stop buffer address specified in the RA.
Example: 3C40D3C1     This will repeat the character ‘A’ (‘0xC1’) to row 1 and column 20.
Data
For LU3 printing the data or printable characters must have values between ‘0x40’ and ‘0xFE’. A table of the EBCDIC character set can be found in the appendix. The only valid values outside this range are the 3270 Orders. Any other values will be rejected as invalid data.
Example: 15C1C2C3     This will print a new line followed by ‘ABC’
Example: 1BC1C2C3     This will be rejected because ‘0x1B’ is an invalid value
Sample Print Data
Data from Host
 
F5C81140 40151515 C1C2C3C4 15404040
E6E7E8E9 19
 
Interpretation of data
F5 – Command code Write/Erase
C8 – WCC with bits 2,3 specifying that NL, EM and CR orders determine the print line length.
114040 – SBA sets print position to row 1 column 1
15 – New line
15 – New line
15 – New line
C1C2C3C4 – EBCDIC hex values for ABCD
15 – New line
404040 – EBCDIC hex values for three spaces
E6E7E8E9 – EBCDIC hex values for WXYZ
19 – End Medium
Print out
LU1
LU1 printing allows the Host to specify formatting for the print job. This is accomplished through the use of SNA Character String (SCS) control codes. The SCS codes encompass the 3270 format orders (FF, CR, and NL), as well as providing additional control codes for format of the print output. Through the SCS codes the Host application can set the margins, characters per line, lines per inch, etc. In addition to the format of the print job, SCS code allows the Host application to send a transparent section. By using an SCS code the Host can mark a section of data as transparent. This will cause the print emulator (the SNA Print Service in this case) to not scan this section for SCS control codes but to pass it to the print output untouched. Transparent sections are most commonly used to embed printer control codes, such as HP’s PCL, in the print job. Unlike LU3 printing there is no write command code or WCC. The first byte of the RU is either an SCS code or data.
Data Stream Flags
The BIND sent by the Host for a LU1 session indicates what SCS control codes are valid for this session. These Data Stream Flags are set in byte 18 of the BIND.
 
Bit      Description

0      0     Base support (NL & FF only)     1            Full Base includes Base plus the following:             BS (back space)             CR (carriage return)             LF (line feed)             ENP (enable presentation)             INP (inhibit presentation)             HT (horizontal tab)             VT (vertical tab)
1           Set Horizontal Format (SHF)     0            not supported     1            supported
2           Set Vertical Format (SVF)     0            not supported     1            supported
3           Vertical Channel Select (VCS)     0            not supported     1            supported
2                   Set Line Density (SLD)     3            not supported     4            supported
5                   Reserved
6                   Bell (BEL)     7            not supported     8            supported
9                   Transparent (TRN) & Interchange Record Separator (IRS)     10           not supported     11           supported

SCS codes
The SCS control codes are fully documented in the IBM Host Print Guide (document number SC31-7145). All of the SCS control codes fall within the range of ‘0x00’ – ‘0x3F’. These codes range from single byte codes, such as Subscript ‘0x38’ to multiple byte codes followed by several parameters, such as Set Horizontal Format ‘0x2BC1. . .’.
The following are some of the more common SCS control codes used.
Note   [L] = length  (Abv) = represents one byte parameters in the SCS control code
Set Horizontal Format (SHF) – ‘0x2BC1[L](MPP)(LM)(RM)(T1)(. . .)(Tn)’
      Parameters:       [L] – Length of the parameters, including the length byte
                                        MPP – Maximum Presentation Position - defines the characters per line
                  LM – Left Margin – column value for the left most print position
                  RM – Right Margin – column value for the right most print position
                  T1 – Horizontal Tab stop – column value for a tab stop
                  Tn – Additional Tab stops, can be added in any order.
      Example: 2BC1068401840542
            2BC1 – SHF
            06 – length of the parameters is 6 bytes including the length byte
            84 – MPP is set to 132 characters per line
            01 – LM is set to column 1
            84 – RM is set to column 132
            05 – T1 is set to column 5
            42 – T2 is set to column 66
Set Vertical Format (SVF) – ‘0x2BC2[L](MPL)(TM)(BM)(T1)(. . .)(Tn)’
      Parameters:      [L] – Length of the parameters, including the length byte
                                        MPL – Maximum Presentation line – defines the lines per page
                  TM – Top margin – line number of top most print position
                  BM – Bottom Margin – line number of the bottom most print position
                  T1 – Vertical Tab stop – line number for a tab stop
                  Tn – Additional tab stops, can be added in any order
      Example: 2BC20642053D0A21
            2BC2 – SVF
            06 – length is 6 bytes
            42 – MPL is set to 66 lines per page
            05 – TM is set to line 5
            3D – BM is set to line 61
            0A – T1 is set to line 10
            21 – T2 is set to line 33
Set Line Density (SLD) – ‘0x2BC6[L](Point)’
      Parameters:      [L] – length, including length byte. Value of ‘0x01’ denotes default
                                             Point –  Distance to be moved vertically for a single line. The number is
                                                         indicated in typographic points (one point is equal to 1/72 inch).
                                                         Setting a value of ‘0x0C’ will result in 6 lines per inch, a value of
                                                         ‘0x09’ will result in 8 lines per inch. Value of ‘0x00’ denotes default
                                                         a value of 6 lines per inch.
      Example: 2BC6020C
            2BC6 – SLD
            02 – length is 2
            0C – 12 points or 6 lines per inch
Set Print Density (SPD) ‘0x2BD2[L]29(CharDensity)(Resv)’
      Parameter:       [L] - length, including length byte. Value of 0x02 denotes default cpi of 10
                                      CharDensity – value indicating the numbers of characters per inch (cpi)
                                Resv – Reserved (not used)
      Example: 2BD204290A00
            2BD2 – SPD
            04 – length is 4 bytes
            29 – type
            0A – 10 cpi
            00 – reserved
Transparent (TRN) – ‘0x35[L](P1)(. . .)(Pn)’
This SCS control code indicates a section of data that is not scanned for SCS codes, but passed to the print output untouched. The extent of the section of data is denoted by the length byte.
Example: 35051B28313055
      35 – TRN
      05 – length of transparent section, not including the length byte
      1B28313055 – transparent section, HP PCL code for PC-8 symbol set ‘Esc(10U’
Note   In this example the transparent section is in ASCII, this would require that the “Transparent is ASCII” box be selected in the SNA Server printer session properties.
Sample Print Data
Data from Host
 
35021B45 2BC10684 01840542 2BC20642
04420A21 C1C2C3C4 15404040 E6E7E8E9
 
Interpretation of data
35021B45 – Transparent section, send ‘Esc E’, a Reset in HP PCL, to printer
2BC1068401840542 – SHF, 132 characters per line, LM 1, RM 132
2BC2064204420A21 – SVF, 66 lines per page, TM 4, BM 66
C1C2C3C4 – EBCDIC hex values for ABCD
15 – New line
404040 – EBCDIC hex values for three spaces
E6E7E8E9 – EBCDIC hex values for WXYZ
Print out
APPC
APPC printing, like LU1 printing, uses SCS control codes in the data stream. With this method of printing the IBM AS/400 also allows an additional feature called Host Print Transform. When SCS control codes are used by the host to format the print output, a print emulator is responsible for rendering the SCS codes and characters into data the printer can understand. For example, using SNA Server’s print service to print to a HP LaserJet, the SCS codes and data from the host would be converted to HP PCL codes using the Windows NT printer driver and Windows NT Print system. With Host Print Transform (HPT) enabled the AS/400 takes responsibility for rendering the print job into data the printer can understand. Using our example above, but with HPT enabled, the AS/400 would convert the data to HP PCL codes before sending the data to the SNA Server. This output from the host requires no further processing once it leaves the AS/400. The print emulator’s only responsibility is submitting the data to the printer.
Host Print Transform (HPT)
HPT is a feature enabled on the AS/400 in the Device description for the print session. When HPT is enabled the AS/400 is responsible for rendering the data into printer control codes. This rendered data is sent to the SNA Server marked as an ASCII Transparent (ATRN) section, using the SCS control code ‘0x03’. The ATRN control code provides the same function as the Transparent (TRN) control code detailed above in the LU1 Section. In addition to indicating that the block of data should be dealt with as transparent, ATRN also indicates that the data is ASCII; therefore, it is not converted from EBCDIC to ASCII.
In SNA Server Manager, the options for HPT are:
Enable Host Print Transform - yes/no
Printer Type - Possible values for Printer Type are found using the CHGDEVPRT command on the AS/400. An example would be *HP560C. This option is only enabled if HPT is selected.
Msg Queue Name and Msg Lib Name - This is used to redirect Printer status errors to a queue other than QSYSOPR (the default error queue). These can be used regardless of whether Enable Host Print Transform is selected. To determine an alternative Msg Queue and Msg lib Name on the AS/400 use the WRKMSGQ command in an AS/400 command prompt.
SNA Print Service enables HPT on an AS/400 by using the Q field ('D8') in the PIP data within the FMH-5 attach message. This will enable device type 3812. The FMH-5 Attach is used by the SNA Print Service to start an APPC conversation.
The following is an FMH-5 Attach sent from the SNA Server to the AS/400 using the device name of TEST22, Font ID of 011, Printer Type: *HPIII, and enabling HPT (3812 device type):
 
DLC   ----------------------------------------------------------
DLC   01020501->05160001 DLC DATA
DLC                      DAF:01 OAF:01 ODAI:off Normal
DLC                      RQE FMD FI BC EC DR1 PI CD
DLC
DLC   ---- Header  at address 015648F8, 1 elements ----
DLC   0B050200 00012C00 01010001 01007B01     <......,.......{.>
DLC
DLC   ---- Element at address 01A5BC8C, start 10, end 205 ----
DLC   0B91203C 0502FF18 03D00040 0430F0F0     <.j.. . . . . .  >
DLC   F90F0402 E2D5C109 012328FC C297C068     <9...SNA..#(.Bp.h>
DLC   C7130AC1 D7D7D54B D3D6C3C1 D307CD0B     <G..APPNKLOCAL...>
DLC   040F3900 01000800 00000000 00000100     <..9.............>
DLC   8512F500 8112E200 7D12A001 02051001     <e.5.a.S.}.......>
DLC   00000023 E3C5E2E3 F2F24040 4040F3F8     <...#TEST22@@@@38>
DLC   F1F2F0F0 F0F10000 00000000 00000000     <120001..........>
DLC   00000000 0000004E D8F0F1F1 00000000     <.......NQ011....>
DLC   00000000 40404040 40404040 40404040     <....@@@@@@@@@@@@>
DLC   40404040 40404040 E2F20300 80005CC8     <@@@@@@@@S2....\H>
DLC   D7C9C9C9 40404040 40404040 40000000     <PIII@@@@@@@@@...>
DLC   40404040 40404040 40404040 40404040     <@@@@@@@@@@@@@@@@>
DLC   40404040                                <@@@@            >

 
SNA Print Service enables 5224 device type on an AS/400 by using the P field  ('D7') in the PIP data within the FMH-5 attach message.
The following is an FMH-5 Attach sent from the SNA Server to the AS/400 using the device name of TEST33. Even though Font ID and Printer Type are also specified in the Attach, they are not used for 5224 printing.
 
DLC   ----------------------------------------------------------
DLC   01020501->05160001 DLC DATA
DLC                      DAF:01 OAF:01 ODAI:off Normal
DLC                      RQE FMD FI BC EC DR1 BB CD
DLC
DLC   ---- Header  at address 015646BC, 1 elements ----
DLC   0B050200 E0002C00 01010002 01007901     <......,.......y.>
DLC
DLC   ---- Element at address 01A5B5B4, start 10, end 162 ----
DLC   0B90A039 0502FF18 03D00040 0430F0F0     <. . . . . . . . >
DLC   F90C0102 0901C3BC 27E6BAD3 1463130A     <9.....C.'W.L.c..>
DLC   C1D7D7D5 4BD3D6C3 C1D307CD 0B041023     <APPNKLOCAL.....#>
DLC   00010008 00000000 00000002 005D12F5     <.............].5>
DLC   005912E2 005512A0 01020510 01000000     <.Y.S.U..........>
DLC   23E3C5E2 E3F3F340 404040F5 F2F2F4F0     <#TEST33@@@@52240>
DLC   F0F0F100 00000000 00000000 00000000     <001.............>
DLC   00000000 26D70000 00000000 00000000     <....&P..........>
DLC   00404040 40404040 40404040 40404040     <.@@@@@@@@@@@@@@@>
DLC   40404040 40E2F203 00                    <@@@@@S2..       >

 
SCS Codes
ASCII Transparency (ATRN) – ‘0x03[L](P1)(. . .)(Pn)’
This SCS control code indicates a section of data that is not scanned for SCS codes, but passed to the print output untouched. In addition this control code indicates that the data is ASCII. The extent of the section of data is denoted by the length byte. With HPT jobs the length byte will commonly be ‘0xFF’.
Example: 030441424344
      03 – ATRN
      04 – length of 4
      41424344 – ASCII hex values for ABCD
SCS Control Code Formatted (Non-HPT)
If HPT is disabled in the Device description for the print session, SCS control codes will be used for the formatting of the print job. The SCS control codes, SHF, SVF, SLD, and SPD detailed above for LU1 printing are also supported in APPC printing. Also commonly used in APPC printing is the SCS control code Presentation Position (PP) ‘0x34’. This control code allows the print position to be moved either horizontally or vertically, relative to the previous position or to an absolute position.
The following are the four forms of the Presentation Position SCS control code.
Absolute Horizontal Presentation Position (AHPP) ‘0x34C0(nn)’
      Parameters: nn – column number the print position is set to.
      Example: 34C00F
            34C0 – AHPP
            0F – column number 15
Relative Horizontal Presentation Position (RHPP) ‘0x34C8(nn)’
      Parameters: nn – number of columns to move from the current print position.
      Example: 34C80F
            34C8 – RHPP
            0F – 15 columns
Absolute Vertical Presentation Position (AVPP) ‘0x34C4(nn)’
      Parameters: nn – line number the print position is set to.
      Example: 34C40F
            34C4 – AVPP
            0F – line number 15
Relative Vertical Presentation Position (RVPP) ‘0x344C(nn)’
      Parameters: nn – number of lines to move from the current print position.
      Example: 344C0F
            344C – RVPP
            0F – 15 lines
Sample Print Data
Data from Host
 
2BC10684 01840542 2BC20642 04420A21
34C404C1 C2C3C434 4C0134C0 04E6E7E8
E9
 
Interpretation of data
2BC1068401840542 – SHF, 132 characters per line, LM 1, RM 132
2BC2064204420A21 – SVF, 66 lines per page, TM 4, BM 66
34C404 – AVPP sets print position to line 4
C1C2C3C4 – EBCDIC hex values for ABCD
344C01 – RVPP sets print position down one line
34C004 – AHPP sets print position to column 4
E6E7E8E9 – EBCDIC hex values for WXYZ
Print out
Printer Definition Table
The SNA Print Service supports the use of a Printer Definition Table (PDT). The PDT file provides a function similar to a printer driver, in that it allows the translation of GDI (Graphic Device Interface) calls to control codes specific to a printer. The PDT file is a binary file created by compiling a text file called a Printer Definition File (PDF). The PDF contains a list of parameters representing GDI calls, such as “A_Capital” or “NEW_LINE” that can be set equal to a character (e.g. “A”), a hexadecimal value (e.g. 0x41), a decimal value (e.g. 132) or a macro (e.g. NLN). The macros, in turn, are set equal to the control codes understood by the printer. For example if the host sends a byte indicating a new line (‘0x15’), the PDT could be used to convert this to a carriage return, line feed (‘0x0D0A’). The process would be as follows:
Host sends ‘0x15’ (3270 format order for a new line)
SNA Print
        Converts ‘0x15’ to New_Line
        Checks the PDT for a mapping for New_Line
               PDT
             New_Line = NLN
             NLN EQU 0D 0A
   ‘0x0D0A’ is placed in the print output in place of ‘0x15’
Printer Definition File
The PDF contains two sections, a list of Macro definitions and a list of Parameter definitions.
Macros section
This section defines the printer specific control codes (e.g. HP PCL escape sequences) that can be invoked from the Parameter section of the PDF. This section is delimited by the key words BEGIN_MACROS and END_MACROS. The lines between these two key words are the macro definitions. The PDF can contain up to 2048 macro definitions. They have the following syntax:
MACRONAME     EQU  MACROVALUE
The macro name can be any alphanumeric string, not including spaces, up to 30 characters in length. The macro names are case sensitive. They are separated from the macro values by the key word EQU. The macro value contains the hexadecimal values for the control characters that will be sent to the printer. These two-digit hexadecimal values must be separated by spaces. The whole string can be up to 255 characters in length.
Example: This is a macro that defines the HP PCL escape sequence for setting 6 lines per inch. The escape sequence is Esc&l6D. This will need to be converted to the hexadecimal values for the PDF. HP PCL uses ‘0x1B’ to denote an escape sequence; the rest of the sequence, converted to hex, is & = ‘0x26’ l = ‘0x6C’ 6 = ‘0x36’ D = ‘0x44’.  
      LL6              EQU 1B 26 6C 36 44
                 |                                      |_______ Macro value
                 |__________________________________ Macro name
Parameter Section
The parameter section contains the list of key words for the GDI calls that can be controlled through the PDT. These parameters fall into two groups, session parameters and characters definitions.
The lines in section use the following syntax:
PARAMETERNAME = PARAMETERVALUE
The parameter name would be either one of the session parameters listed below or one of the characters parameters listed in sample PDF. The compiler will ignore unsupported parameters. The parameter value can be left blank or have one of the following values:
·      Three-digit decimal value (e.g. MAXIMUM_PRINT_POSITION = 132)
·      Two-digit hexadecimal value (e.g. FORM_FEED = 0C)
·      Macro name  (e.g. SET_6_LINES_PER_INCH = LL6)
·      List of Macro names (e.g. START_JOB = RESET  SYMSET  FONT)
·      Character (e.g. A_CAPITAL = A)
 
Session parameters
The following session parameters are currently supported in the PDF.
START_JOB
END_JOB
MAXIMUM_PRINT_POSITION
DEFAULT_LPI
CARRIAGE_RETURN
LINE_FEED
FORM_FEED
NEW_LINE
SET_6_LINES_PER_INCH
SET_8_LINES_PER_INCH
START_HIGHLIGHT_INTENSE
END_HIGHLIGHT_INTENSE
START_HIGHLIGHT_UNDERLINE
END_HIGHLIGHT_UNDERLINE
START_SUBSCRIPT
END_SUBSCRIPT
START_SUPERSCRIPT
END_SUPERSCRIPT
Of these session parameters, START_JOB, END_JOB, MAXIMUM_PRINT_POSITION, and DEFAULT_LPI are called for every print job. The others are invoked by the data in the print job.
Character parameters
For a complete list of character parameters see the sample PDF below. These parameters can be used to re-map characters to another character, a hexadecimal value, or a macro. This section can be removed before compiling if no character mapping is desired. Otherwise it will override the conversion returned from the Host Code Page.
Common Uses of PDT
START_JOB
The START_JOB macro is commonly used to set default parameters to be used for print jobs. START_JOB will be called at the beginning of every print job. Though it, macros can be invoked to set print job parameters such as the symbol set, the font, the font size, page orientation, etc.
Invoking Macros or Special Character with a Character Parameter
To workaround cases where formatting cannot be included in the host data stream (i.e. LU3 printing or legacy jobs), an obscure character can be mapped to a macro or escape character. One example is with LU3 printing, where the HP PCL escape character ‘0x1B’ cannot be included in the data stream. This prevents the inclusion of escape sequences in the host job.
As a workaround the escape sequence can be placed in the host job, but with the escape character replaced with a character such as the tilde “~”. Then in the PDT file that character is mapped to a ‘0x1B’.
Comments in PDF
Comments can included in the PDF by use of the C-language comment markers ( /* and */).
Sample PDF
 
/**********************************************************************/
/*                                                                    */
/*    PRINTER DEFINITION FILE FOR: HP PCL5 Printers                   */
/*                                                                    */
/**********************************************************************/

/**********************************************************************/
/*               MACRO DEFITION SECTION                               */
/**********************************************************************/

BEGIN_MACROS
NUL    EQU 00                /* Nul character                         */
BAK    EQU 08                /* Back Space                            */
TAB    EQU 09                /* Tab                                   */
LFF    EQU 0A                /* Line Feed                             */
FFF    EQU 0C                /* Form Feed                             */
CRR    EQU 0D                /* Carriage Return                       */
P12    EQU 1B 28 73 31 32 48 /* 12 PITCH-CHARACTERS/INCH Esc(s12H     */
P10    EQU 1B 28 73 31 30 48 /* 10 Pitch-Characters/inch Esc(s10H     */
P17    EQU 1B 28 73 31 36 2E 36 37 48    /* 16.67 Pitch-Characters/inch Esc(s16.67H  */
ESC    EQU 1B                /* Escape                                 */
SPA    EQU 20                /* Space                                  */
CS1    EQU 1B 28 38 55       /* Roman 8 char set 1 Esc(8U              */
EC1    EQU 1B 28 30 4E       /* ECMA-94 Latin 1 char set 1 Esc(0N      */
PC1    EQU 1B 28 31 30 55    /* PC-8 (IBM US) char set 1 Esc(10U       */
SSP    EQU 1B 26 6C 31 4C    /* Set skip perforation  Esc&l1L          */
CSP    EQU 1B 26 6C 30 4C    /* Cancel skip perforation Esc&l0L        */
SUL    EQU 1B 26 64 44       /* Start Underline                        */
CUL    EQU 1B 26 64 40       /* Cancel Underline                       */
LL6    EQU 1B 26 6C 36 44    /* Set line length 6 lines/inch Esc&l6D   */
LL8    EQU 1B 26 6C 38 44    /* Set line length 8 lines/inch Esc&l8D   */
SPL    EQU 1B 26 6C 36 36 50 /* Set page length (66 lines) Esc&l66F    */
RESET  EQU 1B 45             /* Reset EscE                             */
TOP    EQU 1B 26 6C 30 45    /* Top Margin     Esc&l0E                 */
POR    EQU 1B 26 6C 30 4F    /* Portrait Esc&l0O                       */
LAN    EQU 1B 26 6C 31 4F    /* Landscape Esc&l1O                      */


END_MACROS

/**********************************************************************/
/*                     Session Parameters                             */
/**********************************************************************/


START_JOB = RESET
END_JOB = FFF
MAXIMUM_PRINT_POSITION =
DEFAULT_LPI =
CARRIAGE_RETURN = CRR LFF
LINE_FEED =
FORM_FEED =
NEW_LINE =
SET_6_LINES_PER_INCH =
SET_8_LINES_PER_INCH =
START_HIGHLIGHT_INTENSE =
END_HIGHLIGHT_INTENSE =
START_HIGHLIGHT_UNDERLINE =
END_HIGHLIGHT_UNDERLINE =
START_SUBSCRIPT =
END_SUBSCRIPT =
START_SUPERSCRIPT =
END_SUPERSCRIPT =


/**********************************************************************/
/*                      Character Parameters                          */
/**********************************************************************/
SPACE = SPA
EXCLAMATION_POINT = 21
QUOTATION_MARKS = 22
NUMBER_SIGN = 23
DOLLAR_SIGN = 24
PERCENT_SIGN = 25
AMPERSAND = 26
APOSTROPHE = 27
LEFT_PARENTHESIS = 28
RIGHT_PARENTHESIS = 29
ASTERISK = 2A
PLUS_SIGN = 2B
COMMA = 2C
HYPHEN = 2D
PERIOD = 2E
SLASH = 2F
ZERO = 0
ONE = 1
TWO = 2
THREE = 3
FOUR = 4
FIVE = 5
SIX = 6
SEVEN = 7
EIGHT = 8
NINE = 9
COLON = 3A
SEMICOLON = 3B
LESS_THAN_SIGN =3C
EQUAL_SIGN = 3D
GREATER_THAN_SIGN = 3E
QUESTION_MARK = 3F
AT_SIGN = 40
A_CAPITAL = A
B_CAPITAL = B
C_CAPITAL = C
D_CAPITAL = D
E_CAPITAL = E
F_CAPITAL = F
G_CAPITAL = G
H_CAPITAL = H
I_CAPITAL = I
J_CAPITAL = J
K_CAPITAL = K
L_CAPITAL = L
M_CAPITAL = M
N_CAPITAL = N
O_CAPITAL = O
P_CAPITAL = P
Q_CAPITAL = Q
R_CAPITAL = R
S_CAPITAL = S
T_CAPITAL = T
U_CAPITAL = U
V_CAPITAL = V
W_CAPITAL = W
X_CAPITAL = X
Y_CAPITAL = Y
Z_CAPITAL = Z
LEFT_BRACKET = 5B
BACKSLASH = 5C
RIGHT_BRACKET = D9          
CIRCUMFLEX_ACCENT = 5E
UNDERLINE = 5F
GRAVE_ACCENT = 60
A_SMALL = a
B_SMALL = b
C_SMALL = c
D_SMALL = d
E_SMALL = e
F_SMALL = f
G_SMALL = g
H_SMALL = h
I_SMALL = i
J_SMALL = j
K_SMALL = k
L_SMALL = l
M_SMALL = m
N_SMALL = n
O_SMALL = o
P_SMALL = p
Q_SMALL = q
R_SMALL = r
S_SMALL = s
T_SMALL = t
U_SMALL = u
V_SMALL = v
W_SMALL = w
X_SMALL = x
Y_SMALL = y
Z_SMALL = z
LEFT_BRACE = 7B
VERTICAL_BAR = 7C
RIGHT_BRACE = 7D
TILDE_ACCENT = 1B
C_CEDILLA_CAPITAL = C7
U_DIAERESIS_SMALL = FC
E_ACUTE_SMALL = E9
A_CIRCUMFLEX_SMALL = E2
A_DIAERESIS_SMALL = E4
A_GRAVE_SMALL = E0
A_OVERCIRCLE_SMALL = E5
C_CEDILLA_SMALL = E7
E_CIRCUMFLEX_SMALL = EA
E_DIAERESIS_SMALL = EB
E_GRAVE_SMALL = E8
I_DIAERESIS_SMALL = EF
I_CIRCUMFLEX_SMALL = EE
I_GRAVE_SMALL = EC
A_DIAERESIS_CAPITAL = C4
A_OVERCIRCLE_CAPITAL = C5
E_ACUTE_CAPITAL = C9
AE_DIPTHONG_SMALL = E6
AE_DIPTHONG_CAPITAL = C6
O_CIRCUMFLEX_SMALL = C1      
O_DIAERESIS_SMALL = C2      
O_GRAVE_SMALL = F2
U_CIRCUMFLEX_SMALL = FB
U_GRAVE_SMALL = F9
Y_DIAERESIS_SMALL = FF
O_DIAERESIS_CAPITAL = B4    
U_DIAERESIS_CAPITAL = DC
O_SLASH_SMALL = F8
POUND_SIGN = A3
O_SLASH_CAPITAL = D8
MULTIPLY_SIGN = C4          
A_ACUTE_SMALL = E1
I_ACUTE_SMALL = ED
O_ACUTE_SMALL = F3
U_ACUTE_SMALL = FA
N_TILDE_SMALL = F1
N_TILDE_CAPITAL = D1
ORDINAL_INDICATOR_FEMININE = AA
ORDINAL_INDICATOR_MASCULINE = BA
QUESTION_MARK_INVERTED = C0  
REGISTERED_TRADEMARK_SYMBOL = AE
LOGICAL_NOT = 40            
ONE_HALF = BD
ONE_QUARTER = BC
EXCLAMATION_POINT_INVERTED = A1
LEFT_ANGLE_QUOTES = AB
RIGHT_ANGLE_QUOTES = BB
A_ACUTE_CAPITAL = C1
A_CIRCUMFLEX_CAPITAL = C2
A_GRAVE_CAPITAL = C0
COPYRIGHT_SYMBOL = A9
CENT_SIGN = A2
YEN_SIGN = A5
A_TILDE_SMALL = E3
A_TILDE_CAPITAL = C3
INTERNATIONAL_CURRENCY_SYMBOL = A4
ETH_ICELANDIC_SMALL = F0
ETH_ICELANDIC_CAPITAL = DA  
E_CIRCUMFLEX_CAPITAL = CA
E_DIAERESIS_CAPITAL = CB
E_GRAVE_CAPITAL = C8
I_DOTLESS_SMALL = 20
I_ACUTE_CAPITAL = CD
I_CIRCUMFLEX_CAPITAL = CE
I_DIAERESIS_CAPITAL = CF
VERTICAL_LINE_BROKEN = A6
I_GRAVE_CAPITAL = CC
O_ACUTE_CAPITAL = D3
SHARP_S_SMALL = DF
O_CIRCUMFLEX_CAPITAL = C3    
O_GRAVE_CAPITAL = D2
O_TILDE_SMALL = F5
O_TILDE_CAPITAL = D5
MICRO_SYMBOL = B5
THORN_ICELANDIC_SMALL = FE
THORN_ICELANDIC_CAPITAL = DE
U_ACUTE_CAPITAL = DA
U_CIRCUMFLEX_CAPITAL = DB
U_GRAVE_CAPITAL = D9
Y_ACUTE_SMALL = FD
Y_ACUTE_CAPITAL = DD
OVERLINE = BF                
ACUTE_ACCENT = B4
SYLLABLE_HYPHEN = AD
PLUS_OR_MINUS_SIGN = C5      
THREE_QUARTERS = BE
PARAGRAPH_SYMBOL = B6
SECTION_SYMBOL = A7
DIVIDE_SIGN = F7
CEDILLA = B8
DEGREE_SYMBOL = B0
DIAERESIS = A8
MIDDLE_DOT_ACCENT = B7
ONE_SUPERSCRIPT = B9
THREE_SUPERSCRIPT = 7C      
TWO_SUPERSCRIPT = B2
REQUIRED_SPACE = 20
/**********************************************************************/
/*                      End of Definition File                        */
/**********************************************************************/
 
Compiling the PDT
The PDF is compiled into a PDT file using PDFCOMP.EXE. This program is located in the platform\SYSTEM\PRINTSRV directory of the SNA Server CD-ROM. This utility uses the following format from a command prompt:
Pdfcomp input_file output_file
Example:
 
     C:\SNA\temp>pdfcomp hppcl.pdf hppcl.pdt
     Opening hppcl.pdf...
     Outputting to hppcl.pdt
     Finished run...
 
LU & Session Status
SNA Server Manager displays the status of both the Printer Session and the LU being used. The Printer Session is displayed in the right-hand panel when the server is selected under the Print Servers folder. The LUs used for LU1 and LU3 printing are displayed in the right-hand panel when the connection is selected under the Connections folder. For APPC printing the local and remote LU will show the session that is established. During the normal course of a print job, from connection startup through completion of the print job, the status of the LU and the printer session should be as follows:
LU1 and LU3
Connection and Print Service Inactive
LU – Inactive
Printer Session – Inactive
Connection Active and Print Service Inactive
LU – Available  
Printer Session – Inactive
The LUs status will go to “available” once an ACTLU is received for this LU number
Connection Inactive, Print Service Active, and Print Session Started
LU – Pending
Printer Session – Pending  
If the connection is inactive the printer session’s status will go to “pending” while it is waiting for the LU to become available
Connection and Print Service Active, Printer Session Started
LU – SSCP
Printer Session – Active  
When the printer session is started an LU-SSCP session is established, wanting for a BIND to be sent from the host
Connection and Print Service Active, Printer Session started, Print job initiated
LU – InSession
Printer Session – InSession  
When a print job is requested the host will send a BIND to establishing a LU-LU session.
Connection and Print Service Active, Printer Session started, Data being received for Print job
LU – InSession
Printer Session – Spooling  
After binding a session the host will initiate a bracket in which to send data. The printer session status of “Spooling” indicates data is being received from host and sent to the Windows NT printer.
Connection and Print Service Active, Printer Session started, all data received for Print job
LU – InSession
Printer Session – InSession
When the host has sent all the data for the print job, it will end the bracket, at which point the printer session status will return to “InSession”.
Connection and Print Service Active, Printer Session started, Print job complete
LU – SSCP
Printer Session – Active  
As the last step of the print job, the host sends an UNBIND, returning the LU to the LU-SSCP session. The printer session is now ready for another print job.
 
Host      Connection      LU      Print Service      Printer Session

      inactive      inactive      inactive      inactive
ACTPU, ACTLU -->      active      available      inactive      inactive

                       printer session started

SSCP --> LU session      active      SSCP      active      active
print job requested                        
BIND -->      active      InSession      active      InSession
Begin Bracket, data -->      active      InSession      active      Spooling
End Bracket -->      active      InSession      active      InSession
UNBIND -->      active      SSCP      active      Active
APPC
For APPC printing the local and remote LUs do not display a status, but do show active APPC sessions in the right-hand panel when they are selected. The printer session will be displayed with the user name the print service is running under. For this example it is assumed there are no other sessions active.
Connection and Print Service Inactive
Local APPC LU – right-hand panel blank
Printer Session – Inactive
Connection Active and Print Service Inactive
Local APPC LU – right-hand panel blank
Printer Session – Inactive
Connection Inactive, Print Service Active, and Printer Session Started
Local APPC LU – right-hand panel blank
Printer Session – Pending
If the connection is inactive the printer session status will go to “pending” while it is waiting for the connection to go active.
Connection and Print Service Active, Printer Session Started
Local APPC LU – active APPC session
Printer Session – InSession
When the printer session is started it will allocate a conversation with the AS/400. The status changes to InSession when the FMH-5 Attach is sent.
Connection and Print Service Active, Printer session started, Data being received for Print job
Local APPC LU – active APPC session
Printer Session – Spooling
The printer session status “Spooling” indicates data is being received from the AS/400 and sent to the Windows NT printer.
Connection and Print Service Active, Printer session started, all data received for Print job
Local APPC LU – active APPC session
Printer Session – InSession
When all the data for the print job has been received the printer session status will return to “InSession”. The printer session is now ready for another print job.
 
AS/400      Connection      Local LU      Print Service      Printer Session

      inactive            inactive      inactive
      active            inactive      inactive

                      printer session started

Attach sent to AS/400      active      active session      active      InSession
    print job requested                        
data from AS/400  -->      active      active session      active      Spooling
    last piece of data -->      active      active session      active      InSession
Traces
The following are sample traces of Data Link Control (DLC) messages captured with the SNA Trace tool.
3270
 
DLC   ----------------------------------------------- 14:18:51.0245
DLC   09160000->01020101 DLC DATA    
DLC                      DAF:00 OAF:00 ODAI:off Exp.  
DLC                      ACTPU  RQD SC  FI BC EC DR1 <--ACTPU from the Host
DLC  
DLC   ---- Header  at address 014446F0, 1 elements ----
DLC   0100000C 10112D00 00001234 01007901     <......-....4..y.>
DLC  
DLC   ---- Element at address 0193E10C, start 10, end 21 ----
DLC   6B800011 02010500 00000001              <k...........    >
DLC   ----------------------------------------------- 14:18:51.0245
DLC   01020101->09160000 DLC DATA    
DLC                      DAF:00 OAF:00 ODAI:off Exp.  
DLC                      ACTPU  +RSP SC  FI BC EC DR1
DLC  
DLC   ---- Header  at address 014446F0, 1 elements ----
DLC   0100000C 10002D00 00001234 01007901     <......-....4..y.>
DLC  
DLC   ---- Element at address 0193E10C, start 10, end 32 ----
DLC   EB800011 11404040 40404040 40000007     <.....@@@@@@@@...>
DLC   01000000 000000                         <.......         >
DLC   ----------------------------------------------- 14:18:51.0245
DLC   09160000->01020101 DLC DATA    
DLC                      DAF:07 OAF:00 ODAI:off Exp.
                              |
                              |___________LU number of the printer session  

DLC                      ACTLU  RQD SC  FI BC EC DR1 <--ACTLU from the Host
DLC  
DLC   ---- Header  at address 014446F0, 1 elements ----
DLC   0100000C 10002D00 07001235 01007901     <......-....5..y.>
DLC  
DLC   ---- Element at address 0193E10C, start 10, end 15 ----
DLC   6B80000D 0201                           <k.....          >
DLC   ----------------------------------------------- 14:18:51.0245
DLC   01020101->09160000 DLC DATA    
DLC                      DAF:00 OAF:07 ODAI:off Exp.  
DLC                      ACTLU  +RSP SC  FI BC EC DR1
DLC  
DLC   ---- Header  at address 014446F0, 1 elements ----
DLC   0100000C 10002D00 00071235 01007901     <......-....5..y.>
DLC  
DLC   ---- Element at address 0193E10C, start 10, end 28 ----
DLC   EB80000D 02010085 8000000C 06010001     <.......e........>
DLC   000000                                  <...             >
DLC   ----------------------------------------------- 14:18:51.0245
DLC   01020101->09160000 DLC DATA    
DLC                      DAF:00 OAF:07 ODAI:off Normal
DLC                      NOTIFY RQD FMD FI BC EC DR1
DLC  
DLC   ---- Header  at address 01444890, 1 elements ----
DLC   02020000 00002C00 00070000 0000A801     <......,.......y.>
DLC  
DLC   ---- Element at address 0193AC94, start 10, end 23 ----
DLC   0B800081 06200C06 01000100 0000         <...a. ........  >
DLC   ----------------------------------------------- 14:18:51.0245
DLC   09160000->01020101 DLC DATA    
DLC                      DAF:07 OAF:00 ODAI:off Normal
DLC                      NOTIFY +RSP FMD FI BC EC DR1
DLC  
DLC   ---- Header  at address 014447F4, 1 elements ----
DLC   0100000C 10112C00 07000000 01007901     <......,.......y.>
DLC  
DLC   ---- Element at address 0193F470, start 10, end 15 ----
DLC   8B800081 0620                           <...a.           >
DLC   ----------------------------------------------- 14:19:01.0823
DLC   01020101->09160000 DLC DATA    
DLC                      DAF:00 OAF:07 ODAI:off Normal
DLC                      NOTIFY RQD FMD FI BC EC DR1
DLC  
DLC   ---- Header  at address 01444890, 1 elements ----
DLC   02020000 00002C00 00070001 0100A801     <......,.......y.>
DLC  
DLC   ---- Element at address 0193E230, start 10, end 23 ----
DLC   0B800081 06200C06 03000100 0000         <...a. ........  >
DLC   ----------------------------------------------- 14:19:01.0823
DLC   09160000->01020101 DLC DATA    
DLC                      DAF:07 OAF:00 ODAI:off Normal
DLC                      NOTIFY +RSP FMD FI BC EC DR1
DLC  
DLC   ---- Header  at address 01444890, 1 elements ----
DLC   02020000 00002C00 07000001 01007901     <......,.......y.>
DLC  
DLC   ---- Element at address 0193E230, start 10, end 15 ----
DLC   8B800081 0620                           <...a.           >
DLC   ----------------------------------------------- 14:19:01.0823
DLC   09160000->01020101 DLC DATA    
DLC                      DAF:07 OAF:01 ODAI:off Exp.  
DLC                      BIND   RQD SC  FI BC EC DR1 <--BIND from the Host
DLC  
DLC   ---- Header  at address 01444758, 1 elements ----
DLC   0100000C 10112D00 07011B4F 01007901     <......-....O..y.>
DLC  
DLC   ---- Element at address 0193F470, start 10, end 47 ----
DLC   6B800031 010303B1 90308000 0087C681     <k..1.....0...gFa>
DLC   00010000 00E10000 00000000 000006D9     <...............R>
         |        |________________________________Data Stream Flags
         |
         |___________LU type: 1  

DLC   D4E3F5F6 F000                           <MT560.          >
DLC   ----------------------------------------------- 14:19:01.0854
DLC   01020101->09160000 DLC DATA    
DLC                      DAF:01 OAF:07 ODAI:off Exp.  
DLC                      BIND   +RSP SC  FI BC EC DR1
DLC  
DLC   ---- Header  at address 01444758, 1 elements ----
DLC   0100000C 10002D00 01071B4F 01007901     <......-....O..y.>
DLC  
DLC   ---- Element at address 0193F6B8, start 10, end 13 ----
DLC   EB800031                                <...1            >
DLC   ----------------------------------------------- 14:19:01.0854
DLC   09160000->01020101 DLC DATA    
DLC                      DAF:07 OAF:01 ODAI:off Exp.  
DLC                      SDT    RQD SC  FI BC EC DR1
DLC  
DLC   ---- Header  at address 01444758, 1 elements ----
DLC   0100000C 10002D00 07011B50 01007901     <......-....P..y.>
DLC  
DLC   ---- Element at address 0193F6B8, start 10, end 13 ----
DLC   6B8000A0                                <k...            >
DLC   ----------------------------------------------- 14:19:01.0885
DLC   01020101->09160000 DLC DATA    
DLC                      DAF:01 OAF:07 ODAI:off Exp.  
DLC                      SDT    +RSP SC  FI BC EC DR1
DLC  
DLC   ---- Header  at address 01444890, 1 elements ----
DLC   0100000C 10002D00 01071B50 0100C300     <......-....P..C.>
DLC  
DLC   ---- Element at address 0193E230, start 10, end 13 ----
DLC   EB8000A0                                <....            >
DLC   ----------------------------------------------- 14:19:01.0885
DLC   09160000->01020101 DLC DATA    
DLC                      DAF:07 OAF:01 ODAI:off Normal
DLC                      RQD FMD BC EC DR1 DR2 BB
                                                |____Begin Bracket
DLC  
DLC   ---- Header  at address 01444890, 1 elements ----
DLC   0100000C 10002C00 07010001 01007901     <......,.......y.>
DLC  
DLC   ---- Element at address 0193E230, start 10, end 103 ----
DLC   03A08015 151515E3 C5E2E3E2 C3D9C9D7     <.......TESTSCRIP> ßData for print job
DLC   E37A40D3 E4F1E3C5 E2E34BC4 C5D415D7     <Tz@LU1TESTKDEM.P>
DLC   C4C67AD5 D6D5C540 404015C1 C2C3C4E6     <DFzNONE@@@.ABCDW>
DLC   E7E8E915 7E7E7E7E 7E7E7E7E 7E7E7E7E     <XYZ.~~~~~~~~~~~~>
DLC   7E7E7E7E 7E7E7E7E 7E151515 15151515     <~~~~~~~~~.......>
DLC   15151515 15151515 15151515 0C0D         <..............  >
DLC   ----------------------------------------------- 14:19:03.0182
DLC   01020101->09160000 DLC DATA    
DLC                      DAF:01 OAF:07 ODAI:off Normal
DLC                      +RSP FMD BC EC DR1 DR2
DLC  
DLC   ---- Header  at address 014446BC, 1 elements ----
DLC   02021400 17002C00 01070001 0100C300     <......,.......C.>
DLC  
DLC   ---- Element at address 0193E230, start 10, end 12 ----
DLC   83A000                                  <c..             >
DLC   ----------------------------------------------- 14:19:03.0182
DLC   09160000->01020101 DLC DATA    
DLC                      DAF:07 OAF:01 ODAI:off Exp.  
DLC                      CLEAR  RQD SC  FI BC EC DR1
DLC  
DLC   ---- Header  at address 014446BC, 1 elements ----
DLC   02021400 17002D00 07011B51 01007901     <......-....Q..y.>
DLC  
DLC   ---- Element at address 0193E230, start 10, end 13 ----
DLC   6B8000A1                                <k...            >
DLC   ----------------------------------------------- 14:19:03.0198
DLC   01020101->09160000 DLC DATA    
DLC                      DAF:01 OAF:07 ODAI:off Exp.  
DLC                      CLEAR  +RSP SC  FI BC EC DR1
DLC  
DLC   ---- Header  at address 01444890, 1 elements ----
DLC   04020004 17002D00 01071B51 0100A801     <......-....Q..y.>
DLC  
DLC   ---- Element at address 0193E230, start 10, end 13 ----
DLC   EB8000A1                                <....            >
DLC   ----------------------------------------------- 14:19:03.0198
DLC   09160000->01020101 DLC DATA    
DLC                      DAF:07 OAF:01 ODAI:off Exp.  
DLC                      UNBIND RQD SC  FI BC EC DR1 <--UNBIND from the Host
DLC  
DLC   ---- Header  at address 01444890, 1 elements ----
DLC   04020004 17002D00 07011B52 01007901     <......-....R..y.>
DLC  
DLC   ---- Element at address 0193E230, start 10, end 14 ----
DLC   6B800032 01                             <k..2.           >
DLC   ----------------------------------------------- 14:19:03.0245
DLC   01020101->09160000 DLC DATA    
DLC                      DAF:01 OAF:07 ODAI:off Exp.  
DLC                      UNBIND +RSP SC  FI BC EC DR1
DLC  
DLC   ---- Header  at address 014446BC, 1 elements ----
DLC   00000000 00002D00 01071B52 0100C300     <......-....R..C.>
DLC  
DLC   ---- Element at address 0193F594, start 10, end 13 ----
DLC   EB800032                                <...2            >

 
APPC
 
DLC   ----------------------------------------------- 19:16:01.0328
DLC   01020501->05160002 DLC DATA    
DLC                      DAF:00 OAF:02 ODAI:on  Exp.  
DLC                      BIND   RQD SC  FI BC EC DR1 <--BIND from the AS/400
DLC  
DLC   ---- Header  at address 0144403C, 1 elements ----
DLC   00000000 00002F00 00020000 0000BB00     <....../.........>
DLC  
DLC   ---- Element at address 0193CC84, start 10, end 109 ----
DLC   6B800031 001307B0 B050B107 07878787     <k..1.....P...ggg>
DLC   07060200 00000000 00001623 00000AC1     <...........#...A>
           |______________________________________________LU Type: 6.2

DLC   D7D7D54B D3D6C3C1 D32C0009 02D8D7C3     <PPNKLOCAL,...QPC>
DLC   E2E4D7D7 40090300 00000000 0000040B     <SUPP@...........>
DLC   04C1D7D7 D54BD3D6 C3C1D30A 1300DB70     <.APPNKLOCAL....p>
DLC   33228306 3F29000C C1D7D7D5 4BD9C1C9     <3"c.?)..APPNKRAI>
DLC   D5C9C5D9                                <NIER            >
DLC   ----------------------------------------------- 19:16:01.0343
DLC   05160002->01020501 DLC DATA    
DLC                      DAF:02 OAF:00 ODAI:on  Exp.  
DLC                      BIND   +RSP SC  FI BC EC DR1
DLC  
DLC   ---- Header  at address 0144403C, 1 elements ----
DLC   00000000 00002F00 02000000 01000501     <....../.........>
DLC  
DLC   ---- Element at address 0193CC84, start 10, end 89 ----
DLC   EB800031 001307B0 B050B107 07878787     <...1.....P...ggg>
DLC   07060200 00000000 00009423 4000002E     <..........m#@...>
DLC   000902D8 D7C3E2E4 D7D74009 03000000     <...QPCSUPP@.....>
DLC   00000000 040D05C1 D7D7D54B D9C1C9D5     <.......APPNKRAIN>
DLC   C9C5D90A 13007C10 AAA370C0 00420000     <IER...|..tp..B..>
DLC   ----------------------------------------------- 19:16:01.0359
DLC   01020501->05160002 DLC DATA    
DLC                      DAF:00 OAF:02 ODAI:on  Normal
DLC                      RQE FMD FI BC EC DR1 PI CD
DLC  
DLC   ---- Header  at address 01444654, 1 elements ----
DLC   0B050900 17002E00 00020001 0100BB00     <................>
DLC  
DLC   ---- Element at address 0193AEDC, start 10, end 168 ----
DLC   0B91203F 0502FF18 03D00040 0430F0F0     <.j ?.......@.000>
                    |______________________________________FMH5, Attach

DLC   F9120702 E2C9C7D5 D6D50901 FC7F3222     <9...SIGNON...2">
DLC   2CCDCC97 130AC1D7 D7D54BD3 D6C3C1D3     <,..p..APPNKLOCAL>
DLC   07CD0A15 13100001 00080000 00000000     <................>
DLC   0001005D 12F50059 12E20055 12A00102     <...].5.Y.S.U....>
DLC   05100100 000023C1 C3C8D7D9 E3404040     <......#ACHPRT@@@>
DLC   40F5F2F2 F4F0F0F0 F1000000 00000000     <@52240001.......>
DLC   00000000 00000000 000026D7 00000000     <..........&P....>
DLC   00000000 00000040 40404040 40404040     <.......@@@@@@@@@>
DLC   40404040 40404040 404040E2 F10300       <@@@@@@@@@@@S1.. >
DLC   ----------------------------------------------- 19:16:01.0765
DLC   05160002->01020501 DLC DATA    
DLC                      DAF:02 OAF:00 ODAI:on  Normal
DLC                      +RSP FMD BC EC PI
DLC  
DLC   ---- Header  at address 014445B8, 1 elements ----
DLC   0B050900 17002E00 02000000 01000501     <................>
DLC  
DLC   ---- Element at address 0193CA3C, start 10, end 12 ----
DLC   830100                                  <c..             >
DLC   ----------------------------------------------- 19:16:02.0000
DLC   05160002->01020501 DLC DATA    
DLC                      DAF:02 OAF:00 ODAI:on  Normal
DLC                      RQD FMD BC EC DR1 DR2 PI
DLC  
DLC   ---- Header  at address 014445B8, 1 elements ----
DLC   0B050900 17002E00 02000001 01000501     <................>
DLC  
DLC   ---- Element at address 0193CA3C, start 10, end 85 ----
DLC   03A10000 4912A090 00056006 00204000     <....I.....`.. @.>
DLC   3D0000C9 F9F0F2D9 C1C9D5C9 C5D940C1     <=..I902RAINIER@A>
DLC   C3C8D7D9 E3404040 40000000 00000000     <CHPRT@@@@.......>
DLC   00000000 00000000 00000000 00000000     <................>
DLC   00000000 00000000 00000000              <............    >
DLC   ----------------------------------------------- 19:16:02.0000
DLC   01020501->05160002 DLC DATA    
DLC                      DAF:00 OAF:02 ODAI:on  Normal
DLC                      +RSP FMD BC EC DR1 DR2
DLC  
DLC   ---- Header  at address 014445B8, 1 elements ----
DLC   08020000 00002E00 00028000 0100BB00     <................>
DLC  
DLC   ---- Element at address 0193CA3C, start 10, end 12 ----
DLC   83A000                                  <c..             >
DLC   ----------------------------------------------- 19:16:40.0953
DLC   05160002->01020501 DLC DATA    
DLC                      DAF:02 OAF:00 ODAI:on  Normal
DLC                      RQE FMD BC EC DR1 CD
DLC  
DLC   ---- Header  at address 01444654, 1 elements ----
DLC   0B050900 17002E00 02000002 01000501     <................>
DLC  
DLC   ---- Element at address 0193CA3C, start 10, end 61 ----
DLC   03902000 3112A001 010A1800 01000000     <.. .1...........>
DLC   0000002B C6020C2B D2042900 0A2BC202     <...+F..+K.)..+B.>
DLC   422BC102 840D34C4 012BD103 81FF002B     <B+A.d.4D.+J.a..+>
DLC   C8034001                                <H.@.            >
DLC   ----------------------------------------------- 19:16:41.0015
DLC   01020501->05160002 DLC DATA    
DLC                      DAF:00 OAF:02 ODAI:on  Normal
DLC                      RQE FMD BC EC DR1 CD
DLC  
DLC   ---- Header  at address 014445B8, 1 elements ----
DLC   07050900 17002E00 00020002 0100BB00     <................>
DLC  
DLC   ---- Element at address 0193AEDC, start 10, end 22 ----
DLC   03902000 0A12A001 02040000 01           <.. ..........   >
DLC   ----------------------------------------------- 19:16:42.0250
DLC   05160002->01020501 DLC DATA    
DLC                      DAF:02 OAF:00 ODAI:on  Normal
DLC                      RQE FMD BC EC DR1 CD
DLC  
DLC   ---- Header  at address 01444654, 1 elements ----
DLC   07050900 17002E00 02000003 01000501     <................>
DLC  
DLC   ---- Element at address 0193CA3C, start 10, end 182 ----
DLC   03902000 AA12A001 010A1800 01000000     <.. .............>
DLC   0000002B D10381FF 00000000 2BC80340     <...+J.a.....+H.@>
             |________________________________________________First byte of Data for Print Job

DLC   010034C4 010034C0 0240F5F7 F6F3D7E6     <..4D..4..@5763PW>
DLC   F140E5F3 D9F2D4F0 4040F9F6 F0F5F1F7     <1@V3R2M0@@960517>
DLC   40404040 40404040 40404040 40404040     <@@@@@@@@@@@@@@@@>
DLC   4040E2C5 E440E2D6 E4D9C3C5 40D3C9E2     <@@SEU@SOURCE@LIS>
DLC   E3C9D5C7 40404040 40404040 40404040     <TING@@@@@@@@@@@@>
DLC   40404040 40404040 40404040 40404040     <@@@@@@@@@@@@@@@@>
DLC   F1F061F2 F161F9F7 40F1F97A F1F67AF2     <10a21a97@19z16z2>
DLC   F7404040 40404040 40404040 40404040     <7@@@@@@@@@@@@@@@>
DLC   4040D7C1 C7C54040 4040F100 0D           <@@PAGE@@@@1..   >
DLC   ----------------------------------------------- 19:16:42.0250
DLC   01020501->05160002 DLC DATA    
DLC                      DAF:00 OAF:02 ODAI:on  Normal
DLC                      RQE FMD BC EC DR1 CD
DLC  
DLC   ---- Header  at address 01444654, 1 elements ----
DLC   07050900 17002E00 00020003 0100BB00     <................>
DLC  
DLC   ---- Element at address 0193CA3C, start 10, end 22 ----
DLC   03902000 0A12A001 02040000 01           <.. ..........   >
DLC   ----------------------------------------------- 19:16:56.0734
DLC   05160002->01020501 DLC DATA    
DLC                      DAF:02 OAF:00 ODAI:on  Normal
DLC                      RQE FMD BC EC DR1 CD
DLC  
DLC   ---- Header  at address 01444654, 4 elements ----
DLC   07050900 17002E00 02000004 01000501     <................>
DLC  
DLC   ---- Element at address 0193CA3C, start 10, end 268 ----
DLC   03902003 1012A001 010A1000 01000000     <.. .............>
DLC   00000000 00000000 00000C00 00000000     <................>
DLC   34C4012B D10381FF 00000000 2BC80340     <4D.+J.a.....+H.@>
DLC   01000000 000034C0 0240F5F7 F6F3D7E6     <......4..@5763PW>
DLC   F140E5F3 D9F2D4F0 4040F9F6 F0F5F1F7     <1@V3R2M0@@960517>
DLC   40404040 40404040 40404040 40404040     <@@@@@@@@@@@@@@@@>
DLC   4040E2C5 E440E2D6 E4D9C3C5 40D3C9E2     <@@SEU@SOURCE@LIS>
DLC   E3C9D5C7 40404040 40404040 40404040     <TING@@@@@@@@@@@@>
DLC   40404040 40404040 40404040 40404040     <@@@@@@@@@@@@@@@@>
DLC   F1F061F2 F161F9F7 40F1F97A F1F67AF2     <10a21a97@19z16z2>
DLC   F7404040 40404040 40404040 40404040     <7@@@@@@@@@@@@@@@>
DLC   4040D7C1 C7C54040 4040F100 15150034     <@@PAGE@@@@1....4>
DLC   C00240E2 D6E4D9C3 C540C6C9 D3C5404B     <..@SOURCE@FILE@K>
DLC   404B404B 404B404B 404B404B 4040D8C7     <@K@K@K@K@K@K@@QG>
DLC   D7D361D8 E3E7E3E2 D9C30015 0034C002     <PLaQTXTSRC...4..>
DLC   40D4C5D4 C2C5D940 404B404B 404B404B     <@MEMBER@@K@K@K@K>
DLC   404B40                                  <@K@             >
DLC  
DLC   ---- Element at address 0193AEDC, start 10, end 268 ----
DLC   4B404B40 4B404B40 40E3C5E2 E3D7D9E3     <K@K@K@K@@TESTPRT>
DLC   00151500 34C00240 E2C5D8D5 C2D95C4B     <....4..@SEQNBR\K>
DLC   4B4B4E4B 4B4B40F1 404B4B4B 4E4B4B4B     <KKNKKK@1@KKKNKKK>
DLC   40F2404B 4B4B4E4B 4B4B40F3 404B4B4B     <@2@KKKNKKK@3@KKK>
DLC   4E4B4B4B 40F4404B 4B4B4E4B 4B4B40F5     <NKKK@4@KKKNKKK@5>
DLC   404B4B4B 4E4B4B4B 40F6404B 4B4B4E4B     <@KKKNKKK@6@KKKNK>
DLC   4B4B40F7 404B4B4B 4E4B4B4B 40F8404B     <KK@7@KKKNKKK@8@K>
DLC   4B4B4E4B 4B4B40F9 404B4B4B 4E4B4B4B     <KKNKKK@9@KKKNKKK>
DLC   40F00015 0034C002 404040F1 F0F00034     <@0...4..@@@100.4>
DLC   C00840B1 4DF0D5D3 C1E3C9D5 B6B540B1     <..@.M0NLATIN..@.>
DLC   4DF8E4D9 D6D460F8 B5B64040 40404040     <M8UROM`8..@@@@@@>
DLC   40404040 40404040 40404040 40404040     <@@@@@@@@@@@@@@@@>
DLC   40404040 40404040 40404040 40404040     <@@@@@@@@@@@@@@@@>
DLC   40404040 40404040 40404040 40404040     <@@@@@@@@@@@@@@@@>
DLC   40404040 40404040 40404040 40404040     <@@@@@@@@@@@@@@@@>
DLC   40404040 40404040 40404040 40404040     <@@@@@@@@@@@@@@@@>
DLC   404040                                  <@@@             >
DLC  
DLC   ---- Element at address 0193CECC, start 10, end 268 ----
DLC   F0F661F2 F761F9F7 00150034 C0024040     <06a27a97...4..@@>
DLC   40F2F0F0 0034C008 40B14DA2 F3C2E3C5     <@200.4..@.Ms3BTE>
DLC   E2E3B14D A2F0C240 40404040 40404040     <ST.Ms0B@@@@@@@@@>
DLC   40404040 40404040 40404040 40404040     <@@@@@@@@@@@@@@@@>
DLC   40404040 40404040 40404040 40404040     <@@@@@@@@@@@@@@@@>
DLC   40404040 40404040 40404040 40404040     <@@@@@@@@@@@@@@@@>
DLC   40404040 40404040 40404040 40404040     <@@@@@@@@@@@@@@@@>
DLC   40404040 40404040 40404040 40404040     <@@@@@@@@@@@@@@@@>
DLC   40404040 40404040 40F0F761 F1F161F9     <@@@@@@@@@07a11a9>
DLC   F7001500 34C00240 4040F3F0 F00034C0     <7...4..@@@300.4.>
DLC   08404040 40404040 40404040 40404040     <.@@@@@@@@@@@@@@@>
DLC   40404040 40404040 40404040 40404040     <@@@@@@@@@@@@@@@@>
DLC   40404040 40404040 40404040 40404040     <@@@@@@@@@@@@@@@@>
DLC   40404040 40404040 40404040 40404040     <@@@@@@@@@@@@@@@@>
DLC   40404040 40404040 40404040 40404040     <@@@@@@@@@@@@@@@@>
DLC   40404040 40404040 40404040 40404040     <@@@@@@@@@@@@@@@@>
DLC   404040                                  <@@@             >
DLC  
DLC   ---- Element at address 0193CC84, start 10, end 19 ----
DLC   40404040 40404040 4040                  <@@@@@@@@@@      >
DLC   ----------------------------------------------- 19:16:56.0750
DLC   01020501->05160002 DLC DATA    
DLC                      DAF:00 OAF:02 ODAI:on  Normal
DLC                      RQE FMD BC EC DR1 CD
DLC  
DLC   ---- Header  at address 01444654, 1 elements ----
DLC   07050900 17002E00 00020004 0100BB00     <................>
DLC  
DLC   ---- Element at address 0193CC84, start 10, end 22 ----
DLC   03902000 0A12A001 02040000 01           <.. ..........   >
DLC   ----------------------------------------------- 19:16:56.0765
DLC   05160002->01020501 DLC DATA    
DLC                      DAF:02 OAF:00 ODAI:on  Normal
DLC                      RQE FMD BC EC DR1 CD
DLC  
DLC   ---- Header  at address 014445EC, 1 elements ----
DLC   07050900 17002E00 02000005 01000501     <................>
DLC  
DLC   ---- Element at address 0193CC84, start 10, end 258 ----
DLC   03902000 F612A001 010A0000 01000000     <.. .6...........>
DLC   00000040 40404040 F0F661F2 F461F9F7     <...@@@@@06a24a97>
DLC   00150034 C0024040 40F4F0F0 0034C008     <...4..@@@400.4..>
DLC   40404040 40404040 40404040 40404040     <@@@@@@@@@@@@@@@@>
DLC   40404040 40404040 40404040 40404040     <@@@@@@@@@@@@@@@@>
DLC   40404040 40404040 40404040 40404040     <@@@@@@@@@@@@@@@@>
DLC   40404040 40404040 40404040 40404040     <@@@@@@@@@@@@@@@@>
DLC   40404040 40404040 40404040 40404040     <@@@@@@@@@@@@@@@@>
DLC   40404040 40404040 40404040 40404040     <@@@@@@@@@@@@@@@@>
DLC   40404040 40404040 40404040 40404040     <@@@@@@@@@@@@@@@@>
DLC   40F0F661 F2F461F9 F7001500 15150034     <@06a24a97......4>
DLC   C0084040 40404040 40404040 40404040     <..@@@@@@@@@@@@@@>
DLC   40404040 40404040 40404040 405C405C     <@@@@@@@@@@@@@\@\>
DLC   405C405C 4040C540 D540C440 40D640C6     <@\@\@@E@N@D@@O@F>
DLC   4040E240 D640E440 D940C340 C540405C     <@@S@O@U@R@C@E@@\>
DLC   405C405C 405C0015 0C                    <@\@\@\...       >
DLC   ----------------------------------------------- 19:16:56.0765
DLC   01020501->05160002 DLC DATA    
DLC                      DAF:00 OAF:02 ODAI:on  Normal
DLC                      RQE FMD BC EC DR1 CD
DLC  
DLC   ---- Header  at address 014445EC, 1 elements ----
DLC   07050900 17002E00 00020005 0100BB00     <................>
DLC  
DLC   ---- Element at address 0193CC84, start 10, end 22 ----
DLC   03902000 0A12A001 02040000 01           <.. ..........   >
DLC   ----------------------------------------------- 19:16:57.0609
DLC   05160002->01020501 DLC DATA    
DLC                      DAF:02 OAF:00 ODAI:on  Normal
DLC                      RQE FMD BC EC DR1 CD
DLC  
DLC   ---- Header  at address 01444654, 1 elements ----
DLC   07050900 17002E00 02000006 01000501     <................>
DLC  
DLC   ---- Element at address 0193CC84, start 10, end 29 ----
DLC   03902000 1112A001 010A0800 01000000     <.. .............>
DLC   00000000                                <....            >
                               |____________________End of job indicated by single byte of data with a value of 00

 
Session Properties
Global Session Properties
General Tab
Session Name
To print 3270 jobs, you must define the session name, which is a descriptive name to distinguish different printers on the network.
Host Code Page
Choose your standard language code for printing from the drop-down list. If your language code does not appear in the drop-down list, click Custom, then click File. The Select Custom Page File dialog box appears. Select your custom code page and click Open. Your custom code page appears in the Host Code Page dialog.
Note   The custom page support in Host Print Server provides Arabic and Hebrew code page support for left-to-right output only. The Host Print Service does not support bi-directional data streams from right to left.
See Custom Host Code Page section for more information on Host Code Pages.
Activation
If set to Automatic, the printer session will be started when the SNA Print service is started. If set to manual the printer session will need to be started by through Manager.
Printing Tab
Printer
Click Printer to send your job to a printer and activate the Printer button. Click the Printer button to open the Windows NT Print Setup dialog box. Make your selections, and click OK.
File
Click File to send your job to a file. Check Unique to activate the Reset button. This feature allows you to reset the print job sequential numbering scheme (e.g., when the number gets too high). Click the Reset button to open the SnaPage dialog box. Click Yes to reset to the printer file extension numbering.
Overrides Tab
Fonts
The font overrides are not used if a PDT is configured or Bypass GDI is selected under the Transparency/GDI tab.
No Specific Font Selected
If the user doesn’t select a font, the Print Server will choose the default font for the printer (usually Courier) and size it as big as possible to fit the SCS formatting.  In other words, the SNA Server Print Service will use the biggest font that will still fit the number of columns and spaced at the exact LPI (lines per inch) setting specified.
The caveat to this is that the user could also select ‘Scale Font Size to Fit Printable Page’. In this case the Print Server will reduce the size of the font so that all the text that would have fit on the physical piece of paper still fits after the margins and non-printable area have been taken into account.
The Print Server makes no attempt to fit the entire job onto a single page because it doesn’t know how big the job will be.The only guarantee this option makes is that if something used to fit on a page, it will continue to do so if you add or change the top and bottom margins. For example, if your data fit on one page exactly with 6 LPI on a 10 inch page and then you added half inch margins at the top and bottom of the page then:
if “scale font size to fit printable page” is NOT set, the print job would take up 1 inch on another page as well as using the first page if “scale font size to fit printable page” is set, the Print Server would reduce your LPI value to 6 * 10 / 9 ( = 6 2/3 LPI), and scale the font size down, so that the data will still fit on a single page.
A Specific Font is selected
If a specific font is selected then this is the font that is used. It is sized depending on the setting of the ‘Use Font Size’ and ‘Scale Font Size to Fit Printable Page’ options:
Use Font Size
This option tells SNA Server Print Service to use the specific size selected in the font dialog. If this is selected, Print Service just uses it. There is no auto-sizing, and all values in the datastream (i.e. LPI) that are normally used for Print Server to size the font are ignored.
Scale Font Size to Fit Printable Page
Print server will dynamically reduce your font size so that a page with top and bottom margins of any size will always contain the same number of print lines. For instance, a page of physical height 11 inches with an LPI of 6 will always hold 66 lines, even if SNA Server Print Service adds margins to the top or bottom of page.
Use Font Size as Defined by Host Print Job
This is really just the case where neither a specific font size is selected or scaling to fit page is done. (i.e. Print Service uses our LPI (lines per inch) value and MPP (max printable page) values to decide what size the font will be, but Print Service does not bother reducing the LPI value if top and bottom margins are added).
Margins
The margins are also only used if Print Server is doing GDI printing. The margins define the printable area. Any margins set by the host are used relative to this printable area.
PDT
If the data stream has transparent sections a PDT must be used. If a PDT is being used, then the following SNA Server Manager Printer Properties will be ignored:
Font and Font attributes (Use Font Size, Scale Font Size to Fit Printable Page, Use Font Size as Defined by Host Print Job)
Margins
Default Lines Per Inch
Default Page Width
No Line Formatting
Print Service uses Windows NT Graphical Device Interface (GDI) to render print job attributes (ie –margins, fonts, etc). When using a PDT, SNA Print Service doesn’t use GDI. However, some of this functionality can be controlled with the START_JOB macro within the PDT. If using a PDT and not using a START_JOB macro, then the Windows NT printer defaults will be used.
Refer to the “Printer Definition Table” section for detailed information on how a PDT works.
3270 Session
3270 Tab
Job Termination when
A print job can be terminated by the remote system either by sending the SNA Server Print Service an UNBIND or End Bracket (EB) message. Refer to the Request Unit (RU) chapter and the Request Header (RH) chapter of the IBM Formats Guide for more information.
Here is an example of the remote system sending the SNA Server Print Service an UNBIND to end the job. In this case the session must be reinitialized with a BIND/BIND+RSP combination to send another job.
 
DLC   08160000->01020301 DLC DATA    
DLC                      DAF:03 OAF:01 ODAI:off Exp.  
DLC                      UNBIND RQD SC  FI BC EC DR1
DLC  
DLC   ---- Header  at address 01564828, 1 elements ----
DLC   01020004 30002D00 03011B70 01000A01     <....0.-....p....>
DLC  
DLC   ---- Element at address 01A5DFE8, start 10, end 14 ----
DLC   6B800032 01                             <k..2.           >
            |_______ Normal UNBIND

 
Refer to the IBM SNA Formats Guide (Request/Response Headers (RH) section) for more information on End Bracket (EB).
Job Timeout
Normally, a print session ends when an UNBIND or an End Bracket (EB) is received. However, if the administrator does not want the session to be torn down using an UNBIND and if they cannot, for whatever reason, use Brackets to end the job, then Job Timeout is necessary to delimit the end of the job. If "Job Timeout" is configured, Print Service keeps an approximate record of how long it has been since a message was last received on each session. When that time exceeds the Job Timeout configured for the print session, the Print Service ends the job and sends a notification to the printer.
Default lines per inch
The Default Lines per Inch value in SNA Server Manager sets the number of printed lines that will fit in one inch. In SNA Server Manager 6 or 8 can be specified.
Methods listed in order of precedence:
LU1
·      Set Line Density (SLD) SCS code within the data stream.
·      PDT – DEFAULT_LPI session parameter.
·      SNA Server Manager Print Properties value.
 
If a value other than 6 or 8 is specified in the data stream or in the PDT, SNA Print Service will use 6 as the value.
Print Service can receive these control sequences at any point in the data stream, although they usually tend to arrive at the start of the print job.
LU3
For LU3 the LPI value cannot be set in the data stream. Instead, the value defined in SNA Server Manager or the PDT will be used.
APPC/5250
Identical to LU1 section, with the exception that it cannot be specified in SNA Server Manager Printer Properties.
Default Page Width
The Default Page Width sets the number of characters per line. SNA Server Manager will allow 1-255.
Methods listed in order of precedence:
LU1
·      Maximum Presentation Position (MPP) using the Set Horizontal Format (SHF) SCS code within the data stream.
·      PDT – MAXIMUM_PRINT_POSITION session parameter.
·      SNA Server Manager Print Properties value.
 
LU3
·      Write Control Character (WCC) byte (Bits 2 and 3) within the data stream.
·      PDT – MAXIMUM_PRINT_POSITION session parameter.
·      SNA Server Manager Print Properties value.
 
No line formatting
“No line formatting” is a special case that will normally not be selected. It prevents the SNA Print Service from inserting its own Carriage Return (CR) / Line Feed (LF) when it thinks the end of the line has been reached (as configured in Default Page Width field in a Printer Property page). This is useful for physical printers that do their own wrapping or are told to do their own wrapping with an Esc sequence. The Esc sequence that causes a printer to do its own line wrapping or “End-of-Line wrap” on PCL printers is:
<Esc>&s0C.
The datastream would look like the following (example in ASCII hex):
1B26733043
If Carriage Return (CR) / Line Feed(s) (LF) are found in the datastream Print Service should still honor them.
Transparency/GDI Tab
Filter DLL
This section introduces the SNA Print Server Data Filter API (sometimes referred to as the Print Exit API) that can be used to extend the capabilities of SNA Print Server. The user can provide a print data filter DLL that will be called by SNA Print Server when a print job is initiated, when data is sent to the printer, and when the print job is completed. This print data filter DLL can:
·      Send data to the printer when a job starts (print a banner page, for example).
·      Perform special processing on the data to be printed.
·      Send data to the printer upon print job completion (print a trailer page, for example).
 
The user configures the path to the print data filter DLL. This DLL is used by all sessions active on the print server. However, the print data filter DLL can specify whether or not it wants a given session's print data passed to it.
The entry points to this DLL are:
PrtFilterAlloc
Obtains a data buffer in which to pass print data.
PrtFilterFree
Frees a data buffer obtained with PrtFilterAlloc.
PrtFilterJobData
Allows the DLL to manipulate print data.
PrtFilterJobEnd
Informs the DLL that a print job has ended.
PrtFilterJobStart
Informs the DLL that a new print job has started.
See the SNA Server on-line SDK for more information on this API.
Bypass GDI
Selecting this box will cause the SNA Print Service to treat the entire job as a transparent section.
What is GDI (Graphical Device Interface)?
Writing text to a printer is fairly similar to displaying text in a window. Below is a basic account of what Print Server does to print with the GDI. For an overview of printing look in the MSDN under Product Documentation\SDKs\Platform SDK\Graphics and Multimedia Services\2-D Graphics\Printing and Print Spooler  
We use the following functions to access the printer and control pages
OpenPrinter
StartDoc
EndDoc
StartPage
EndPage
CreateDC gives us a GDI device context we can write to.
We find an appropriate font with the following functions:
EnumFontFamiliesEx
CreateFont
CreateFontIndirect
SelectObject
We then write text to the page using ExtTextOut.
Monitor Job
Request Definite Response – This is where the remote printing subsystem is requesting that SNA Print Server acknowledges every incoming message that has RQD set in the RH. To determine if an incoming message has RQD set see the IBM SNA Formats Guide RH Formats section, byte 2, bits 0, 1, and 2. You often times will see this in Check Stamping print jobs where it’s important to know if the check was printed or not.
Transparency
Transparency provides a way for the print job to contain data that does not need to be interpreted by SNA Print Service and sent as a Raw datatype to the Windows NT printer. The transparent section is delimited by an SCS code. (The entire job can be treated as a transparent section if Bypass GDI is selected. See Bypass GDI above). By default, this SCS code is hex EBCDIC ‘35’. The byte immediately following the transparent byte is the length of the data contained within the transparent section.
Transparency is ASCII
The data contained within transparent sections can be sent to SNA Print Service as ASCII or EBCDIC. The following is an example of an ASCII transparent section. It is common for PCL (Print Control Language) escape sequences to be embedded in these transparent sections.
35021B45 3508 1B26 6C30306F 3045
In the previous sample data stream excerpt, ‘35’ EBCDIC hex is the delimiter for the transparent section, 02 is the length of the data following, and 1B45 (ESC, E) is the data. The next section has a length of 08 and 1B26 6C30306F 3045 (ESC, &, l, 0,0,o,0, E) is the data.
Custom byte
A custom byte can also be used in place of the value hex ‘35’. Use SNA Server Manager to configure the custom byte that the 3270 data stream will be sending.
APPC Session
APPC Tab
Remote APPC LU Alias
This is the Remote LU alias defined for this AS/400. Use the AS/400 Connection Wizard to configure a valid AS/400 connection.
Local LU Alias
Select a LU Alias from the drop down list box.
Mode Name
Use QPCSUPP as the mode name.
AS/400 Device Name
This will be the APPC Printer Virtual Device that gets created for this printer. Any value can be specified. The AS/400 command GO PRINTER can be used to get further information on the various objects associated with printing on the AS/400.
At the AS/400 command prompt type:
===> GO PRINTER
Default Page Width
Refer to LU1 section of the 3270 Default Page Width section for details.
System Type
Select the appropriate remote system type that you are printing from. The AS/400 and System/36 differ in how their respective conversations are started. To start a print conversation, an FMH-5 Attach is sent from the SNA Server. See the IBM SNA Formats Guide (Functional Management (FM) Headers section) for more information on the format of an FMH-5 Attach.
AS/400
 
          DLC   -----------------------------------------------------------
          DLC   01020501->05160001 DLC DATA
          DLC                      DAF:01 OAF:01 ODAI:off Normal
          DLC                      RQE FMD FI BC EC DR1 PI CD
          DLC
          DLC   ---- Header  at address 01564758, 1 elements ----
          DLC   0B050200 00012C00 01010001 0100BD01     <......,.........>
          DLC
          DLC   ---- Element at address 01A5B5B4, start 10, end 208 ----
          DLC   0B91203F 0502FF18 03D00040 0430F0F0     <.j ?.......@.000>
          DLC   F9120702 E2D5C1C4 C5E50901 4AFB2D47     <9...SNADEV..J.-G>
          DLC   0E493510 130AC1D7 D7D54BD3 D6C3C1D3     <.I5...APPNKLOCAL>
          DLC   07CD0B05 0D320001 00080000 00000000     <.....2..........>
          DLC   00010085 12F50081 12E2007D 12A00102     <...e.5.a.S.}....>
          DLC   05100100 000023E3 C5E2E3C4 C5E54040     <......#TESTDEV@@>
          DLC   40F3F8F1 F2F0F0F0 F1000000 00000000     <@38120001.......>
          DLC   00000000 00000000 00004ED8 F0F1F100     <..........NQ011.>
          DLC   00000000 00000040 40404040 40404040     <.......@@@@@@@@@>
          DLC   40404040 40404040 404040E2 F2030080     <@@@@@@@@@@@S2...>
          DLC   005CC8D7 C9C9C940 40404040 40404040     <.\HPIII@@@@@@@@@>
          DLC   00000040 40404040 40404040 40404040     <...@@@@@@@@@@@@@>
          DLC   40404040 404040                         <@@@@@@@         >
 
System/36
 
          DLC   -----------------------------------------------------------
          DLC   01020501->05160001 DLC DATA
          DLC                      DAF:01 OAF:01 ODAI:off Normal
          DLC                      RQE FMD FI BC EC DR1 PI CD
          DLC
          DLC   ---- Header  at address 015644E8, 1 elements ----
          DLC   0B050200 00012C00 01010001 01008A01     <......,.........>
          DLC
          DLC   ---- Element at address 01A5DEC4, start 10, end 208 ----
          DLC   0B91203F 0502FF18 03D00040 0430F0F0     <.j ?.......@.000>
          DLC   F9120702 E2D5C1C4 C5E50901 8E379BF4     <9...SNADEV...7.4>
          DLC   C8646FBA 130AC1D7 D7D54BD3 D6C3C1D3     <Hdo...APPNKLOCAL>
          DLC   07CD0B05 0D360001 00080000 00000000     <.....6..........>
          DLC   00010085 12F50081 12E2007D 12A00102     <...e.5.a.S.}....>
          DLC   05000100 000023E3 C5E2E3C4 C5E54040     <......#TESTDEV@@>
          DLC   40F3F8F1 F2F0F0F0 F1000000 00000000     <@38120001.......>
          DLC   00000000 00000000 00004ED8 F0F1F100     <..........NQ011.>
          DLC   00000000 00000040 40404040 40404040     <.......@@@@@@@@@>
          DLC   40404040 40404040 404040E2 F2030080     <@@@@@@@@@@@S2...>
          DLC   005CC8D7 C9C9C940 40404040 40404040     <.\HPIII@@@@@@@@@>
          DLC   00000040 40404040 40404040 40404040     <...@@@@@@@@@@@@@>
          DLC   40404040 404040                         <@@@@@@@         >
 
Security Tab
User ID, Password, Confirm Password
This is the user's conversation security credentials that are passed to the remote system in an FMH-5 Attach message. The following shows the username that is sent to the host in the Attach message:
 
DLC   -----------------------------------------------------------
DLC   01020501->05160001 DLC DATA
DLC                      DAF:01 OAF:01 ODAI:off Normal
DLC                      RQE FMD FI BC EC DR1 PI CD
DLC
DLC   ---- Header  at address 01564758, 1 elements ----
DLC   0B050200 00012C00 01010001 0100BD01     <......,.........>
DLC
DLC   ---- Element at address 01A5B5B4, start 10, end 208 ----
DLC   0B91203F 0502FF18 03D00040 0430F0F0     <.j ?.......@.000>
DLC   F9120702 E2D5C1C4 C5E50901 4AFB2D47     <9...SNADEV..J.-G>
DLC   0E493510 130AC1D7 D7D54BD3 D6C3C1D3     <.I5...APPNKLOCAL>
DLC   07CD0B05 0D320001 00080000 00000000     <.....2..........>
DLC   00010085 12F50081 12E2007D 12A00102     <...e.5.a.S.}....>
DLC   05100100 000023E3 C5E2E3C4 C5E54040     <......#TESTDEV@@>
DLC   40F3F8F1 F2F0F0F0 F1000000 00000000     <@38120001.......>
DLC   00000000 00000000 00004ED8 F0F1F100     <..........NQ011.>
DLC   00000000 00000040 40404040 40404040     <.......@@@@@@@@@>
DLC   40404040 40404040 404040E2 F2030080     <@@@@@@@@@@@S2...>
DLC   005CC8D7 C9C9C940 40404040 40404040     <.\HPIII@@@@@@@@@>
DLC   00000040 40404040 40404040 40404040     <...@@@@@@@@@@@@@>
DLC   40404040 404040                         <@@@@@@@         >

 
Host Print Transform Tab
Refer of Overview of Data Streams section of this document.
Sample PDF, Bypass GDI, and Transparency Combinations
LU1 Printing (Byte 14 of BIND is '01')
PDF: yes, Bypass GDI: yes, “Transparency is ASCII”: yes
The entire print job is treated as ASCII transparent data and passed directly to the printer, except for SCS codes that are mapped to characters to send to the printer using a PDF file.
Because the whole job is transparent, there is no SCS code delimiting a transparent section.
1B<esc sequence>1B<esc sequence>
·      ‘1B’ hex ASCII is Escape Character.  
·      Escape Sequences are in ASCII.
 
2BC6020C 0D2BC204 4201420D 2BC12F84
01840407 0A0D1013 16191C1F 2225282B
2E313437 3A3D4043 46494C4F 5255585B
5E616467 6A6D7073 76797C7F 82
 
·      SCS codes (For an interpretation of this example, see “Interpretation of SCS Code Block Example” in the Appendix.)
 
54484953204953204120544553540D      
T H I S   I S   A   T E S T   <cr>       
 
·      The data is represented in ASCII characters
·      ’0D’ hex EBCDIC is the SCS for CR(carriage return) as mapped in the following PDF (Printer Definition File):
 
/*    PRINTER SESSION DEFINITION FILE FOR SNA Server Printers    */
/*                                                                                                                          */
BEGIN_MACROS
LFF EQU 0A
FFF EQU 0C
CRR EQU 0D
END_MACROS
/*  Parameters                                                                                                    */
CARRIAGE_RETURN=CRR
NEW_LINE=CRR LFF
LINE_FEED=LFF
FORM_FEED=FFF CRR
/*                        End of Definition File
 
 
PDF: yes, Bypass GDI True: yes, “Transparency is ASCII”: no
The entire print job is treated as EBCDIC transparent data and passed directly to the printer after being converted to ASCII, except for SCS codes which are mapped to the characters to send to the printer using a PDF file.
There are no “marked transparent sections”.
27<esc sequence>27<esc sequence>
·      ‘27’ hex EBCDIC is Escape Character.  
·      Escape Sequences are in EBCDIC.
 
E3C8C9E240C9E240C140E3C5E2E30D
T H I S   I S   A   T E S T   <cr>       
 
·      The data is represented in EBCDIC characters
·      ’0D’ hex EBCDIC is the SCS for CR(carriage return) as mapped in the following PDF (Printer Definition File):
 
/*    PRINTER SESSION DEFINITION FILE FOR SNA Server Printers    */
/*                                                                                                                          */
BEGIN_MACROS
LFF EQU 0A
FFF EQU 0C
CRR EQU 0D
END_MACROS
/*  Parameters                                                                                                    */
CARRIAGE_RETURN=CRR
NEW_LINE=CRR LFF
LINE_FEED=LFF
FORM_FEED=FFF CRR
/*                        End of Definition File
 
 
PDF: yes, Bypass GDI: no, “Transparency is ASCII”: yes
The print job is a mixture of non-transparent data and marked transparent sections. The GDI interface will not be used to pass the data to the printer (because the GDI interface cannot process transparent sections).  SCS codes in the data will be mapped using the PDF file.
The data in transparent sections is assumed to be in ASCII rather than EBCDIC. Transparent sections are passed directly to the printer.
35301B<esc sequence>1B<esc sequence>      
·      ’35’ hex EBCDIC is the SCS code for delimiting a transparent section.  
·      ‘30’ hex is the length field of the transparent data.  
·      ‘1B’ hex ASCII is Escape Character.  
·      Escape Sequences are in ASCII.
 
54484953204953204120544553540D       
T H I S   I S   A   T E S T   <cr>       
 
·      The data is represented in ASCII characters.
·      ’0D’ hex EBCDIC is the SCS for CR(carriage return) as mapped in the following PDF (Printer Definition File):
 
/*    PRINTER SESSION DEFINITION FILE FOR SNA Server Printers    */
/*                                                                                                                          */
BEGIN_MACROS
LFF EQU 0A
FFF EQU 0C
CRR EQU 0D
END_MACROS
/*  Parameters                                                                                                    */
CARRIAGE_RETURN=CRR
NEW_LINE=CRR LFF
LINE_FEED=LFF
FORM_FEED=FFF CRR
/*                        End of Definition File
 
 
PDF: yes, Bypass GD: no, “Transparency is ASCII”: no
The print job is a mixture of non-transparent data and marked transparent sections. The GDI interface will not be used to pass the data to the printer (because the GDI interface cannot process transparent sections). SCS codes in the data will be mapped using the PDF file.
The data in transparent sections is assumed to be EBCDIC (and therefore the Print Server will convert it to ASCII before sending it to the printer).
353027<esc sequence>27<esc sequence>      
·      ’35’ hex EBCDIC is the SCS code for delimiting a transparent section.  
·      ‘30’ hex is the length field of the transparent data.  
·      ‘27’ hex EBCDIC is Escape Character.  
·      Escape Sequences are in EBCDIC.
 
E3C8C9E240C9E240C140E3C5E2E30D       
T H I S   I S   A   T E S T   <cr>       
 
·      The data is represented in EBCDIC characters
·      ’0D’ hex EBCDIC is the SCS for CR(carriage return) as mapped in the following PDF (Printer Definition File):
 
/*    PRINTER SESSION DEFINITION FILE FOR SNA Server Printers    */
/*                                                                                                                          */
BEGIN_MACROS
LFF EQU 0A
FFF EQU 0C
CRR EQU 0D
END_MACROS
/*  Parameters                                                                                                    */
CARRIAGE_RETURN=CRR
NEW_LINE=CRR LFF
LINE_FEED=LFF
FORM_FEED=FFF CRR
/*                        End of Definition File
 
 
PDF: no, Bypass GDI: yes, “Transparency is ASCII”: yes
The entire job will be passed directly to the printer without being processed or altered in any way.
Print data will be treated as entirely transparent and ASCII and will be passed directly to the printer. This would be a datastream that was pre-rendered by the host and sent as pure ASCII. It would be as if you copied an output file from the host to you local computer and just copied it to the printer port.
1B<esc sequence>1B<esc sequence>
·      ‘1B’ hex ASCII is Escape Character.  
·      Escape Sequences are in ASCII.
 
54484953204953204120544553540D      
T H I S   I S   A   T E S T   <cr>       
 
·      The data is represented in ASCII characters.
·      ’0D’ happens to be CR (carriage return) in ASCII (as well as EBCDIC) so it will just get passed like all of the other ASCII bytes to the printer.
 
PDF: no, Bypass GDI: yes, “Transparency is ASCII”: no
The entire print job will be passed to the printer after being converted from EBCDIC to ASCII. No other changes will be made.
27<esc sequence>27<esc sequence>
·      ‘27’ hex EBCDIC is Escape Character.  
·      Escape Sequences are in EBCDIC.
 
E3C8C9E240C9E240C140E3C5E2E30D       
T H I S   I S   A   T E S T   <cr>       
 
·      The data is represented in EBCDIC characters.
·      ’0D’ happens to be CR (carriage return) in EBCDIC (as well as ASCII) so it will just get interpreted like all of the other EBCDIC bytes in the datastream.
 
PDF: no, Bypass GDI: no, “Transparency is ASCII”: no
Normal case, print data will be passed to the printer using the "GDI" interface.
·      Special Notes on LU1 Printing
      The BypassGDI flag is not ignored totally if a PDF file is used. In this case it signals whether the whole job is transparent or whether only marked portions are transparent, for example, if PDF file is present:
      Bypass GDI: yes: Whole job transparent, except SCS codes which are mapped using PDF file.
Bypass GDI: no: Job is mixture of transparent and non-transparent sections.
      Print Server supports SCS codes without a PDF file. For example, when it receives a Set Vertical Format it keeps track of the page length, top and bottom margins, and vertical tab stops. It then uses this data to format the page by:
·      Moving down a number of lines at the start of a page to allow for the top margin.
·      Moving down the page to the next vertical tab stop on receipt of a VT SCS command
·      generating a FF when the bottom margin or page length is exceeded.
 
      If you have a PDF file, Print Server will use the data from the PDF file for the following functions only.  For example, at the start of each job PS will write the bytes defined by the START_JOB line in the PDF file to the printer.
 
START_JOB
END_JOB
CARRIAGE_RETURN
LINE_FEED
FORM_FEED
NEW_LINE
SET_6_LINES_PER_INCH
SET_8_LINES_PER_INCH
START_HIGHLIGHT_INTENSE
END_HIGHLIGHT_INTENSE
START_HIGHLIGHT_UNDERLINE
END_HIGHLIGHT_UNDERLINE

 
      All other SCS codes are handled by Print Server in a similar manner. For example, if Print Service receives a vertical tab SCS command, it will issue an appropriate number of Line Feeds (using the PDF file to define Line Feed (LF)).
      If any of the above are not defined then Print Service does not have a default action. If Line Feed (LF) is not defined Print Service will simply issue nothing for line feed.
      Print Service also reads in (and makes use of) character mapping data from the PDF file. This lets you map any printable character to any sequence of bytes.
      Print Server also reads the MAXIMUM_PRINT_POSITION and DEFAULT_LPI. These are not sequences of bytes to write to the printer; they are configuration settings.
 
LU3 Printing (Byte 14 of BIND is '03')
·      'Bypass GDI' is ignored for LU3
·      There are no transparent sections in LU3 so 'transparency is ASCII' does not apply.
 
Therefore, the only option that makes a difference is whether or not a PDF file is being used. Note that some customers use the same printer session for LU3 and LU1 printing, so 'Bypass GDI' and 'transparency is ASCII' are ignored rather than disallowed.
LU3 does not have SCS codes as such, but does have NL, CR, FF, and LF characters and does have commands to allow you to position print data on the page. Print Server uses these to build an internal representation of the page before printing it out. When a PDF file is used, Print Server uses the definitions of NL, CR, FF, and LF from the PDF file to allow it to format things correctly. If no PDF file is configured, Print Server uses the Windows GDI. All LU3 bytes will be EBCDIC and will be converted to ASCII.
Here is an example LU3 data stream. In this example, Orders are used in place of ‘15’ NL character for Carriage Returns.
F5F81140 401DE3C8 C9E240C9 E240C140
E3C5E2E3 11C2601D DE3C8C9E 240C9E24
0C140E3C 5E2E3
From the 3270 Information Display System Programmer’s Reference:
F5F8 – Write Command, WCC field (See Overview of Data Streams).
11 – Order (This happens to be SBA (Set Buffer Address) Order; See Overview of Data Streams).
These are 3270 Buffer Address Codes assuming 132 column (See 3270 Information Display System Reference Summary page 123):
4040 – Row 01; Column 01
C150 - Row 02; Column 01
The data spells “THIS IS A TEST” in EBCDIC.
Notice there are no SCS codes in the data stream.
Troubleshooting
What action the customer should take?
Tracing the problem
SNA Server incorporates extensive tracing within the Print Service components and the messages that flow between them. The SNA Server Print Service communicates over two well-defined SNA Server APIs – FMI (Functional Management Interface) and the APPC API (Application Program to Program Communication) API. FMI is used for 3270 Printing while APPC API is used for AS/400 printing.
For problems where the output is not correct, do the following:
 1.      If possible, isolate this print job by stopping all printing to other printer sessions. This will make it easier for support personnel to analyze when viewing traces.
 2.      Stop the print session(s) in question.
 3.      Enable the following traces using the SNA Server Trace Utility:
a.      Select  SNAPrint: Internal Trace Tab (Custom Events), Message Trace (all).  Custom Events enables a new type of tracing with SNA Server 4.0 called Advanced Job Logging. It traces each byte of the datastream. It is important to note that if Customer Events is selected, other internal trace settings
b.      Select SNAServer. Message Trace (Data Link Control, 3270 Messages,  LU6.2 Messages)
c.      Reproduce the problem
d.      Turn the traces off immediately by selecting Clear All Taces button in the Tracing Items Tab.
e.      Print another job to this Print Session, this time changing the Destination to File.  This can be done in the Printing Tab for this Print Session.
 
 
For all other problems, do the following:
 1.      If the problem manifests itself with only one print job, isolate this job by stopping all printing to other print sessions, if possible. This will make it easier for support personnel to analyze when viewing traces.
 2.      Stop the print session(s) in question.
 3.      Enable the following traces using the SNA Server Trace Utility:
a.      Select  SNAPrint: Internal Trace (all; with the exception of Custom Events), Message Trace (all)
b.      Select SNAServer. Message Trace (Data Link Control, 3270 Messages,  LU6.2 Messages)
c.      Reproduce the problem
d.      Turn the traces off immediately by selecting Clear All Traces button in the Tracing Items Tab.
 
 
Collecting Information for support personnel:
 1.      %snaroot%\system\config\com.cfg      
 2.      All traces in the %snaroot%\traces directory.
 3.      Application Event log
 4.      Printer output file in cases where the problem is wrong output.
 5.      Hard copy output from the physical printer.
 6.      An output file and / or a hard copy output of a “successful” job.  This might be another print emulator or an output from a actual IBM device.
 
Common Problems
 1.      The SNA Server Print Service runs under a Windows NT user context, as does other SNA Services. The SNA Print Service (SnaPrint) may not be running under a Windows NT user context that has authority to open a session to the destination Windows NT printer (or NetWare printer). Confirm the user context of the SNA Print Service, and/or try re-entering the password within the Control Panel / Services / SnaPrint / Startup dialog, within "Log On As: This Account:". In addition the users rights can be confirmed by logging on the SNA Server as that users and attempt to print from Notepad.
 2.      The Generic/Text only printer driver has several limitations (Please see Microsoft Knowledge Base articles Q168233, Q166000, Q162616, and Q154322.)
 3.      Print jobs containing Transparent sections will fail to print unless a PDT file is configured.
 4.      HP PCL escape sequences in transparent sections should use all ASCII character. In addition the session property “Transparent is ASCII” needs to be selected.
 5.      If printing through cascaded Windows NT print servers, it may be necessary to added the printer share name to the NullSessionShares registry entry on the Windows NT computer that the SNA Print Service is printing to:
HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services/LanmanServer/Parameters/NullSessionShares: REG_MULTI_SZ:  <sharename>
where <sharename> is the share name associated with the Windows NT printer. Note that each share name must be listed on a separate line within the REGEDT32 "Multi-String editor". The Windows NT computer must be rebooted to enable this change. (Please see Microsoft Knowledge Base article Q121853)
 
Form Feeds
One commonly seen problem with SNA Print server is extra or missing form feeds (FF). Some of these issues involve how SNA Print handles explicit form feeds. Other issues relate to using the number of lines per page, in place of a FF character, to cause a page break (form feed).
When SNA Print server receives a FF character in the host data stream (‘0x0C’), it holds this character until it receives additional data, either control codes (SCS or 3270 orders) or printable characters. If it receives additional data, the FF is sent to the printer and the additional data is processed. If no further data is received, meaning we are at the end of the job, the FF is dropped. At this point the SNA Print will complete the outstanding job by calling either EndDoc for sessions not using a PDT or EndDocPrinter, for sessions using a PDT. When EndDoc is called a FF is added to the end of the job. When EndDocPrinter is called no FF is added.  In this latter case, whether SNA Print adds a FF to the end of the job depends on how the END_JOB parameter is configured in the PDT. An alternative to using the PDT is to change the default datatype for the print processor in the Windows NT Printer properties. If the default datatype is set to RAW [auto FF], the print driver check for the presents of a FF and adds one if necessary.
It is possible to force SNA Print to not drop the final FF when using a PDT. This requires the registry entry FlushFF be added and set to TRUE.
FlushFF: REG_SZ
HKEY_LOCAL_MACHINE
     SYSTEM
          CurrentControlSet
               Services
                    SnaPrint
                         Parameters
 
FF at End of Job      PDT      FF added      End results

Yes      No      Yes      FF
No      No      Yes      FF
Yes      Yes      No      (depends on PDT)
No      Yes      No      (depends on PDT)
Many older Host print jobs rely on the number of lines per page to determine page breaks. They assume for example that a job will use 66 lines per page, so add enough blank lines after the text to bring the total number of lines to 66 before starting the text that should be on the next page. If there were 30 lines of text, 36 blank lines would be added before the text intended for the next page. The drawback of this method is it depends on the printable area of the printer, the lines per inch, the lines per page, and the top margin set for the job. If by default only 65 lines will fit per page, the resulting printout will show “page creep”, where the last blank line is pushed to the top of the next page, and then two lines to the top of the third page, etc. This “page creep” can be remedied within the PDT file by having the START_JOB parameter set the top margin to zero and the lines per page to 66. In addition the Printer Session properties should have the lines per inch set to 6.
For example with a printer using HP PCL the following would be added to the PDF.
In the macros section:

TOP0      EQU 1B 26 6C 30 45      /* Top Margin set to 0 */
STL      EQU 1B 26 6C 36 36 46      /* Set Text Length to 66 *
Then for Start Job,
START_JOB = TOP0 STL
Windows NT related issues
Q162616 Extra Form Feed with Passthrough Functions to Text Only Driver
Custom Host Code Page
SNA Server allows a custom host code page to be used for a printer session. The host code page is used for the translation between ASCII and EBCDIC. By default a printer session will use the standard language code page provided by Windows NT. As an alternative a custom code page can be specified to allow a different translation. For example using the default code page the EBCDIC letter “A” (‘0xC1’) would be translated to an ASCII letter “A” (‘0x41’). With a custom code page it would be possible to have the EBCDIC “A” translated to any value. The custom code pages are text files that can be modified with a hex editor. Samples are included in the PRINTSERVERADDONS directory on the SNA Server CD-ROM.  The code page file contains 512 bytes. The first 256 bytes represent what the EBCDIC characters are translated to. The second 256 bytes are what the ASCII characters are translated to. Logically each section is a 16-column by 16-row block.
 
Bytes 0-255: Data from Host
  | 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
00| 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
10| 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
20| 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
30| 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
40| 20 a0 e2 e4 e0 e1 e3 e5 e7 f1 a2 2e 3c 28 2b 7c
50| 26 e9 ea eb e8 ed ee ef ec df 21 24 2a 29 3b ac
60| 2d 2f c2 c4 c0 c1 c3 c5 c7 d1 a6 2c 25 5f 3e 3f
70| f8 c9 ca cb c8 cd ce cf cc 60 3a 23 40 27 3d 22
80| d8 61 62 63 64 65 66 67 68 69 ab bb f0 fd de b1
90| b0 6a 6b 6c 6d 6e 6f 70 71 72 aa ba e6 b8 c6 a4
a0| b5 7e 73 74 75 76 77 78 79 7a a1 bf d0 dd fe ae
b0| 5e a3 a5 b7 a9 a7 b6 bc bd be 5b 5d af a8 b4 d7
c0| 7b 41 42 43 44 45 46 47 48 49 ad f4 f6 f2 f3 f5
d0| 7d 4a 4b 4c 4d 4e 4f 50 51 52 b9 fb fc f9 fa ff
e0| 5c f7 53 54 55 56 57 58 59 5a b2 d4 d6 d2 d3 d5
f0| 30 31 32 33 34 35 36 37 38 39 b3 db dc d9 da 00

Bytes 256-511: Data to Host
  | 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
00| 00 01 02 03 37 2d 2e 2f 16 05 25 0b 0c 0d 0e 0f
10| 10 14 24 04 b6 15 32 26 18 19 00 27 1c 1d 1e 1f
20| 40 5a 7f 7b 5b 6c 50 7d 4d 5d 5c 4e 6b 60 4b 61
30| f0 f1 f2 f3 f4 f5 f6 f7 f8 f9 7a 5e 4c 7e 6e 6f
40| 7c c1 c2 c3 c4 c5 c6 c7 c8 c9 d1 d2 d3 d4 d5 d6
50| d7 d8 d9 e2 e3 e4 e5 e6 e7 e8 e9 ba e0 bb b0 6d
60| 79 81 82 83 84 85 86 87 88 89 91 92 93 94 95 96
70| 97 98 99 a2 a3 a4 a5 a6 a7 a8 a9 c0 4f d0 a1 00
80| 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90| 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0| 41 aa 4a b1 9f b2 6a b5 bd b4 9a 8a 5f ca af bc
b0| 90 8f ea fa be a0 b6 b3 9d da 9b 8b b7 b8 b9 ab
c0| 64 65 62 66 63 67 9e 68 74 71 72 73 78 75 76 77
d0| ac 69 ed ee eb ef ec bf 80 fd fe fb fc ad 8e 59
e0| 44 45 42 46 43 47 9c 48 54 51 52 53 58 55 56 57
f0| 8c 49 cd ce cb cf cc e1 70 dd de db dc 8d ae df

 
The value being translated is matched to its new value using the first number in the hex value as the row and the second as the column. For example to find what the EBCDIC character “Z” (‘0xE9’) is translated to in the sample code page count down to row E and over to columns 9. This position has the value ‘0x5A’, which is the ASCII value for a “Z”.
Sample Host Code Page (as seen in a Hex editor)
 
20 20 20 20 20 20 20 20-20 20 20 20 20 20 20 20
20 20 20 20 20 20 20 20-20 20 20 20 20 20 20 20
20 20 20 20 20 20 20 20-20 20 20 20 20 20 20 20
20 20 20 20 20 20 20 20-20 20 20 20 20 20 20 20
20 A0 E2 E4 E0 E1 E3 E5-E7 F1 A2 2E 3C 28 2B 7C
26 E9 EA EB E8 ED EE EF-EC DF 21 24 2A 29 3B AC
2D 2F C2 C4 C0 C1 C3 C5-C7 D1 A6 2C 25 5F 3E 3F
F8 C9 CA CB C8 CD CE CF-CC 60 3A 23 40 27 3D 22
D8 61 62 63 64 65 66 67-68 69 AB BB F0 FD DE B1
B0 6A 6B 6C 6D 6E 6F 70-71 72 AA BA E6 B8 C6 A4
B5 7E 73 74 75 76 77 78-79 7A A1 BF D0 DD FE AE
5E A3 A5 B7 A9 A7 B6 BC-BD BE 5B 5D AF A8 B4 D7
7B 41 42 43 44 45 46 47-48 49 AD F4 F6 F2 F3 F5
7D 4A 4B 4C 4D 4E 4F 50-51 52 B9 FB FC F9 FA FF
5C F7 53 54 55 56 57 58-59 5A B2 D4 D6 D2 D3 D5
30 31 32 33 34 35 36 37-38 39 B3 DB DC D9 DA 00
00 01 02 03 37 2D 2E 2F-16 05 25 0B 0C 0D 0E 0F
10 14 24 04 B6 15 32 26-18 19 00 27 1C 1D 1E 1F
40 5A 7F 7B 5B 6C 50 7D-4D 5D 5C 4E 6B 60 4B 61
F0 F1 F2 F3 F4 F5 F6 F7-F8 F9 7A 5E 4C 7E 6E 6F
7C C1 C2 C3 C4 C5 C6 C7-C8 C9 D1 D2 D3 D4 D5 D6
D7 D8 D9 E2 E3 E4 E5 E6-E7 E8 E9 BA E0 BB B0 6D
79 81 82 83 84 85 86 87-88 89 91 92 93 94 95 96
97 98 99 A2 A3 A4 A5 A6-A7 A8 A9 C0 4F D0 A1 00
00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
41 AA 4A B1 9F B2 6A B5-BD B4 9A 8A 5F CA AF BC
90 8F EA FA BE A0 B6 B3-9D DA 9B 8B B7 B8 B9 AB
64 65 62 66 63 67 9E 68-74 71 72 73 78 75 76 77
AC 69 ED EE EB EF EC BF-80 FD FE FB FC AD 8E 59
44 45 42 46 43 47 9C 48-54 51 52 53 58 55 56 57
8C 49 CD CE CB CF CC E1-70 DD DE DB DC 8D AE DF
 
Appendix
References
IBM 3270 Information Display System Reference Summary (GX20-1878)
IBM 3270 Information Display System Data Stream Programmer’s Reference (GA23-0059)
IBM 5250 Information display System Function Reference Manual (SA21-9247)
IBM SNA Formats Guide (GA27-3136)
IBM Communications Manager/2 Version 1.1Host Print Guide  (SC31-7145-00)
Hewlett Packard PCL 5 Comparison Guide Manual (5961-0941)
Hewlett Packard PCL 5 Printer Lang. Tech Ref. Manual (5961-0509)
ASCII Table
 
Dec      Hex      Name                  Dec      Hex      Name

0      0x00      NUL                  64      0x40      @, commercial at
1      0x01      SOH                  65      0x41      A
2      0x02      STX                  66      0x42      B
3      0x03      control-C, ETX                  67      0x43      C
4      0x04      EOT                  68      0x44      D
5      0x05      ENQ                  69      0x45      E
6      0x06      ACK                  70      0x46      F
7      0x07      BEL                  71      0x47      G
8      0x08      BS, backspace                  72      0x48      H
9      0x09      HT, tab                  73      0x49      I
10      0x0a      NL, line feed                  74      0x4a      J
11      0x0b      VT                  75      0x4b      K
12      0x0c      form feed, FF, NP                  76      0x4c      L
13      0x0d      CR, carriage return                  77      0x4d      M
14      0x0e      SO                  78      0x4e      N
15      0x0f      SI                  79      0x4f      O
16      0x10      DLE                  80      0x50      P
17      0x11      Control-Q, XON, DC1                  81      0x51      Q
18      0x12      DC2                  82      0x52      R
19      0x13      Control-S, XOFF, DC3                  83      0x53      S
20      0x14      DC4                  84      0x54      T
21      0x15      NAK                  85      0x55      U
22      0x16      SYN                  86      0x56      V
23      0x17      ETB                  87      0x57      W
24      0x18      CAN                  88      0x58      X
25      0x19      EM                  89      0x59      Y
26      0x1a      SUB                  90      0x5a      Z
27      0x1b      ESC, escape                  91      0x5b      [, open square baracket
28      0x1c      FS                  92      0x5c      \, backslash
29      0x1d      GS                  93      0x5d      ], close square bracket
30      0x1e      RS                  94      0x5e      ^, caret
31      0x1f      US                  95      0x5f      _, underscore
32      0x20      space                  96      0x60      `, backquote
33      0x21      !, exclamation mark                  97      0x61      a
34      0x22      ", double quote                  98      0x62      b
35      0x23      #, hash                  99      0x63      c
36      0x24      $, dollar                  100      0x64      d
37      0x25      %, percent                  101      0x65      e
38      0x26      &, ampersand                  102      0x66      f
39      0x27      ', quote                  103      0x67      g
40      0x28      (, open parenthesis                  104      0x68      h
41      0x29      ), close parenthesis                  105      0x69      i
42      0x2a      *, asterix                  106      0x6a      j
43      0x2b      +, plus                  107      0x6b      k
44      0x2c      ,, comma                  108      0x6c      l
45      0x2d      -, minus                  109      0x6d      m
46      0x2e      ., full stop                  110      0x6e      n
47      0x2f      /, oblique stroke                  111      0x6f      o
48      0x30      0                  112      0x70      p
49      0x31      1                  113      0x71      q
50      0x32      2                  114      0x72      r
51      0x33      3                  115      0x73      s
52      0x34      4                  116      0x74      t
53      0x35      5                  117      0x75      u
54      0x36      6                  118      0x76      v
55      0x37      7                  119      0x77      w
56      0x38      8                  120      0x78      x
57      0x39      9                  121      0x79      y
58      0x3a      :, colon                  122      0x7a      z
59      0x3b      ;, semicolon                  123      0x7b      {, open curly bracket
60      0x3c      <, less than                  124      0x7c      |, vertical bar
61      0x3d      =, equals                  125      0x7d      }, close curly bracket
62      0x3e      >, greater than                  126      0x7e      ~, tilde
63      0x3f      ?, question mark                  127      0x7f      delete
EBCDIC Table

15      Line Feed            99      r     r, Small            C6      F     F, Capital
40      Space            4B      .     Period            C7      G     G, Capital
50      &     Ampersand            4C      <     Less Than Sign            C8      H     H, Capital
59      ß     Sharp s            4D      (     Left Parenthesis            C9      I     I, Capital
60      #NAME?            4E      #NAME?            D1      J     J, Capital
61      /     Slash            5B      $     Dollar Sign            D2      K     K, Capital
62      A Circumflex, Capital            5C      *     Asterisk            D3      L     L, Capital
63      Ä    A Diaeresis, Capital            5D      )     Right Parenthesis            D4      M     M, Capital
64      A Grave, Capital            5E      ;     Semicolon            D5      N     N, Capital
65      A Acute, Capital            6B      ,     Comma            D6      O     O, Capital
66      A Tilde, Capital            6C      %     Percent Sign            D7      P     P, Capital
67      Å  A Overcircle, Capital            6D      _     Underline            D8      Q     Q, Capital
68      Ç     C Cedilla, Capital            6E      >     Greater Than Sign            D9      R     R, Capital
69      Ñ     N Tilde, Capital            6F      ?     Question Mark            DF      ÿ     y Diaeresis, Small
71      É     E Acute, Capital            7A      :     Colon            E2      S     S, Capital
72      E Circumflex, Capital            7B      #     Number Sign            E3      T     T, Capital
73      E Diaeresis, Capital            7C      @     At Sign            E4      U     U, Capital
74      E Grave, Capital            7D      '     Apostrophe            E5      V     V, Capital
75      I Acute, Capital            7E      #NAME?            E6      W     W, Capital
76      I Circumflex, Capital            7F      "     Quotation Marks            E7      X    X, Capital
77      I Diaeresis, Capital            9A      ª     a Underscore, Small            E8      Y     Y, Capital
78      I Grave, Capital            9B      º     o Underscore, Small            E9      Z     Z, Capital
80      O Slash, Capital            9E      Æ AE Dipthong, Cap.            EB      O Circumflex, Capital
81      a     a, Small            A0      Micro, Mu            EC      Ö    O Diaeresis, Capital
82      b     b, Small            A2      s     s, Small            ED      O Grave, Capital
83      c     c, Small            A3      t     t, Small            EE      O Acute, Capital
84      d     d, Small            A4      u     u, Small            EF      O Tilde, Capital
85      e     e, Small            A5      v     v, Small            F0      0     Zero
86      f     f, Small            A6      w     w, Small            F1      1     One
87      g     g, Small            A7      x, Small            F2      2     Two
88      h     h, Small            A8      y     y, Small            F3      3     Three
89      i     i, Small            A9      z     z, Small            F4      4     Four
91      j     j, Small            AC      D Stroke, Capital            F5      5     Five
92      k     k, Small            AD      Y Acute, Capital            F6      6     Si
93      l     l, Small            AE      Thorn, Capital            F7      7     Seven
94      m     m, Small            C1      A     A, Capital            F8      8     Eight
95      n     n, Small            C2      B     B, Capital            F9      9     Nine
96      o     o, Small            C3      C     C, Capital            FB      U Circumflex, Capital
97      p     p, Small            C4      D     D, Capital            FC      Ü    U Diaeresis, Capital
98      q     q, Small            C5      E     E, Capital            FD      U Grave, Capital
FE      U Acute, Capital                                    
Glossary
APPC - Advanced Program-to-Program Communications. APPC is an application programming interface (API) that allows peer-to-peer communications in a Systems Network Architecture (SNA) environment.
CPI – characters per inch
Data Stream Flags – Byte 18 of the BIND of LU1 print jobs, indicates what SCS control codes are valid for this session
HPT – Host Print Transform.  AS/400 Device option for AS/400 APPC printing.
LPI – Lines per inch
Maximum presentation line MPL – SCS code that sets the lines per page
Maximum presentation position MPP – SCS code that sets the characters per line
PDF – Printer Definition File, a text file compiled to create the PDT, which is compiled using the SNA Server PDFCOMP utility to compile a PDT file that can be used by the SNA Print Service.
PDT – Printer Definition Table, the compiled version of the PDF, which stores custom printer control command settings used by the SNA Print Service.
PIP – Program Initialization Parameters. PIP data can consist of initialization parameters or environmental setup information required by a partner TP or remote operating system. In relation to the SNA Print Service, the AS/400 requires specific PIP data when the SNA Print Service initiates a printer session, and indicates various parameters defining capabilities of the AS/400 printer.
RA – Repeat to Address. Format order for the 3270 data stream.
SBA – Set Buffer Address. Format order for the 3270 data stream that controls the placement of a field onto a 3270 presentation space (or when printing, this indicates the location on the page that the data will be printed).
SCS – SNA Character String control codes supported by LU1-capable host print devices, as well as AS/400 APPC print devices
Set Character Density SCD – SCS code that sets characters per inch
Set Horizontal Format SHF – SCS code affecting horizontal format
Set Line Density SLD – SCS code that sets lines per inch
Set Vertical Format SVF – SCS code affecting vertical format.
Transparency- SCS code that allows host LU1 or AS/400 data to be pass unaltered to the printer.
WCC – Write Control Character. Byte following the command code in the 3270 data stream.
-----------------------------------------------------------------------------------------------------------------------
INFORMATION PROVIDED IN THIS DOCUMENT AND ANY SOFTWARE THAT MAY ACCOMPANY THIS DOCUMENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. The user assumes the entire risk as to the accuracy and the use of this document. This document may be copied and distributed subject to the following conditions: 1) All text must be copied without modification and all pages must be included; 2) If software is included, all files on the disk(s) must be copied without modification (the MS-DOS(R) utility diskcopy is appropriate for this purpose); 3) All components of this document must be distributed together; and 4) This document may not be distributed for profit.
Copyright (C) 1997 Microsoft Corporation.  All Rights Reserved.
Microsoft, MS-DOS, and Windows are registered trademarks.
----------------------------------------------------------------------------------------------------------------------


 

Avatar of cbray

ASKER

I need a more generalized description of ATRN and how it applies to Exchange.  I also need to know the differences between ETRN and ATRN in Exchange for the passing of mail both ways, instead of each side dialing up to pass mail one direction at a time.
ASKER CERTIFIED SOLUTION
Avatar of ppan082298
ppan082298

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial