System/36 Environment and Printing

Technote (troubleshooting)

Problem(Abstract)

This document includes an assortment of helpful information when printing in the System/36 Environment (S/36E).

Resolving the problem

This document provides an assortment of helpful information when printing in the S/36 Environment (S/36E).

This document was last updated on 4 April 2014.

When generating spooled files within the IBM System/36 environment on the operating system, you are actually using the operating system native spooling commands. Specifically, the
OVRPRTF command is used extensively within the System/36 Environment.

// PRINTER OCL Statement vs the OVRTPRTF Command

When running a System/36 environment procedure that uses a PRINTER OCL statement, the
OVRPRTF command is actually running. The following list relates the PRINTER OCL parameters with the corresponding
OVRPRTF parameters that they relate to.

// PRINTER OCL

OVRPRTF Command Equivalent

NAME-

FILE()

DEVICE-

DEV()

OUTQ-library/name

OUTQ(library/name)

DUPLEX-NO

DUPLEX(*NO)

DUPLEX-YES

DUPLEX(*YES)

DUPLEX-TUMBLE

DUPLEX(*TUMBLE)

LINES-

PAGESIZE(length *N)

LPI-

LPI()

CPI-

CPI()

FORMSNO-

FORMTYPE()

ALIGN-YES

ALIGN(*YES)

ALIGN-NO

ALIGN(*NO)

SPOOL-YES

SPOOL(*YES)

SPOOL-NO

SPOOL(*NO) DFRWRT(*NO)

COPIES-

COPIES()

CONTINUE-

SHARE()

PRIORITY-0

HOLD(*YES) OUTPTY(7)

ACTIVITY

Supported for System/36 compatibility only. Syntax checking is done, but the value is not used.

DEFER-YES

SCHEDULE(*FILEEND)

HOLD-YES

SAVE(*YES)

HOLD-NO

SAVE(*NO)

IGCCPI-5

IGCCPI(5)

IGCCPI-6.7

IGCCPI(*CONDENSED)

SOSI-NORMAL

IGCSOSI(*YES)

SOSI-SHIFT

IGCSOSI(*RIGHT)

SOSI-DROP

IGCSOSI(*NO)

TYPE-IGC

IGCDTA(*YES)

EXTN-OFF

IGCEXNCHR(*NO)

JUSTIFY-

JUSTIFY()

FONT-(hex)

FONT((decimal) *NONE)

TEXT-YES

PRTQLTY(*NLQ)

TEXT-NO

PRTQLTY(*DRAFT)

EOFMSG-YES

FORMFEED(*CONT)

EOFMSG-NO

FORMFEED(*CUT)

ROTATE-

PAGRTT()

DRAWER-

DRAWER()

DRAWER-3

DRAWER(*E1)

With // PRINTER OCL, an
OVRPRTF is generated specifically for the file listed in NAME. The System/36 Environment also runs the
OVRPRTF FILE(*PRTF) with parameters derived from the active System/36 Environment Session Status. The D command can be used to display the current session status. Some of the entries that are used in this generic
OVRPRTF are:

// PRINTER OCL

OVRPRTF Command Equivalent

Session printer

DEVICE()

Forms

FORMTYPE()

Lines per page

PAGESIZE(length *N)

Lines per inch

LPI()

Characters per inch

CPI()

At times it can be difficult to figure out where these settings are coming from. The base settings are derived from the System/36 Environment Configuration. Use the
DSPS36 command to see these current settings. Display the System/36 environment values, and the
Default forms and
Default lines per page are the base values for Forms and Lines per page.

Return to the System/36 Environment Configuration, and display the System/36 printer IDs. This table equates a 2-character System/36 environment printer ID with the native operating system printer device that it refers to. There are also columns for Lines per Inch, Characters per Inch, and Font. If the System/36 application refers to one of these printers, these values will result in an
OVRPRTF command using the LPI, CPI, and Font parameters. The font in this table is a hexadecimal value and can go up only to FF. FF is font 255 in decimal. Therefore, a font identifier larger than 255 cannot be specified using this interface.

OVRPRTF Parameters not Available through // PRINTER OCL Statement

Not all functionality is available with the // PRINTER OCL statement. The following is a list of parameters for the Override with Printer File (
OVRPRTF) command that are not available through the // PRINTER OCL statement:

If one or more of these parameters needs to be overridden in a S/36 Environment (S/36E) procedure, then that procedure should be changed to use the Override with Printer File (
OVRPRTF) command instead of using the // PRINTER OCL statement, or to use the
OVRPRTF command in addition to using the // PRINTER OCL statement (since the two can be used together).

Note: The above is not a complete list of parameters available in the OVRPRTF command.

Information on the PRINT Procedure

The PRINT, SET and LINES System/36 environment procedures can also result in an
OVRPRTF setting.

The PRINT S/36 Environment (S/36E) procedure is basically the same thing as the
CHGJOB command. It affects only the job that it is running from. As soon as the job ends, the PRINT values go away. The
OVRPRTF parameters that can be derived from the PRINT procedure are:

PRINT Procedure

OVRPRTF Command Equivalent

ID of printer to be used

DEV()

Number of lines per page

PAGESIZE(length *N)

Lines per inch

LPI()

Characters per inch

CPI()

Forms number

FORMTYPE()

Degree of rotation

PAGRTT()

Input paper drawer

DRAWER()

Information on the SET Procedure

The PRINT, SET and LINES System/36 environment procedures can also result in an
OVRPRTF setting.

The SET S/36 Environment (S/36E) procedure basically does a
CHGDEVDSP for the display terminal you are currently using to store settings for certain parameters, which are then entered through the OVRPRTF command when you signon. The
OVRPRTF parameters that can be derived from the SET procedure are:

SET Procedure

OVRPRTF Command Equivalent

Number of lines to be printed per page

PAGESIZE(length *N)

Printer to receive printed output

DEV()

Forms number for printed output

FORMTYPE()

Once the SET procedure stores these settings in the display device description, the change does not go away when you end your job, but will be active for any user that signs on using that display. Beware of this if your display device description name is assigned randomly, such as one of the QPADEVxxxx devicesm since using SET on a QPADEVxxxx device will still be active the next time someone else signs onto that QPADEVxxxx device, and it will not be active if you get a different QPADEVxxxx device the next time you signon

To complicate matters, it is difficult to determine if a SET command has been issued for a specific display because the
DSPDEVD command does not show them, but you may be able to determine if the SET procedure has been used and what settings have been used by using the Dump Object (
DMPOBJ) command. For example, if the SET procedure has been used on the QPADEV0005 display device description to specify the following settings:

Tab to the Find parameter and type the name of the display device description in ALL CAPS, such as QPADEV0005, and then press the F16 (Find) key. If this is done from the same display device, then you will need to press the F16 (Find) key twice to get past the name of the display device description in the header on the first page.

5.

You should then find the display device description in body of the Dump Object output; for example:

The D8D7 C1C4C5E5 F0F0F0F5 in the above example is the QPADEV0005 display device description in hexadecimal (or hex) format. The 33 is the hex representation of decimal 51, which is the Number of lines to be printed per page from the SET procedure. The F0F0F0F9 is the hex representation of decimal 0009, which is the Forms number for printed output.

6.

The Printer to receive printed output cannot be seen in the spooled file generated by the DMPOBJ command. However, if you use the following Display Device Description (DSPDEVD) command:

DSPDEVD DEVD(QPADEVS36E)

you can look at the setting for the Print device (PRTDEV) parameter, which is the name of the AS/400 printer device description that corresponds to the S/36 Printer ID specified in the Printer to receive printed output parameter in the SET procedure.

Note: There is no way to clear out the Number of line to be printed per page, Printer to receive printed output and Forms number for printed output settings once they have been specified using the SET procedure. The SET procedure can be used again to specify new values for these settings; however, the only way to clear them out is to delete and then re-create the display device description.

Information on the LINES Procedure

The PRINT, SET and LINES System/36 environment procedures can also result in an
OVRPRTF setting.

The LINES S/36 Environment (S/36E) procedure can be used to override the following parameters:

LINES Procedure

OVRPRTF Command Equivalent

Number of lines per page

PAGESIZE(length *N)

Characters per inch

CPI()

Lines per inch

LPI()

Information on the Change S/36 Configuration (CHGS36) Command

S/36 Environment Values

The Change S/36 Configuration (
CHGS36) command has an option for changing the S/36 environment values, including the Default lines per page setting. This specifies the default number of lines that are printed on a page for jobs that run in the System/36 environment. This value is used, unless a different value is specified in the SET command or in the FORMS or PRINTER OCL statements.

S/36 Display IDs

The Change S/36 Configuration (
CHGS36) command has an option for changing the S/36 display IDs. This can be used to specify the S/36 display ID that corresponds to each i5/OS display device description. This can also be used to specify a default S/36 printer ID for each display, essentially associating a display session with one a particular printer device.

Changes have been made to accommodate the new Printer Association support in V7R1M0 (7.1) System i Access for Windows, V6R1M0 (R610) System i Access for Windows, V5R4M0 (R540) iSeries Access for Windows and V5R3M0 (R530) iSeries Access for Windows. If using PC5250 display sessions, or TN5250e display sessions in V7R1M0 (7.1), V6R1M0 (6.1 or R610), V5R4M0 (5.4 or R540) or V5R3M0 (R530) i5/OS, then it is recommended that the display session be setup to use the printer association, rather than specifying the default S/36 printer ID through the Change S/36 Configuration (
CHGS36) command. For more information, refer to the following document:

Sometimes, a spooled file will be created on an output queue that is not expected. For example, a PRINT command is used to set the
ID or printer to be used to be P1. The
DSPS36 printer IDs shows that P1 relates to PRT01. However, the output goes to an output queue called PRT05 rather than PRT01. You are using native OS/400 to create spooled files. OS/400 will use the OUTQ parameter of a printer file to determine which output queue a file gets created in. The PRINT command to P1 does a
OVRPRTF FILE(*PRTF) DEV(PRT01). However, if the printer file being used specifies OUTQ(PRT05), the spooled file will go to PRT05 rather than PRT01. If the printer file specifies OUTQ(*DEV), the spooled file gets placed in PRT01 as expected. For this reason, it is recommended that all the printer files in #LIBRARY be set to OUTQ(*DEV) to ensure that spooled files are routed to the expected printer device.

If a spooled file is generated from a System/36 Environment application and an attribute is not what you expect, set a debug stop in your program to see the printer file overrides. Unfortunately, you can see them only while the program is running, and they go away afterward. If you are running the application interactively, the following command may be helpful:

STRDBG PGM(LIBNAME/PGMNAME) UPDPROD(*YES) ADDBKP STMT('/0001')

Displaying the Printer Overrides using the Debug Mode when a Program Runs in Batch

This will place a debug stop in your program at the first executable statement. When you hit the breakpoint, press the F10 Key to get a command line, and use the Display Override (
DSPOVR) command to see the overrides. If debugging a batch job, do the following:

1.

Use the Hold Job Queue (HLDJOBQ) command to hold the QSPL job queue so the writer job will not start until after the trace has been started. On an operating system command line, type the following:

HLDJOBQ JOBQ(QSPL)

Press the Enter key.

2.

Submit the batch job, and determine the job name.

3.

Use the Start Service Job (STRSRVJOB) command to start servicing the writer job. On an operating system command line, type the following:

STRSRVJOBJOB(######/job-user/job-name)

Press the Enter key.

Note: Only one job can be traced at a time. If Step 4 resulted in two jobs (one WTR job and one PDJ job) for this writer, talk to a representative of the Rochester Support Center to determine which job should be traced or start a second interactive session and trace both jobs.

4.

Use the Start Debug (STRDBG) command to start servicing the writer job. On an operating system command line, type the following:

STRDBG PGM(LIBNAME/PGMNAME) UPDPROD(*YES)

Press the Enter key.

5.

Use the Release Job Queue (RLSJOBQ) command to release the QSPL job queue now that the trace has been started. On the operating system command line, type the following:

RLSJOBQ QSPL

Press the Enter key.

6.

When prompted, use the Add Breakpoint (ADDBKP) command to add a breakpoint at the first instruction in the program. On the operating system command line, type the following:

ADDBKP STMT('/0001')

Press the Enter key.

7.

When you hit the breakpoint, use the Work with Job (WRKJOB) command to work with the batch job. On an operating system command line, type the following:

WRKJOBJOB(######/job-user/job-name)

Press the Enter key.

8.

Select Option 15 (Display file overrides, if active) from the Work with Job screen to display the overrides.