AS/400e series

IBM

Workstation Customization Programming
Version 4

SC41-5605-00

AS/400e series

IBM

Workstation Customization Programming
Version 4

SC41-5605-00

Note
Before using this information and the product it supports, be sure to read the general information in “Notices” on page 395.

First Edition (September 1998)
This edition applies to version 4, release 3, modification 0 of IBM Operating System/400 (product number 5769-SS1)
and to all subsequent releases and modifications until otherwise indicated in new editions. This edition applies only
to reduced instruction set computer (RISC) systems.
© Copyright International Business Machines Corporation 1998. All rights reserved.
Note to U.S. Government Users — Documentation related to restricted rights — Use, duplication or disclosure is
subject to restrictions set forth in GSA ADP Schedule Contract with IBM Corp.

Contents
Figures . . . . . . . . . . . . . . . . . . . . . . . . . . .
Tablesxi. . . . . . . . . . . . . . . . . . . . . . . . . . . xiii

About Workstation Customization Programming (SC41-5605) .
Who should read this book . . . . . . . . . . . . . . .
Conventions and terminology used in this book . . . . . . .
AS/400 Operations Navigator . . . . . . . . . . . . . .
Installing Operations Navigator subcomponents . . . . . .
Accessing AS/400 Operations Navigator . . . . . . . . .
Prerequisite and related information . . . . . . . . . . . .
How to send your comments . . . . . . . . . . . . . .

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

. xv
. xv
. xv
. xvi
. xvii. xvii. xviii. xviii

Part 1. Customizing Workstations . . . . . . . . . . . . . . . . . . . . . .
Chapter 1. Planning For and Setting Up Workstation Customizing .
Workstation Customizing Overview . . . . . . . . . . . . . .
Preparing for Workstation Customizing . . . . . . . . . . . . .
Workstation Controllers . . . . . . . . . . . . . . . . .
Displays . . . . . . . . . . . . . . . . . . . . . . .
ASCII Printers . . . . . . . . . . . . . . . . . . . . .
OS/400 Workstation Customizing Function Limitations . . . . . . .
Setting Up Workstation Customizing. . . . . . . . . . . . . .
Errors and Recovery . . . . . . . . . . . . . . . . . . .
Verifying That Planning Is Complete . . . . . . . . . . . . . .

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

1

.
3
.
3
.
5
.
6
.
7
.
7
.
7
.
7
.
9
. 10

Chapter 2. Retrieving the Workstation Customizing Source . . . . . .
Devices That Use the Emulator on the Workstation Controller or Display . .
Retrieving Source for Devices That Use the Emulator on the Workstation
Controller or the Display . . . . . . . . . . . . . . . . . .
Printers that Use the Host Print Transform Function . . . . . . . . . .
Retrieving Source for ASCII Printers That Use the Host Print Transform
Function . . . . . . . . . . . . . . . . . . . . . . . .
Retrieving Source for Devices Not Supported by IBM . . . . . . . . .
Errors and Recovery . . . . . . . . . . . . . . . . . . . . .
Verifying the Source Is Retrieved Successfully . . . . . . . . . . . .

.
.
.
.

13
13
14
15

Chapter 3. Changing the Source to Customize Your Workstations .
Using Control Codes, Escape Sequences, and Control Sequences . .
Structure of Customizing Objects . . . . . . . . . . . . . . .
Using Source Entry Utility to Change the Tags and Keywords . . . .
General Programming Considerations for Workstation Customizing . .
Finding the Hexadecimal Values for the Tags . . . . . . . . .
Errors and Recovery . . . . . . . . . . . . . . . . . . .
Verifying That the Source Changes Are Complete. . . . . . . . .

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

17
17
18
19
20
21
21
22

Chapter 4. Creating the Workstation Customizing Object.
Compiling and Creating the Workstation Customizing Object.
Errors and Recovery . . . . . . . . . . . . . . .
Verifying the Workstation Customizing Object Is Created . .

.
.
.
.

.
.
.
.

.
.
.
.

23
23
24
25

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.

11
11

. 11
. 13

Chapter 5. Testing the Customizing Object . . . . . . . . . . . . . 27
Changing the Device Description . . . . . . . . . . . . . . . . . . 27
© Copyright IBM Corp. 1998

iii

Varying On the Device . . . . . . . . . . . . . . . . . . .
Starting the Printer Writer for a Printer That Uses Host Print Transform
Function . . . . . . . . . . . . . . . . . . . . . . .
Errors and Recovery . . . . . . . . . . . . . . . . . . .
Verifying a Successful Vary On . . . . . . . . . . . . . . .

. . . 27
. . . 28
. . . 28
. . . 32

Part 2. Display and Keyboard Customization Technical Reference . . . . . . . 33
Chapter 6. Customizing Displays and Keyboards . . . . . .
Determining Whether a Display or Keyboard Can Be Customized .
Understanding Function Support for Displays and Keyboards . .
Customizing Twinaxial Displays . . . . . . . . . . . .
Customizing ASCII Displays . . . . . . . . . . . . . .

iv

.
.
.
.
.

.
.
.
.
.

35
35
35
36
36

Chapter 7. Customizing Twinaxial Displays . . . . . . . . . . . .
Types of Displays and Keyboards . . . . . . . . . . . . . . . .
Customizing Unsupported Twinaxial Displays . . . . . . . . . . . .
Working with Keyboard Translation Tables and the Workstation Controller .
Keyboard Scan Codes . . . . . . . . . . . . . . . . . . . . .
National Language Requirements. . . . . . . . . . . . . . . . .
EBCDIC Code Page Standards . . . . . . . . . . . . . . . .
Keyboard Layout Standards . . . . . . . . . . . . . . . . . .
Customizing Restrictions for Twinaxial Display Keyboards . . . . . . . .
122-Key Typewriter Keyboard Translation Table Restrictions . . . . . .
122-Key Data Entry Keyboard Translation Table Restrictions. . . . . .
5250 Typewriter Keyboard Translation Table Restrictions . . . . . . .
5250 Data Entry Keyboard Translation Table Restrictions . . . . . . .
Enhanced Keyboard Translation Table Restrictions . . . . . . . . .
Determining Which Twinaxial Keyboard Translation Table to Customize . . .
Twinaxial Display Source Format . . . . . . . . . . . . . . . .
Changing the Entries in Your Workstation Customizing Source . . . . .
Changing Source Entries for Scan Codes That Are Not Valid . . . . .
Keyboard Functions Not Specified in Translation Tables . . . . . . .
Working with the Tag Language for Twinaxial Displays . . . . . . . . .
Using the Tags to Customize Twinaxial Display Keyboards . . . . . . .
Keyboard Translation Table (TKBDTBL) Tag . . . . . . . . . . . .
Keyboard Translation State Table (TKSTATE) Tag. . . . . . . . . .
Customizing a 3477 Twinaxial Display for Diacritic Character Support . . .
Step 1: Planning the Customizing. . . . . . . . . . . . . . . .
Step 2: Retrieving the Workstation Customizing Source . . . . . . .
Step 3: Changing the Source . . . . . . . . . . . . . . . . .
Step 4: Creating the Workstation Customizing Object . . . . . . . .
Step 5: Varying On the Device . . . . . . . . . . . . . . . . .

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

39
39
41
41
42
47
47
48
48
50
50
50
51
51
51
52
54
61
61
62
62
63
65
68
68
69
70
70
71

Chapter 8. Customizing ASCII Displays . . . . . . . . . . . .
Beginning to Customize ASCII Displays . . . . . . . . . . . . .
Customizing Unsupported ASCII Displays. . . . . . . . . . . . .
Working with ASCII Displays and the Local ASCII Workstation Controller .
Twinaxial Device Emulation . . . . . . . . . . . . . . . . .
ASCII Character Sets and Code Pages . . . . . . . . . . . .
ASCII Control Codes . . . . . . . . . . . . . . . . . . .
ASCII Command Sequences . . . . . . . . . . . . . . . .
ASCII Display Keyboard Operations . . . . . . . . . . . . . .
Processing Data for an ASCII Display . . . . . . . . . . . . .
Mapping Tables for ASCII Display Keyboards . . . . . . . . . .
Mapping Tables for ASCII Display Screens . . . . . . . . . . .

.
.
.
.
.
.
.
.
.
.
.
.

73
73
74
75
77
78
79
79
80
84
85
89

OS/400 Workstation Customization Programming V4R3

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

Customizing Restrictions for ASCII Displays . . . . . . . .
Determining Which ASCII Display Tables to Customize . . . .
Working with the Tag Language for ASCII Displays . . . . .
Using the Tags to Customize an ASCII Display Screen . . . .
Working with the Update Screen Table . . . . . . . . .
Update Screen Tags . . . . . . . . . . . . . . .
Working with the EBCDIC-to-ASCII Code Mapping Table . .
Using the Tags to Customize an ASCII Display Keyboard . . .
Working with the ASCII to Keyboard Function Mapping Table
Working with the ASCII-to-EBCDIC Mapping Table . . . .
Customizing a DEC VT-320 Display in VT-300 Mode . . . .
Step 1: Planning the Customizing. . . . . . . . . . .
Step 2: Retrieving the Workstation Customizing Source . .
Step 3: Changing the Source . . . . . . . . . . . .
Step 4: Creating the Workstation Customizing Object . . .
Step 5: Varying On the Device . . . . . . . . . . . .

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

. 90
. 92
. 93
. 95
. 95
. 104
. 117
. 119
. 119
. 123
. 125
. 125
. 126
. 127
. 127
. 127

Part 3. Printer Customization Technical Reference . . . . . . . . . . . . . . .129
Chapter 9. Customizing Printers . . . . . . . . . . .
Determining Whether an ASCII Printer Can Be Customized . .
Understanding ASCII Printer Function Support . . . . . . .
Choosing a Method for Customizing Printer Functions . . . .
Printers that Use Host Print Transform Function . . . . .
Printers that Use the Emulator on the Display . . . . . .
Printers that Use the Emulator on the Workstation Controller

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

. 135
. 135
. 135
. 138
. 139
. 140
. 142

Chapter 10. Customizing ASCII Printers That Use the Host Print Transform
Function . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Preparing to Customize an ASCII Printer . . . . . . . . . . . . . . . 145
Gathering Source Materials . . . . . . . . . . . . . . . . . . . 145
Completing Printer Setup . . . . . . . . . . . . . . . . . . . . 145
Planning the Customization Schedule . . . . . . . . . . . . . . . 146
Customizing Unsupported ASCII Printers . . . . . . . . . . . . . . 146
Retrieving the Workstation Customizing Source . . . . . . . . . . . . 146
Understanding the Transform Table . . . . . . . . . . . . . . . . 146
Choosing the Customizing Source . . . . . . . . . . . . . . . . 147
Changing the Source . . . . . . . . . . . . . . . . . . . . . . 147
Transform Table (TRNSFRMTBL) Tag . . . . . . . . . . . . . . . 147
Using the Tags . . . . . . . . . . . . . . . . . . . . . . . 148
Programming Considerations . . . . . . . . . . . . . . . . . . 148
Customizing Printer Information . . . . . . . . . . . . . . . . . . 149
Printer Data Stream (PRTDTASTRM) Tag. . . . . . . . . . . . . . 149
Raster Mode (RASTERMODE) Tag . . . . . . . . . . . . . . . . 150
No-print Border (NOPRTBDR) Tag . . . . . . . . . . . . . . . . 151
Drawer Page Size . . . . . . . . . . . . . . . . . . . . . . 152
Customizing Printer Controls . . . . . . . . . . . . . . . . . . . 153
Bell (BELL) Tag . . . . . . . . . . . . . . . . . . . . . . . 153
Carrier Return (CARRTN) Tag . . . . . . . . . . . . . . . . . . 153
Initialize Printer (INITPRT) Tag . . . . . . . . . . . . . . . . . . 153
Reset Printer (RESETPRT) Tag . . . . . . . . . . . . . . . . . 154
Raster Graphics End (RASEND) Tag . . . . . . . . . . . . . . . 154
Print All Characters (PRTALLCHR) Tag . . . . . . . . . . . . . . 154
Print Next Character (PRTNXTCHR) Tag . . . . . . . . . . . . . . 155
Customizing Print Media Size . . . . . . . . . . . . . . . . . . . 155
Envelope Size . . . . . . . . . . . . . . . . . . . . . . . . 155
Contentsv

Paper Size . . . . . . . . . . . . . . . . . . .
Page Length . . . . . . . . . . . . . . . . . .
Printable Area . . . . . . . . . . . . . . . . . .
Customizing Highlighting . . . . . . . . . . . . . . .
Bold . . . . . . . . . . . . . . . . . . . . .
Underscore . . . . . . . . . . . . . . . . . . .
Customizing Horizontal Movement . . . . . . . . . . .
Backspace (BSP) Tag . . . . . . . . . . . . . . .
Characters Per Inch. . . . . . . . . . . . . . . .
Horizontal Absolute Movement (HORAMOV) Tag . . . . .
Horizontal Relative Movement (HORRMOV) Tag . . . . .
Proportional Spacing . . . . . . . . . . . . . . .
Space (SPACE) Tag . . . . . . . . . . . . . . .
Customizing Vertical Movement . . . . . . . . . . . .
Form Feed (FORMFEED) Tag . . . . . . . . . . . .
Half Line Feed (HLFLINEFEED) Tag . . . . . . . . .
Line Feed (LINEFEED) Tag . . . . . . . . . . . . .
Vertical Absolute Movement (VERAMOV) Tag . . . . . .
Vertical Relative Movement (VERRMOV) Tag . . . . . .
Reverse Half Line Feed (RVSHLFLINEFEED) Tag . . . .
Reverse Line Feed (RVSLINEFEED) Tag . . . . . . . .
Vertical Line Spacing . . . . . . . . . . . . . . .
Customizing Indexing . . . . . . . . . . . . . . . .
Subscript. . . . . . . . . . . . . . . . . . . .
Superscript . . . . . . . . . . . . . . . . . . .
Customizing Color . . . . . . . . . . . . . . . . .
Foreground Color (FOREGRND) Tag . . . . . . . . .
Customizing Paper Input . . . . . . . . . . . . . . .
Paper Drawer Selection (DWRSLT) Tag . . . . . . . .
Selecting Paper Drawer Number (DWRNBR) Tag . . . . .
Additional Paper Drawer Selection . . . . . . . . . .
Customizing Paper Output . . . . . . . . . . . . . .
Output Bin Selection . . . . . . . . . . . . . . .
Jog Output Tray . . . . . . . . . . . . . . . . .
Duplex . . . . . . . . . . . . . . . . . . . .
Simplex . . . . . . . . . . . . . . . . . . . .
Customizing Print Orientation . . . . . . . . . . . . .
Print Angle (PRTANGLE) Tag . . . . . . . . . . . .
Paper Orientation (PRTORIENT) Tag . . . . . . . . .
Customizing Print Quality. . . . . . . . . . . . . . .
Print Quality (PRTQLTY) Tag . . . . . . . . . . . .
Customizing Fonts . . . . . . . . . . . . . . . . .
Font Groups . . . . . . . . . . . . . . . . . .
Individual Fonts . . . . . . . . . . . . . . . . .
Font Mapping . . . . . . . . . . . . . . . . . .
Customizing Code Page Support . . . . . . . . . . . .
Customizing EBCDIC-to-ASCII Code Page Mapping . . . .
Supporting Additional ASCII Code Pages . . . . . . . .
Overriding the Default ASCII Code Page (DFTASCCP) Tag .
Customizing Fax Support. . . . . . . . . . . . . . .
Fax Size . . . . . . . . . . . . . . . . . . . .
Customizing Double-Byte Character Set (DBCS) Support . . .
CCSID Mapping . . . . . . . . . . . . . . . . .
Shift In (SI) Tag . . . . . . . . . . . . . . . . .
Shift Out (SO) Tag . . . . . . . . . . . . . . . .
DBCS Space (DBSPACE) Tag . . . . . . . . . . . .

vi

OS/400 Workstation Customization Programming V4R3

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

. 156
. 157
. 159
. 161
. 161
. 162
. 162
. 162
. 162
. 164
. 165
. 167
. 167
. 167
. 168
. 168
. 168
. 168
. 169
. 171
. 171
. 171
. 173
. 173
. 173
. 174
. 174
. 174
. 174
. 175
. 175
. 176
. 176
. 177
. 178
. 178
. 179
. 179
. 179
. 180
. 180
. 180
. 181
. 182
. 183
. 184
. 185
. 187
. 189
. 189
. 190
. 191
. 191
. 192
. 192
. 192

Character Orientation (CHRORIENT) Tag . . . . . . . . .
Set Character Pitch (SCPITCH) Tag . . . . . . . . . . .
Set Line Pitch (SLPITCH) Tag . . . . . . . . . . . . .
Set Font Size Scaling (FONTSCALING) Tag. . . . . . . .
Set Font Size Scale (FONTSCALE) Tag . . . . . . . . .
CPI (Set Characters per Inch) . . . . . . . . . . . . .
Set Grid Type (GLTYPE) Tag . . . . . . . . . . . . .
Set Grid Line Width (GLWIDTH) Tag . . . . . . . . . .
Draw Grid Line (DRAWLINE) Tag. . . . . . . . . . . .
Printer Data Stream (PRTDTASTRM) Tag. . . . . . . . .
Creating the Workstation Customizing Object . . . . . . . .
Specifying the Workstation Customizing Object. . . . . . . .
Deleting the Workstation Customizing Object . . . . . . . .
Customizing a Hewlett-Packard LaserJet 4 Printer . . . . . .
Setting up the Hewlett-Packard LaserJet 4 Printer . . . . .
Step 1: Planning the Customizing. . . . . . . . . . . .
Step 2: Retrieving the Workstation Customizing Object Source .
Step 3: Changing the Source . . . . . . . . . . . . .
Step 4: Creating the Workstation Customizing Object . . . .
Step 5: Specifying the Workstation Customizing Object. . . .
Step 6: Varying On the Device . . . . . . . . . . . . .

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

Chapter 11. Customizing ASCII Printers That Use the Emulator on the
Display . . . . . . . . . . . . . . . . . . . . . . . . .
Supported ASCII Printers Attached to Twinaxial Displays . . . . . . . .
Customizing Unsupported ASCII Printers Attached to Twinaxial Displays . .
Printer Mapping Table for ASCII Printers Attached to Twinaxial Displays . .
ASCII Printer Definition Table . . . . . . . . . . . . . . . . .
Determining Which ASCII Printer Tables to Use . . . . . . . . . . .
Working with the Tag Language for ASCII Printers Attached to Twinaxial
Displays . . . . . . . . . . . . . . . . . . . . . . . . .
Using the Tags to Customize ASCII Printers Attached to Twinaxial Displays .
ASCII Printer Definition Table (PDFNTBL) Tag . . . . . . . . . . .
Printer Function Tags . . . . . . . . . . . . . . . . . . . .
Printer Function Tags for 3477 Model H, 3486, 3487, and 3488 Displays . .
Printer Function Tags with Variable and Relative Movement . . . . . .
Backspace (BSP) Tag . . . . . . . . . . . . . . . . . . . .
Bell (BELL) Tag . . . . . . . . . . . . . . . . . . . . . .
Start Bold Printing Function (STRBOLD) Tag . . . . . . . . . . .
End Bold Printing (ENDBOLD) Tag . . . . . . . . . . . . . . .
Carrier Return (CARRTN) Tag . . . . . . . . . . . . . . . . .
Set Characters per Inch (CPI) Tag . . . . . . . . . . . . . . .
Set Code Page (CODEPAGE) Tag . . . . . . . . . . . . . . .
Set Double Character Height (DBLCHRH) Tag . . . . . . . . . . .
Start Double-Wide Continuous (STRWIDE) Tag . . . . . . . . . .
End Double-Wide Continuous (ENDWIDE) Tag. . . . . . . . . . .
Drawer Selection (DWRSLT) Tag . . . . . . . . . . . . . . . .
Global Fonts for Printer Definition Table (FNTGPDT) Tag . . . . . . .
End Global Fonts for PDT (EFNTGPDT) Tag . . . . . . . . . . .
Global Font Range (FNTGRNG) Tag . . . . . . . . . . . . . .
Foreground Color (FOREGRND) Tag . . . . . . . . . . . . . .
Form feed (FORMFEED) Tag . . . . . . . . . . . . . . . . .
Initialize Printer (INITPRT) Tag . . . . . . . . . . . . . . . . .
Line Feed (LINEFEED) Tag . . . . . . . . . . . . . . . . . .
Set Lines per Inch (LPI) Tag . . . . . . . . . . . . . . . . .
Set Page Length in Lines (PAGLENL) Tag . . . . . . . . . . . .
Contents

. 192
. 193
. 194
. 195
. 196
. 196
. 197
. 197
. 198
. 199
. 200
. 200
. 200
. 201
. 201
. 201
. 202
. 202
. 203
. 203
. 204

. 205
. 205
. 206
. 206
. 207
. 207
. 207
. 208
. 208
. 209
. 209
. 209
. 211
. 211
. 211
. 211
. 212
. 212
. 212
. 213
. 213
. 213
. 213
. 214
. 214
. 214
. 215
. 215
. 215
. 215
. 216
. 216

vii

Paper Feed (PRTFEED) Tag . . . . . . . . . . . . . . . . . . 217
Paper Orientation (PRTORIENT) Tag . . . . . . . . . . . . . . . 217
Print Quality (PRTQLTY) Tag . . . . . . . . . . . . . . . . . . 218
Start Proportional Space (STRPROP) Tag . . . . . . . . . . . . . 218
End Proportional Space (ENDPROP) Tag. . . . . . . . . . . . . . 218
Quality Font Download (SETQLTY) Tag . . . . . . . . . . . . . . 219
Space (SPACE) Tag . . . . . . . . . . . . . . . . . . . . . 219
Set Standard Character Height (STDCHRH) Tag . . . . . . . . . . . 219
Start Subscript (STRSUBS) Tag . . . . . . . . . . . . . . . . . 219
End Subscript (ENDSUBS) Tag . . . . . . . . . . . . . . . . . 220
Start Superscript (STRSUPS) Tag . . . . . . . . . . . . . . . . 220
End Superscript (ENDSUPS) Tag. . . . . . . . . . . . . . . . . 220
Table Name (TBLNAME) Tag . . . . . . . . . . . . . . . . . . 220
Translation Printer Definition Table (TRNEBCDIC) Tag . . . . . . . . . 221
End Translation Printer Definition Table (ETRNEBCDIC) Tag . . . . . . . 221
Translation Entry (TRNEBCDICE) Tag . . . . . . . . . . . . . . . 221
Start Underscore (STRUS) Tag . . . . . . . . . . . . . . . . . 221
End Underscore (ENDUS) Tag . . . . . . . . . . . . . . . . . . 221
Set Vertical Units (VERUNT) Tag . . . . . . . . . . . . . . . . . 222
Additional Tags for Use with 3486, 3487, and 3488 Displays . . . . . . . . 222
Adjust Horizontal Origin (ADJHRZORG) Tag. . . . . . . . . . . . . 222
Adjust Vertical Origin (ADJVERORG) Tag. . . . . . . . . . . . . . 222
Set Characters per Inch (CPI) Tag . . . . . . . . . . . . . . . . 223
Set Characters per Inch in COR Mode (CPICOR) Tag . . . . . . . . . 223
Duplex Printing (DUPXPRT) Tag . . . . . . . . . . . . . . . . . 224
Half Line Feed (HLFLINEFEED) Tag . . . . . . . . . . . . . . . 224
Jog Output Tray (JOGOUTTRAY) Tag . . . . . . . . . . . . . . . 225
Select Next Side Printing in Duplex (NXTDUPXPRT) Tag . . . . . . . . 225
Paper Orientation (PRTORIENT) Tag . . . . . . . . . . . . . . . 225
Reverse Half Line Feed (RVSHLFLINEFEED) Tag . . . . . . . . . . 226
Reverse Line Feed (RVSLINEFEED) Tag . . . . . . . . . . . . . . 226
Set Simplex Printing (SMPXPRT) Tag . . . . . . . . . . . . . . . 226
Set Tumble Duplex Printing (TUMDUPXPRT) Tag. . . . . . . . . . . 226
Set Vertical Units in Half (VERUNTHLF) Tag . . . . . . . . . . . . 227
Customizing a Hewlett-Packard LaserJet Series IIP Printer Attached to a 3477
Twinaxial Display . . . . . . . . . . . . . . . . . . . . . . . 227
Setting up the 3477 Model H Display . . . . . . . . . . . . . . . 227
Step 1: Planning the Customizing. . . . . . . . . . . . . . . . . 228
Step 2: Retrieving the Workstation Customizing Object Source . . . . . . 231
Step 3: Changing the Source . . . . . . . . . . . . . . . . . . 232
Step 4: Creating the Workstation Customizing Object . . . . . . . . . 233
Step 5: Varying On the Device . . . . . . . . . . . . . . . . . . 234
Chapter 12. Customizing ASCII Printers That Use the Emulator on theController . . . . . . . . . . . . . . . . . . . . . . .
Supported ASCII Printers . . . . . . . . . . . . . . . . . . .
Customizing Unsupported ASCII Printers . . . . . . . . . . . . .
Mapping Tables for ASCII Printers . . . . . . . . . . . . . . .
Default EBCDIC-to-ASCII Mapping Table . . . . . . . . . . . .
ASCII Printer Function Table . . . . . . . . . . . . . . . .
Printer Multilanguage EBCDIC-to-ASCII Mapping Table. . . . . . .
Determining Which ASCII Printer Tables to Use . . . . . . . . . .
Working with the Tag Language for Directly Attached ASCII Printers . . .
Using the Tags to Customize ASCII Printers . . . . . . . . . . . .
Default EBCDIC-to-ASCII Mapping Table (PDFTMAPTBL) Tag . . . .
End Default EBCDIC-to-ASCII Mapping Table (EPDFTMAPTBL) Tag. .

viii

OS/400 Workstation Customization Programming V4R3

.
.
.
.
.
.
.
.
.
.
.
.

. 237
. 237
. 237
. 239
. 239
. 241
. 241
. 243
. 244
. 246
. 246
. 246

EBCDIC-to-ASCII Mapping Table (PDFTEBCTBL) Tag . . . . . . . . . 246
Font Width Mapping Table (PFNTWTH) Tag . . . . . . . . . . . . . 247
ASCII Printer Function Table (PFCNTBL) Tag . . . . . . . . . . . . 247
Multilanguage EBCDIC-to-ASCII Mapping Table (PMLGMAPTBL) Tag . . . 247
End Multilanguage EBCDIC-to-ASCII Mapping Table (EPMLGMAPTBL) Tag . 248
EBCDIC-to-ASCII Mapping Table (PMLGEBCTBL) Tag . . . . . . . . . 248
Printer Function Tags . . . . . . . . . . . . . . . . . . . . . 250
Syntax for Printer Function Tags with a Variable . . . . . . . . . . . 251
Syntax for Printer Function Tags with Variable and Relative Movement . . . 253
ASCII Control Code Mapping (ASCIICTL) Tag . . . . . . . . . . . . 254
Collate Width (COLLATE) Tag . . . . . . . . . . . . . . . . . . 255
Set Characters per Inch (CPI) Tag . . . . . . . . . . . . . . . . 255
Default Font ID (DFTFNTID) Tag . . . . . . . . . . . . . . . . . 256
Drawer Selection (DWRSLT) Tag . . . . . . . . . . . . . . . . . 256
Font ID Mapping (FNTMAP) Tag . . . . . . . . . . . . . . . . . 257
End Font ID Mapping (EFNTMAP) Tag . . . . . . . . . . . . . . . 258
Font Mapping Table Entry (FNTMAPE) Tag . . . . . . . . . . . . . 258
Font Quality (FONTQLTY) Tag . . . . . . . . . . . . . . . . . . 258
Set Margin (MARGIN) Tag . . . . . . . . . . . . . . . . . . . 259
Set Page Length in Lines (PAGLENL) Tag . . . . . . . . . . . . . 259
Page Size for Printer Function Table (PAGSIZPFT) Tag . . . . . . . . 260
Paper Feed (PRTFEED) Tag . . . . . . . . . . . . . . . . . . 261
Paper Orientation (PRTORIENT) Tag . . . . . . . . . . . . . . . 261
Print Quality (PRTQLTY) Tag . . . . . . . . . . . . . . . . . . 262
Tag Considerations for Customizing a Directly Attached ASCII Printer . . . . 262
Using the Superscript and Subscript Tags. . . . . . . . . . . . . . 262
Using the Set Page Length Tag . . . . . . . . . . . . . . . . . 263
Using the Font Selection Tags . . . . . . . . . . . . . . . . . . 264
Customizing a Hewlett-Packard LaserJet Series III Printer that Uses theEmulator on the Workstation Controller . . . . . . . . . . . . . . . 266
Step 1: Planning the Customizing. . . . . . . . . . . . . . . . . 267
Step 2: Retrieving the Workstation Customizing Source . . . . . . . . 276
Step 3: Changing the Source . . . . . . . . . . . . . . . . . . 277
Step 4: Creating the Workstation Customizing Object . . . . . . . . . 304
Step 5: Varying On the Device . . . . . . . . . . . . . . . . . . 304
Appendix A. Twinaxial Keyboard Layouts .
5250 Data Entry Keyboard Layout . . . .
5250 Typewriter Keyboard Layout . . . .
122-Key Data Entry Keyboard Layout . . .
122-Key Typewriter Keyboard Layout . . .
Enhanced Keyboard Layout . . . . . . .

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

. 307
. 307
. 308
. 308
. 308
. 309

Appendix B. Source Code Examples. . . . . . . . . . . . . . . . 311
Source Code for 3477 Twinaxial Display . . . . . . . . . . . . . . . 311
Source Code for 3151 ASCII Display . . . . . . . . . . . . . . . . 321
Source Code for 4029 ASCII Printer That Uses the Host Print Transform
Function . . . . . . . . . . . . . . . . . . . . . . . . . . 328
Source Code for 4019 ASCII Printer That Uses the Emulator on the Controller . 334
Source Code for HP4 ASCII Printer That Uses the Host Print Transform
Function . . . . . . . . . . . . . . . . . . . . . . . . . . 359
Appendix C. Character to Hexadecimal Value Tables . . . . . . . . . 367
ASCII Character Code to Hexadecimal Value Chart . . . . . . . . . . . 367
EBCDIC Character Code to Hexadecimal Value Chart . . . . . . . . . . 367

Contentsix

Appendix D. Setting Up to Customize a Display . . . . . . . . . . . 369
Setting Up to Customize an ASCII Display . . . . . . . . . . . . . . 369
Setting Up a 3477 Twinaxial Display. . . . . . . . . . . . . . . . . 371
Appendix E. Workstation Customizing Planning Work Sheets . . . . . . 373
Matching Command Parameters . . . . . . . . . . . . . . . . . . 373
Work Sheets for Planning to Customize a Display Workstation . . . . . . . 374
Twinaxial Displays . . . . . . . . . . . . . . . . . . . . . . 375
ASCII Displays . . . . . . . . . . . . . . . . . . . . . . . 376
Work Sheets for Customizing ASCII Printers That Use the Host Print Transform
Function . . . . . . . . . . . . . . . . . . . . . . . . . . 379
Work Sheets for ASCII Printer Functions . . . . . . . . . . . . . . 379
Work Sheet for Customizing ASCII Printers That Use the Emulator on the
Display . . . . . . . . . . . . . . . . . . . . . . . . . . 385
Work Sheets ASCII Printers Attached to 3477 Model H, 3486, 3487, and
3488 Displays . . . . . . . . . . . . . . . . . . . . . . . 386
Additional Work Sheets ASCII Printers Attached to 3486, 3487, and 3488
Displays . . . . . . . . . . . . . . . . . . . . . . . . . 388
Work Sheets for ASCII Printers That Use the Emulator on the Workstation
Controller. . . . . . . . . . . . . . . . . . . . . . . . . . 389
Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . 395
Programming Interface Information . . . . . . . . . . . . . . . . . 397
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . 397
Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . 399
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401
Readers’ Comments — We’d Like to Hear from You. . . . . . . . . . 427

x

OS/400 Workstation Customization Programming V4R3

Figures
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
© Copyright IBM Corp. 1998

Types of AS/400 Displays . . . . . . . . . . . . . . . . . . . xvi
AS/400 Operations Navigator Display . . . . . . . . . . . . . . xvii
Workstation Customizing Procedure Road Map . . . . . . . . . . .
4
Syntax for the Workstation Customizing Object Tag . . . . . . . . . 18
Scan Code Byte Format . . . . . . . . . . . . . . . . . . . 42
5250-Style Keyboard Scan Codes. . . . . . . . . . . . . . . . 43
Enhanced Keyboard Scan Codes . . . . . . . . . . . . . . . . 44
122-Key Keyboard Scan Codes . . . . . . . . . . . . . . . . 45
Source Structure for Twinaxial Displays. . . . . . . . . . . . . . 62
Syntax for the Keyboard Translation Table Tag . . . . . . . . . . . 63
Syntax for the Keyboard Translation State Table Tag . . . . . . . . . 66
Scan Codes for Unassigned Keys on 3477 Model H 122-Key Typewriter
Keyboard . . . . . . . . . . . . . . . . . . . . . . . . . 69
Twinaxial Device Emulation Processes . . . . . . . . . . . . . . 76
IBM 3151 ASCII Display Keyboard Layout. . . . . . . . . . . . . 81
Hexadecimal Code Values for the IBM 3151 ASCII Keyboard. . . . . . 82
Inbound Processing for an ASCII Display . . . . . . . . . . . . . 84
Outbound Processing for an ASCII Display . . . . . . . . . . . . 85
ASCII Display Keyboard Mapping Tables . . . . . . . . . . . . . 86
Source Code Showing Data Substring Restriction . . . . . . . . . . 92
Source Structure for ASCII Displays . . . . . . . . . . . . . . . 94
Syntax for the Update Screen Table Tag . . . . . . . . . . . . . 95
Setting Highlighting Attributes for the Screen . . . . . . . . . . . . 97
Adding New Highlighting Attributes . . . . . . . . . . . . . . . 98
Displaying the Highlighted Characters (1) . . . . . . . . . . . . . 99
Displaying the Highlighted Characters (2) . . . . . . . . . . . . . 99
General Syntax for the Update Screen Tags . . . . . . . . . . . . 105
Syntax for the Set Cursor Address Tag . . . . . . . . . . . . . . 107
Syntax for the Attribute Command Tag . . . . . . . . . . . . . . 111
Syntax for the Set Screen Size Tag . . . . . . . . . . . . . . . 113
Syntax for the Extended Set Cursor Address Tag . . . . . . . . . . 115
Syntax for EBCDIC-to-ASCII Mapping Table Tag . . . . . . . . . . 117
EBCDIC-to-ASCII Mapping Table Format . . . . . . . . . . . . . 118
Syntax for ASCII to Keyboard Function Mapping Table Tag . . . . . . 119
General Syntax for the Keyboard Function Tags . . . . . . . . . . 120
Syntax for the Function Key Tag . . . . . . . . . . . . . . . . 122
Syntax for the ASCII-to-EBCDIC Mapping Table Tag . . . . . . . . . 123
ASCII-to-EBCDIC Mapping Table Format . . . . . . . . . . . . . 124
ASCII to Keyboard Function Mapping Table (Function Key)–Example Work
Sheet . . . . . . . . . . . . . . . . . . . . . . . . . . 126
ASCII Printers That Use the Host Print Transform Function . . . . . . 136
ASCII Printers That Use the Emulator on the Display . . . . . . . . 137
ASCII Printers That Use the Emulator on the Workstation Controller . . . 138
Source Structure for ASCII Printers Attached to Twinaxial Displays . . . 208
Syntax for the ASCII Printer Definition Table Tag . . . . . . . . . . 209
OfficeVision/400 Printer Test Document. . . . . . . . . . . . . . 228
OfficeVision/400 Test Document First Printout . . . . . . . . . . . 229
Final OfficeVision/400 Printer Test Document . . . . . . . . . . . 235
Source for the Default EBCDIC-to-ASCII Mapping Table . . . . . . . 240
Source for the Multilanguage EBCDIC-to-ASCII Mapping Table . . . . . 242
Source Structure for ASCII Printers . . . . . . . . . . . . . . . 245
Decision Structure for Selecting the Subscript and Superscript Tags . . . 263
Decision Structure for Selecting the Correct Page Length Tags . . . . . 264

xi52. Decision Structure for Selecting the Correct Font Selection Tags . . . . 265
53. Matching Command Parameters . . . . . . . . . . . . . . . . 374

xii

OS/400 Workstation Customization Programming V4R3

Tables
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
© Copyright IBM Corp. 1998

Device Does Not Vary On. . . . . . . . . . . . . . . . . . . 30
IBM Twinaxial Displays and Supported Keyboards. . . . . . . . . . 39
1A Keyboard Type Dependent Emulation Scan Codes . . . . . . . . 46
122-Key Typewriter Keyboard Scan Codes Restricted from Remapping . . 50
122-Key Data Entry Keyboard Scan Codes Restricted from Remapping . . 50
5250 Typewriter Keyboard Scan Codes Restricted from Remapping . . . 50
5250 Data Entry Keyboard Scan Codes Restricted from Remapping . . . 51
Enhanced Keyboard Scan Codes Restricted from Remapping . . . . . 51
Format for Translation Table Entries That Map to EBCDIC Characters . . 54
General Format for Translation Table Entries for Diacritics . . . . . . . 56
Sets of Supported Diacritics by Language Group . . . . . . . . . . 56
Translation Table Entry Format for Blank Keys . . . . . . . . . . . 58
Translation Table Entry Format for Scan Codes That Are Not Valid . . . 58
Translation Table Entry Format for Proof Space Character . . . . . . . 58
Translation Table Entry Formats: Cursor Movement Functions . . . . . 59
Translation Table Entry Formats: Field Exit Functions . . . . . . . . 59
Translation Table Entry Formats: Nonaid Functions . . . . . . . . . 59
Translation Table Entry Formats: Immediate Functions . . . . . . . . 59
Translation Table Entry Formats: Function (Cmd) Key Functions . . . . 60
Translation Table Entry Formats: Aid Generating Functions . . . . . . 60
Translation Table Entry Formats: Shift Key Functions. . . . . . . . . 60
Values for the Language Type (LANGTYPE) Parameter. . . . . . . . 63
Language Type and Keyboard Type Considerations . . . . . . . . . 66
Twinaxial Keyboard Translation Table Entries–Example Work Sheet . . . 70
Example: 3151 ASCII Code Sequences . . . . . . . . . . . . . 83
Graphics for Text Control Characters . . . . . . . . . . . . . . 103
Descriptions of the Update Screen Tags . . . . . . . . . . . . . 105
Control Characters for Highlighting an ASCII Display . . . . . . . . . 112
Address Parameter for the Extended Set Cursor Address Command . . . 115
Descriptions of the Keyboard Function Tags . . . . . . . . . . . . 121
Default CCSID Mapping Table . . . . . . . . . . . . . . . . . 191
Printer Function Tags–Example Work Sheet . . . . . . . . . . . . 201
Printer Function Tags with a Variable and Relative Movement . . . . . 209
Printer Function Tags with Only a Data Parameter – Example Work Sheet 230
Printer Function Tags with Variable and Relative Movement – Example
Work Sheet . . . . . . . . . . . . . . . . . . . . . . . . 230
Other Printer Function Tags – Example Work Sheet . . . . . . . . . 231
Required Code Page Identifiers . . . . . . . . . . . . . . . . 249
Printer Function Tags with Data Parameter Only . . . . . . . . . . 250
Printer Function Tags with a Variable . . . . . . . . . . . . . . 251
Printer Function Tags with Variable and Relative Movement . . . . . . 253
ASCII Character Code to Hexadecimal Value Conversion Table . . . . . 367
EBCDIC Character Code to Hexadecimal Value Conversion Table . . . . 367
Matching Command Parameters--Devices That Do Not Use Host Print
Transform Function . . . . . . . . . . . . . . . . . . . . . 373
Matching Command Parameters--Printers That Use Host Print Transform
Function . . . . . . . . . . . . . . . . . . . . . . . . . 374
Command Parameters for ASCII Printers That Use the Host Print
Transform Function . . . . . . . . . . . . . . . . . . . . . 379
Customizing Printer Controls . . . . . . . . . . . . . . . . . 379
Customizing Printer Data Streams . . . . . . . . . . . . . . . 380
Customizing Print Media Size . . . . . . . . . . . . . . . . . 380
Customizing Highlighting . . . . . . . . . . . . . . . . . . . 380

xiii

50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.

xiv

Customizing Horizontal Spacing and Movement . . . . . . . . . . 381
Customizing Vertical Spacing and Movement . . . . . . . . . . . 381
Customizing Indexing . . . . . . . . . . . . . . . . . . . . 382
Customizing Color . . . . . . . . . . . . . . . . . . . . . 382
Customizing the No Print Border . . . . . . . . . . . . . . . . 383
Customizing Page Length. . . . . . . . . . . . . . . . . . . 383
Customizing Paper Drawer Selection . . . . . . . . . . . . . . 383
Customizing Paper Orientation . . . . . . . . . . . . . . . . . 384
Customizing Print Quality . . . . . . . . . . . . . . . . . . . 384
Customizing Fonts . . . . . . . . . . . . . . . . . . . . . 384
Customizing Code Page Support . . . . . . . . . . . . . . . . 384
Printer Function Tags for Printers Attached to 3477 Model H Displays . . 386
Additional Printer Function Tags for Printers Attached to 3486, 3487, and
3488 Displays . . . . . . . . . . . . . . . . . . . . . . . 388

OS/400 Workstation Customization Programming V4R3

||

About Workstation Customization Programming (SC41-5605)

|
|
|
|

This book provides introductory, procedural, and reference information about the
OS/400 workstation customizing functions. The workstation customizing functions
allow you to map both supported and unsupported twinaxial keyboards, ASCII
display and keyboards, and ASCII printers for use with the AS/400 system.

|||

You should also have the International Application Development readily available tolook up information about the EBCDIC code pages associated with the language
you are using.

|

For a list of related publications, see the “Bibliography” on page 399.

||

Who should read this book||

This publication is intended for experienced technical professional who areknowledgeable about configurations of keyboards, displays, and printers.

|
|
|
|
|

Before using the workstation customizing funcations, your AS/400 system should beup and running. You should have your licensed programs installed, including IBM
Application Development ToolSet (Program 5769-PW1). The new devices you want
to use with the system should be physically attached to the system to complete thecustomizing procedures.

|
|
|
|
|
|
|

Conventions and terminology used in this book
The AS/400 displays in this book could be shown as they are presented throughGraphical Access for AS/400, which is part of Client Access on the personal
computer. The example displays in this book could also be shown without GraphicalAccess for AS/400 available. Figure 1 on page xvi shows both types of displays.

© Copyright IBM Corp. 1998

xv

Figure 1. Types of AS/400 Displays||

AS/400 Operations Navigator

|
|
|
|
|

AS/400 Operations Navigator is a powerful graphical interface for Windows 95/NT
clients. With AS/400 Operations Navigator, you can use your Windows 95/NT skills
to manage and administer your AS/400 systems.
v You can work with basic operations (messages, printer output, and printers), job
management, system configuration, network administration, security, users andgroups, database administration, file systems, and multimedia.
v You can schedule regular system backups, work with Interprocess
Communication through application development, and manage multiple AS/400
systems through a central system by using Management Central. You can also
customize the amount of Operations Navigator function that a user or user group
can use through application administration.
v You can create a shortcut to any item in the explorer view of Operations
Navigator. For example, you can create a shortcut either to Basic Operations or
to the items that are listed under Basic Operations (Messages, Printer Output,
and Printers). You can even create a shortcut to an individual printer or use ashortcut as a fast way to open the item.

|

Figure 2 on page xvii shows an example of the Operations Navigator display:

|
|
|
|
|
|
|
|
|
|
|

|

xvi

OS/400 Workstation Customization Programming V4R3

Figure 2. AS/400 Operations Navigator Display|||

IBM recommends that you use this new interface. It has online help to guide you.
While we develop this interface, you will still need to use either of the following to
do some of your tasks:||v Graphical Access (which provides a graphical interface to AS/400 screens).
Graphical Access is part of the base Client Access.

|v A traditional emulator such as PC5250.

|

Installing Operations Navigator subcomponents|

AS/400 Operations Navigator is packaged as separately installable subcomponents.
If you are upgrading from a previous release of AS/400 Operations Navigator, only
those subcomponents that correspond to the function that is contained in theprevious release will be installed. If you are installing for the first time and you use
the Typical or Minimum installation options, the following options are installed bydefault:v Operations Navigator base support|

v Basic operations (messages, printer output, and printers)|||

To install additional AS/400 Operations Navigator subcomponents, either use theCustom installation option or use selective setup to add subcomponents after
Operations Navigator has been installed:|||

1. Display the list of currently installed subcomponents in the Component
Selection window of Custom installation or selective setup.
2. Select AS/400 Operations Navigator and click Details.

||

3. Select any additional subcomponents that you want to install and continue with
Custom installation or selective setup.

|
|
|
|

Note: To use AS/400 Operations Navigator, you must have Client Access installed
on your Windows 95/NT PC and have an AS/400 connection from that PC.
For help in connecting your Windows 95/NT PC to your AS/400 system,
consult Client Access for Windows 95/NT - Setup, SC41-3512.

|
|
|
|
|
|

|
|
|
|

Accessing AS/400 Operations Navigator
To access Operations Navigator after you install Client Access and create an
AS/400 connection, do the following:
1. Double-click the Client Access folder on your desktop.
About Workstation Customization Programming (SC41-5605)

xvii

2. Double-click the Operations Navigator icon to open Operations Navigator. You
can also drag the icon to your desktop for even quicker access.

|
|
|
|

Prerequisite and related information
Use the AS/400 Information Center as a starting point for your AS/400 informationneeds. It is available in either of the following ways:
v The Internet at this uniform resource locator (URL) address:|||

http://publib.boulder.ibm.com/html/as400/infocenter.html||

v On CD-ROM: AS/400e series Information Center, SK3T-2027.

|
|
|
|
|

The AS/400 Information Center contains browsable information on important topics
such as Java, program temporary fixes (PTFs), and Internet security. It also
contains hypertext links to related topics, including Internet links to Web sites suchas the AS/400 Technical Studio, the AS/400 Softcopy Library, and the AS/400 home
page.

|

For a list of related publications, see the “Bibliography” on page 399.

||

How to send your comments
Your feedback is important in helping to provide the most accurate and high-quality
information. If you have any comments about this book or any other AS/400
documentation, fill out the readers’ comment form at the back of this book.
v If you prefer to send comments by mail, use the readers’ comment form with theaddress that is printed on the back. If you are mailing a readers’ comment form
from a country other than the United States, you can give the form to the local
IBM branch office or IBM representative for postage-paid mailing.
v If you prefer to send comments by FAX, use either of the following numbers:

|
|
|
|
|
|
|
|

– United States and Canada: 1-800-937-3430– Other countries: 1-507-253-5192|||

v If you prefer to send comments electronically, use this network ID:– IBMMAIL, to IBMMAIL(USIB56RZ)– RCHCLERK@us.ibm.com|

Be sure to include the following:|v The name of the book.
v The publication number of the book.
v The page number or topic to which your comment applies.

|
|

|
|

xviii

OS/400 Workstation Customization Programming V4R3

Part 1. Customizing Workstations
Chapter 1. Planning For and Setting Up Workstation Customizing .
Workstation Customizing Overview . . . . . . . . . . . . . .
Preparing for Workstation Customizing . . . . . . . . . . . . .
Workstation Controllers . . . . . . . . . . . . . . . . .
Displays . . . . . . . . . . . . . . . . . . . . . . .
ASCII Printers . . . . . . . . . . . . . . . . . . . . .
OS/400 Workstation Customizing Function Limitations . . . . . . .
Setting Up Workstation Customizing. . . . . . . . . . . . . .
Errors and Recovery . . . . . . . . . . . . . . . . . . .
Verifying That Planning Is Complete . . . . . . . . . . . . . .

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
3
.
3
.
5
.
6
.
7
.
7
.
7
.
7
.
9
. 10

Chapter 2. Retrieving the Workstation Customizing Source . . . . . .
Devices That Use the Emulator on the Workstation Controller or Display . .
Retrieving Source for Devices That Use the Emulator on the Workstation
Controller or the Display . . . . . . . . . . . . . . . . . .
Printers that Use the Host Print Transform Function . . . . . . . . . .
Retrieving Source for ASCII Printers That Use the Host Print Transform
Function . . . . . . . . . . . . . . . . . . . . . . . .
Retrieving Source for Devices Not Supported by IBM . . . . . . . . .
Errors and Recovery . . . . . . . . . . . . . . . . . . . . .
Verifying the Source Is Retrieved Successfully . . . . . . . . . . . .

.
.
.
.

13
13
14
15

Chapter 3. Changing the Source to Customize Your Workstations .
Using Control Codes, Escape Sequences, and Control Sequences . .
Structure of Customizing Objects . . . . . . . . . . . . . . .
Using Source Entry Utility to Change the Tags and Keywords . . . .
General Programming Considerations for Workstation Customizing . .
Finding the Hexadecimal Values for the Tags . . . . . . . . .
Errors and Recovery . . . . . . . . . . . . . . . . . . .
Verifying That the Source Changes Are Complete. . . . . . . . .

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

17
17
18
19
20
21
21
22

Chapter 4. Creating the Workstation Customizing Object.
Compiling and Creating the Workstation Customizing Object.
Errors and Recovery . . . . . . . . . . . . . . .
Verifying the Workstation Customizing Object Is Created . .

.
.
.
.

.
.
.
.

.
.
.
.

23
23
24
25

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

Chapter 5. Testing the Customizing Object . . . . . . . . . .
Changing the Device Description . . . . . . . . . . . . . . .
Varying On the Device . . . . . . . . . . . . . . . . . . .
Starting the Printer Writer for a Printer That Uses Host Print Transform
Function . . . . . . . . . . . . . . . . . . . . . . .
Errors and Recovery . . . . . . . . . . . . . . . . . . .
Verifying a Successful Vary On . . . . . . . . . . . . . . .

© Copyright IBM Corp. 1998

.
.

11
11

. 11
. 13

. . . 27
. . . 27
. . . 27
. . . 28
. . . 28
. . . 32

1

2

OS/400 Workstation Customization Programming V4R3

Chapter 1. Planning For and Setting Up Workstation
Customizing
This chapter provides a brief overview of the workstation customizing procedureand then describes the planning step in the procedure. A list of the possible errors
and the necessary steps for recovery is provided, followed by a planning checklist
that tells you what you need to have when the planning step is complete. You canfind examples of the planning step for the workstation customizing procedure in thereference chapters in Part 2 and Part 3 of this book.

Workstation Customizing Overview
The workstation customizing functions provided by the IBM Operating System/400
licensed program allow you to do the following:v Change the way a local or remote workstation controller supports displays,
keyboards, and ASCII printers that you use with your AS/400 system.
v Change the way a twinaxial display supports ASCII printers that you use withyour AS/400 system.
v Change the way the host print transform function supports the ASCII printers thatyou use with your AS/400 system.
Some of the workstation characteristics you can add or change are listed below:
Command key sequences
Special character support (display and print)
Function key support
Shift state key processing
Bold, underlined, and double width printing
Font and pitch support
Paper orientation
Paper selection
Customizing Limitationsv Workstation customizing supports only those functions supported by theworkstation controller, the display, or the host print transform function and thedevice itself.
v If the workstation controller, the display, or the host print transform function
cannot support a particular function, the function cannot be added using theworkstation customizing functions.
v If a device is not capable of performing a function, or displaying or printing acharacter, workstation customizing does not and cannot provide the additional
function.
v The workstation customizing functions require that you provide hexadecimal data
corresponding to the characters and functions supported by your device. You
must have this information to customize device functions.
To change the characteristics of workstations and printers, you change copies of the
mapping tables used for character translation and function translation. You thencreate a customizing object. A road map showing the basic steps of the workstation
customizing procedure is shown in the following figure. The steps are denoted© Copyright IBM Corp. 19983

throughout the first part of this book by the reference numbers (for example, step 1)
that appear in the figure.

Figure 3. Workstation Customizing Procedure Road Map. Step 7 applies only to printers that use the host print
transform function with spooled print jobs. For printers that use the host print transform function with nonspooled print
jobs, the customized table is activated when the job is printed.

To begin the workstation customizing procedure, there are some things you should
do before you actually customize the device. First, you need to familiarize yourself
with the display or printer device you want to customize. This means you should
read the books and available reference material for the device and understand thecharacteristics you want to change. If the device has never been used with the
AS/400 system before, or it is a device that is not supported by IBM, you need toconnect the device to the system, see how it works, and then create a list of thecharacteristics you want to change. You also need the hexadecimal codes for thedevice. The hexadecimal codes provide you with values for customizing theappropriate mapping tables.
If you are using a language other than English, you may also have language
concerns you need to address. The language a workstation uses determines how
you should define several characteristics when you first set up the AS/400 systemand the workstation itself.
You may be working with more than one language on your AS/400 system. For
example, suppose the primary language used on the system is US English, butsome of your workstations are set up to display French. The device description for
the workstations using the secondary language must indicate the correct keyboard
language type and character identifier. Indicating the correct keyboard language
type and character identifier ensures the correct mapping tables are used to display
data.
For more information about language-specific concerns with workstation
customizing, see the language considerations discussed in the following chapters in
the reference section of this book:v Chapter 7. Customizing Twinaxial Displays
v Chapter 8. Customizing ASCII Displays

4

OS/400 Workstation Customization Programming V4R3

v Chapter 10. Customizing ASCII Printers That Use the Host Print Transform
Functionv Chapter 11. Customizing ASCII Printers That Use the Emulator on the Display
v Chapter 12. Customizing ASCII Printers That Use the Emulator on the Controller
For more general information about setting up and using national language support,
see the sections about using and changing a secondary language and system
coded character set identifier (CCSID) implementation in the National Language
Support book and the other language support books listed in the Bibliography.
The next step in the workstation customizing procedure is to retrieve or create acustomizing source file. To retrieve a source file member based on existing AS/400
supported devices, use the Retrieve Work Station Customizing Object Source(RTVWSCST) command. The retrieved source contains copies of the system
mapping tables for the device or manufacturer type and model you specified in thecommand. The source also contains the correct tags for the type of device or
manufacturer type and model. For examples of retrieved source file members thathave not been changed, see Appendix B. Source Code Examples.
A tag language is provided for you to change the mapping tables that you retrieve.
The tag language provides a shell for the system-based mapping tables that areused to map data and functions between the AS/400 system and the device you arecustomizing. For a description of the tag language for workstation customizing, see
Chapter 3. Changing the Source to Customize Your Workstations.
After you have completed your changes in the source file member, you use theCreate Work Station Customizing Object (CRTWSCST) command to create acustomizing object. Specifying the name of that object in the device description forthe display or printer links the object to the device. If a customized object is used by
the host print transform function, it is activated when:v The printer writer is started (spooled print jobs)
v A job is printed (nonspooled print jobs)
Otherwise, the customized mapping tables are downloaded to the workstation
controller when you vary on the device. The customized tables are used to map thedata from the device to the AS/400 system and from the system back to the device.
If you need to delete a workstation customizing object from your system, use theDelete Work Station Customizing Object (DLTWSCST) command.

Preparing for Workstation Customizing
If you are already using an ASCII workstation or printer, you or your users may
have identified certain functions that are not supported the way that you would wantor expect. For example, you press a key and the character displayed is not thecharacter engraved on the key. Or, although your ASCII printer prints mostcharacters correctly, there are some characters specific to the language you usethat you would also like to have print correctly. The workstation customizing
functions can help you correct these problems.
The following list shows the device types that can be customized using the OS/400
workstation customizing functions:v Twinaxial keyboards (twinaxial workstations)v ASCII displays and keyboards (ASCII workstations)v ASCII printers that use the host print transform function
Chapter 1. Planning For and Setting Up Workstation Customizing

5v ASCII printers (attached to 3477 Model H, 3486, 3487, or 3488 twinaxial
workstations) that use the emulator on the displayv ASCII printers (directly attached to the AS/400 system) that use the emulator on
the workstation controller
Before you begin using the workstation customizing functions, your AS/400 system
must be up and running, and you need to have at least one workstation configured
and usable. The workstations you want to customize should be physically attachedto the AS/400 system, and you also should have created all the appropriate line (ifremote), controller, and device descriptions.
You may need to refer to some or all of the following books when customizing adevice:v Reference book for the device you want to customize
v ASCII Work Station Referencev National Language Support
It is absolutely critical that you have the hexadecimal codes for the device you wantto customize. This information is often included in the reference book for the device.
The device book also gives you an understanding of what functions the device iscapable of performing and which language or character sets it supports.
The following sections briefly describe some of the equipment and the mappingtables for which you use the workstation customizing functions.

Workstation Controllers
The following local and remote workstation controllers can use the customized
mapping tables you create with the workstation customizing functions.
Note: Customized printers that use the host print transform function do not haveworkstation controller dependencies.
v Local Workstation Controllers
2661: Twinaxial local workstation controller
2638: Twinaxial local workstation controller
6040: Twinaxial local workstation controller
6050: Twinaxial local workstation controller
6140: Twinaxial local workstation controller
2637: ASCII local workstation controller
6041: ASCII local workstation controller
6141: ASCII local workstation controllerv Remote Workstation Controllers
5494 Remote workstation controller (Release 1 Modification 1)
Note: The 5494 is a twinaxial workstation controller. The customizing process fora remote workstation attached to the 5494 is the same as it would be fora local twinaxial workstation.
The workstation controller uses the mapping tables loaded from the AS/400 system
to translate data back and forth between the workstation or printer and the system.
When you change the hexadecimal values in the mapping tables, you customize
the associated device. The customized tables and attributes are then compiled and6

OS/400 Workstation Customization Programming V4R3

stored in the customizing object you create. This object is used to createcustomized mapping tables that are downloaded to the workstation controller the
next time you vary on the workstation or printer. You can use a single customizing
object for more than one workstation or printer, or you may want a different
customizing object for each device.

Displays
The IBM Corporation sells a wide variety of displays that can be connected to the
AS/400 system. The OS/400 workstation customizing functions support both thetwinaxial display and the ASCII display. Displays are attached to the AS/400 system
by way of a workstation controller. Both the ASCII workstation controller and thetwinaxial workstation controller use mapping tables downloaded from the AS/400
system to support the input/output (I/O) for these devices.
The workstation controller processes I/O for a display in two ways. Inboundprocessing refers to keystroke and function processing from the display to the
AS/400 system. Outbound processing refers to character and function processing
from the AS/400 system to the display. The workstation customizing functions allow
you to customize both types of processing for an ASCII display, but only the
inbound, or keystroke processing can be customized for a twinaxial display.

ASCII Printers
A wide variety of ASCII printers can be attached to the AS/400 system. ASCII
printers receive and process data by way of an ASCII data stream. One example of
an ASCII data stream is the IBM page printer data stream (PPDS). ASCII printers
understand only the ASCII data stream and commands. The AS/400 system andapplications produce an EBCDIC data stream. Therefore, the AS/400 system treats
all ASCII printers as emulated AS/400 printers.
This means that the EBCDIC data stream is converted to an ASCII data stream.
Some restrictions exist on the printing functions that are supported because of theselected emulation type, the ASCII printer type, and the connection type. Some of
the more general functions that may not be supported include graphics, images,
and bar codes. For more information on customizing printers, see Chapter 9.
Customizing Printers.

OS/400 Workstation Customizing Function Limitations
Most manufacturers design displays and printers that support the specific character
sets for the countries in which the devices are sold. The character set support iseither built into the hardware for the device or embedded into the internal code forthe device. This places limitations on the OS/400 customizing functions.

Setting Up Workstation Customizing
In most cases, you are already aware of some characteristics that you would like tochange about the way your device works with the AS/400 system. In other cases,
the device has never been attached to the AS/400 system. You may need toexperiment with it to see which characteristics you want to change. Either way, youneed to gather the following information before you put together your workstation
customizing plan:v Reference books for your device
Chapter 1. Planning For and Setting Up Workstation Customizing

7

v A copy of the customizing source for the device
v Information about the tag language used for customizingv A list of characters, command, and control sequences you want to change
Notes:
1. If you are customizing an ASCII display station, you also need to have the
ASCII Work Station Reference.
2. If you are customizing an ASCII printer that uses the emulator on theworkstation controller, you also need to have theASCII Work Station Reference.
3. If you are using one or more national languages, you also need to have the
National Language Support book.
The second and third items in this list are covered in the reference part of this book.
The last item comes from your or your user’s experience with the device to becustomized. If you are customizing the tables for a device that is not supported byIBM, you may also want to have the reference information for a similarIBM-supported device so that you can compare the character values and control
sequences. To complete the planning for customizing your workstation, do thefollowing:
1. Read the reference books for the device and know what the control codes andfunction codes are and where they are located in the book.
2. Experiment with the device to find out which characteristics you would like tochange. For example, you may need to change the way a character is displayedor printed. You may want to change the way a certain character is displayedwhen used with the Shift key or change the function of a command or control
key sequence.
3. Use the work sheets provided in Appendix E. Workstation Customizing PlanningWork Sheets to make a note of these characteristics and check the device
reference books to find out the following:v Does the device itself support the character or function you want to add orchange? (Is the device capable of producing the character or performing thefunction?)
Note: If a device cannot support a character or function, the workstation
customizing functions cannot provide the missing support.
v If the device can support the character or function, what is the hexadecimal
or integer representation for that character or function?
4. Familiarize yourself with the way the AS/400 workstation controller, the display,or the host print transform function handles the mapping tables for the type ofdevice you want to customize.
5. Read the tag language descriptions in Part 2 and Part 3 of this book tounderstand the tags you use to customize your device.
6. Use the information in the following sections of this book to determine how tocustomize your device:v Twinaxial keyboard: see “Determining Which Twinaxial Keyboard Translation
Table to Customize” on page 51.
v ASCII display: see “Determining Which ASCII Display Tables to Customize”
on page 92.
v ASCII printer that uses the host print transform function: see “Choosing theCustomizing Source” on page 147.

8

OS/400 Workstation Customization Programming V4R3

v ASCII printer that uses the emulator on the display: see “Determining Which
ASCII Printer Tables to Use” on page 207.
v ASCII printer that uses the emulator on the workstation controller: see“Determining Which ASCII Printer Tables to Use” on page 243.
Examples showing this step of the workstation customizing procedure areprovided for each device class in the corresponding reference chapters in Part 2
and Part 3 of this book. When the planning step is complete, you should havean understanding of the device you want to customize, the customizing
procedures, and a list of the characteristics (and their hexadecimal values if
applicable) for the device you want to customize.

Errors and Recovery
The following list describes errors that can occur during the steps of planning andsetting up workstation customizing. The list also recommends some things to do torecover from the error.
v Missing reference information for the device
If you do not have the reference information for the device you want tocustomize, you will not be able to use the workstation customizing functions.
OS/400 workstation customizing is dependent on the hexadecimal codes andsequences that a device sends or understands. The reference book for thedevice should provide this information. If you do not have the reference book forthe device, contact your sales representative or the manufacturer of the device
and request a copy.
v ASCII display does not show Sign On display
If you cannot sign on to the AS/400 system, you cannot experiment with thedisplay to see what needs to be customized. Use the procedure provided inAppendix D. Setting Up to Customize a Display. If you still cannot sign on using
the display, you can try to continue to customize the display by changing a few
characteristics in the source at a time, compiling the object, and testing it with thedisplay. The best characteristics to start with are the Clear Screen and Set
Cursor Address commands.
v ASCII printer does not produce any printouts
If your printer does not produce any printouts, one of the following errors may becausing the problem:– Your hardware may be set up incorrectly. Check the reference books for yourdisplay, workstation controller, and printer, as appropriate, to resolve thisproblem.
– Your printer may be configured incorrectly. If the ASCII printer is supported by
IBM and the AS/400 system, you need to check the device type and model
number and verify that this information was entered correctly in the device
description.
If the ASCII printer is not supported by IBM, you may need to try specifying
another device type for the device description. The ASCII Work Station
Reference provides descriptions of some supported ASCII printers that you
can use for comparison with the characteristics of your unsupported ASCII
printer.
– Your 3477 display is not a Model H. Use the procedure in “Setting Up a 3477
Twinaxial Display” on page 371 to verify your 3477 display is a Model H. If
your printer uses the emulator on the twinaxial display, the 3477 display must
Chapter 1. Planning For and Setting Up Workstation Customizing

9

be a Model H. If it is not a Model H, you cannot use the workstation
customizing functions to customize an attached printer. If you would like toupgrade your 3477 to a Model H, contact your marketing representative orservice representative.

Verifying That Planning Is Complete
When the planning step is complete, you should have collected the following:v A list of the device characteristics you want to customize
v The hexadecimal data or integer values associated with the device
characteristics
You should be familiar with the way the workstation controller, the display, or thehost print transform function handles the mapping tables for your device. You
should also have an understanding of the tags you use in the customizing step of
the procedure. (See the chapters for each device type in Part 2 and Part 3 of thisbook.)

10

OS/400 Workstation Customization Programming V4R3

Chapter 2. Retrieving the Workstation Customizing Source
After you have completed the planning for workstation customizing, you are readyto retrieve copies of the workstation customizing source for the device you want tocustomize. Use the Retrieve Work Station Customizing Object Source(RTVWSCST) command to retrieve copies of the workstation customizing source forthe device.
When you retrieve copies, the internal forms of the tables and control sequences
are converted into the source format of the customizing tag language. The source isthen put into a source file member.
Although it is possible to create an entire source file member without retrieving a
copy of existing tables, it is not recommended. The retrieved source provides you
with the correct number of mapping tables for the device or the manufacturer, type,and model you specify. The retrieved source also provides you with the correct
layout and syntax for the tag language code. To look at examples showing thesource retrieved for the different device classes, see Appendix B. Source Code
Examples.

Devices That Use the Emulator on the Workstation Controller or
Display
If you are customizing a device that uses the emulator on the workstation controller
or the display, have the following information available. You need this information to
retrieve the correct source for the device:v Device type
If you are customizing an unsupported device, select a device type that is most
like your device. Doing this allows you to retrieve a source file member that
contains the mapping tables for you to customize. If you cannot determine which
supported device is most like your device, select any ASCII device. Be sure todifferentiate between an ASCII display and an ASCII printer.
v Keyboard language type to be used on this devicev Library and source physical file name for storing your customizing source code
Note: If you are customizing the keyboard for an unsupported twinaxial display, youmust select the supported twinaxial display that your display emulates.
After you determine which device type to select, use the following procedure to
retrieve your workstation customizing source.

Retrieving Source for Devices That Use the Emulator on theWorkstation Controller or the Display
Follow these steps to retrieve workstation customizing source for devices that use
the emulator on the workstation controller or the display station.
1. Type RTVWSCST (Retrieve Work Station Customizing Object Sourcecommand) and press F4 (Prompt).
2. Specify the device type for the device you want to customize. This is a required
parameter. For the lists of IBM-supported devices, see one of the following:v “Types of Displays and Keyboards” on page 39© Copyright IBM Corp. 199811

v “Beginning to Customize ASCII Displays” on page 73
v “Supported ASCII Printers Attached to Twinaxial Displays” on page 205v “Supported ASCII Printers” on page 237
Note: If you are customizing an ASCII printer attached to a twinaxial display,specify the display type for this parameter. Do not specify the printertype. (If you are customizing an ASCII printer attached to a 3488 display,specify that the printer is attached to a 3487 display. The OS/400
customizing functions treat a 3488 display station as a 3487 display
station.)3. Specify the keyboard language type you want to use for this device. This is arequired parameter. A list of the languages you can specify here is in Table 22
on page 63, or you can use the help information on the system to determine
which language type to specify.
Note: It is important that the keyboard language type you specify here is thesame as the keyboard language type specified in the device description.
If the two keyboard language types specified do not match, then thedevice will not vary on.
4. Specify a name for the source file member to be created for the customizing tag
language source that you want to retrieve. This is a required parameter. Thisshould be a name you can easily remember, possibly related to the device ortype of device you are customizing.
5. Specify the keyboard type. This parameter is required only for customizing
twinaxial displays and twinaxial displays with attached ASCII printers. For
illustrations of the keyboard types you can use with twinaxial displays, see
Appendix A. Twinaxial Keyboard Layouts. Each illustration is associated with akeyword value to assist you in making your selection.
Note: For twinaxial displays, this is a required parameter. The value specified
here must match the actual keyboard type of the display being
customized; otherwise the display will not vary on successfully.
6. Specify a library and source file name to create a source physical file in whichto store the source file member. The library you specify must exist. If the source
physical file already exists, the system adds the new file member to it. If thesource file does not exist, the system creates it for you. The coded character
set identifier for the newly created file is *HEX.
The default value for this field is the system-supplied source file QTXTSRC inlibrary QGPL.
7. Specify a text description for the source file if it does not already have one. The
description should be unique so that you can use it to help you identify thedevices associated with the source file member. This is helpful when you havemore than one source file for more than one device type.
Each device that can be customized has one or more specific mapping ortranslation tables associated with it. The source physical file member you create inthis step should contain all the source code for each of the tables required by thedevice you specified.
Examples showing this step of the workstation customizing procedure are provided
for each device class in the corresponding reference chapters in Parts 2 and 3 ofthis book. After you have retrieved the workstation customizing source, you canbegin changing the source that allows you to customize your device.

12

OS/400 Workstation Customization Programming V4R3

Printers that Use the Host Print Transform Function
If you are customizing a printer that uses the host print transform function, have thefollowing information available. You need this information to retrieve the correctsource for the device:
v Manufacturer, type, and model
If you are customizing an unsupported printer, select a manufacturer, type, andmodel that is most like your device. Doing this allows you to retrieve a source filemember that contains the mapping tables for you to customize.
v Library and source physical file name for storing your customizing source code
After you determine which manufacturer, type, and model to select, use thefollowing procedure to retrieve your workstation customizing source.

Retrieving Source for ASCII Printers That Use the Host Print Transform
Function
Follow these steps to retrieve workstation customizing source for ASCII printers that
use the host print transform function.
1. Type RTVWSCST (Retrieve Work Station Customizing Object Sourcecommand) and press F4 (Prompt).
2. Specify *TRANSFORM for the device type. This is a required parameter.
3. Specify the manufacturer, type, and model for the ASCII printer you want tocustomize. Press F4 (Prompt) in the Manufacturer type and model field to see alist of values you can specify. This is a required parameter.
4. Specify a name for the source file member to be created for the source that you
want to retrieve. This is a required parameter. This should be a name you caneasily remember, possibly related to the manufacturer, type, and model name.
5. Specify a library and source file name to create a source physical file in whichto store the source file member. The library you specify must exist. If the source
physical file already exists, the system adds the new file member to it. If thesource file does not exist, the system creates it for you. The coded character
set identifier for the newly created file is *HEX.
The default value for this field is the system-supplied source file QTXTSRC in*LIBL.
6. Specify a text description for the source file if it does not already have one. The
description should be unique so that you can use it to help you identify thedevices associated with the source file member. This is helpful when you havemore than one source file for more than one manufacturer, type, and model.
Examples showing this step of the workstation customizing procedure are provided
for the TRANSFORM device class in the corresponding reference chapter in Part 3of this book. After you have retrieved the workstation customizing source, you canbegin changing it to customize your device.

Retrieving Source for Devices Not Supported by IBM
If you are customizing the keyboard for an unsupported twinaxial display, you mustselect the supported twinaxial display that your display emulates.

Chapter 2. Retrieving the Workstation Customizing Source13

If you want to create a workstation customizing object for an ASCII device that is
not supported by IBM and you want to retrieve a source file for the object, you needto compare the specifications for the unsupported device with the specifications ofIBM-supported devices. You can also use the ASCII Work Station Reference to help
you match your display with a supported ASCII display. If you find a moderately
close match between sets of specifications, you can then specify the device typeand model of that IBM-supported device in the RTVWSCST command. This allows
you to retrieve source that may be compatible with the unsupported device youwant to customize.
Note: The source you retrieve for an unsupported device based on an
IBM-supported device will not be totally compatible with the device. You may
have to use trial-and-error methods when working with the source to create acustomizing object that works effectively.
If you do not want to attempt to match device specifications or you cannot find an
IBM-supported device that has similar specifications to your device, you can createa source file and blank source file member to enter the tag language and table
information yourself. This method of creating workstation customizing source is notrecommended; however, if you cannot find any IBM-supported devices withmatching specifications, it may be simpler to create a new source file member
yourself than to retrieve and try to change a source file member for a totallydifferent device type.

Errors and Recovery
The following list describes some errors that can occur during this step and what
you can do to recover from the error.
v One or more parameters on the RTVWSCST command not valid
To find out which parameters were not valid, use the Display Job Log(DSPJOBLOG) command and press F10 (Display detailed messages) to look at
the detailed messages that were sent when you ran the RTVWSCST command.
Note the parameter values that the system found to be not valid. Use theplanning information in “Preparing for Workstation Customizing” on page 5 tomake any necessary corrections and try the RTVWSCST command again.
v You are not authorized to use the RTVWSCST command
Have the security administrator (QSECADM) for your system use the Grant
Object Authority (GRTOBJAUT) command to give you the proper authority to use
the command. You can then try the command again.
v Parameter KBD required for this device typeThe keyboard (KBD) parameter is required when you specify a twinaxial display
for the device type (DEVTYPE) parameter. To look at the valid keyboard types fora twinaxial display, see “Types of Displays and Keyboards” on page 39.
v Parameter KBD not allowed for this device typeThe keyboard (KBD) parameter is not allowed when you specify an ASCII display
or printer for the device type (DEVTYPE) parameter. Remove the value you
specified for this parameter and try the RTVWSCST command again.
v Device type specified not compatible with the actual device
This may occur when retrieving workstation customizing source for devices notsupported by IBM. Be sure that the device type you specify for an unsupported
device is the same as the device type of the actual device you are using. For

14

OS/400 Workstation Customization Programming V4R3

example, If your unsupported device is an ASCII display, be sure that the
supported device you select for the device type parameter of the RTVWSCST
command is an ASCII display.
The mapping tables retrieved will not be completely compatible with your device;
however, the source retrieved should contain the appropriate mapping tables andcorresponding customizing language tags. You should be able to make thenecessary changes to the mapping tables in the source using the hexadecimalcode information in the reference book for the device.
v Keyboard language type not allowed
The keyboard language type (KBDTYPE) parameter is not allowed when you
specify *TRANSFORM for the device type (DEVTYPE) parameter. Remove thisvalue and try the RTVWSCST command again.
v Manufacturer type and model not allowed
The manufacturer type and model (MFRTYPMDL) parameter is not allowed when
you specify anything other than *TRANSFORM for the device type (DEVTYPE)
parameter. Remove this value and try the RTVWSCST command again.
v Manufacturer type and model required
The manufacturer type and model (MFRTYPMDL) parameter is required when
you specify *TRANSFORM for the device type (DEVTYPE) parameter. To see theallowed values, type in the RTVWSCST command, and press F4 (Prompt). In the
MFRTYPDML field, press F4 (Prompt). Specify one of the values shown for the
MFRTYPMDL parameter, and try the RTVWSCST command again.
v Keyboard language type required
The keyboard language type (KBDTYPE) parameter is required when you specify
anything other than *TRANSFORM for the device type (DEVTYPE) parameter.
Specify a keyboard language type and try the RTVWSCST command again.
v Source member required
The source member (SRCMBR) parameter is a required parameter. Specify asource member and try the RTVWSCST command again.

Verifying the Source Is Retrieved Successfully
When you have completed the procedure to retrieve the source for the customizing
object, you can use the Source Entry Utility (SEU) to verify the source file member
has been created.
1. Type STRSEU (Start Source Entry Utility) and press F4 (Prompt).
2. Type the name of the source file you created for the workstation customizing
source. (Specify QTXTSRC for this value if you used the system default source
file for the RTVWSCST command.)3. Type the name of the library where the source file you specified is stored. If you
used the system default source file for the RTVWSCST command, specify:
v QGPL as the library for devices that use the emulator on the display or theemulator on the workstation controller.
v *LIBL as the library for printers that use the host print transform function.
4. Type the name of the source file member you specified for the RTVWSCST
command and press the Enter key.
The workstation customizing source should appear on your display. If the systemcannot find the source, press F9 (Retrieve) as needed to look at the names you
specified when you ran the RTVWSCST command. Try the verification procedureagain.
Chapter 2. Retrieving the Workstation Customizing Source15

If you still cannot find the source, verify that the source was created successfully byentering the Display Job Log (DSPJOBLOG) command and pressing F10 (Display
detailed messages) to look at the detailed messages that were sent when you ran
the RTVWSCST command.

16

OS/400 Workstation Customization Programming V4R3

Chapter 3. Changing the Source to Customize Your
Workstations
Now that you have the source file for the customizing object, you can make thechanges necessary for the device to display or print correctly. For this step you
need to have the following information available:v The list of characteristics you want to change and the corresponding
hexadecimal values needed to make the changes (see Chapter 1. Planning For
and Setting Up Workstation Customizing)v The tag language reference informationv The guide and reference information for the device
The workstation customizing source you retrieved in step 2 (Figure 3 on page 4)
contains the mapping tables for the specified device converted into the tag
language structure. To change these tables, you need to understand thehexadecimal codes used by the device and the workstation controller or the hostprint transform function. Understanding the hexadecimal codes helps you make thechanges and additions correctly. These hexadecimal codes are classified as control
codes, escape sequences, and control sequences.

Using Control Codes, Escape Sequences, and Control Sequences
Some applications send commands to the devices they use in the form of control
codes, escape sequences, or control sequences. These commands are sent within
the data stream to provide instructions for the display and printer devices. The
codes and sequences may be called other names by device manufacturers otherthan IBM. The important thing is that the ASCII command sequence is a string of
hexadecimal data that directs the device to perform a specific function.
For IBM devices, control codes are the simplest hexadecimal codes and provide thebasic device functions. A control code is usually a single byte of hexadecimal datathat tells the device to perform a basic function. Some examples of functions thatare called by control codes are the vertical tab, carrier return, and backspacefunctions.
Escape sequences and control sequences are strings of hexadecimal data, 2 ormore bytes long, that tell the device to perform more complicated functions. For
example, character highlighting, selecting character sets, and selecting fonts areamong the functions called by escape sequences. Selecting the code page, setting
the cursor position, and selecting global fonts are functions called by control
sequences.
Within your workstation customizing source, these codes and sequences areindicated by specific tags. For example, there are two tags associated with
underlining for an ASCII printer attached to a 3477 display. The STRUS (startunderscore) and ENDUS (end underscore) tags each have a data parameter. The
data parameter specifies the hexadecimal ASCII sequence that tells the printer tostart and end underlining.
For example, you have a Hewlett-Packard LaserJet 4 printer and you want tounderline text. The printer does not currently underline text, although it is capable ofdoing so, as stated in the printer reference manual. To add support for this function,© Copyright IBM Corp. 1998

17

change the hexadecimal data for the STRUS and ENDUS tags. The following
example section of source shows this change:.
.
/* Add next tags, hex values*/.
/* from the device reference manual */:STRUSDATA ='1B26643044'X.
:ENDUSDATA ='1B266440'X.
.
.
.

Structure of Customizing Objects
Each source file member contains the source code for a single workstation
customizing object. The source file member always begins with a WSCST(workstation customizing object) tag and ends with an EWSCST (end workstation
customizing object) tag. Secondary tags must follow their associated primary tags ineach source file member. This is strictly enforced by the workstation customizing
object compiler. The content and structure of the source file member is determinedby the device class, indicated by the DEVCLASS parameter of the WSCST tag. The
general source structure for a workstation customizing source file member is shownin Figure 4.
:WSCSTDEVCLASS=TWINAXDSP|ASCIIDSP|TWINAXPRT|ASCIIPRT|TRANSFORM.

.
.
.
/*tag or comment*/
.
.
.
.
.
:EWSCST.

Figure 4. Syntax for the Workstation Customizing Object Tag

The possible values for the DEVCLASS parameter on the WSCST tag are:
TWINAXDSPAn EBCDIC display connected by a twinaxial cable.
ASCIIDSPAn ASCII display connected by way of a local ASCII workstation controller.
TWINAXPRTAn ASCII printer connected to one of the following twinaxial displays: 3477,
3486, 3487, or 3488 that use the emulator on the display.
Note: The 3477 twinaxial display must be a Model H display. To verify this,see the procedure described in “Setting Up a 3477 Twinaxial
Display” on page 371.

18

OS/400 Workstation Customization Programming V4R3

ASCIIPRTAn ASCII printer (connected by way of a local ASCII workstation controller)that uses the emulator on the workstation controller.
TRANSFORM
An ASCII printer that uses the host print transform function.
When you retrieve the source file member for a device, the tags are set up in theappropriate structure and the values on the tags are from the system mappingtables for that particular device. The allowable structures for source file members(hereafter called source) for each device class are shown in the correspondingreference chapters in this part of the manual.

Using Source Entry Utility to Change the Tags and Keywords
To change the mapping tables used, change the tags and their associatedkeywords and values using the source entry utility (SEU). SEU is a function of the
AS/400 Application Development ToolSet/400 licensed program that is used tocreate and change source members.
Use the following procedure to change the source file members you createdpreviously in step 2 (Retrieving the source).
1. Type
STRSEU SRCFILE(library/source file name)on any command line. The library and source file you specify should be the one
you created in step 2. Press the Enter key.
2. Type a 2 (Edit) in the Option column next to the file member containing thecustomizing source you want to change and press the Enter key.
3. Use the tag language as described in Part 2 and Part 3 to change the values
for mapping tables used by your device. The following list will help you find thetags specific to the device you are customizing.
Twinaxial display (keyboard)
See “Working with the Tag Language for Twinaxial Displays” on page 62.
ASCII display
See “Working with the Tag Language for ASCII Displays” on page 93.
ASCII printer that uses the host print transform function
See “Changing the Source” on page 147.
ASCII printer attached to a 3477, 3486, 3487, or 3488 twinaxial display thatuses the emulator on the display
See “Working with the Tag Language for ASCII Printers Attached toTwinaxial Displays” on page 207.
ASCII printer that uses the emulator on the workstation controller
See “Working with the Tag Language for Directly Attached ASCII Printers”
on page 244.
Note: A device that uses the emulator on the workstation controller may haveentire tables you do not want to customize. You can delete the mappingtables you do not want to customize. For example, if you did not need tochange the ASCII-to-EBCDIC mapping table, you could delete this table fromyour workstation customizing source. Doing this reduces the storage
requirements on the workstation controller. The workstation controller thenChapter 3. Changing the Source to Customize Your Workstations

19

uses the default mapping tables associated with your device type to map thedata properly between the device and the system. You should not however,delete the tags for individual functions, such as the tags for the printerdefinition table. When you delete these tags and values, the workstation
controller does not map the associated function at all.
Examples showing this step of the workstation customizing procedure are provided
for each device class in the corresponding reference chapters in Part 2 and Part 3of this book. When you have finished making the changes to the workstation
customizing source, you can create the customizing object that allows you tocustomize your device.
When you have completed the changes to the source member, use the Create
Work Station Customizing Object (CRTWSCST) command. This command creates
the new customizing object for the device.

General Programming Considerations for Workstation Customizing
The general syntax for the tags used by the workstation customizing tag language
is as follows:
tagid
keyword = value.
.
.
delimiter

The following rules apply to all the tags and keywords used for the workstation
customizing tag language.
v Tag identifiers (IDs) begin with a colon followed by a character string. The total
maximum length of a tag ID is 15 characters.
v Keywords that are associated with a tag ID have a maximum length of 10
characters.
v Parameters (for tags that require parameters) are represented by pairs of
keywords and values.
v Values that are not hexadecimal are limited to a length of 32KB. The allowable
length for hexadecimal values depends on the size of the table you are working
with. The allowable length is shown in specific places within the tag descriptions.
v The ending delimiter for all tags is a period.
v Blanks are not allowed within the tag names, identifiers, keywords, or values.
Blanks are allowed anywhere else in the source.
v The tag language for workstation customizing can be coded in free form. There
are no column-dependent restrictions. Tags may begin in any column.
v Comments can appear anywhere in the source as long as they are not in the
middle of a tag, keyword, or value. A comment is coded in the following form:/* . . . character string . . . */v Values associated with the keywords for the tags are in one of the following
formats:
Character constants
These values are to be coded exactly as shown in the tag descriptions.

20

OS/400 Workstation Customization Programming V4R3

Integer values
These values may be signed or unsigned, 0 through 9. The default for
integer values is unsigned, unless noted for a specific value. The value 0
is valid unless it is explicitly excluded in the value portion of the tag
description.
Hexadecimal values
These values are coded using the following notation:'xxxx'X

The xxxx within the apostrophes in the example represents an evennumber of the characters 0–9 and A–F. You can code a hexadecimalvalue as a single string, or the string can be broken into many
contiguous strings. Contiguous strings are logically concatenated so thatthe resulting value is equal, internally, to a single large string.

Finding the Hexadecimal Values for the Tags
The hexadecimal and integer values required for the workstation customizing tags
are in the reference book or reference section of the book that came with thedevice you want to customize. You create some of the data parameter values basedon the combination of keys (and codes) you use to represent a control or commandsequence. In these cases, you concatenate the hexadecimal values for several
individual keystrokes to create a “single keystroke”.
Twinaxial scan codes for the 122-key, 5250, and enhanced keyboards are listed in“Keyboard Scan Codes” on page 42.
For each device class supported by the workstation customizing functions, there isa corresponding reference chapter. The reference chapters provide the detailed
technical information you need. The reference chapters also provide examples tohelp you work with the tag language and the workstation customizing source. A
number of appendixes also provide keyboard layouts, source examples, additional
procedures, and hexadecimal conversion tables. Appendix C. Character to
Hexadecimal Value Tables provides the hexadecimal values for the United States
ASCII character codes. “EBCDIC Character Code to Hexadecimal Value Chart” onpage 367 provides an EBCDIC character to hexadecimal value conversion table.

Errors and Recovery
The following list describes some errors that can occur during this step and what
you can do to recover from the error.
v Library containing the workstation customizing source not foundThe library in which the workstation customizing source is stored does not exist
or could not be found by the system. Use the Display Library (DSPLIB) command
to verify that the library you specified is the correct library and to verify that thelibrary exists. Use the Display Job Log (DSPJOBLOG) command to verify thatyou spelled the name of the library correctly when you used the Retrieve Work
Station Customizing Object Source (RTVWSCST) command. If you specified thedefault value when you retrieved the source, the library name is QGPL.
v Source file containing the workstation customizing source not foundThe source file where the workstation customizing source is stored does not exist
or could not be found by the system. Use the Display Library (DSPLIB) command
Chapter 3. Changing the Source to Customize Your Workstations

21

to display the library you used to store the workstation customizing source. Typethe option to display the objects next to this library name and look for yoursource file. If it is not present, use the Display Job Log (DSPJOBLOG) command
to verify that you spelled the name of the source file correctly when you used the
RTVWSCST command. If you specified the default value when you retrieved thesource, the source file name is QTXTSRC. If you cannot find the source file you
created in “Chapter 2. Retrieving the Workstation Customizing Source” onpage 11 , you may need to use the RTVWSCST command again.
v Source file member containing the workstation customizing source not
found
The source file member where the workstation customizing source is stored does
not exist or could not be found by the system. Use the Display File Description(DSPFD) command specifying your source file and library names. Page down
through the file information and look at the member names. If your source filemember is not listed, use the Display Job Log (DSPJOBLOG) command to verify
that the member was created successfully and that you spelled the name of thelibrary correctly when you used the RTVWSCST command. If you cannot find thesource file member, you may need to use the RTVWSCST command again.
v Part of workstation customizing source typed over or deleted
As previously stated, the workstation controller is dependent on having allnecessary mapping tables for a specific device. If one of the mapping tables
embedded in your source is accidentally typed over or partially or completely
deleted, you need to recover the lost tables and code. One way to do this is to
use the RTVWSCST command to retrieve a new copy of the source you started
to change. With this new source, you can either copy the missing parts into thesource you were originally changing or, if you have not made too many changes
to the original source, you can make these changes to the new copy of thesource and delete your original source when the changes are complete.

Verifying That the Source Changes Are CompleteYour workstation customizing source changes are complete when you havechanged all the hexadecimal and integer values for the DATA parameters on thetags representing the appropriate table values for the characters, command, andcontrol sequences for your device. These are the values you listed in the planningsteps of this procedure described in Chapter 1. Planning For and Setting Up
Workstation Customizing.

22

OS/400 Workstation Customization Programming V4R3

Chapter 4. Creating the Workstation Customizing Object
After you change the values in the source for the workstation or ASCII printer you
are customizing, you are ready to create the customizing object. To do this, you use
the Create Work Station Customizing Object (CRTWSCST) command to compile
the source file members containing the tags you added or changed in step 3 (seeFigure 3 on page 4). You need to use this command for each source file member
you created and changed in step 3 of the customizing procedure.

Compiling and Creating the Workstation Customizing Object
When you are ready to use the CRTWSCST command, see the maps of matchingparameters in Table 43 on page 373 and Table 44 on page 374. To compile andcreate the workstation customizing object, do the following:
1. Type CRTWSCST on any command line and press F4 (Prompt).
2. Specify a name for the customizing object. This name should be unique to thedevice for which the object is being created. For example, if you are planning
to use this object for a group of ASCII workstations, you might want to namethe object ASCWSC1. This is a required parameter.
3. Press F10 (Additional parameters) to display the remaining parameters.
4. Specify the name of the library and the name of the source physical file that
contains the customized tag language. (You created this file in step 2 of thecustomizing procedure).
5. Specify the name of the source file member you created and changed in step
3 of this procedure.
6. Specify the authority you want to grant to users who do not have specificauthority to the object.
7. Indicate whether or not this customizing object should replace an existingcustomizing object of the same name. (Specify *YES for the Replace field
when you have made new changes to existing customized tables.)8. Specify a text description for the customizing object if it does not already haveone.
Your description should be unique so that you can use it to help you identify acustomizing object you created to customize one or more specific devices. If
you do not specify any text here, the text is taken from the source member you
specified previously.
9. Press the Enter key.
10. Press F10 (Include detailed messages) on the Command Entry display to lookat the messages associated with the CRTWSCST command and to verify thecommand completed successfully.
After you create the customizing object, you can use it to customize one or more
devices of the same type. For example, you may create a customizing object for an
ASCII workstation and you may want to use seven of these workstations with yourAS/400 system. You can use the single customizing object you created for all sevenof the workstation configurations, or you can use a different customizing object foreach of the seven identical workstations.

© Copyright IBM Corp. 1998

23

You can also save the customizing object in a save file or on tape. You can thendistribute the object to another AS/400 system in a network. At the receiving
system, the object can be restored. The object can then be used by:
v Workstation controllers attached to the receiving systemv The host print transform function on the receiving system
For more information about saving, restoring, and distributing objects, see the
Backup and Recovery book and the Central Site Distribution book.
Examples showing this step of the workstation customizing procedure are provided
for each device class in the corresponding reference chapters in Part 2 and Part 3of this book. When you have finished creating the workstation customizing object,
you can change the device description for your device. For devices that use theemulator on the workstation controller or the display, you can vary the device off
and on. This loads the object into the workstation controller for the device. For
printers that use the host print transform function, you can start the printer writer to
use the customized object for the printer.

Errors and Recovery
The following list shows some of the error messages that can be sent to the job log
during this step of the workstation customizing procedure. The recovery for eacherror is in the help information on the AS/400 system for the individual message
and is not duplicated here. This list is provided to give you an idea of the kinds oferrors that can occur.
v Combination of keyword values not valid
v Combination of keyword values already specified
v
v
v
v
v

Comment starting on line X not closed
Ending delimiter on hexadecimal value not valid
Ending period missing on tag
Ending period not found for tag
Format of keyword starting on line X not valid

v Hexadecimal value on line X not correct
v Internal error occurred
v
v
v
v
v

Keyword not allowed on tag
Keyword is not allowed
Language type value not valid
Length of associated value for keyword incorrect
Mapping for code page occurred multiple times

v Required tag not foundv Required keyword not found for tagvvvv

Required combination of keyword values missing
Required mapping for code page not foundStart comment delimiter found inside comment
Starting delimiter on hexadecimal value not valid

v System monocase table not foundv Tag not foundv Tag on line X not allowedv Too few tags found24

OS/400 Workstation Customization Programming V4R3

v Too many tags foundv Value for keyword not allowed
v Workstation customizing object not created
The following is a list of errors that can also occur during this step in the procedure
but do not correspond to a specific AS/400 error message.
v You are not authorized to use the CRTWSCST command
Have the security administrator (QSECADM) for your system use the Grant
Object Authority (GRTOBJAUT) command to give you the proper authority to use
the command. You can then try the command again.
v You are not authorized to use the library in which the source file is stored.
Have the security administrator (QSECADM) for your system use the Grant
Object Authority (GRTOBJAUT) command to give you the proper authority to use
the library (create and store files and members there). You can then try using the
CRTWSCST command again.
v Programming errors
The workstation customizing functions are based on the use of a tag languagethat has syntax rules much like any other programming language. When you
have a coding error, you can use the messages in the job log associated withyour AS/400 session to help you resolve the error. If the workstation customizing
object is created and the character or function you are trying to add or change
does not work, you need to go back to your device book and verify thehexadecimal values you used for the data parameters. As with most types ofprogramming, customizing a device involves some trial-and-error.

Verifying the Workstation Customizing Object Is Created
To verify that the workstation customizing object has been successfully created, use
the Display Job Log (DSPJOBLOG) command and press F10 (Display detailed
messages) to show the messages that were sent when you used the Create Work
Station Customizing Object (CRTWSCST) command. If the object was created, amessage is shown indicating that the creation was successful.
Note: If you need to delete a workstation customizing object from your system, you
use the Delete Work Station Customizing Object (DLTWSCST) command.

Chapter 4. Creating the Workstation Customizing Object

25

26

OS/400 Workstation Customization Programming V4R3

Chapter 5. Testing the Customizing Object
After the customizing object has been successfully created, test the results of yourchanges. To test the results of your changes, specify the new object in the device
description and then vary on the device. For this step, you need the following
information:v The name of the device descriptionv The library and name for the customizing object
v Security authorization for both the object and the library in which it is stored
For examples of this step in the workstation customizing procedure, see theexample sections in the reference chapters for each device type in Part 2 and Part
3 of this book.

Changing the Device Description
To specify the workstation customizing object in the device description for thedevice you are customizing, use the following procedure:
1. Type the appropriate change device description command (either CHGDEVDSP
for a display or CHGDEVPRT for a printer) and press F4 (Prompt).
2. If the device you are customizing is an ASCII printer that uses the host print
transform function, you must enable the host print transform function.
a. Specify the value for your printer in the Manufacturer type and model field.
You can press Prompt (F4) on the Manufacturer type and model field todisplay a list of values for this field.
Note: If your printer is not shown in the list of manufacturer type and model
values, specify *WSCST.
b. Specify the following parameters in the device description:
v Paper source 1
v Paper source 2v Envelope sourcev ASCII code page 899 support
For a description of these parameters, see the CL Reference (Abridged)book.
3. Press F10 (Additional parameters) and page through the information until theWorkstation customizing object field is shown.
4. Type the name of the workstation customizing object followed by the name of
the library where it is stored and press the Enter key.

Varying On the Device
Use the Vary Configuration (VRYCFG) command to vary on the devices you havecustomized. For devices using the emulator on the workstation controller or the
display, the mapping tables you have changed are downloaded to the workstation
controller. The mapping tables are actively used to convert data between the device
and the AS/400 system. For printers using the host print transform function, themapping table you changed is not used when the device is varied on. The printerstill needs to be varied on, however. Do the following:© Copyright IBM Corp. 1998

27

1. Type VRYCFG on any command line and press F4 (Prompt).
2. Type the names of the devices you are ready to vary on (from the device
descriptions you just changed).
3. Specify the device type (*DEV in most cases).
4. Specify *ON for the status, and press the Enter key. The devices move to astatus of Vary on pending.
To view the status of the devices, use the Work with Configuration Status(WRKCFGSTS) command. Your devices should show a status of Vary on pending,
Active, or Signon display.
Note: If for any reason, your displays are not functioning properly or thecustomization is not successful (that is, the displays do not respond at all),you can use the QCONSOLE display to reset the system so that the original
system mapping tables are used until you can correct the customizing
source and recompile the customizing object.

Starting the Printer Writer for a Printer That Uses Host Print Transform
Function
Use the Start Printer Writer (STRPRTWTR) command to start the printer writer forthe customized printer that uses the host print transform function. When you start
the printer writer, the host print transform function uses the customized AS/400
mapping table to transform the data from the AS/400 system to the printer forspooled print jobs. For nonspooled print jobs, the customized mapping table is used
when the job is printed.
Note: For ASCII printers attached to the AS/400 system through Client Access/400,
the printer writer is automatically started when the workstation function
printer session is started.

Errors and Recovery
The following list describes some errors that can occur during this step and thethings to do to recover from the error.
v Unchanged characters and control sequences not displayed or printedThis can happen when the tags or the mapping tables for characters or control
sequences that you did not customize have been accidentally deleted from thesource. The customizing object created from such source no longer contains thenecessary mappings for the characters and control sequences you did not want
to change. The workstation controller or the host print transform function has no
information to use to map these characters and control sequences.
Save the source from which these tags or tables have been deleted. Create a
new source file using the RTVWSCST command just as you did when you
created the original source for the object. Using the original source as a guide,
make the changes for customization as you did for the original source, taking
care not to delete any of the tags or mapping tables. When this is complete, use
the Create Work Station Customizing Object (CRTWSCST) command to create
the object again. Be sure the customizing object is specified in the device
description. Then vary on the device. If the device is using the host print
transform function, start the printer writer for the printer. The results should bewhat you expected.

28

OS/400 Workstation Customization Programming V4R3

v Mapping table changes (customizing) not producing expected results
This can occur when one or more of the hexadecimal or integer values youchanged in the workstation customizing source is not correct. For example,
because some of the hexadecimal values are very large, you may have typed avalue incorrectly or recorded a different hexadecimal value from the device bookthan the value you needed. First, check the list of changes you created when you
did the planning for customizing (step 1 in Figure 3 on page 4). Verify that thevalues you recorded when planning the customizing are the correct values byrechecking the device reference manual. Be certain that the values you recorded
are the correct values for the keys, characters, and control functions you wanted
to change. Next, verify that the values you entered into the customizing source
match the values you recorded when planning the customization. Make anynecessary changes. Use the Create Work Station Customizing Object(CRTWSCST) command to create the customizing object again. Vary on thedevice. If the device is using the host print transform function, start the printerwriter for the printer. Then test the keys or functions you changed.
v Customizing object or library not foundEither the workstation customizing object or the library where it resides was notfound by the system. Use the Display Library (DSPLIB) command to look at thecontents of the library where the customizing object should be stored and verify
that the library you specified is the correct library and that the object has beencreated.
If the object is in the list of objects for the library, check the spelling of the object
name. Verify that you typed this name correctly in the device description.
If the customizing object is not in the library, check to see if the source member
was added to the user file QTXTSRC in the following libraries:– QGPL for devices that use the emulator on the display or the emulator on theworkstation controller.
– *LIBL for printers that use the host print transform function.
You may want to move it to one of your own libraries. If you cannot locate thecustomizing object at all, use the CRTWSCST command to create the object
again.
v Library not foundThe library where the workstation customizing object should reside does not exist
or could not be found by the system. Use the Display Library (DSPLIB) command
to verify that the library you specified is the correct library and to verify that thelibrary exists. Verify that you spelled the name of the library correctly in thedevice description.
v Value not valid for parameter
The value you entered for one of the command parameters is not valid or isincorrect. Use the AS/400 online help information or the CL Reference(Abridged)to verify the values of parameters. Change the parameter value and try
the command again.
v You are not authorized to the workstation customizing object
Have the security officer or the owner of the workstation customizing object use
the Grant Object Authority (GRTOBJAUT) command to change the authorities forthe object so that you can use it. The authority can be set to *USE or *ALL for
one or more user IDs. *ALL also allows you to change and delete the object as
well.
v Workstation customizing object damaged

Chapter 5. Testing the Customizing Object

29

Delete the damaged object. Either use the source you used to create the object
originally and create a new workstation customizing object, or If you periodicallysave your system and data, use the Restore Object (RSTOBJ) command torestore the object. Analyze Problem (ANZPRB) command to describe and report
the problem to your service representative. If the problem persists, it may be asystem problem. Use the Analyze Problem (ANZPRB) command to describe andreport the problem to your service representative.
v You are not authorized to the library where the workstation customizing
object is stored
Have the security officer or the owner of the library in which the workstation
customizing object is stored use the Grant Object Authority (GRTOBJAUT)
command to change the authorities for the library so that you can use it. The
authority can be set to *USE or *ALL for one or more user IDs. *ALL also allows
you to change and delete the object as well.
v Device not varying on
There are three cases for this problem. The first involves the storage limitationsof the workstation controller. The second case involves the keyboard type you
selected when you retrieved the workstation customizing source. The third caseinvolves a mismatch between the language you selected for the workstation
customizing source and the language you specified in the description for thedevice. Table 1 describes what you can do to look at and correct this problem.
Note: This problem does not occur for printers customized through the host print
transform function.
Table 1. Device Does Not Vary On
Problem

RecoveryWorkstation controller
storage capacity exceeded

If you have varied a device off and on many times to test a workstation customizing
object, new or changed mapping tables have been downloaded to the workstation
controller each time you have varied on the device. It is possible that the storage forthe workstation controller is full to capacity. To verify this, check the error messages in
the QSYSOPR message queue. If the workstation controller storage is full, you needto vary off the controller, and then vary it on again specifying RESET(*YES). Use thefollowing values on the Vary Configuration display to vary on the controller, specifying
your controller name for ctlname.
– CFGOBJ(ctlname)– CFGTYPE(*CTL)– STATUS(*ON)– RESET(*YES)
To display the Reset parameter on the Vary Configuration display, you need to press
F10 (Additional parameters).

30

OS/400 Workstation Customization Programming V4R3

Table 1. Device Does Not Vary On (continued)
Problem

Recovery

Keyboard attached value
specified on RTVWSCST
command is not correct

If you are customizing a twinaxial display or an ASCII printer attached to a twinaxial
display, verify that the value you selected for the keyboard attached parameter when
you retrieved the workstation customizing source is the correct keyboard type for yourdisplay. “Keyboard Translation Table (TKBDTBL) Tag” on page 63 describes thelanguage types and keyboards that match the IBM-supported twinaxial displays andthe shift states supported for those keyboards. If the keyboard type does not matchone of those supported by the display, the device will not vary on and a message
indicating the vary on status is Failed will appear on the Configuration Status display.
If you have specified an incompatible value for the keyboard attached parameter when
you retrieved the source for customizing a twinaxial display or ASCII printer attached
to a twinaxial display, you need to use the Retrieve Work Station Customizing Object
Source (RTVWSCST) command again, specifying a compatible keyboard for thisvalue. You can then make the same changes to this new source that you made in theoriginal source, create the new workstation customizing object, and try to vary on thedevice again.

Language type inworkstation customizing
object does not match
language type specified indevice description

When you are customizing any type of device, you must be sure that the keyboard
language type you specify when you retrieve the source exactly matches the keyboard
language type (for displays) or the language type (for printers) in the device
description. If these values do not match, the device fails to vary on and messages aresent to the job log.
To correct this, you must change either the language type you selected to retrieve theworkstation customizing source, or the language type in the device description. If you
decide to change the value you specified for the source, you need to use the Retrieve
Work Station Customizing Object Source (RTVWSCST) command again, specifying
the correct language type for this value. You can then make the same changes to thisnew source that you made in the original source, create the new workstation
customizing object, and try to vary on the device again.

v Workstation controller failed
The workstation customizing object has caused the workstation controller to fail.
The workstation controller does limited checking to detect certain common errorsthat may have been made in specifying the mapping table data of a customizing
object. For example, it checks that twinax keyboard translation table entry values
are within a specified range. However, the workstation controller does not verify
all the data in the mapping tables for all possible errors. Data specified
incorrectly in a mapping table could cause unpredictable results, including a
possible failure of the workstation controller. If the controller has failed due to thedata in a workstation customizing object, remove that customizing object from all
device descriptions. You need to make corrections to your workstation
customizing source. To do this, return to Chapter 3. Changing the Source toCustomize Your Workstations, and complete the workstation customizing
procedures again from step 3, changing your source.
If the workstation controller fails without using the customizing object, you may
have a problem with the workstation controller. Check the QSYSOPR message
queue and error log to look for the cause of the failure. You may need to run
problem analysis from the QSYSOPR message queue, create an APAR using theCreate Authorized Problem Analysis Report (CRTAPAR) command, or contact
your software support specialist.

Chapter 5. Testing the Customizing Object

31

Verifying a Successful Vary On
To see whether or not the device has been varied on, use the Work with
Configuration Status (WRKCFGSTS) command to look at the status of the device.
The status should be Active, Sign On display, Varied on or Vary on Pending.
When the display or printer is varied on, you should check to see whether or not
the customization procedure was a success. You can do this by looking at the plan
you created and verifying that the characteristics you wanted to change are working(printed or displayed with no unexpected results or controller failures). If all is
working according to your plan, then the workstation customizing procedures arecomplete. Otherwise, you may need to make more changes to your workstation
customizing source. To do this, return to Chapter 3. Changing the Source toCustomize Your Workstations and complete the workstation customizing procedures
again from step 3, changing your source.

32

OS/400 Workstation Customization Programming V4R3

Part 2. Display and Keyboard Customization Technical
Reference
Chapter 6. Customizing Displays and Keyboards . . . . . .
Determining Whether a Display or Keyboard Can Be Customized .
Understanding Function Support for Displays and Keyboards . .
Customizing Twinaxial Displays . . . . . . . . . . . .
Customizing ASCII Displays . . . . . . . . . . . . . .
Customizing the System-Supplied Mapping Tables . . . .

.
.
.
.
.
.

.
.
.
.
.
.

35
35
35
36
36
37

Chapter 7. Customizing Twinaxial Displays . . . . . . . . . . . .
Types of Displays and Keyboards . . . . . . . . . . . . . . . .
Customizing Unsupported Twinaxial Displays . . . . . . . . . . . .
Working with Keyboard Translation Tables and the Workstation Controller .
Keyboard Scan Codes . . . . . . . . . . . . . . . . . . . . .
National Language Requirements. . . . . . . . . . . . . . . . .
EBCDIC Code Page Standards . . . . . . . . . . . . . . . .
Keyboard Layout Standards . . . . . . . . . . . . . . . . . .
Customizing Restrictions for Twinaxial Display Keyboards . . . . . . . .
122-Key Typewriter Keyboard Translation Table Restrictions . . . . . .
122-Key Data Entry Keyboard Translation Table Restrictions. . . . . .
5250 Typewriter Keyboard Translation Table Restrictions . . . . . . .
5250 Data Entry Keyboard Translation Table Restrictions . . . . . . .
Enhanced Keyboard Translation Table Restrictions . . . . . . . . .
Determining Which Twinaxial Keyboard Translation Table to Customize . . .
Twinaxial Display Source Format . . . . . . . . . . . . . . . .
Changing the Entries in Your Workstation Customizing Source . . . . .
Entry Format for EBCDIC Character Conversions . . . . . . . . .
Entry Format for Diacritic Characters . . . . . . . . . . . . .
Entry Format for Blank Keys and Unassigned Scan Codes . . . . .
Entry Format for the Proof Space Character . . . . . . . . . . .
Entry Format for Function Keys . . . . . . . . . . . . . . .
Changing Source Entries for Scan Codes That Are Not Valid . . . . .
Keyboard Functions Not Specified in Translation Tables . . . . . . .
Working with the Tag Language for Twinaxial Displays . . . . . . . . .
Using the Tags to Customize Twinaxial Display Keyboards . . . . . . .
Keyboard Translation Table (TKBDTBL) Tag . . . . . . . . . . . .
Keyboard Translation State Table (TKSTATE) Tag. . . . . . . . . .
Customizing a 3477 Twinaxial Display for Diacritic Character Support . . .
Step 1: Planning the Customizing. . . . . . . . . . . . . . . .
Step 2: Retrieving the Workstation Customizing Source . . . . . . .
Step 3: Changing the Source . . . . . . . . . . . . . . . . .
Step 4: Creating the Workstation Customizing Object . . . . . . . .
Step 5: Varying On the Device . . . . . . . . . . . . . . . . .

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

39
39
41
41
42
47
47
48
48
50
50
50
51
51
51
52
54
54
56
57
58
58
61
61
62
62
63
65
68
68
69
70
70
71

Chapter 8. Customizing ASCII Displays . . . . . . . . . . . .
Beginning to Customize ASCII Displays . . . . . . . . . . . . .
Customizing Unsupported ASCII Displays. . . . . . . . . . . . .
Working with ASCII Displays and the Local ASCII Workstation Controller .
Twinaxial Device Emulation . . . . . . . . . . . . . . . . .
ASCII Character Sets and Code Pages . . . . . . . . . . . .
ASCII Control Codes . . . . . . . . . . . . . . . . . . .
ASCII Command Sequences . . . . . . . . . . . . . . . .
ASCII Display Keyboard Operations . . . . . . . . . . . . . .
Processing Data for an ASCII Display . . . . . . . . . . . . .

.
.
.
.
.
.
.
.
.
.

73
73
74
75
77
78
79
79
80
84

© Copyright IBM Corp. 1998

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

33

Inbound and Outbound Processing . . . . . . . . . . .
Mapping Tables for ASCII Display Keyboards . . . . . . . .
Mapping ASCII Graphic Character Data . . . . . . . . .
Mapping ASCII Control Characters and Control Sequences . .
Mapping Tables for ASCII Display Screens . . . . . . . . .
ASCII Update Screen Table . . . . . . . . . . . . . .
EBCDIC-to-ASCII Code Mapping Table . . . . . . . . .
Display Commands for Unsupported Device Types . . . . .
Customizing Restrictions for ASCII Displays . . . . . . . . . .
Determining Which ASCII Display Tables to Customize . . . . . .
Working with the Tag Language for ASCII Displays . . . . . . .
Using the Tags to Customize an ASCII Display Screen . . . . . .
Working with the Update Screen Table . . . . . . . . . . .
Update Screen Table (DSCNTBL) Tag . . . . . . . . . .
Update Screen Tags . . . . . . . . . . . . . . . . .
Clear Screen Command . . . . . . . . . . . . . . .
Display Setup Commands . . . . . . . . . . . . . .
Set Graphic Character Set Command . . . . . . . . . .
Set Cursor Display On and Set Cursor Display Off Commands .
Display Attribute Commands . . . . . . . . . . . . .
Attribute Command (ATRCMD) Tag . . . . . . . . . . .
Set Screen Size Commands . . . . . . . . . . . . .
Extended Set Cursor Address Command . . . . . . . . .
Considerations for 132-Column Support . . . . . . . . .
Working with the EBCDIC-to-ASCII Code Mapping Table . . . .
EBCDIC-to-ASCII Mapping Table (DEBCTBL) Tag . . . . .
Using the Tags to Customize an ASCII Display Keyboard . . . . .
Working with the ASCII to Keyboard Function Mapping Table . .
ASCII to Keyboard Function Mapping Table (DKBDTBL) Tag. .
Keyboard Function Tags . . . . . . . . . . . . . . .
Working with the ASCII-to-EBCDIC Mapping Table . . . . . .
ASCII-to-EBCDIC Mapping Table (DASCTBL) Tag . . . . .
Customizing a DEC VT-320 Display in VT-300 Mode . . . . . .
Step 1: Planning the Customizing. . . . . . . . . . . . .
Step 2: Retrieving the Workstation Customizing Source . . . .
Step 3: Changing the Source . . . . . . . . . . . . . .
Step 4: Creating the Workstation Customizing Object . . . . .
Step 5: Varying On the Device . . . . . . . . . . . . . .

34

OS/400 Workstation Customization Programming V4R3

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

. 84
. 85
. 86
. 87
. 89
. 89
. 89
. 90
. 90
. 92
. 93
. 95
. 95
. 95
. 104
. 106
. 108
. 109
. 110
. 111
. 111
. 113
. 114
. 116
. 117
. 117
. 119
. 119
. 119
. 120
. 123
. 123
. 125
. 125
. 126
. 127
. 127
. 127

Chapter 6. Customizing Displays and Keyboards
This chapter provides a brief overview of the workstation customizing functions to
prepare you for customizing displays and keyboards. It describes the two different
methods you can use to customize the functions of displays and keyboards. It helps
you understand which functions can be customized and whether your displays or
keyboards can be customized.

Determining Whether a Display or Keyboard Can Be Customized
You can use the test function provided by the display to determine whether or notcertain characters are already supported.
Before you start to use the test function, be sure the AS/400 Sign On display is
showing. If the Sign On display does not appear on the device, you may need tochange the device type (DEVTYPE) parameter in your device description. Change
the device type to a type that is more closely matched to your display device. (For aprocedure to help you get to a Sign On display, see Appendix D. Setting Up to
Customize a Display.)
For twinaxial displays, use the following keystrokes to call the test function. The setof keystrokes you use is determined by the type of keyboard that is attached to thetwinaxial display.
5250

Press the Cmd key followed by the Backspace key

122-key

Press the Alt key and the Play key simultaneously

Enhanced

Press the Alt key and the Help key simultaneously

For an ASCII display, press the key sequence Esc+t to call the test function.
The test function uses the tables that were loaded into the workstation controller
when you varied on the display. These tables are the system-supplied tables if you
did not specify a customizing object in the device description before you varied on
the display. If you did specify a customizing object in the device description before
you varied on the display, these tables are user-defined tables.
If the characters you need to display are not shown, check the International
Application Development book to see if they are defined for the code page you
specified in the device description. If they are defined for that code page, check to
see if the book for the device indicates you can change the code page. (Somedisplays do not provide this function.) Remember that workstation customizing
functions support only the characters and functions that the device and theworkstation controller support.

Understanding Function Support for Displays and Keyboards
The workstation customizing functions support twinaxial displays and ASCII displays
attached to the AS/400 system by way of a workstation controller. The workstation
controller uses mapping tables that are downloaded from the AS/400 system tosupport the input/output (I/O) for these devices.
The workstation controller processes I/O for a display as inbound processing andoutbound processing. Inbound processing is keystroke and function processing from© Copyright IBM Corp. 199835

the display to the AS/400 system. Outbound processing is character and function
processing from the AS/400 system to the display.
The workstation customizing functions allow you to customize only the inbound, or
keystroke processing, for a twinaxial display. The workstation customizing functions
allow you to customize both inbound and outbound processing for an ASCII display.

Customizing Twinaxial Displays
The workstation customizing functions allow you to customize keystroke processing
for the following supported twinaxial displays:
3179

3197

3486

5251

3180

3476

3487

5291

3196

3477

3488

5292

You can also customize keystroke processing for unsupported twinaxial displays.
For more information on customizing unsupported twinaxial displays, see“Customizing Unsupported Twinaxial Displays” on page 41.
Customize the characters and functions called from the keyboard of a twinaxial
display by changing the hexadecimal values in the twinaxial keyboard translationtable. You may also need to change the keyboard language type specified in thedevice description if:
v You are using a language other than your primary language
v You want to use a special character set
The workstation controller uses the twinaxial keyboard translation table to translate
the keyboard scan codes from a twinaxial keyboard. The keyboard scan codes aretranslated into either character codes or internal function codes for processing by
the AS/400 system. For complete information on customizing the twinaxial keyboard
translation table, see Chapter 7. Customizing Twinaxial Displays.

Customizing ASCII Displays
The workstation customizing functions allow you to change both inbound andoutbound processing for the following supported ASCII displays:
3101
3151
3161
3162
3163
3164
D220 (Data General Dasher D220)
T910 (TeleVideo 910)
T925 (TeleVideo 925)
T955 (TeleVideo 955)
V100 (DEC VT-100)
V220 (DEC VT-220)
W30 (Wyse WY30)

36

OS/400 Workstation Customization Programming V4R3

W50 (Wyse WY50)
W60 (Wyse WY60)
You can also customize inbound and outbound processing for unsupported ASCII
displays. For more information on customizing unsupported ASCII displays, see“Customizing Unsupported ASCII Displays” on page 74.
Customize the characters and functions called from the ASCII display and keyboard
by changing the hexadecimal values in a set of system-provided mapping tables.
For a better understanding of the default character and control sequence mappings,
retrieve the source for the display and keyboard as described in Chapter 2.
Retrieving the Workstation Customizing Source. You can then use the source entry
utility (SEU) to view the default character and control sequence mappings.

Customizing the System-Supplied Mapping Tables
Customizing the ASCII workstation for use with the AS/400 system is accomplishedby changing the hexadecimal values in one or more of the following tables:v ASCII-to-EBCDIC mapping table
This table converts an ASCII character value in the range '20'X to 'FF'X into asingle EBCDIC character code value.
v ASCII-to-keyboard function mapping table
This table converts an ASCII control character value or a character sequence
beginning with a control character into one of the following:– A twinaxial display function key request– A local display function (screen refresh, toggle display indicators, or terminal
disconnect)– A request to set the state (shift-in and shift-out support) for processing
subsequent data from the device
v EBCDIC-to-ASCII mapping table
This table converts an EBCDIC character value in the range '40'X to 'FE'X into asingle ASCII character code value. This table is also used to map twinaxial
display control characters in the range '00'X to '1F'X into ASCII character codes
or ASCII control codes.
v Update screen table
This table is used by the workstation controller to perform the following types ofoperations with the ASCII display:– Set the type of highlighting that is used at a given screen location––––

Set the screen position at which data should be written
Clear the screen
Sound the audible alarm at the display
Initialize the display parameters

The choices you make for character and control sequence mapping are based onthe:v Reference information for the ASCII display
v Supported device you select when you retrieve the tables
v Characteristics of the display
v National language code page and character set you are using

Chapter 6. Customizing Displays and Keyboards

37For more complete information on customizing ASCII displays and keyboards, see
Chapter 8. Customizing ASCII Displays.

38

OS/400 Workstation Customization Programming V4R3

Chapter 7. Customizing Twinaxial Displays
This chapter provides detailed technical information to help you customize twinaxial
display keyboards. Background information about the workstation controller,
keyboard mapping tables, scan codes, and languages is provided, followed by thedescriptions of the tags you use to customize twinaxial displays.
For a twinaxial display, the OS/400 workstation customizing functions provide youwith a way to create a customized version of the keyboard translation table. The
translation table is used by the workstation controller to convert scan codes fromthe twinaxial display keyboard to EBCDIC codes or function codes that the AS/400
system can interpret. To customize this table, you retrieve a workstation customizing
object source (a source file member) that contains the entries for a translation tablecorresponding to the device type, keyboard type, and language specified in thedevice description for the display. The source and its structure allow you to create
an object that is compatible with the system translation tables normally used by theworkstation controller.
Note: The OS/400 licensed program does not support the customizing of
double-byte character set (DBCS) keyboards.

Types of Displays and Keyboards
The AS/400 system and the twinaxial workstation controller use the following pieces
of information to determine the translation table to be used for a particular twinaxial
display:
The type of display attached
The type of keyboard attached to the display
The keyboard language type
There are five basic types of keyboards you can attach to displays on the twinaxial
workstation controller. The different keyboard layouts are distinguished from eachother by the physical layout of the keys. For example, the number of keys, therelative position of different groups of keys, and the way in which certain types ofnumeric and graphic characters are laid out on the keyboard are different fordifferent national languages. Keyboard layout is usually either a typewriter or a data
entry style. For illustrations of the different keyboard layouts, see Appendix A.
Twinaxial Keyboard Layouts.
Table 2 shows the different types of twinaxial displays that may be attached to a
twinaxial workstation controller. For each display type, the table shows the types ofkeyboards that can be attached and the parameter value you would use for the
Keyboard attached parameter on the Retrieve Work Station Customizing Object
Source (RTVWSCST) command to retrieve the object source for a twinaxial display
with that type of keyboard.
Note: There are no twinaxial displays to which all the different types of keyboards
can be attached.
Table 2. IBM Twinaxial Displays and Supported Keyboards© Copyright IBM Corp. 1998

Display

Supported Keyboards

Parameter Values

5251

5250 Typewriter5250 Data Entry*TYPE5250*DATA5250

39

Table 2. IBM Twinaxial Displays and Supported Keyboards (continued)
Display

Supported Keyboards

Parameter Values

5291

5250 Typewriter5250 Data Entry*TYPE5250*DATA5250

5292

5250 Typewriter5250 Data Entry*TYPE5250*DATA5250

3180

122-key Typewriter
122-key Data Entry*TYPE122*DATA1223179

122-key Typewriter*TYPE52501

3196

122-key Typewriter
Enhanced Typewriter*TYPE122*ENHANCED

3197

122-key Typewriter
Enhanced Typewriter*TYPE122*ENHANCED

3476

122-key Typewriter
Enhanced Typewriter*TYPE122*ENHANCED

3477

122-key Typewriter
Enhanced Typewriter*TYPE122*ENHANCED

3486

122-key Typewriter
Enhanced Typewriter*TYPE122*ENHANCED

3487

122-key Typewriter
Enhanced Typewriter*TYPE122*ENHANCED

34882

122-key Typewriter*Enhanced Typewriter*TYPE122*ENHANCED

Notes:
1

The 3179-2 and the 5292-1 both report the same vital product data to theworkstation controller when they report in. The workstation controller cannot
distinguish between the two. The 3179-2 displays are configured as 5292-1. The
5292-1 only supports the TYPE5250 keyboard (F typewriter layout). Consequently,
because the workstation controller thinks the 3179 is a 5292 that only supports the
TYPE5250, varying on a 3179 with a TYPE122 keyboard specified in thecustomizing object causes the workstation controller to detect a mismatch between
the keyboard type specified in the customizing object and the actual keyboard
attached to the display.

2

The 3488 display station must be specified as a 3487 display station when using
the RTVWSCST command. The workstation customizing functions support a 3488
display station as a 3487 display station.

The table of twinaxial displays does not include double-byte character set devices.
It also does not include any devices that can be attached, but for which theworkstation controller does no keystroke processing, such as personal computers
running Client Access/400 Keystroke processing for these devices is done in thedevice itself; therefore, no translation table is downloaded to the workstation
controller for these devices.

40

OS/400 Workstation Customization Programming V4R3

Customizing Unsupported Twinaxial Displays
When you want to customize an unsupported twinaxial display for use with the
AS/400 system, you still need to retrieve a source file member based on a
supported IBM device type, keyboard type, and keyboard language type. To do thiseffectively, you need to find out which supported IBM twinaxial display yourunsupported display emulates. You can try using the automatic configuration
functions provided by the AS/400 system to help you determine the most similarIBM-supported device type and model. You can also try reading the reference book,talking to the manufacturer of the device, or talking to your technical support
specialist.
To determine the type of keyboard that most closely matches your keyboard,
compare your keyboard to the keyboard illustrations in Appendix A. Twinaxial
Keyboard Layouts.
To determine the keyboard language type for your display, check the device
description for the display (if it exists), or check with your system administrator toverify that the language type used by the system is the language you want toconfigure for the device. The language type used by the system is defined in the
QCHRID system value.
Note: The keyboard language type you specify when you retrieve the workstation
customizing source for a display must exactly match the keyboard language
type you specify in the device description for the display. If these values do
not match, the device will not vary on when you specify the workstation
customizing object in the device description.

Working with Keyboard Translation Tables and the Workstation
Controller
The twinaxial workstation controller processes all keystrokes entered at an attacheddisplay. The workstation controller then determines the function to perform for agiven key using the keyboard translation table. This table allows the workstation
controller to convert the scan codes generated by display keyboards into either
character codes or internal function codes, which are then used to determine thefunction to be performed.
The workstation controller supports a wide variety of display types, keyboard styles,
and languages. Using different translation tables, the controller can support all thedifferent combinations of displays, keyboards, and languages. There are separatetranslation tables to support each unique combination of display type, keyboard
style, and language.
Because of the wide variety of displays, keyboard styles, and languages supportedby the workstation controller, a large number of translation tables exist on the
AS/400 system. However, only a small number of these tables are stored in theworkstation controller when it is first varied on.
The OS/400 licensed program determines the particular translation table required tosupport the unique requirements of a given display. When the display device andthe workstation controller are first varied on, the correct translation tables aredownloaded to the controller.

Chapter 7. Customizing Twinaxial Displays

41

Keyboard Scan Codes
When you press a key on a twinaxial keyboard, the display passes a code back to
the workstation controller that uniquely identifies the key that you pressed. This
code is called a keyboard scan code.
Every key on the keyboard has a particular scan code value assigned to it. The
assignment of a scan code is not directly related to the label on the key top. A key
at a certain position on a particular keyboard layout always has the same scancode value assigned to it. For example, a key at a given location on a 5250-style
keyboard always returns the same scan code, although the key may be labeled
differently for different national languages.
Keyboard scan codes are passed to the controller in a 1-byte code. The 7 leastsignificant bits within this byte contain the actual scan code. Some keys, called
make/break keys, use the most significant bit of this byte to indicate whether thescan code corresponds to a make of the key or a break of the key. When amake/break key is pressed, a scan code is generated when the key is first pressed(make) and another scan code is generated when the key is released (break).
The shift keys (left and right), Alt key, Shift Lock key, and Caps Lock key on a
keyboard are usually all make/break keys. In general, it is not recommended thatyou change these keys using the workstation customizing functions.
Figure 5 shows the format for a scan code byte passed to the workstation controller
from a display.
Bit ────Ê

0
1
2
3
4 5
6
7
┌─────┬────┬────┬────┬───┬────┬────┬────┐│ M/B │ S │ S │ S │ S │ S │ S │ S │└─────õ────┴────┴────┴───┴────┴────┴────õMake/Break bit õ││
0 ─ Make───┘└──────────────┬──────────────────┘
1 ─ Break└───Ê Scan Code Bits

Figure 5. Scan Code Byte Format

Scan code values are assigned in the range '01'X to '7F'X. Not all values in thisrange are assigned to keys on the keyboard. The set of valid scan codes depends
on the style of keyboard. For example, the set of scan codes generated by a
5250-style keyboard is different from the set of scan codes generated by an
Enhanced keyboard.
Figure 6 and Figure 7 shows the scan code values assigned to each of the different
key positions for the 5250 and Enhanced keyboard layouts, respectively. The scan
codes for corresponding keys on the 5250 typewriter and 5250 data entry
keyboards are the same.
Note: Some of the existing 5250-style translation tables are set up to handle scan
codes that cannot be generated by an actual 5250-style keyboard. Attacheddevices using 5250 emulation use these scan codes to support additional
capabilities that are not available with the 5250-style keyboard.

42

OS/400 Workstation Customization Programming V4R3

F u n ctio n
C o n tro l K e y s

N u m e ric P a d

7C

6F

6C

6D

47

48

49

6E

7D

44

45

46

71

70

41

42

43

72

73

40

4B

4C

4E

4D

4A

C o re A re a
31

3E

32

21

20

OE

57

22

11

54

34

33

01

24

23

12

35

25

14

13

02

36

03

7E

37

26

15

04

38

27

16

05

OF

28

06

07

2A

29

18

17

3B

3A

39

19

08

3C

2B

1A

09

3D

2C

1B

2D

1C

0A

OC

56

68
RV2H453-0

Figure 6. 5250-Style Keyboard Scan Codes

Chapter 7. Customizing Twinaxial Displays

43

Cursor Control Keys
5F

57

62
Numeric Pad

67

6E

6F

76

77

7E

7F

64

65

6D

6C

75

7D

7C

6B

73

74

7B

69

72

7A

63

79
61

60

71

70

6A

Function Keys
07

OA

OF

17

1F

27

2F

3F

37

47

4F

56

5E

Core Area
16

OE

15

OD

12

25

26

24

1D

1C

14

11

1E

1B

2D

23

22

1A

2E

2C

2B

21

3D

36

33

34

2A

3C

35

32

19

41

55

54

4D

4A

49

39

66

5B

52

4C

4B

42

3A

4E

45

44

43

3B

31

29

46

3E

5C

5A

59

58
RV2H471-0

Figure 7. Enhanced Keyboard Scan Codes

The 122-key keyboard is shown in Figure 8 on page 45. Displays with this layoutthat attach to the twinaxial workstation controller always operate in what can bereferred to as a 5250-style emulation mode. When a key on a 122-key keyboard ispressed, the scan codes assigned to each individual key are not passed directly
back to the workstation controller. Instead, the display passes back a scan code ora sequence of scan codes corresponding to the scan code required for that samefunction on a 5250-style keyboard. For example, pressing the key for PF1 on a
122-key keyboard actually results in the generation of 5250 keyboard scan codes
for the Cmd key and the key in the core area of the keyboard normally labeled with
the number 1.
Note: For certain national languages, the 122-key displays are capable of also
passing back additional scan codes that cannot be generated on an 5250
keyboard.

44

OS/400 Workstation Customization Programming V4R3

In handling a particular function on the 122-key keyboard, the 5250 keyboard
emulation process also takes care of generating any 5250 scan codes for shift key
sequences that are required to emulate the entry of that same function on a 5250
keyboard. For example, pressing the F13 key on a 122-key keyboard generates the5250 keyboard scan codes for keys containing the Cmd key, the shift (make) key,
the top-row key labeled with the number 1, and finally, another shift (break) key.
F u n c tio n
C o n tro l K e y s

C u rs o r C o n tro l K e y s

N u m e ric P a d

7C
c

75
(65)

66
c

(80)
c

62
c

1D
c

1E
c

4F
c

50
c

66
c

67
c

(76)
c

6C u
c

6C 1
c

47
c

48
c

49
c

(106)
c

6E
c

7D
c3E 1

44
c

45
c

46
c

55
c

78
c

c3D 1

41
c

42
c

41
c

c7B

c6B

71
c
72
c

60
6D

73
c

4D
c
40
c

70
c

4A
c

C o m m a n d K e y A re a

c31 u
c51

c32 u
c51

c33 u
c51

c34 u
c51

c35 u
c51

c36 u
c51

c37 u
c51

c38 u
c51

c39 u
c51

c3A u
c51

c3 B u
c51

c3C u
c51

c31 1
c51

c32 1
c51

c33 1
c51

c34 1
c51

c35 1
c51

c36 1
c51

c37 1
c51

c38 1
c51

c39 1
c51

c3A 1
c51

c3 B 1
c51

c3C 1
c51

38
c51

39
c51

3A
c51

3B
c51

(13)
c51

C o re A r e a
31
c51

(01)
c51
(16)
c

32
c51
21
c

(44)

OE
c

23
c

22
c

11
c

(30)

34
c51

33
c51

12
c
01
c

35
c51

24
c

13
c
02
c

36
c51

26
c

25
c

04
c

05
c

18
c

17
c
06
c

07
c

2A
c

29
c

28
c

27
c
16
c

15
c

14
c
03
c

37
c51

08
c

09
c

(42)
c

1B
c
0A
c

0C
c

0F
c

7E

(15)
c51
(29)
c

(28)
c

2B
c

1A
c

19
c

(14)
c51

(43)
c

(57)

68
c
RV2H483-0

Figure 8. 122-Key Keyboard Scan Codes

In Figure 8, the top line shown for each key shows the emulation scan code
generated for that key. The scan codes are for the key when:v It is pressed simultaneously with the shift key (the upper-shift state)v It is pressed by itself (the lower-shift state)
The bottom line shown for each key shows the emulation scan code generated forthat key when it is pressed simultaneously with the ALT key.
Chapter 7. Customizing Twinaxial Displays

45

The following additional symbols are used in Figure 8 on page 45:
c

Emulation generates scan code for 5251 CMD key (X’6F’), followed by thescan code shown on the top line.

cXX

Emulation generates scan code for 5251 CMD key (X’6F’), followed by thescan code (XX) specified.

uEmulation forces upper shift state when generating this scan code
sequencel

Emulation forces lower shift state when generating this scan code sequence()

Parentheses around a scan code, for example (28), indicate that theemulation scan code generated for that key is dependent on the keyboard
type. The following keyboards have emulation scan codes that are
dependent on the keyboard type:v 1A data processing keyboard
v 1A data entry keyboard
v 1A Katakana data processing keyboard
v 1A Katakana data entry keyboard

Table 3 shows the emulation scan codes generated for keys that are dependent on
the keyboard layout.
Table 3. 1A Keyboard Type Dependent Emulation Scan Codes
1A Katakana
Data
1A Data
Processing
Key Number
Processing
1A Data Entry
(01)
3E
3E
30
(13)
3C
3D
3C
(15)
3D
3F
3D
(16)
20
5E
20
(28)
2C
2E
2C
(30)
54
10
57
(42)
1C
1C
1C
(43)
2D
2D
56
(44)
57
57
53
(57)
56
56
52
(65)
6F3D
6F3D
6F61
(76)
0C
63
63
(80)
4C
65
4C
(106)
4E
2C
4E

1A Katakana
Data Entry
3E
30
3F
5E
2D
57
1F
56
53
52
6F3D
63
65
2C

There are slight differences in other national language versions of keyboards fromthe U.S. English versions; for example, some keys in the core area can bearranged differently. These other versions are not shown; however, a more
complete listing of the supported keyboards is available in the National Language
Support book.

46

OS/400 Workstation Customization Programming V4R3

National Language Requirements
Each country and national language type supported by the OS/400 licensed
program establishes standards to which data processing equipment used in thatcountry must conform. For each national language, the two main standards
affecting the local twinaxial workstation controller are the following:v EBCDIC code page standards
v Keyboard layout for displays

EBCDIC Code Page Standards
The EBCDIC code page standard for a given national language provides the set ofgraphic characters that an attached device should be able to display. It also
identifies the EBCDIC code point value that should be used to represent eachgraphic character. For example, the EBCDIC code value of 'F1'X is used to identify
the graphic character for the number 1. Different countries or national language
groups have their own code page standards to which equipment manufacturers are
expected to conform.
For most of the Latin-based languages supported by the OS/400 licensed program,
such as those used in US/Canada, Latin America, and most of Western Europe, acommon set of characters, known as character set 697, makes up the different
code pages. The set of characters in the code pages is the same from one code
page to the next; however, the code point values assigned to given characters may
be different from one code page to the next.
One of the code pages that contains all the characters in character set 697 is theMultinational EBCDIC code page, or code page 500. This code page does notconform to the code page standard of any particular national language. It does,
however, contain all the same characters as those code pages used by the
Latin-based languages. Displays that support the Multinational EBCDIC code pagealso usually support one or more national language code pages containing thecharacters in code page 697. For more information about code pages and EBCDIC
code point values, see the International Application Development book.
AS/400 systems required to handle data originating from a number of different
countries are often set up to use this Multinational EBCDIC code page. You can set
up most displays and printers that are manufactured for a particular national
language to run using either the specific EBCDIC code page defined for thatnational language or the Multinational EBCDIC code page.
The workstation controller uses the translation tables to convert the keyboard scan
codes into EBCDIC character codes. This conversion is done taking into accountthe layout of characters on the keyboard for that country and the EBCDIC code
page to which a scan code is being mapped. The conversion is done differently
depending on whether the conversion is being done for a specific national language
EBCDIC code page or the Multinational EBCDIC code page. This means that for
the keyboards of many countries, there are separate translation tables so that many
countries using national language support can handle the conversion into either a
specific national language EBCDIC code page or the Multinational EBCDIC code
page.

Chapter 7. Customizing Twinaxial Displays

47

Keyboard Layout Standards
Every country has standards for the layouts of keyboards that are manufactured foruse in that country. These standards define the country’s national language
requirements for the layout of keys on a keyboard containing alphanumeric data.
The standards apply to what is generally called the core area on a keyboard.
Note: Some countries use more than one national language.
Over time, a country may change its standards. Not only the keyboard standard
may change, but the EBCDIC code page standard may change as well. New
displays and printers are expected to conform to the new standards, but existing
hardware devices are usually not changed to meet the new standards. The
workstation controller supports the existing displays that conform to older standards,
as well as the new displays that conform to the latest standards. For example,
many displays with the 5250 keyboard layout that are supported by the workstation
controller conform to older standards.

Customizing Restrictions for Twinaxial Display Keyboards
When considering the customizing of a twinaxial display, keep in mind the following
restrictions of the OS/400 workstation customizing functions. Read these restrictions
carefully before you continue to customize a twinaxial display.
v The workstation customizing functions require that you provide hexadecimal data
corresponding to the characters and functions supported by your twinaxial
display. You must have the reference books for the display to obtain thisinformation.
v You cannot customize the mapping of characters sent to the display from AS/400
application programs. Only the characters and functions that are entered from the
keyboard can be customized.
v In most cases, the workstation hardware supports only a subset of the code
pages that the AS/400 system can support. Be sure that you select and set thecorrect code page for the hardware and then select a compatible keyboard
language type in the device description for the workstation.
v Twinaxial keyboards usually support different states by combining keystrokes. For
example, pressing the Alt key or Shift key in combination with other keys may
display a special character or call a display function. However, there is a
restriction on the 122-key keyboard. The Alt key on 122-key keyboards is notsupported as a separate shift state in the 122-key keyboard translation tables. To
find out which states your keyboard supports look at the following sections:
See Appendix A. Twinaxial Keyboard Layouts to determine the keyboard type
for the workstation you want to customize.
See Table 23 on page 66 and the corresponding mode and shift table todetermine which states are supported for your keyboard.
v Keys used for text processing, such as those used with the OfficeVision/400
licensed program, cannot be directly customized. These keys may be affected
when you customize other keyboard functions. See “Keyboard Functions Not
Specified in Translation Tables” on page 61 for information on how customizing
other keyboard functions can affect the text processing keyboard functions.
v It is not recommended that you customize keys such as Alt, Caps Lock, Shift,
and Shift Lock as this can produce unpredictable results.

48

OS/400 Workstation Customization Programming V4R3

v The twinaxial translation tables contain entries that indicate which characters on
the keyboard are subject to monocasing. However, you cannot customize the
keyboard so that characters not currently subject to monocasing are now
converted to uppercase. Entries in the keyboard translation table for a twinaxial
display that are subject to monocasing have a first byte equal to '0A'X. The
workstation controller uses separate internal tables that allow it to determine the
EBCDIC character to be displayed when monocasing is used to convert a given
character. The internal monocase tables cannot be customized.
If the internal monocase table does not indicate that an EBCDIC character has
an uppercase character associated with it, monocasing is not done even if youchange the translation table entry to designate the character as subject tomonocasing support.
On the other hand, if the translation table entry for a character currently identified
as subject to monocasing is changed so that monocasing is no longer supported(first byte value is changed from '0A'X), monocasing is no longer done for thatcharacter.
v The display must support the code page associated with the character identifier(CHRID) assigned to the display in the device description, and the CHRID mustmatch the coded character set identifier (CCSID) of the job you are running onthat display.
v When you choose the keyboard language type for the display, you must selectone that uses the same code page mapping supported by your display. Many
twinaxial displays provide a test request function, which you can use to show thecharacters that the display is capable of supporting. Use this function whenavailable to verify that the graphics character mapping is correct. You cannot
customize this mapping because this character set is built into the device. All you
can do is specify a compatible choice for the language type in the device
description, and specify the same language type for the customizing object(these should match).
v Specifying keyboard translation table mappings for keyboard functions that are
not otherwise present in the translation table for a given type of keyboard may
produce unexpected results. The following is a list of items that could result:– Incorrect data displayed,– Keyboard locked in a shift state,– Failure of the controller.
In general, specifying functions that are not supported for a particular type ofkeyboard should be avoided. For example, the translation table entry for a proof
space character is only present in the translation tables for data entry keyboards,
and should not be specified for other keyboard types.
There are also certain scan codes that you should not customize. The translationtable entries for these scan codes should not be changed in the source you
retrieve.
Changing these particular translation table entries could cause your keyboards tobe unusable. For example, if certain shift key functions were converted to scan
codes for keys that are not make/break keys, a user might not be able to get out ofa certain shift state. For another example, when the scan code assigned to theCmd key function in a 122-key keyboard translation table is changed, many of the
Cmd key functions on a display with that keyboard become inaccessible because
there is no single key on the 122-key keyboard that generates this particular scancode. The scan code for the Cmd key is part of a scan code sequence generated
because the 122-key keyboard operates in a 5250 keyboard emulation mode.
Chapter 7. Customizing Twinaxial Displays

49

The scan codes for translation table entries that should not be changed are shownin the following tables, Table 4 through Table 8. The translation table entries forthese scan codes in any customized translation table should match thecorresponding entries within the existing system table, regardless of the shift state
to which a given translation table entry applies. Some of the scan codes shown
may apply only to the keyboards for certain national languages. However, theentries associated with these scan codes should not be changed from the way they
appear in the original system table that you retrieve in your workstation customizing
source.
Note: The Caps Lock/Shift Lock key on an Enhanced keyboard is an exception to
the restrictions shown in the following tables. See the note following“Enhanced Keyboard Translation Table Restrictions” on page 51 for more
information about this exception.

122-Key Typewriter Keyboard Translation Table Restrictions
Table 4. 122-Key Typewriter Keyboard Scan Codes Restricted from Remapping
Scan Code
Value

Assigned Function'52'X

Language Layer shift (4-shift keyboards) or Katakana shift on Katakana
keyboards'53'X

Latin Layer shift (4-shift keyboards) or Alphanumeric shift on Katakana
keyboards'54'X

Shift Lock

'56'X

Left Shift, or Katakana Symbols shift on Katakana keyboards'57'X

Right Shift'6F'X

Scan code for Cmd key in emulation sequence

122-Key Data Entry Keyboard Translation Table Restrictions
Table 5. 122-Key Data Entry Keyboard Scan Codes Restricted from Remapping
Scan Code
Value

Assigned Function'0F'X

Space/Proof Space Character Mapping'52'X

Katakana shift (Katakana 122-key data entry keyboards only)'53'X

Katakana Symbol shift (Katakana 122-key data entry keyboards only)'56'X

Alphanumeric shift'57'X

Left Shift'6F'X

Scan code for Cmd key in emulation sequence5250 Typewriter Keyboard Translation Table Restrictions
Table 6. 5250 Typewriter Keyboard Scan Codes Restricted from Remapping
Scan Code
Value
'52'X

50

Assigned Function
Language Layer shift (4-shift keyboards) or Katakana shift on Katakana
keyboards

OS/400 Workstation Customization Programming V4R3

Table 6. 5250 Typewriter Keyboard Scan Codes Restricted from Remapping (continued)
Scan Code
Value

Assigned Function'53'X

Latin Layer shift (4-shift keyboards) or Alphanumeric shift on Katakana
keyboards'54'X

Shift Lock

'56'X

Left Shift, or Katakana Symbols shift on Katakana keyboards'57'X

Right Shift

5250 Data Entry Keyboard Translation Table Restrictions
Table 7. 5250 Data Entry Keyboard Scan Codes Restricted from Remapping
Scan Code
Value

Assigned Function'0F'X

Space/Proof Space Character Mapping'52'X

Katakana shift (Katakana 5250 data entry keyboards only)'53'X

Katakana Symbol shift (Katakana 5250 data entry keyboards only)'56'X

Alphanumeric shift'57'X

Left Shift

Enhanced Keyboard Translation Table Restrictions
Table 8. Enhanced Keyboard Scan Codes Restricted from Remapping
Scan Code
Value

Assigned Function'12'X

Left Shift or Latin shift (when Alt shift is also active for 4-shift keyboards)'14'X

Caps Lock or Shift Lock (depending on country and state of Alt shift). See
note.

'19'X

Left Alt shift'39'X

Right Alt shift or Layer Select (on Katakana keyboards)'59'X

Right Shift or Language shift (when Alt shift also active for 4-shift
keyboards)

Note: For the Enhanced keyboard, the entries in a customized translation table for thescan code value of '14'X may be different from the entries in the base table, but the entries
should still specify either the Caps Lock or the Shift Lock function.

Determining Which Twinaxial Keyboard Translation Table to Customize
This section provides a description of the content and format of the workstation
customizing source that contains the twinaxial keyboard translation tables used by
the workstation controller.
The twinaxial workstation controller uses the keyboard translation tables to map
scan codes received from an attached display in one of the following ways:
v Map the scan code for a key into the EBCDIC code for the character that islabeled on the top of the key.

Chapter 7. Customizing Twinaxial Displays

51

After the workstation controller has converted this EBCDIC code from the scancode, it transmits the EBCDIC code back to the display so that the propergraphic character appears.
v Map the scan code to an internal workstation controller code that the controller
recognizes as a request to perform some local edit or cursor movement function.
For example, a particular scan code can be converted into a code that is arequest to move the cursor in a particular direction. When the controller receives
such a request, it directs the display to move the cursor in the direction indicated.
v Map the scan code into an internal workstation controller code that the controller
recognizes as a request to either send data to a system application or signal theapplication that a particular system function is being requested.
For example, you may have pressed the Enter key, the Help key, or any of theother function keys while working with an application.
The translation tables contain information indicating which keys are blank (nographic character or function assigned) and which scan codes are not valid (cannot
be generated by certain keyboard types). The translation table that the workstation
controller uses for a given display must be specific to the particular requirements ofthat display. The following list shows the factors that determine which translationtable is to be used:v Device typev Keyboard type (5250, 122-key, or Enhanced)
v Keyboard language type
When you use the Retrieve Work Station Customizing Object Source (RTVWSCST)
command to retrieve the source for customizing a twinaxial keyboard, you specify
parameters relating to these factors that determine which translation table is copiedin your source. It is very important that you specify the correct keyboard type andlanguage parameters so that the correct translation table is retrieved.
Note: The device type and keyboard language type you specify for the
RTVWSCST command must match the corresponding parameter values inthe device description for the display; otherwise, the device will not vary on
when the workstation customizing object is specified in the device
description. For an example showing the use of the RTVWSCST command,see “Customizing a 3477 Twinaxial Display for Diacritic Character Support”
on page 68.

Twinaxial Display Source Format
When you retrieve the source for a twinaxial display, the translation table for the
display type, keyboard type, and language type you specify is pulled into a source
file member and formatted using the workstation customizing tag language. The
content and format of the source depends on the shift capabilities of the display andkeyboard for which the workstation controller is using that translation table.
The workstation customizing source is divided into a number of different shift
regions. Each region is denoted by a TKSTATE (keyboard translation state table)
tag and its parameters. A shift region defines the characters on the keyboard whena shift key (or Alt key) is pressed in conjunction with a character or function key.
The number of shift regions within a workstation customizing source file member
depends on the type of display and keyboard, and the language type specified forthe display. Each shift region contains information for converting scan code values
from '00'X to '7F'X into EBCDIC or functional code values.

52

OS/400 Workstation Customization Programming V4R3

When the workstation controller receives a scan code from a display, the controller
first determines the correct shift region of the translation table based on the current
shift state of the display. The scan code value is then used to determine the offset
within the proper shift region in order to access a particular translation table entry.
There are five basic translation table layouts (according to shift regions):
1. 5250 and 122-key layout for 2-shift national languages (2 shift regions)
2. 5250 and 122-key layout for 4-shift national languages (4 shift regions)
3. Enhanced keyboard layout for 2-shift national languages without special
character support (3-shift regions)
4. Enhanced keyboard layout for 4-shift national languages (5 shift regions)
5. Enhanced keyboard layout for 2-shift national languages with special character
support (6 shift regions)
Each of the shift regions has a corresponding region in the workstation customizing
source that begins at '00'X following a TKSTATE tag.
For most national languages, a 5250 keyboard type has only an upper-shift
capability. National languages whose keyboards contain this type of shift capability
are called 2-shift national languages (unshifted and upper shift).
Some national languages also support a language and Latin shift key or keys on
their keyboard, in addition to keys for the upper shift state. National languages that
use the language and Latin shift key or keys are called 4-shift national languages.
The data keys on this type of keyboard can be viewed functionally as being split
into a language layer and a Latin layer. The language layer of the data keys usuallycontains characters unique to a particular language, while the Latin layer contains
those characters common to most Latin-based languages. Each layer of a key is acharacter defined for the unshifted position and another character defined for theupper shift position. Therefore, a key may have 4 characters on the key top, one
corresponding to each possible combination of the upper/lower shift andlanguage/Latin shift.
Although 122-key keyboards contain an Alt shift key, there is no shift region
reserved within the translation table for this keyboard for the Alt shift state. This isbecause all twinaxial displays using 122-key keyboards function in a 5250 keyboard
emulation mode, and the 5250 keyboard does not have a defined Alt key.
Enhanced keyboards also have Alt keys in their layout. When you press the Alt key
on this type of keyboard, it is recognized by the workstation controller as a uniqueshift state. Therefore, the translation tables used for an Enhanced keyboard also
include shift regions to handle the Alt shift state. For some national languages, theEnhanced keyboard also contains language and Latin shift keys. The translationtables for these types of keyboards have regions to handle the different
combinations of language/Latin and upper/lower shift.
For national languages whose EBCDIC code page consists of characters incharacter set 697, such as United States English, Canadian, Latin American, andmany European national languages, the workstation controller also provides support
for an Enhanced keyboard function known as special character support. The special
character support provides Enhanced keyboard users with yet another shift state.
When you press an Alt key in combination with an upper shift key on one of these
Enhanced keyboards, the workstation controller puts the display into special
character mode. In this mode, scan codes from the display are translated according
Chapter 7. Customizing Twinaxial Displays53

to a keyboard layout defined as keyboard ID 100. This mode allows you to enter
many special characters that you cannot enter directly from the keyboard because
these characters are not included on the standard keyboard layout for a given
national language. The Enhanced keyboard translation tables for the national
languages that support special characters include separate shift regions to handle
scan code translations in this mode.
Note: Special character support is not provided for Enhanced keyboards containing
a language/Latin shift capability.
“Source Code for 3477 Twinaxial Display” on page 311 shows an example of thesource for a 3477 Model H twinaxial display with a 122-key keyboard and a
keyboard language type of USI. Each shift region in the source contains theindividual entries corresponding to each possible scan code value from '00'X to'7F'X in each of the possible shift states.

Changing the Entries in Your Workstation Customizing Source
Each entry in a shift region of a workstation customizing source file member
consists of two bytes. The first byte in an entry contains information about thefunctional category to which this conversion belongs. If the conversion involves ascan code conversion to a graphic character, the second byte of the table entry
contains the EBCDIC code for the character into which the scan code is mapped. If
the scan code conversion does not involve a conversion to a graphic character, thesecond byte contains a code that identifies a specific keyboard function to be
performed.

Entry Format for EBCDIC Character Conversions
When a scan code is to be converted into a graphic EBCDIC character, the first
byte of the entry in the source for that scan code must have a value in the range'09'X to '10'X. This value indicates to the workstation controller the type of character
it is. It also provides an indication of the types of input fields in which eachcharacter can be used. Table 9 shows the valid first byte values for translation table
entries that handle mapping to an EBCDIC character, the types of character eachvalue signifies, and the valid input field types associated with each. For more
information about the input field types, see the reference books for your workstation
controllers.
Table 9. Format for Translation Table Entries That Map to EBCDIC CharactersFirst Byte
Value

54

EBCDIC Character Type

Valid Field Types'09'X

Uppercase alphabetic characters

Alphanumeric ShiftAlphabetic
Numeric Shift'0A'X

Lowercase alphabetic characters(monocasing supported)

Alphanumeric ShiftAlphabetic
Numeric Shift'0B'X

Nonalphanumeric characters

Alphanumeric Shift
Numeric Shift'0D'X

Numeric digit (0–9 in core area of
keyboard)

Alphanumeric Shift
Numeric Shift
Numeric Only
Digits Only
Signed Numeric

OS/400 Workstation Customization Programming V4R3

Table 9. Format for Translation Table Entries That Map to EBCDIC Characters (continued)
First Byte
Value

EBCDIC Character Type

'0E'X

Numeric digit (0–9 in key pad area)

Alphanumeric Shift
Numeric Shift
Numeric Only
Digits Only
Signed Numeric'0F'X

Plus character

Alphanumeric Shift
Numeric Shift
Numeric Only

'10'X

Comma, period, minus, or spacecharacters

Alphanumeric ShiftAlphabetic Only
Numeric Shift
Numeric Only

Valid Field Types

Note: Monocasing is not supported for any entry that has a first byte value otherthan '0A'X.
The second byte of the translation table entries for EBCDIC character translations
must contain a valid EBCDIC character code. The valid range of values for thissecond byte is from '40'X to 'FE'X.
The uppercase and lowercase alphabetic character types are used for scan codesthat are mapped to the alphabetic characters A-Z and a-z, as well as to any othercharacters that are on the keyboard or included in the alphabet for a given national
language. When you enter a character from the keyboard and that character is
identified as supporting monocasing, the character is converted to its uppercase
character value if the Caps Lock key is active or if the character is entered into a
monocase input field.
The process of converting the lowercase version of a character into its uppercase
version is called monocasing. The workstation controller performs this conversion
when an input field is designated as a monocase input field or when the Caps Lockkey is active. The OS/400 operating system has monocasing tables that it uses forthe conversion of system data. The workstation controller has its own separate
tables for doing this monocase conversion; it does not access or use the system
monocasing tables. When you change the source for a twinaxial keyboard
translation table, identifying a character as an alphabetic character type that
supports monocasing does not result in that character supporting monocasing
unless that character is in the workstation controller’s internal monocase table. Also,changing a character that is currently identified as an alphabetic character type that
supports monocasing to a different character type means that monocasing is nolonger done for that character.
The numeric digit character type for the numeric key pad area of the keyboard isused for scan codes corresponding to keys in the numeric key pad that are mapped
into a numeric digit character (0-9). The numeric digit character type for the corearea of the keyboard is used for scan codes corresponding to keys containing
numeric characters anywhere within the core area (either the top row keys oftypewriter keyboards or the keys used for numeric characters on a data entry
keyboard).
The plus (+) character type is used solely to designate the plus character on a
keyboard. There is also a class of characters consisting of the comma, period,
Chapter 7. Customizing Twinaxial Displays

55

minus, and space characters. Translation table entries for characters that do not fall
into any of the previously mentioned categories have a first byte value of '0B'X
indicating the nonalphanumeric character type.
The workstation controller uses the different character types to determine thevalidity of data types in different input fields. When customizing a keyboard for a
twinaxial display, you should not change the character type value associated with agiven EBCDIC character code. Doing so can result in data being allowed in certain
types of input fields that an application may not expect or accept. For some
applications, this causes unpredictable results.

Entry Format for Diacritic Characters
The keyboards for most national languages have at least one diacritic character. A
diacritic is an accent near or through a letter or combination of letters indicating aphonetic value different from that given the unmarked or otherwise marked letters.
The workstation customizing source entries for scan codes corresponding to keys
that contain a diacritic have the following general format:
Table 10. General Format for Translation Table Entries for Diacritics
Byte Number

Bit Numbers

Values

1

0-7'25'X Alphabetic diacritic '26'X Nonalphabetic
diacritic

2

0-7

Assigned diacritic value

The first byte of a source entry for a diacritic indicates that the entry is for adiacritic. If the value for an alphabetic diacritic is specified, then that diacritic istreated the same way as an alphabetic character. If a non-alphabetic diacritic is
specified, that diacritic is treated the same way as a non-alphabetic character.
The value for the second byte of a source entry for a diacritic indicates the specificdiacritic character associated with the entry. The value assigned to a particulardiacritic character depends on the language of the translation table (see Table 11 on
page 57). The following example shows a source entry for a nonalphabetic diacritic
character from the source for the upper shift region of a 3477 Model H twinaxial
display with a 122-key keyboard.
Data

Corresponding
Scan Code

Mode

Shift
Region2603/*3E*//*MODE=NONE

SHIFT=UPPER*/

The set of diacritic characters that the workstation controller supports depends on
the language associated with the translation table. The following list shows the setsof diacritics that are supported by the workstation controller for different groups oflanguages. For each set, the values for the second bytes in the translation tableassociated with each diacritic are also shown.

56

OS/400 Workstation Customization Programming V4R3

Table 11. Sets of Supported Diacritics by Language Group
Hexadecimal Value–Diacritic
Character

Language Group

Keyboard Language Type

Character Set 697

AGB AGI BLI BRB CAB CAIDMB DMI FAB FAI FNB FNIFQB FQI ICB ICI INB INI ITBITI JEB JEI NEB NEI NWBNWI PRB PRI SFI SSI SWBSWI UKB UKI USB USI

01–circumflex
02–grave
03–tilde
04–cedilla
05–diaeresis
06–acute
07–overcircle

Languages of theformer Yugoslavia

YGI

01–circumflex
02–grave
03–cedilla
04–diaeresis
05–acute
06–caron
07–breve08–overcircle
09–ogonek
0A–double acute0B–overdot

Roece

ROB

01–circumflex
02–cedilla
03–diaeresis
04–acute
05–caron
06–breve
07–overcircle
08–ogonek
09–double acute
0A–overdot

TurkeyTKB

01–circumflex
02–grave
03–tilde

Greece (Old, CP
423)

GKB

01–circumflex
02–grave
03–cedilla
04–diaeresis
05–acute

Greece (New, CP
875)

GNB

01–double strike
02–diaeresis
03–acute

The keyboard language type associated with a customized table is the same as the
keyboard language type of the workstation customizing source from which thecustomized table is created. Because diacritic processing done by the workstation
controller depends on the keyboard language type of a translation table, it isimportant that the keyboard language type you select when retrieving a set oftranslation tables be the same as the actual language for that keyboard. If it is not
the same, the EBCDIC characters resulting from diacritic character processing may
be incorrect.

Entry Format for Blank Keys and Unassigned Scan Codes
Not all keys or key positions for a given keyboard necessarily have an assigned
character or keyboard function. Source entries for scan codes corresponding to key
Chapter 7. Customizing Twinaxial Displays

57

positions having nothing assigned have a format indicating that the key is blank.
Table 12 shows the format for blank and unassigned scan codes.
Table 12. Translation Table Entry Format for Blank Keys
Byte

Value

1

'22'X Unassigned Key

2

'00'X

When an unassigned key is pressed, the workstation controller discards the scancode. No character is displayed, nor is any kind of error message displayed.
If a particular scan code value cannot be generated by a particular type ofkeyboard, then all source entries corresponding to that scan code have a format
indicating the scan code is not valid. When the workstation controller detects suchscan codes, an error message is sent indicating the scan code is not valid. Table 13
shows the format for scan codes that are not valid.
Table 13. Translation Table Entry Format for Scan Codes That Are Not Valid
Byte

Value

1

'23'X Key Not Valid

2

'00'X

Entry Format for the Proof Space Character
The source entry for the scan code corresponding to a shifted spacebar on a data
entry keyboard requires a special format so that certain data entry keyboard
functions are properly handled. This entry is called the entry for a proof spacecharacter. Table 14 shows the format for the proof space character.
Table 14. Translation Table Entry Format for Proof Space Character
Byte

Value

1

'27'X

2

'40'X (EBCDIC code for the space character)

Entry Format for Function Keys
In this section, the term function key refers to a broad class of keyboard functions
that can be performed by the workstation controller. The term does not refer
exclusively to the PF or Cmd keys that may be on the keyboard of a twinaxial
display. It can also refer to other keys that may result in such controller functions as
moving the cursor, putting the display into insert mode, or generating an aidfunction, such as Help or Page Up.
The controller processes function key requests from a twinaxial display based on anumber of different categories of keyboard functions. The source entries for function
keys have a format that allows the controller to identify a function key request as
belonging to a particular function category.
The first byte of each source entry has the same value for all keyboard functions
that are in the same category. The second byte of the entry contains the value thatuniquely identifies the keyboard function within a particular category.

58

OS/400 Workstation Customization Programming V4R3

Table 15 through Table 21 on page 60 show the formats for function keys.
Table 15. Translation Table Entry Formats: Cursor Movement Functions
Byte

Value and Function

1'01'X Cursor Movement Function

2

'01'X
'02'X
'03'X
'04'X
'05'X
'06'X
'07'X
'08'X
'09'X
'0A'X
'0B'X
'0C'X
'0D'X
'0E'X

New Line
Cursor Left
Cursor Right
Fast Cursor Left
Fast Cursor Right
Cursor Up
Cursor Down
Character Backspace
Tab Back (Field Backspace)
Tab AdvanceTab Advance and Tab Function
Tab Function
Home
Character Advance

Note: In data processing mode, unique text functions are performed for the different tabs
with hexadecimal values '0A'X, '0B'X, and '0C'X. In word processing mode, the unique text
functions are performed for all the different types of tabs.

Table 16. Translation Table Entry Formats: Field Exit Functions
Byte

Value and Function

1'02'X Field Exit Function

2

'01'X
'02'X
'03'X
'04'X

Field Exit
Field − (minus)
Field + (plus)
Dup

Table 17. Translation Table Entry Formats: Nonaid Functions
Byte

Value and Function

1'03'X Nonaid Functions

2

'01'X
'02'X
'03'X
'04'X
'05'X
'06'X
'07'X
'08'X
'09'X
'0A'X
'0B'X
'0C'X
'10'X
'11'X

InsertDeleteErase Input
CancelClose (Bidirectional languages only)
Reverse (Bidirectional languages only)
Base (Bidirectional languages only)
Screen Reverse (Bidirectional languages only)
Reverse Video Screen
Erase End of Field (Erase EOF)
Field Mark
Cursor SelectCommand Key (Cmd)
Hex

Table 18. Translation Table Entry Formats: Immediate Functions
Byte

Value and Function

1'04'X Immediate Functions

Chapter 7. Customizing Twinaxial Displays

59

Table 18. Translation Table Entry Formats: Immediate Functions (continued)
Byte

Value and Function

2

'01'X
'02'X
'03'X

Reset
Attention
System Request

Table 19. Translation Table Entry Formats: Function (Cmd) Key Functions
Byte

Value and Function

1'05'X Cmd Key Functions

2

'01'X
'02'X
'03'X
'04'X
'05'X
'06'X
'07'X
'08'X
'09'X
'0A'X
'0B'X
'0C'X
'0D'X
'0E'X
'0F'X
'10'X
'11'X
'12'X
'13'X
'14'X
'15'X
'16'X
'17'X
'18'X

PF1 (Cmd1)
PF2 (Cmd2)
PF3 (Cmd3)
PF4 (Cmd4)
PF5 (Cmd5)
PF6 (Cmd6)
PF7 (Cmd7)
PF8 (Cmd8)
PF9 (Cmd9)
PF10 (Cmd10)
PF11 (Cmd11)
PF12 (Cmd12)
PF13 (Cmd13)
PF14 (Cmd14)
PF15 (Cmd15)
PF16 (Cmd16)
PF17 (Cmd17)
PF18 (Cmd18)
PF19 (Cmd19)
PF20 (Cmd20)
PF21 (Cmd21)
PF22 (Cmd22)
PF23 (Cmd23)
PF24 (Cmd24)

Table 20. Translation Table Entry Formats: Aid Generating Functions
Byte

Value and Function

1'06'X Aid Generating Functions

2

'01'X
'02'X
'03'X
'04'X
'05'X
'06'X
'07'X
'08'X
'09'X
'0A'X

Print
Roll Up (Page Down)
Roll Down (Page Up)
Enter
Clear
Test Request
Help
PA1
PA2
PA3

Table 21. Translation Table Entry Formats: Shift Key Functions

60

Byte

Value and Function

1'16'X Shift Key

OS/400 Workstation Customization Programming V4R3

Table 21. Translation Table Entry Formats: Shift Key Functions (continued)
Byte

Value and Function

2

'01'X
'02'X
'03'X
'04'X
'05'X
'06'X
'07'X
'08'X
'09'X
'0A'X
'0B'X
'0C'X
'0D'X
'0E'X

Shift Lock
Left Shift
Right ShiftAlphanumeric Shift
Katakana Symbol Shift
Katakana Shift
Left Alt Shift (Enhanced keyboards only)
Right Alt Shift (Enhanced keyboards only)
Caps Lock
Latin Shift
Language Shift
Layer Select Shift
Left Special Character support
Right Special Character support

Changing Source Entries for Scan Codes That Are Not Valid
The set of scan codes that a particular display keyboard can generate is a subsetof the entire range of scan code values in a translation table. The complete range isfrom '00'X to '7F'X. Translation table entries for scan code values that are not in a
specific subset are usually coded as scan code entries that are not valid (see “Entry
Format for Blank Keys and Unassigned Scan Codes” on page 57). Although mosttwinaxial displays should never generate such scan code values, you can change
the corresponding source entries for these scan codes so that something other thana scan code that is not valid is specified.
A device that is emulating a twinaxial display may be capable of generating scancode values that an actual twinaxial display cannot. Also, there are a number oftwinaxial displays manufactured to meet certain language requirements that cangenerate scan code values besides those shown in “Keyboard Scan Codes” onpage 42 . To accommodate such displays, the translation table entries for all scan
codes (except the ones noted for each keyboard type) can be changed in yourworkstation customizing source.

Keyboard Functions Not Specified in Translation Tables
There are some keyboard functions that you cannot directly specify in a translationtable. Some of these functions cannot be changed using workstation customizing,
while others can be indirectly affected by it.
Examples of keyboard functions that you cannot directly specify are functions that
require a Command (Cmd) key sequence on a 5250-style keyboard. When youpress the Cmd key on a twinaxial keyboard followed by one of the top-row keys on
the keyboard, the workstation controller performs one of the Command or PF key
functions (Cmd1-Cmd12). However, there are no individual entries in a 5250-style
keyboard translation table for each of these functions. There is only a translationtable entry for the Cmd key itself. When the Cmd key is pressed and the scan code
for a top-row key is received, the controller calls one of the Cmd1-Cmd12 functions.
Any keyboard functions normally performed by the workstation controller that are
not coded in a given translation table cannot be customized using the workstation
customizing functions. Therefore, the key sequences for Cmd1-Cmd12 on a
5250-style keyboard must always involve pressing a given key (like Cmd) followed
Chapter 7. Customizing Twinaxial Displays61

by one of the top-row (numeric) keys. You can change the key required to put thedisplay into the Cmd state; however, the subsequent key required to call one of thefunctions Cmd1-Cmd12 cannot be changed.
On an Enhanced keyboard, the equivalent keyboard functions (Cmd1-Cmd12) areaccessed by way of single keys. There are separate entries in an Enhanced
keyboard translation table that specifically identify the Cmd function to be
performed.
Another group of keyboard functions that can be indirectly affected by workstation
customizing are the OfficeVision/400 editor functions. Many of these functions arecalled using Alt key sequences on 122-key and Enhanced keyboards, and using
Cmd key sequences on 5250 keyboards. The translation tables contain no
information specifying these particular functions. The workstation controller isnotified that a display is in the editor (text edit) mode, and the base translation tablefunction that is called determines whether or not one of these editing functions
should be performed.
The text editing functions are only affected by workstation customizing when you
decide to change the base keyboard functions with which a given text edit function
is associated. For example, the editing function for underlining text is initiated bypressing Alt U on an Enhanced keyboard when the editing functions are active. If acustomized translation table changes the key required for a user to enter thecharacter U, then the underscore function follows the U function to that new key.

Working with the Tag Language for Twinaxial Displays
When the device class parameter specified for the RTVWSCST command is a
twinaxial display other than 3477, 3486, or 3487 (DEVCLASS=TWINAXDSP), your source
structure looks like the following::WSCST DEVCLASS=TWINAXDSP.
:TKBDTBL with parameters.
:TKSTATE with parameters.
/*one keyboard state table*/.
.
/*from 1 - 5 additional state*//*tables depending on keyboard type*/.
.
:EWSCST.

Figure 9. Source Structure for Twinaxial Displays

The order and placement of the primary tags in each source file member isenforced by the workstation customizing object compiler.

Using the Tags to Customize Twinaxial Display Keyboards
The following sections describe the tags you can use to customize a twinaxial
keyboard. For a twinaxial device, the keyboard is the only part of the device thatyou can customize.

62

OS/400 Workstation Customization Programming V4R3

To retrieve a source file for customizing a twinaxial display, be sure to specify atwinaxial display for the device type when you use the Retrieve Work Station
Customizing Object Source (RTVWSCST) command. To see a complete sourcecode example for a twinaxial display, see “Source Code for 3477 Twinaxial Display”
on page 311.

Keyboard Translation Table (TKBDTBL) Tag
The TKBDTBL (keyboard translation table) tag in your source defines the twinaxial
keyboard translation table you want to customize. When the TKBDTBL tag is
missing from the source, the default translation tables are used when the device isvaried on. The syntax for this tag is::TKBDTBL

LANGTYPE = keyboard language type
KBDTYPE = DATA5250|TYPE5250|
DATA122|TYPE122|
ENHANCED.

Figure 10. Syntax for the Keyboard Translation Table Tag

The TKBDTBL tag indicates the beginning of the keyboard translation table and isused to specify a keyboard and language type for a twinaxial display or an ASCII
printer attached to a twinaxial display.
LANGTYPE
A required parameter that specifies the type of keyboard language. Valid values
for this parameter are listed in Table 22.
Note: Not all combinations of the language type parameter and the keyboard
type parameter are valid. For a list of the valid combinations, see
Table 23 on page 66.
Table 22. Values for the Language Type (LANGTYPE) Parameter
Language Type Value

Language Description

Associated Code Page

AGB

Austria/Germany

273

AGI

Austria/Germany Multinational

500

ALI

Albania500

BGB

Bulgaria

1025

BLI

Belgium Multinational

500

BRB

Brazil037

CAB

Canadian French

260

CAI

Canadian French Multinational

500

CLB

Arabic420

CSB

Czech Republic

870

CYB

Cyrillic

880

DMB

Denmark

277

DMI

Denmark Multinational

500

FAB

France (Azerty)

297

FAI

France (Azerty) Multinational

500
Chapter 7. Customizing Twinaxial Displays

63

Table 22. Values for the Language Type (LANGTYPE) Parameter (continued)
Language Type Value

Language Description

Associated Code Page

FNB

Finland278

FNI

Finland Multinational

500

FQB

France (Qwerty)

297

FQI

France (Qwerty) Multinational

500

GKB

Greece423

GNB

Greece875

HNB

Hungary870

ICB

Iceland871

ICI

Iceland Multinational

500

INB

International

500

INI

International Multinational

500

IRB

Iran (Farsi)

1097

ITB

Italy

280

ITI

Italy Multinational

500

JEB

Japan English

281

JEI

Japan English Multinational

500

KAB

Japan Katakana

290

MKB

FYR Macedonia Former Yugoslav Republic

1025

NCB

Hebrew

424

NEB

Netherlands

037

NEI

Netherlands Multinational

500

NWB

Norway277

NWI

Norway Multinational

500

PLB

Poland870

PRB

Portugal

037

PRI

Portugal Multinational

500

RMB

Romania870

ROB

Latin 2

870

RUB

Russia1025

SFI

Switzerland/French Multinational

500

SGI

Switzerland/German Multinational

500

SKB

Slovakia

870

SPB

Spain

284

SPI

Spain Multinational

500

SQB

Serbia (Cyrillic)

1025

SSB

Spanish Speaking

284

SSI

Spanish Speaking Multinational

500

64

OS/400 Workstation Customization Programming V4R3

Table 22. Values for the Language Type (LANGTYPE) Parameter (continued)
Language Type Value

Language Description

Associated Code Page

SWB

Sweden278

SWI

Sweden Multinational

500

THB

Thailand

838

TKB

Turkey (Qwerty)

1026

TRB

Turkey (F)

1026

UKB

United Kingdom

285

UKI

United Kingdom Multinational

500

USB

United States/Canada

037

USI

USA/Canada Multinational

500

YGI

Croatia870

YGI

Languages of the former Yugoslavia

870

YGI

Serbia (Latin)

870

YGI

Slovenia

870

KBDTYPE
A required parameter that specifies the keyboard type. The following list shows
the valid values and their meanings.
DATA122122-key data entry keyboard

TYPE122122-key typewriter keyboard

DATA5250

5250 data entry keyboard

TYPE5250

5250 typewriter keyboard

ENHANCED

Enhanced keyboard

Table 23 on page 66 maps the available language types with the types of keyboards
for which workstation customizing is supported.
The TKBDTBL tag can be followed by from two to six TKSTATE (keyboard
translation state table) tags. Each tag indicates one state table for the keyboard.
For a given language type, there are valid combinations of the KBDTYPE
parameter with the MODE and SHIFT parameters on the TKSTATE tags. See
Table 23 on page 66 for the format value associated with each valid KBDTYPE
value for the language type you selected. This format value dictates the number of
TKSTATE tags that are required. The formats are described with the TKSTATE tag
in the following section.

Keyboard Translation State Table (TKSTATE) Tag
The TKSTATE (keyboard translation state table) tag defines a twinaxial keyboard
translation table for one state of a keyboard. Keyboards can have anywhere fromtwo to six states, depending on the type. Therefore, there are two to six TKSTATE
tags following each TKBDTBL tag. This tag is required whenever the TKBDTBL tag
is specified. The syntax for the TKSTATE tag is:

Chapter 7. Customizing Twinaxial Displays

65

:TKSTATEMODE = NONE|LATIN|LANGUAGE|SPCCHRSHIFT = UNSHIFT|UPPER|ALT
DATA = table data.

Figure 11. Syntax for the Keyboard Translation State Table Tag

MODE
A required parameter. Specifies the keyboard mode for which the translationtable is used.
NONE

No keyboard mode is required.

LATIN

Latin character entry mode

LANGUAGE

Language character entry mode

SPCCHR

Special character keyboard mode.

SHIFT
A required parameter. Specifies the keyboard shift for which the translation table
is used.
UNSHIFTThe translation table is used if the keyboard is not in any shiftstate.

UPPER

The translation table is used if the keyboard is in an upper shiftstate.

ALT

The translation table is used if the keyboard is in an Alt key
shift state.

DATA
A required parameter. Specifies the translation table data for one keyboard
state. The data is the hexadecimal values for the keys on the keyboard in thisstate. The table data must be hexadecimal and must be exactly 256 bytes inlength.

table data
Hexadecimal values for the keyboard keys in this state.
Table 23 maps the available language types with the keyboards and shift states
they support. A list following the table shows the MODE / SHIFT combinations forthe various language and keyboard types. These combinations can occur in any
order within the group, but all are required to be present for a particular keyboard
and its requirements.
Table 23. Language Type and Keyboard Type Considerations
Language Type Value

Number of TKSTATE Tags
DATA122

TYPE122

DATA5250

TYPE5250

ENHANCED

AGB, AGI

—

2

2

2

6

ALI

—

2

—

—

6

BGB

—

—

—

—

5

BLI

—

2

2

2

6

BRB

—

—

—

2

6

CAB

2

2

2

2

3

CAI

2

2

2

2

6

66

OS/400 Workstation Customization Programming V4R3

Table 23. Language Type and Keyboard Type Considerations (continued)
Language Type Value

Number of TKSTATE Tags
DATA122

TYPE122

DATA5250

TYPE5250

ENHANCED

CLB, CYB

—

4

—

4

5

CSB

—

—

—

—

3

DMB, DMI

—

2

2

2

6

FAB, FAI

—

2

2

2

6

FNB, FNI

—

2

2

2

6

FQB, FQI

—

—

2

2

—

GKB, GNB

—

4

—

4

5

HNB

—

—

—

—

3

ICB, ICI

—

2

—

2

6

INB, INI

—

—

2

2

—

IRB

—

4

—

—

5

ITB, ITI

—

2

2

2

6

JEB, JEI

—

—

2

2

—

KAB

4

4

4

4

5

MKB

—

—

—

—

5

NCB

—

4

—

4

5

NEB, NEI

2

2

2

2

6

NWB, NWI

—

2

2

2

6

PLB

—

—

—

—

3

PRB, PRI

—

2

2

2

6

RMB

—

—

—

—

3

ROB

—

2

—

2

3

RUB

—

—

—

—

5

SFI, SGI

—

2

—

2

6

SKB

—

—

—

—

3

SPB, SPI

—

2

2

2

6

SQB

—

—

—

—

5

SSB, SSI

2

2

2

2

6

SWB, SWI

—

2

2

2

6

THB

—

—

—

—

5

TKB

—

2

—

2

3

TRB

—

2

—

—

3

UKB, UKI

—

2

2

2

6

USB, USI

2

2

2

2

6

YGI

—

2

—

2

3

Chapter 7. Customizing Twinaxial Displays

67

The MODE / SHIFT combinations that are required for the different numbers of
TKSTATE tags specified in a workstation customizing source are defined as follows:v When 2 TKSTATE tags are specified, the required MODE / SHIFT combinations
are:
NONE / UNSHIFTNONE / UPPERv When 3 TKSTATE tags are specified, the required MODE / SHIFT combinations
are:
NONE / UNSHIFTNONE / UPPERNONE / ALTv When 4 TKSTATE tags are specified, the required MODE / SHIFT combinationsare:
LATIN / UNSHIFTLATIN / UPPERLANGUAGE / UNSHIFTLANGUAGE / UPPERv When 5 TKSTATE tags are specified, the required MODE / SHIFT combinationsare:
LATIN / UNSHIFTLATIN / UPPERLANGUAGE / UNSHIFTLANGUAGE / UPPERNONE / ALTv When 6 TKSTATE tags are specified, the required MODE / SHIFT combinations
are:
NONE / UNSHIFTNONE / UPPERNONE / ALT
SPCCHR / UNSHIFTSPCCHR / UPPERSPCCHR / ALT

Customizing a 3477 Twinaxial Display for Diacritic Character Support
In this example, you are customizing a 3477 Model H twinaxial display with a
122-key typewriter keyboard and you want to use and display some diacritic
characters.
It is assumed that the 3477 Model H workstation is physically attached to the
AS/400 system, configured to work with the system (appropriate controller anddevice descriptions created), and is varied on.

Step 1: Planning the Customizing
After looking over the reference book for the display to familiarize yourself with thedisplay device, see the reference information for customizing twinaxial displays in
Chapter 7. Customizing Twinaxial Displays of this book.

68

OS/400 Workstation Customization Programming V4R3

In this example, the diacritic characters for which you want to add support are thefollowing:|

circumflex

˜

tilde

ç

cedilla (the accent beneath the c)..

diaeresis

u

acute

From experimenting with the display functions, you find that five keys on the
numeric key pad do not correspond to or provide any function. Using the scan code
illustrations in “Keyboard Scan Codes” on page 42, you find the scan codes forthese unassigned keys. These are shown in the following figure:┌───────┬────────┬───────┬───────┐
│
│
│
│
│
│ 1D │ 1E │ 4F │ 50 │
│
│
│
│
│
├───────┼────────┼───────┼───────┤
│
│
│
│
│
│
│
│
│
│
│
│
│
│
│
├───────┼────────┼───────┼───────┤
│
│
│
│
│
│
│
│
│ 55
│
│
│
│
│
│
├───────┼────────┼───────┼───────┤
│
│
│
│
│
│
│
│
│
│
│
│
│
│
│
├───────┴────────┼───────┤
│
│
│
│
│
│
│
│
│
│
│
│
│
│
│
│
│
│
│
│
│
└────────────────┴───────┴───────┘
Numeric Key Pad

Figure 12. Scan Codes for Unassigned Keys on 3477 Model H 122-Key Typewriter Keyboard

Step 2: Retrieving the Workstation Customizing Source
To create a workstation customizing source, you use the Retrieve Work Station
Customizing Object Source (RTVWSCST) command and specify the following:
Device type

DEVTYPE(3477)

Keyboard language type¹

KBDTYPE(USI)

Source member

SRCMBR(CST3477)

Keyboard attached

KBD(*TYPE122)

Source file

SRCFILE(CSTSRC)

Library

LIB(CSTLIB)Text

TEXT(’Workstation customizing source for 3477 diacritics’)

Chapter 7. Customizing Twinaxial Displays69

¹This value must match the keyboard language type you specified in the device description
for the display; otherwise the display will not vary on.

Step 3: Changing the Source
After you retrieve the source, use the source entry utility (SEU) to change thehexadecimal values that correspond to the codes for the keys on the numeric key
pad. The command is:
STRSEU SRCFILE(CSTLIB/CSTSRC) SRCMBR(CST3477)

To be certain that the keys you want to customize are unassigned, look at the firststate table in your source denoted by:TKSTATE MODE = NONESHIFT = UNSHIFT.

The values for unassigned keys are set to '2200'X. The first byte of the new entries
was selected from Table 10 on page 56. The second byte was selected from
Table 11 on page 57. Write these values on your planning work sheet as shown in
the following table:
Note:
Table 24. Twinaxial Keyboard Translation Table Entries–Example Work Sheet
Twinaxial Keyboard Translation Table Entries (Mode= NONE Shift State= UNSHIFT)
Key or Function

Hexadecimal Data

Scan Code

Old

New

Old

New

1D

Num Lock

|

2200

2501

1E

/

˜

2200

2503

4F

*

cedilla

2200

2504

50

—

..

2200

2505

55

+

u

2200

2506

Change the '2200'X entries for the appropriate keys in your source to the entry
values shown in the previous table and save the changed source.

Step 4: Creating the Workstation Customizing Object
After you change and save the source, create the workstation customizing object
using the Create Work Station Customizing Object (CRTWSCST) command.
Specify the following parameter values:
WSCST name

WSCST(CST3477)

Library

LIB(CSTLIB)

Source member

SRCMBR(CST3477)

Text

TEXT(’Workstation Customizing Object for 3477
diacritics’)

Source file

SRCFILE(CSTSRC)

Library

LIB(CSTLIB)

If any errors occur, messages are sent to the job log to help you correct them.

70

OS/400 Workstation Customization Programming V4R3

Step 5: Varying On the Device
Using the Change Device Description Display (CHGDEVDSP) command, change
the device description for the 3477 Model H display and specify the customizing
object CST3477 for the workstation customizing object (WSCST) parameter.
To activate the workstation customizing function, use the Work with Configuration
Status (WRKCFGSTS) to vary off and then vary on the display.

Chapter 7. Customizing Twinaxial Displays

71

72

OS/400 Workstation Customization Programming V4R3

Chapter 8. Customizing ASCII Displays
This chapter provides more detailed technical information to help you customize
ASCII displays. This chapter describes the function and operation of the mappingtables used by the AS/400 system’s local ASCII workstation controller to support an
ASCII display. Some of the background information about the local ASCII
workstation controller is provided to help you understand the way the different
mapping tables are used with one another and how the ASCII workstation controller
processes keyboard and display data. This information may help you customize
your ASCII display.
The tag language source structure for customizing the mapping tables for ASCII
displays is also described in this chapter, followed by the syntax and descriptions
for the individual tags related to customizing ASCII displays.
Using the OS/400 workstation customizing for ASCII displays you can:v Customize the functional characteristics of a supported ASCII display
v Customize the functional characteristics and specify all the necessary parameters
required to provide support for an unsupported ASCII device type

Beginning to Customize ASCII Displays
When you customize a supported ASCII display, you are adding or changing thefunctional or character support the ASCII workstation controller provides for the
display. If you want to change the way the ASCII keyboard sends information to the
ASCII workstation controller, you need to change the mapping tables used toperform inbound processing. If you want to change the way that characters appear
on the display, you need to change the mapping tables used to perform outboundprocessing. In most cases you want to change both. (See “Inbound and Outbound
Processing” on page 84 for a more detailed definition.)
To begin customizing your ASCII display, start by changing the characteristics foroutbound processing first. This allows you to see the information being sent to thedisplay correctly. It is then easier to determine the changes you want to make for
keyboard processing. After you have made the necessary additions and changes tothe display mapping tables, you should create the customizing object and test thecharacteristics for outbound processing that you changed. When you have thesecharacteristics working correctly, you can then change the workstation customizing
source a second time to change the characters and functions called by the
keyboard.
If you are customizing a supported ASCII display, you can skip the next section andgo on to the technical overview that describes the way the ASCII workstation
controller performs both inbound and outbound processing. Following the overview
is more detailed technical information about the ASCII display mapping tables andthe tags you can use to customize your display.

© Copyright IBM Corp. 1998

73

Customizing Unsupported ASCII Displays
When you want to customize an ASCII display that is not currently supported by the
ASCII workstation controller, you need to retrieve a source file member based on a
supported device type and keyboard language type. To do this, you need to find out
which device type is most like your unsupported display. This may involve reading
the reference book to find out if the display emulates any supported display types,
talking to the manufacturer of the device, or talking to your technical support
specialist. The following are some other questions you need to answer before you
begin the workstation customizing process:v What display functions or characteristics and national characters do I want thisdisplay to support?
Write these down so that you can answer the next question.
v Does the display itself support the functions you need?
Check the reference book to determine this. If neither the display nor the ASCII
workstation controller can support the functions you need, you cannot customize
the display to support those functions.
v Does the display emulate or support the emulation of an IBM-supported display?
If so, set it up to use the emulation because it could make your customizing
easier.
v Which supported ASCII display has similar characteristics to my unsupported
ASCII display?
To find out more about the characteristics of the ASCII displays supported by IBM
and the AS/400 system, you can do one or more of the following:– Check the reference books for the supported displays. These may beavailable through your technical support specialist or marketing representative.
You may already be using one or more of the supported displays and have abook on hand, or you could contact the manufacturer of a supported display
and ask for a list of the display characteristics or the book for the supported
display.
– The ASCII Work Station Referencecontains a list of the general display
characteristics (such as the line speed, parity, and size of the screen) for
supported ASCII displays.
When you know or have an idea which supported display your ASCII display ismost like, you can use the device type for the supported display to retrieve aworkstation customizing source file member to be the basis of your workstation
customizing object. Use the Retrieve Work Station Customizing Object Source(RTVWSCST) command to retrieve mapping tables for a supported workstation thatis most like your unsupported workstation.
After you have answered the previous questions, you also need to do the following:v Set up all the necessary hardware to connect the display to the ASCII
workstation controllerv Set up any programmable features provided by the display
This is the time to set up any emulation (if supported), a well as any language
sets and other parameters that affect the display.
v Create the necessary controller and device descriptions if needed
The controller description is for the ASCII workstation controller and may alreadyexist. The device description is for the ASCII display.

74

OS/400 Workstation Customization Programming V4R3

After you have set up and turned on the display, vary it on and see if the Sign On
display is shown. If so, you can test the characteristics of the display immediately.
Otherwise, you may need to create a workstation customizing source and change
the hexadecimal values for the CLRSCN (Clear Screen), and CSRADR (Set Cursor
Address) attributes in the source to those for the unsupported display. For more
information about changing these tags initially, see “Display Commands for
Unsupported Device Types” on page 90.
The workstation customizing procedure for ASCII displays that are not currently
supported can involve some trial-and-error. For an unsupported display, you usually
have a lot of additions or changes to make. To avoid compiling errors, you can dothis by making one or two changes to the source at a time and then creating theworkstation customizing object. Test the object (vary off the display, specify thecustomizing object in the device description, and then vary the display back on) to
see if the results are what you expected. If so, then make the next changes;
otherwise, go back to the source and the reference book for the display todetermine the cause of the problem before going further with the workstation
customizing procedure.
The remaining sections in this chapter provide more detailed technical information
about the display mapping tables, the tags you use to customize an ASCII display,and some examples.

Working with ASCII Displays and the Local ASCII Workstation
Controller
The AS/400 local ASCII workstation controller works similarly to the local twinaxial
workstation controller in terms of the display and printer interface it provides to the
AS/400 operating system. Whether the attached device is an ASCII or a twinaxial
device does not matter to applications sending data to a display or printer from the
AS/400 system.
The function of the local ASCII workstation controller is based on that of thetwinaxial workstation controller. Much of the functional code within the twocontrollers is common code. This common code provides most of the major
functions provided by the controllers, for example, data flow control, data stream
processing, and keystroke processing.
An ASCII-specific layer of code provides the function that is unique to supporting
ASCII displays with the ASCII workstation controller. Among the functions includedin this layer of code are a twinaxial device emulation function (ASCII displays aresupported as emulated twinaxial displays), ASCII device configuration support, andthe necessary interface between the ASCII displays and the ASCII-unique hardwareof the ASCII controller.
The ASCII-specific layer of code has two main interfaces. One is an interface to thecommon code, which sends and receives commands, status, and data as though a
twinaxial display is attached. The other is the interface to the actual ASCII displays.
The character data sent to and received from the devices must be ASCII character
data and the command format must conform to the command format for the specific
type of ASCII display that is attached.

Chapter 8. Customizing ASCII Displays75

Figure 13 illustrates the interfaces between the code (the ASCII-specific code andthe common workstation controller code) and the devices themselves:

ASCII Workstation Controller

Common Workstation
Controller Functions
AS/400 orApplication
Datastreams
AS/400
Keyboard
Functions

CommonDatastream
Processing

CommonKeystroke Processing

ASCII-SpecificFunctions

ASCII Conversion
ASCII to EBCDICASCII to Keyboard
Function(tables 1 and 2)

Twinaxial Display
Commands
Twinaxial Display
Commands

Update Screen Image
Buffer Processing

ASCII Datastream
Generation Processing(tables 3 and 4)

ASCII Keyboard Data
- ASCII Character Data
- ASCII Control Sequences

ASCII Data Streams- ASCII Character Data
- ASCII Command Sequences
ASCII
Display

Tables:
1. ASCII to EBCDIC Character Mapping Table
2. ASCII to Keyboard Function Mapping Table
3. Update Screen Table
4. EBCDIC to ASCII Mapping Table

Figure 13. Twinaxial Device Emulation Processes

76

OS/400 Workstation Customization Programming V4R3

RV2H455-2

The ASCII-specific code in the ASCII workstation controller processes keyboard
data by converting it to EBCDIC character codes or twinaxial keyboard functions.
The common code then performs the keystroke processing necessary to echo acharacter back to the display, move the cursor, or signal an application that a
particular function key has been pressed. The ASCII-specific code then generates
ASCII commands and data from the twinaxial display commands passed to it fromthe common code.
To support an ASCII display, the ASCII-specific code must map data and commands
back and forth between the format required by the common code and the format
required by the devices themselves. This is done using a number of different
mapping tables. The following list shows the mapping tables required to support an
ASCII display.
ASCII display tables:v ASCII-to-EBCDIC character mapping tablev ASCII to keyboard function mapping tablev Update screen tablev EBCDIC-to-ASCII character mapping table
In most cases, the ASCII to keyboard function table and the update screen tableused for an ASCII display depends exclusively on the device type. Which
ASCII-to-EBCDIC character tables and EBCDIC-to-ASCII character tables are used
for an ASCII display depends on both the device type and the national language
selected for the device description.

Twinaxial Device Emulation
Before looking at the display and mapping tables used by the ASCII workstation
controller, it is helpful to have some background information on ASCII character
sets, code pages, control codes, and command sequences.
The ASCII workstation controller uses the mapping tables combined with twinaxial
device emulation to map data between an ASCII workstation and the AS/400
system. The twinaxial device emulation assures that the following objectives aremet:v Appearance of application displays sent to an ASCII display are the same (ornearly the same) as if those application displays were sent to a twinaxial display.
This means that the same characters should be displayed in the same locations
on the screen, and the highlighting of data should be consistent with what it
would be on a twinaxial display.
v Data passed back to the application from an attached ASCII display is in thesame format as data passed back from an attached twinaxial display.
v ASCII keyboard functions are the same as the keyboard functions available for a
twinaxial display.
Part of the twinaxial device emulation involves the maintenance of an internal
screen image buffer within the ASCII workstation controller itself. This internal
screen image buffer is equivalent to the screen buffer for a twinaxial display. The
type of data residing in the internal screen image buffer for the ASCII workstation
controller is exactly the same as the type of data that would be in the buffer for a
twinaxial display. For example, null character data, control character data, attributecontrol characters, and EBCDIC character data are stored in this buffer.

Chapter 8. Customizing ASCII Displays

77

As Figure 13 on page 76 shows, the interface between the common workstation
controller code and the ASCII-specific code involves twinaxial commands from thecommon code to the ASCII-specific code. For displays, these twinaxial commands
contain information on the data that should be displayed and where on the screen it
should be displayed. The ASCII-specific code processes these commands, updating
its internal screen image buffer so that it contains the same data that would be in a
twinaxial display’s internal screen buffer.
Maintaining the internal screen image buffer and mapping the data from this buffer
into ASCII data streams allows the appearance of the ASCII display to be as close
as possible to the appearance of a twinaxial display. This also allows the ASCII
workstation controller to be sure that data being passed back to the application isequivalent to data that would be passed back from a twinaxial display.
To provide you with the same type of keyboard functions that are available on a
twinaxial display, the ASCII-specific code in the ASCII workstation controller maps
the ASCII control characters and control sequences generated from the keyboard of
your ASCII display into a format which the common workstation controller code
recognizes as twinaxial keyboard function requests. The common workstation
controller code then completes the keystroke processing.

ASCII Character Sets and Code Pages
An ASCII character set represents another method of encoding character data (thesame way that an EBCDIC character set represents a way of encoding characterdata). “ASCII Character Code to Hexadecimal Value Chart” on page 367 shows how
graphical character data is encoded for the United States (US) ASCII character set.
The encoding scheme shown is also often referred to as the US ASCII code page.
Code values in the range '20'X through '7E'X are reserved for graphical characterdata. Code values in the range '00'X through '1F'X, plus '7F'X, are used for control
codes.
Just as there are different varieties of EBCDIC character sets and code pages,
there is also a variety of ASCII character sets and code pages. For most ASCII
devices manufactured in the US, the US ASCII character set is the same from one
ASCII device to the next. The particular ASCII character set used for a given
national language varies from one display manufacturer to the next.
The US ASCII character set is a 7-bit character set, meaning all the data andcontrol codes within this set can be represented by different combinations of 7 bits.
Some ASCII devices support 8-bit ASCII character sets. For 8-bit ASCII character
sets, the assignment of character code values and control code values is split into
two ranges, a lower range of values from '00'X through '7F'X, and an upper rangeof values from '80'X through 'FF'X. The assignment of character values in this upper
range is similar to the assignment used in the lower range as shown in the following
list.

78

Lower range'00'X-'7F'X

Lower range control characters'00'X-'1F'X

Graphic character data

'20'X-'7E'X

Control code

'7F'X

Upper range'80'X-'FF'X

OS/400 Workstation Customization Programming V4R3

Upper range control characters'80'X-'9F'X

Graphic character data

'A0'X-'FE'X

Character data (usually)'FF'X

ASCII devices that support an 8-bit character set can be set up to operate in 7-bit
mode. In this case, the display still needs a way to access data in the upper rangeof the character set using a 7-bit character code. To access the upper range of thecharacter set, the control characters, shift-in (SI) and shift-out (SO) are used.
When a shift-out control character (usually '0E'X) is sent to the display, the display
is signaled that it should now treat the subsequent data it receives in the range'20'X through '7F'X as though it is character data in the upper range ('A0'X through'FF'X) of the character set.
When a shift-in control character (usually '0F'X) is sent to the display, the display issignaled that it should return to treating data in the range '20'X through '7F'X as thecharacter data defined for those values.
The two ranges that make up the 8-bit character set are often referred to as
character spaces. IBM ASCII displays refer to those spaces as the G0 and G1
character spaces. These displays support commands that allow the set ofaccessible characters in one of these character spaces to be swapped with adifferent set of graphic characters. Therefore, a single display may actually support
three or more sets of characters simultaneously with specific character sets being
loaded into the two character spaces as needed to display specific characters.
For example, many ASCII displays that are not manufactured in the United States
are designed so that, by default, the US ASCII character set is assigned to thecharacter space '20'X through '7F'X. Another character set containing many of thespecial language characters is assigned to the space from 'A0'X through 'FF'X.
These displays usually support a command that allows the special language
character set to be replaced with another graphic character set.
A command to switch back to the national language character set is also provided
allowing the ASCII workstation controller to force the display back and forth
between character sets as needed. The ASCII workstation controller makes use of
these character space exchanging functions in its support for text symbol
characters.

ASCII Control Codes
ASCII control codes are sent to an ASCII display to indicate a specific commandthat the device is to perform. For example, the control code of '07'X has themnemonic name BEL, and is usually a command to sound the audible alarm at thedisplay. The control code of '08'X has the mnemonic name BS (backspace), and isusually a command to the display indicating that it should perform a backspacefrom the current cursor position.

ASCII Command Sequences
Besides recognizing commands in the form of control codes, ASCII devices also
recognize commands sent in the form of ASCII command sequences. Commandsequences consist of a string of ASCII characters, where the first character is a

Chapter 8. Customizing ASCII Displays

79

control code. For most ASCII devices, command sequences begin with the Escape(Esc) control code, which has the hexadecimal value '1B'X.
The data stream sent to an ASCII display or printer consists of ASCII graphic
character codes, control codes, and ASCII command sequences. Although many
ASCII displays and printers perform similar types of functions and support similartypes of commands, the set of commands that is supported varies considerablyfrom one device to another. Also, commands that perform similar functions on
different types of displays are often called with completely different commandsequences or control codes. This means that each ASCII device has its own unique
set of commands. Therefore, the ASCII data stream sent to a particular type ofdevice to perform a given function must be specific to that type of device.

ASCII Display Keyboard Operations
Most of the keys on an ASCII display keyboard are assigned ASCII charactercodes, control codes, or ASCII command sequences. When a key is pressed on the
keyboard, the assigned character code, control code, or command sequence is sent
to the ASCII workstation controller.
More than one character code, control code, or command sequence can be
assigned to a given key on an ASCII keyboard. In such cases, the particular codeor sequence sent to the ASCII workstation controller depends on whether the key
has been pressed in combination with a Shift or Control (Ctrl) key.
In general, ASCII displays do not send anything to the workstation controller when
only the Shift or Ctrl key is pressed. When these keys are pressed in combination
with other keys, is data sent to the ASCII workstation controller.
There are usually other keys on an ASCII keyboard that do not send anything to the
ASCII workstation controller. Most ASCII displays have several keys reserved for
local display functions. Pressing these keys causes the display to perform someinternal function that does not involve the workstation controller.
As with command sequences that are sent to an ASCII display to perform certain
functions, the control codes or command sequences that are assigned to the keys
on an ASCII display depend on the ASCII device type. Each different device
generally has its own unique way of assigning control codes or commandsequences to the keys.
As an example, Figure 14 on page 81 shows the keyboard layout for an IBM 3151
ASCII display. The functions and characters shown are labeled on the key tops anddo not indicate any kind of specific functions supported by the ASCII workstation
controller. Figure 15 on page 82 shows the ASCII character codes and ASCII code
sequences sent to the ASCII workstation controller when the keys on the keyboard
are pressed. Table 25 on page 83 shows the ASCII control sequences for providing
the function key support for an IBM 3151 ASCII display.

80

OS/400 Workstation Customization Programming V4R3

Figure 14. IBM 3151 ASCII Display Keyboard Layout

Chapter 8. Customizing ASCII Displays

81Cursor Control Keys┌─────┬─────┬─────┐││││
1B5703│1B5503│││1B5603│└─────┴─────┴─────┘┌─────┬─────┬─────┐││││
1B502008│1B48 │1B4C03│1B4E │ 7F │1B4B │├─────┼─────┼─────┤│││││1B51 │1B32 │1B49 ││1B4F │
│1B4A │
└─────┴─────┴─────┘┌─────┐│││1B41 │││
┌─────┼─────┼─────┐│││││1B43 │1B42 │1B44 │││││└─────┴─────┴─────┘

Numeric Pad┌─────┬─────┬─────┬──────┐
│
│
│
│
│
1B2241│
1B213803│││
1B203803│├─────┼─────┼─────┼──────┤
│
│
│
│
│
│37
│38
│39
│ 2D ││││││├─────┼─────┼─────┼──────┤
│
│
│
│
│
│34
│35
│36
│ 2C ││││││├─────┼─────┼─────┼──────┤
│
│
│
│
│
│31
│32
│33
│
│
1B216D03 1B216E03 1B216F03│├─────┴─────┼─────┤1B3803│
│
│
│
│
│
30
│ 2E ││││││└───────────┴─────┴──────┘Function Keys┌─────┬─────┬─────┬─────┐┌─────┬─────┬─────┬─────┐
│
│
│
│
│ │
│
│
│
│
│
│
│
│
│ │
│
│
│
│
│
│
│
│
│ │
│
│
│
│
└─────┴─────┴─────┴─────┘└─────┴─────┴─────┴─────┘Core Area┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬───────────┐│7E │21 │40 │23 │24 │25 │5E │26
│2A
│28
│20
│5F
│2B
│
│
│60 │31 │32 │33 │34 │35 │36 │37
│38
│39
│30
│2D
│3D
│
08
│
│
│
│00 │1B │1C │1D │1E │1F │7F │
│
│
│
│
│
├─────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬────────┤││51│57 │45 │52 │54 │59
│55
│49
│4F
│50
│7B
│7D
│7C
│
│ 09 │71 │77 │75 │72 │74 │79 │75
│69
│6F
│70
│5B
│5D
│5C
│
│
│11
│17 │05 │12 │14 │19
│15
│09
│0F
│10
│
│
│
│
├────────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴────────┤││41 │53 │44 │46 │47 │58
│4A
│4B
│4C
│3A
│22
│
│
│
│61 │73 │64 │66 │67 │78
│6A
│6B
│6C
│3B
│27
│
0D
│
│
│01 │13 │04 │06 │07 │08
│0A
│0B
│0C
│
│
│
0A
│
├───────────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴───────────┤││5A │58 │43 │56 │42
│4E
│4D
│3C
│3E
│3F
│
│
│
│7A │78 │63 │76 │62
│6E
│6D
│2C
│2E
│2F
│
│
│
│1A │18 │03 │16 │02 │0E │0D │││││├────────┬─────┼─────┴──┬──┴─────┴─────┴─────┴─────┴─────┴─────┴─────┼─────┴──┬──┬────────┤
│
│
│
│
│
│ │
│
│
│
│1B217A03│
20││ │ 1B3803 │
│
│
│
│
│
│ │
│
└────────┘└────────┴────────────────────────────────────────────┴────────┘ └────────┘
Notes:
1st line Shift state, 2nd line Unshifted, 3rd Line Ctrl┌─────┐│││ 1B │││└─────┘┌─────┬─────┬─────┬─────┐
│
│
│
│
│
│
│
│
│
│
│
│
│
│
│
└─────┴─────┴─────┴─────┘Figure 15. Hexadecimal Code Values for the IBM 3151 ASCII Keyboard

82

OS/400 Workstation Customization Programming V4R3

Table 25. Example: 3151 ASCII Code Sequences
F1–F12(Unshifted)

Hexadecimal
Data

F13–F24(Shifted)

Hexadecimal
Data

F25–F36(Ctrl+Shift)

Hexadecimal
Data

F1

1B6103

F13

1B216103F25

1B226103

F2

1B6203

F14

1B216203

F26

1B226203F3

1B6303

F15

1B216303

F27

1B226303

F4

1B6403

F16

1B216403

F28

1B226403

F5

1B6503

F17

1B216503

F29

1B226503

F6

1B6603

F18

1B216603

F30

1B226603

F7

1B6703

F19

1B216703

F31

1B226703

F8

1B6803

F20

1B216803

F32

1B226803

F9

1B6903

F21

1B216903

F33

1B226903

F10

1B6A03

F22

1B216A03

F34

1B226A03

F11

1B6B03

F23

1B216B03

F35

1B226B03

F12

1B6C03

F24

1B216C03

F36

1B226C03

Notes:
1. The keyboards on other ASCII displays may have some of the same functions
as those shown for the 3151. In general, however, the keyboards on ASCII
displays vary from one manufacturer to another, and the assignment of control
codes or character sequences varies a great deal from one display device tothe next.
2. If the data sent to the workstation controller for noncharacter keyboard functions
contains more than one byte, then the first byte is almost always the Esc control
character ('1B'X). This is also the case for most ASCII displays other than the3151.
3. Different data can be returned when a key is pressed depending on whether the
Shift or Control (Ctrl) key is being held down at the same time the key ispressed.
4. Some of the labeled functions shown in Figure 14 on page 81 do not send databack to the workstation controller. In most cases, a local display function is
performed. Examples of this are the Hold and Trace keyboard functions on the3151 display, which are local display functions.
5. The data passed back to the workstation controller for keys containing graphic
character data is always in the range '20'X through '7E'X. The data sent backfor all other functions, such as noncharacter keyboard functions, always begins
with data in the range '00'X through '1F'X or '7F'X.
6. For many of the character and control codes generated by the keyboard andsent to the ASCII workstation controller, it is not possible to identify exactly
which key was pressed. For example, the control code of '09'X is sent to theworkstation controller as a result of either pressing the Tab key or pressing the
key sequence Ctrl I. Similarly, the code for the number 1 ('31'X) can originate
from either a key on the top row of the keyboard or from one of the keys on the
numeric key pad.
The data sent to the ASCII workstation controller from the keyboard does notallow the workstation controller to determine which key has been pressed. Only
the particular function or character that you are trying to call is known.

Chapter 8. Customizing ASCII Displays

83

Processing Data for an ASCII Display
The following list shows the names of the mapping tables the workstation controller
uses to map data between two formats: the format required by the ASCII display
and the format used to process data for AS/400 applications.
vvvv

ASCII-to-EBCDIC character mapping table
ASCII to keyboard function mapping table
Update screen table
EBCDIC-to-ASCII character mapping table

Inbound and Outbound Processing
One of the things you need to think about when you customize an ASCII display isinbound and outbound processing. The ASCII-to-EBCDIC character and the ASCII
to keyboard function mapping tables are the tables used to process data from the
ASCII display keyboard. This type of processing is called inbound processing. The
update screen table and the EBCDIC-to-ASCII character mapping table are thetables used to process data coming to the ASCII display from the AS/400 systemand the ASCII workstation controller. This type of processing is called outboundprocessing. Figure 16 and Figure 17 on page 85 show the flow for both types ofprocessing.

ASCII
Keyboard

Keyboard Mapping Table┌────────────┐│ DKBDTBL│
Commands││┌────────Ê│├───────┐│││││└────────────┘
│
│
│
│
ø
────────Ê├──────Ê ASCII│õWorkstation│┌────────────┐│Controller││ DASCTBL
│
│
│
│
│
│
└────────Ê│├───────┘ASCII││
Characters││└────────────┘ASCII-to-EBCDIC Mapping Table

Figure 16. Inbound Processing for an ASCII Display

84

OS/400 Workstation Customization Programming V4R3

Update Screen Table┌──────────┐Control Codes│ DSCNTBL │┌──────Ê│├─────────┐
│
│
│
│
│
└──────────┘
│
│
│
│
ø
ASCII ──────┤────────ÊASCII Display
Workstation│
õController│││┌──────────┐│││ DEBCTBL ││└──────Ê│├─────────┘
EBCDIC││
Characters└──────────┘
EBCDIC-to-ASCII Table

Figure 17. Outbound Processing for an ASCII Display

It is recommended that you start customizing the mapping tables for outboundprocessing first, and then customize the tables for inbound processing. This is sothat what you see on the display is correct before you try to customize the keyboard
for special characters and functions.
The following sections describe the general characteristics of the mapping tables tohelp you better understand how to change the workstation customizing source forthese tables.

Mapping Tables for ASCII Display Keyboards
The ASCII-to-EBCDIC mapping table and the ASCII to keyboard function table areused to convert data received from the ASCII display keyboard into the internal
codes used for processing keystrokes. Figure 18 on page 86 shows the two tables
and how they each fit into the process of generating the internal codes for
keystroke processing (inbound processing).
The flow of operations shown in the figure is from the ASCII display to the common
code for the workstation controller. The ASCII display sends data to the workstation
controller when you press keys on the ASCII keyboard. An example of the type ofdata passed to the workstation controller for particular keys is shown in Figure 15
on page 82.
The ASCII-specific code in the workstation controller provides two paths for theprocessing of inbound data. One path handles the mapping of ASCII code values
associated with graphic characters, while the other path handles mapping ASCII
control characters and control character sequences.

Chapter 8. Customizing ASCII Displays85õ Common Code│ Keystroke Processing│┌──────────┴───────────┐││┌──────┴────┐┌────┴──────┐│ Common││ Common││ Code││ Code││ EBCDIC││ Keyboard ││ Character ││ Function ││ Processing││ Processing│││││└───────────┘└───────────┘
EBCDICõõ Internal Twinaxial
Character││ Keyboard Function
Code││ Code││┌──────┴────┐┌────┴──────┐│ ASCII││ ASCII
│
│ to
│
│ to
│
│ EBCDIC││ Keyboard ││ Mapping││ Function ││ Table││ Mapping││││ Table│└───────────┘└───────────┘
ASCII
õ
õ
ASCII Control
Graphic││
Characters orCharacter││
Control Character
Data││
Sequences(X'20' to X'7E', ││(X'00' to X'1F',X'7F'
X'80' to X'FF') ││or sequences beginning││with these characters)└───────────õ──────────┘│ASCII Data
Generated from
Keyboardõ│┌────┴──────┐
│
ASCII
│
│ Display │└───────────┘Figure 18. ASCII Display Keyboard Mapping Tables

Mapping ASCII Graphic Character Data
The ASCII workstation controller uses the ASCII-to-EBCDIC mapping table tohandle the mapping of ASCII code values for graphic characters.
Using the ASCII-to-EBCDIC mapping table, the workstation controller converts an
ASCII character code value in the range '20'X through 'FF'X into a single EBCDIC
character code value. The particular ASCII-to-EBCDIC mapping table used depends
on the ASCII character set used by the display and the EBCDIC code page
associated with the national language configured for the display. Using theworkstation customizing functions, you can customize the ASCII-to-EBCDIC
mapping table that the ASCII workstation controller uses to support an ASCII
display configured for a particular national language.

86

OS/400 Workstation Customization Programming V4R3

Mapping ASCII Control Characters and Control Sequences
The ASCII workstation controller uses the ASCII to keyboard function table to map
ASCII control characters and control character sequences from the ASCII display
keyboard to the internal processing codes used by the workstation controller
common code.
When the data received from an ASCII display is a control character or a character
sequence beginning with a control character, the ASCII workstation controller
compares that data with information in the ASCII to keyboard function mappingtable to determine whether or not it matches a mapping sequence in the table. The
workstation customizing functions allow you to customize this table. Control
characters and control sequences are mapped to one of the following:v A twinaxial display function key requestv A local function supported by a display, such as a screen refresh, toggleindicator, or a terminal disconnectv A request to set the state for processing subsequent data from the device

Mapping Twinaxial Display Function Key Requests: The twinaxial display
function key request is the primary mapping function provided by this table. Whenthe incoming data matches the information specified in the table for a function key
request, a code representing the requested twinaxial keyboard function is generated
and sent to the common keystroke processing code in the ASCII workstation
controller.
When customizing an ASCII to keyboard function table for twinaxial display function
key requests, you can be sure that the workstation customizing functions generate
the correct internal code for the function key specified. You only need to beconcerned with specifying the ASCII command or control sequence for a givenfunction key tag.
Table 30 on page 121 shows the workstation customizing tags you can use tocustomize the twinaxial keyboard functions with the ASCII to keyboard function
mapping table.

Mapping Local ASCII Display Functions: The ASCII workstation controller
supports three local display functions unique to using a display in an ASCII or
asynchronous environment. The ASCII display calls these local display functions
using a predefined key sequence that you enter from the keyboard. These functions
are local to the ASCII workstation controller and the ASCII display. The following
paragraphs describe the local display functions:
Screen Refresh Functions
When this function is called, the ASCII workstation controller retransmits all thedata required to display the current image on the screen. This information is
maintained by the internal screen image buffer of the ASCII workstation
controller. To specify this function or change the way it is called, use the
SCNREFRESH (screen refresh) tag following the DKBDTBL (keyboard function
table) tag.
Terminal Disconnect Function
When this function is called, the ASCII workstation controller internally simulatesa device power-off and power-on sequence for a display. When a display is
attached by way of remote modems to the ASCII workstation controller, thisends or drops the remote connection. To specify or change the way this

Chapter 8. Customizing ASCII Displays

87

function is called, use the DISC (terminal disconnect) tag following theDKBDTBL (keyboard function table) tag.
Toggle Display Indicators
Twinaxial conditioning indicators are emulated on ASCII displays by showing an
asterisk character in the last column of the display. The last column of rows
8–18 are reserved to indicate which display status conditions are currently
active; for example, you may be in insert mode, input may be inhibited, or yourkeyboard may be in a certain shift state. When you turn on the display of
indicators, data that might normally appear in these locations on the screen isoverlaid by either an asterisk, indicating a status condition is active, or a blank,
indicating a status condition is not active. When the indicators are turned off,the data that would normally appear in those locations is displayed. To specify
or change the way this function is called, use the TOGIND (toggle display
indicator) tag following the DKBDTBL (keyboard function table) tag.
Note: Character data that is overlaid by the conditioning indicators is stillpresent in the internal screen buffer of the ASCII workstation controller.
The data is not lost to an application.

Setting the State for Inbound Data Processing: Some other general types offunctions specified in the ASCII to keyboard function mapping table are functions to
set the state for processing inbound data. The following list describes the threefunctions for setting the state that you can specify using the workstation customizing
functions.
v Shift-Out State: This function sets the ASCII workstation controller into a
shift-out state for this display. When this state is set, ASCII character data
received from the display in the range from '20'X through '7E'X is mapped to
EBCDIC character data as though the ASCII character received is in the upper
range of the ASCII character set ('A0'X through 'FE'X.) This function may be set
by the SHIFTOUT (shift-out) tag following the DKBDTBL (keyboard function
table) tag.
Note: This state is normally used with ASCII displays that have an ASCII code
page covering a range of character values from '20'X through '7E'X and'A0'X through 'FE'X, but are operating in 7 bit mode which only allows amaximum value of '7F'X to be specified. The ASCII display uses the Shift
Out control character to switch to the higher range of the code page.
v Shift-In State: This function sets the ASCII workstation controller into a shift-in
state for this display. When this state is set, ASCII character data received fromthe display in the range from '20'X through '7E'X is processed as character data.
If the display has previously been set to the shift-out state, this resets it. Thisfunction may be set by the SHIFTIN (shift-in) tag following the DKBDTBL(keyboard function table) tag.
v Set Read Status State: This function sets the ASCII workstation controller into aread status state for an ASCII display. When the attached display is an IBM
ASCII display with an auxiliary printer configured for the display, the workstation
controller periodically sends the display a command to check whether a printer is
attached and powered on at the auxiliary port on the display. IBM ASCII displays
return a five-byte response to this command. When the ASCII workstation
controller detects the first two bytes of this response, it goes into read statusstate, verifying that the remaining bytes of the response have been received
correctly. If the response data indicates that the printer is powered on, thepower-on status for the auxiliary printer is sent back to the AS/400 system andthe controller stops sending the read status command to the display.

88

OS/400 Workstation Customization Programming V4R3

The first two bytes of the read status response from the display are specified in
the ASCII to keyboard function table by the READSTS (read status) tag that
follows the DKBDTBL (keyboard function table) tag. For more information about
using these tags, and the restrictions on specifying the READSTS tag, see“Working with the ASCII to Keyboard Function Mapping Table” on page 119.

Mapping Tables for ASCII Display Screens
To format the ASCII display screen, the ASCII workstation controller generates
ASCII data streams by mapping data, such as EBCDIC character codes, twinaxial
display attribute control characters, and other control characters, from its internal
screen image buffer into the appropriate string of ASCII characters and control
characters.
The ASCII workstation controller uses two tables to perform this function, theupdate screen table and an EBCDIC-to-ASCII mapping table.

ASCII Update Screen TableThe update screen table contains ASCII display command information that allows
the workstation controller to perform the following operations for the ASCII display:
v
v
v
v
v

Set the type of highlighting that will be used at given locations on the screen.
Position the cursor.
Set the position on the screen at which data should be written.
Clear the screen.
Sound the audible alarm at the display.

v Initialize display parameters (setup commands).
The update screen table also contains information specifying other commands thatare sent to support certain special workstation controller functions, such as132-column support and support for text symbols. This table also contains theinformation used to specify device support characteristics for the display, such as
the way the positions on the screen are addressed and the way display highlighting
is handled. You can use the workstation customizing functions to customize thistable. See “Working with the Update Screen Table” on page 95 for more information
about what you can specify in this table.

EBCDIC-to-ASCII Code Mapping Table
The EBCDIC-to-ASCII mapping table converts an EBCDIC character code value
from the internal screen image buffer into a single ASCII character code value. This
table handles the processing of character code values from '00'X through 'FF'X,
even though the range of valid EBCDIC characters that can be displayed is '40'X
through 'FE'X. Table entries corresponding to attribute control characters ('20'X
through '3F'X) are not used; however, entries for control characters in the range'00'X through '1F'X are used. These control characters usually are mapped into
blanks. You can use the workstation customizing functions to customize this table.
For more information about this table, see “Working with the EBCDIC-to-ASCII
Code Mapping Table” on page 117.

Chapter 8. Customizing ASCII Displays

89

Display Commands for Unsupported Device Types
If you want to create the appropriate customized mapping tables for an ASCII
display that is not currently supported by the ASCII workstation controller, you needto specify data in the ASCII display mapping tables that is probably quite different
from the data that is retrieved from the source tables on the system. This isespecially true for the ASCII to keyboard function table and the update screen table.
For the update screen table, it is especially important that certain commands bepresent in the table. Without those commands, the ASCII workstation controller
cannot perform the twinaxial device emulation functions.
At a minimum, you must specify commands for the following tags in an update
screen table to obtain a minimal level of ASCII device support:
v CLRSCN (Clear Screen command)v CSRADR (Set Cursor Address command)
If only these two commands are specified, basic 24x80 display support is provided
on an ASCII display. However, there is no highlighting support for the screen. If the
ASCII display does support highlighting on the screen, then the attribute commands
should also be specified (ATRCMD tag). Most ASCII displays also support acommand to sound the display alarm, so the ALARM tag can usually be specified
also.
In most cases, you can obtain an acceptable level of display support by specifying
the data for the CLRSCN, CSRADR, and ATRCMD tags (and possibly the ALARM
tag). For more information about these commands and their associated tags, see
the following sections:“Clear Screen Command” on page 106“Set Cursor Address Command” on page 106“Attribute Command (ATRCMD) Tag” on page 111“Sound Alarm Command” on page 107

Customizing Restrictions for ASCII Displays
When considering the customizing of an ASCII display station, keep in mind thefollowing restrictions of the workstation customizing functions. Read these carefully
before you continue to customize an ASCII display.
v An unsupported ASCII workstation must have characteristics that are similar to atleast one of the supported ASCII workstations for the workstation customizing
functions to work for you. If you do not have the reference books for any of the
supported ASCII displays to use to compare characteristics with yourunsupported display, you can check the general characteristics for supported
ASCII displays in the ASCII Work Station Reference. If you cannot find a
supported ASCII display that has similar characteristics to your display, you
should select the IBM 3101 display as the device type when you retrieve yourworkstation customizing source. The 3101 ASCII display is the simplest of all the
IBM ASCII displays. (See Appendix D. Setting Up to Customize a Display for aprocedure to help you get the unsupported workstation to provide minimalfunction.)v The ASCII workstation controller has a limited amount of space available for the
ASCII to keyboard function table. The ASCII to keyboard function table that is
downloaded to the ASCII controller for a given display has a variable length90

OS/400 Workstation Customization Programming V4R3

depending on the length of the ASCII control sequences that are specified andthe number of keyboard function tags that are specified. When you arecustomizing an ASCII to keyboard function table, the workstation customizing
functions inform you whether the customized table that is created is too large. If
this occurs, you need to either delete some of the keyboard function tags fromthe source, or select ASCII control sequences for mapping that are shorter inlength.
v The ASCII to keyboard function mapping table and the update screen table canvary in size depending on the data you specify in these tables. The amount ofstorage available in the ASCII workstation controller for these tables is limited,and error messages are sent to the job log if the size of the tables you customize
is larger than the size allowed by the workstation controller.
v Many 7-bit displays, like the VT-52, do not support all the different national
language characters, and you may not be able to display some special
characters. Use the reference book for the ASCII display to verify the charactersthe display is capable of supporting before you begin to customize it.
v When customizing the highlighting attributes for an ASCII display screen, thedisplay must support highlighting functions on the screen in a way that agrees
with either character-based or field-based highlighting. These are the methods
that the ASCII workstation controller uses to handle highlighting attributes for an
ASCII display. These types of highlighting are described in “The Highlighting
Support Parameter (CHARATR)” on page 96.
The appearance of data on the screen may not be correct if the display
highlighting does not function in a manner consistent with one of these two
methods. For example, some ASCII displays that support character-based
highlighting do not change the appearance of a position on the screen when thecurrent highlighting characteristic has been changed, but the character being
written is a blank (ASCII '20'X). The ASCII workstation controller’scharacter-based highlighting support assumes that a position on the screen takeson the appearance of the current highlighting characteristic regardless of whichcharacter is being written on the screen.
In some situations, the ASCII workstation controller sends blank characters toclear certain sections of the screen. When using an ASCII display that works inthis way, you would probably see the highlighting attributes from previous
displays lingering when moving from one display to the next. For such ASCII
displays, you may want to remove the ASCII attribute mapping specifications that
result in this type of appearance on the screen from your customizing source.
v The READSTS (read status keyboard function) tag appears in the ASCII to
keyboard function table when you retrieve your workstation customizing source
for an IBM ASCII display (except for the IBM 3101). In general, you should notchange this tag and its data when it appears in your workstation customizing
source.
When you do change the ASCII control sequence for the READSTS tag, thefollowing restrictions apply:– Only 2 bytes should be specified for this tag.
– The format of the read status data returned to the workstation controller by
the ASCII display must be similar to the format which the ASCII workstation
controller expects from an IBM ASCII display:- Read status response must be 5 bytes in length- Bytes 3 and 4 of the response should contain the status response
information.
- The fifth byte of the response must contain the line turnaround character(LTA) with a value of '03'X.
Chapter 8. Customizing ASCII Displays91

v The SHIFTOUT (set shift-out) and SHIFTIN (set shift-in) keyboard function tags
specify the control character (or control character sequence) that the ASCII
workstation controller uses to switch back and forth between mapping inbound
ASCII characters from the lower and upper ranges of ASCII character spaces.
You should be sure to specify both of these tags, if you decide to use them.
When only one of these tags is specified, an ASCII display user can get locked ina state where the ASCII characters from the keyboard are not mapped correctly.
v If you are using port sharing for your ASCII display connections, there are some
restrictions when using a workstation customizing object. Device type detection is
not supported when you specify a customizing object in the device description;
however, line speed, word length and parity checking are supported. The ASCIIWork Station Reference provides recommendations for the setup of your display
and more information about ASCII port sharing for supported combinations of line
speed, word length, and parity.
v When adding or changing tags in a workstation customizing source, you cannot
specify a substring of the hexadecimal data for one tag as the hexadecimal data
for another tag. This can produce unpredictable results. For example, the tag for
the F1 key shown in Figure 19 has a data value of '1B31'X. The tag for the F10
key has a data value of '1B3130'X. This could cause the controller to map theF10 key to the function for the F1 key or map the F1 key to the function for the
F10 key.
><:FKEY:FKEY

KEY = F1DATA = '1B31'X.

/*Substring of F10 key data*/

KEY = F10DATA = '1B3130'X.
.
.
.

Figure 19. Source Code Showing Data Substring Restriction

v Most ASCII workstations also provide functions that are local to the display;
because these functions are local, they cannot be customized. These functions
do not send codes to the ASCII workstation controller.

Determining Which ASCII Display Tables to Customize
The OS/400 workstation customizing functions allow you to customize an ASCII
display by changing the hexadecimal values in the following mapping tables:v ASCII to keyboard function mapping table (DKBDTBL tag)v ASCII-to-EBCDIC mapping table (DASCTBL tag)v Update screen table (DSCNTBL tag)v EBCDIC-to-ASCII mapping table (DEBCTBL tag)
The tables used by an ASCII display are downloaded to the ASCII workstation
controller at the time that the display is varied on. To accommodate the variety ofdevice types, EBCDIC character sets, and ASCII character sets that the ASCII
workstation controller must work with, there are a large number of tables stored on
the system. When you retrieve and edit the source for an ASCII display, all four of
the tables required to support a given ASCII display configured for a particularlanguage are retrieved and ready to be changed.

92

OS/400 Workstation Customization Programming V4R3

If you want to change both the keyboard mappings and the way that characters are
displayed, you may need to change all four of the tables the ASCII workstation
controller uses to map data.
When you want to change only the way a character or characters appear on thedisplay (outbound processing), you need to change the following tables in theworkstation customizing source you retrieve:v Update screen tablev EBCDIC-to-ASCII mapping table
When you want to change only the way the keyboard is interpreted (inboundprocessing), you need to change the following tables in the workstation customizing
source you retrieve:v ASCII to keyboard function mapping tablev ASCII-to-EBCDIC mapping table
Note: The ASCII workstation controller currently has restrictions on the language
types that may be configured for an unsupported ASCII device type. Also,
there are restrictions, regardless of whether the device is a supported or
unsupported ASCII display, on selecting certain language types supported by
the twinaxial workstation controller. Almost all such restrictions are removed
when you specify a customizing object during device configuration. Using theworkstation customizing functions, you can create a set of mapping tables toproperly support an unsupported ASCII display for a national language otherthan US English (USB) or US International (USI).
The workstation customizing functions do not support the customization of
double-byte character set languages. Restrictions for the Katakana language typestill exist and are described where applicable.

Working with the Tag Language for ASCII Displays
When the device class parameter specified for the RTVWSCST command is an
ASCII display (DEVCLASS = ASCIIDSP), your source structure looks like the following:

Chapter 8. Customizing ASCII Displays

93

:WSCST DEVCLASS=ASCIIDSP.
:DASCTBL with parameters. /*ASCII-to-EBCDIC mapping table*/:DKBDTBL.
/*ASCII to Keyboard mapping table*/.
.
keyboard function tags/*tags with parameters*/.
.
.
.
:DEBCTBL with parameters. /*EBCDIC-to-ASCII mapping table*/:DSCNTBL with parameters. /*Update screen table*/.
.
update screen tags/*tag with parameters*/.
.
.
.
:EWSCST.

Figure 20. Source Structure for ASCII Displays

The primary tags in the workstation customizing source for an ASCII display are thefollowing:
DASCTBLASCII-to-EBCDIC mapping table tag

DKBDTBLASCII to keyboard function mapping table tag

DEBCTBLEBCDIC-to-ASCII mapping table tag

DSCNTBL

Update screen table tag

The default values for the parameters associated with a given tag depend on thedevice type you specify when you retrieve the workstation customizing source.
These tags can occur in any order within the source file member; however, thesecondary tags must follow the appropriate primary tag.
When a primary tag is missing from the source, the system default table associatedwith the missing primary tag is used. This is based on the device type and national
language type you specified when you used the RTVWSCST command.
When a DKBDTBL tag is present in the source, but has no keyboard function tags
following it, no keyboard functions are mapped when the workstation controller uses
this customizing object. This may cause unpredictable results.
When a DSCNTBL tag is present in the source, but has no update screen tags
following it, no functions to update the screen are mapped when the workstation
controller uses this customizing object. It is probable that no data will appear on thescreen when this occurs.

94

OS/400 Workstation Customization Programming V4R3

Using the Tags to Customize an ASCII Display Screen
The following sections describe the tags you use to customize the outboundprocessing for an ASCII display. These tags provide the commands and attributes
that the ASCII display uses to show data received from the AS/400 system.

Working with the Update Screen TableThe update screen table contains information about the command sequences the
ASCII workstation controller sends to an ASCII display in the process of updating
the screen. Among the types of commands that are sent to the display arecommands to clear the screen, position the cursor, and control highlighting. This
table also contains information indicating the different support characteristics of the
ASCII display.
The update screen table used to support an ASCII display is unique to the ASCII
device type. It contains commands specific to that ASCII display. You specify thedata for the update screen table by changing the hexadecimal values for associatedtags in the workstation customizing source you retrieved for the ASCII display.
The following sections describe the tags and commands that allow you to set up themost basic screen characteristics. As previously mentioned, these may be the mostimportant commands you use when using the workstation customizing functions
with an unsupported ASCII display.

Update Screen Table (DSCNTBL) Tag
The update screen table tag, DSCNTBL, defines the screen table used to update
an ASCII display screen. The syntax for this tag is::DSCNTBL
CHARATR = FIELD|CHAR
ADDRMOD = CHAR|BINARYTEXTSYM = NOSUPPORT|SUPPORTAUTOSCL = NO|YES.

Figure 21. Syntax for the Update Screen Table Tag

Note: The default values for the following parameters depend on the device type
you specify when you retrieve the workstation customizing source.
CHARATR (Character)
An optional parameter. Specifies whether or not the display supports
highlighting on the screen on a character basis or on a field basis. The default
for this value depends on the ASCII display you specify for the device typewhen you retrieve the workstation customizing source. (For more information
about the field or character basis, see “The Highlighting Support Parameter(CHARATR)” on page 96.)
FIELD

The display that the source is to customize supports highlighting
on the screen on a field basis.

CHAR

The display that the source is to customize supports highlighting
on the screen on a character basis.

ADDRMOD (Address mode)
An optional parameter. Specifies whether the addressing is by ASCII numeric
Chapter 8. Customizing ASCII Displays95

characters or binary values.
CHAR

Addressing is by numeric characters.

BINARY

Addressing is by binary values.

TEXTSYM (Text symbol)
An optional parameter. Specifies whether text symbols are supported.
NOSUPPORT

Text symbols are not supported.

SUPPORT

Text symbols are supported.

AUTOSCL (Automatic scrolling)
An optional field. Specifies whether automatic paging is supported.
NO

Automatic paging is not supported.

YES

Automatic paging is supported.

The DSCNTBL tag is immediately followed by a number of individual update screen
tags, which make up the table entries. The absence of a specific update screen tag
after the DSCNTBL tag implies that particular update screen function will not bemapped. When the same update screen tag occurs in an update screen table
multiple times following a DSCNTBL tag, warning messages are sent to the job log
for each occurrence. The customizing object then uses the last occurrence of the
update screen tag in the source. The only exception to this is the SCNSIZE (screensize) tag, which may appear with different values for the size of the screen up to
three times in the update screen table.
The following sections describe the parameters for the :DSCNTBL tag in moredetail.

The Highlighting Support Parameter (CHARATR): This parameter specifies
whether the device supports highlighting on the screen on a field basis or acharacter basis.
Field-Based Highlighting: For field-based highlighting on an ASCII display, entire
regions or fields of data on the screen are automatically shown with a particular
highlighting characteristic (for example, blinking, reverse image, or underscore)when commands to set these characteristics are sent to the screen. The commands
are directed to specific addresses on the screen that are determined by the current
cursor position on the screen. When a command to set the highlighting on thescreen for a specific position is sent, all data on the screen is shown with theselected highlighting from that position to the next position on the screen at which ahighlighting attribute is defined.
As an example, assume that commands to set highlighting for three positions on
the screen have been sent to an ASCII display that supports field-based highlighting
as shown in the following figure:96

OS/400 Workstation Customization Programming V4R3

def

abc
123
ghi

jkl

mno

RV2H476-0

Figure 22. Setting Highlighting Attributes for the Screen

For field-based highlighting on an ASCII display, all data between the limits of
where highlighting on the screen is defined are displayed with the highlighting
attribute defined for the beginning of that region. Therefore, in this example, thecharacters abc, def, and 123 are displayed as blinking data. The actual field defined
to use the blinking attribute begins just before the character a and ends just after
the character 3. The characters ghi and jkl are shown as reverse image data. This
field begins just before the character g and ends just after the character l The
remainder of the display is treated as 1 large field and is set to normal highlighting.
Therefore the characters mno are displayed with normal highlighting.
If a command is now sent to set the highlighting on the screen at row 5, column 15(between abc and def) to underscore, all characters between this position and thenext highlighting attribute position (row 7, column 10) are now shown as underlined
data. Although the underlined highlighting is only shown for the characters def and123, the actual field that is highlighted begins with the character d and ends with thelast space before the character g.

Chapter 8. Customizing ASCII Displays

97

New Attribute

def

abc
123

gh i

jkl

mno

RV2H477-0

Figure 23. Adding New Highlighting Attributes

Character-Based Highlighting: On ASCII displays that support character-based
highlighting on the screen, a given character on the screen is displayed with aparticular type of highlighting only when that character is shown on the screen
following the receipt of a command to set the desired type of highlighting. Sending
the command to set the type of highlighting on the screen, by itself, does notchange the way that the data currently on the screen is highlighted. However, allcharacter data that is shown on the screen following the command to set thehighlighting is shown with the selected highlighting. This highlighting is used todisplay all characters subsequently written on the screen, until another command to
set the highlighting to something different is received by the display screen.
Therefore, sending a command to set the highlighting on the screen on a displaythat supports character-based highlighting does not change the way that data
currently shown on the screen is shown. For example, assume that the following
display has been sent to such a display screen with the data highlighted as shownin Figure 24 on page 99.

98

OS/400 Workstation Customization Programming V4R3

abc

def

ghi

jkl

mno

RV2H478-0

Figure 24. Displaying the Highlighted Characters (1)To write the characters 123 on the screen between the abc and def with theunderscore highlighting, the following sequence of commands must be sent to thescreen:1. Position the cursor to the appropriate address on the screen between the abc
and def characters.
2. Set the highlighting to underscore.
3. Write the characters 123.
The resulting data on the screen would appear as follows:

def

abc
123
ghi

jkl

mno

RV2H479-0

Figure 25. Displaying the Highlighted Characters (2)Note that the data previously shown on the screen does not change. To write thecharacters def on the screen to be shown as underlined characters in this example,
the following additional commands must be sent following the three listed previously
listed.
1. Position the cursor from the current screen address to the location on thescreen where the character d is shown.
Chapter 8. Customizing ASCII Displays99

2. Rewrite the characters def on the screen.
When selecting the CHARATR parameter for an ASCII display, you should refer tothe book for the display to determine whether highlighting on the screen is
performed on a field or character basis. You can then set this parameter
appropriately and use the ATRCMD (attribute command) tag to allow screen
highlighting.

The Address Mode Parameter (ADDRMOD): This parameter specifies whether
data for the ASCII display is addressed by ASCII decimal numeric characters or
binary values.
Decimal Numeric Character Addressing: For ASCII displays that support
addressing by numeric characters, the commands for positioning data on the screen
require the address data to be specified as numeric character ASCII codes for each
digit in the address.
For the decimal numeric character addressing format, the address on the screen isrepresented by separate character or character sequences for the row and columnof the address. The character or character sequence consists of ASCII codes forthe numeric characters (graphic characters 0 through 9, represented by the ASCII
codes '30'X through '39'X).
For example, a row value of 18 is specified using a sequence of ASCII characters'31'X (for 1) followed by '38'X (for 8). A column address of 63 is represented by thesequence '36'X (for 6) followed by '33'X (for 3). Each row or column value is thenrepresented by a separate ASCII code for each order of ten in the row or column
value. For either a row or column value, there is one numeric character code for thetens unit and one numeric character code for the ones unit. There is also aseparate character code for a column hundreds unit, if needed.
When specifying data for the command to set the cursor address on a display
screen that uses numeric character addressing, the position of each address unit in
the command sequence must be specified. This is shown in the following example.
Assume that the general format for setting the cursor address for an ASCII displaythat uses numeric character addressing is as follows:
ESC [
1B

R1R2

; C1C2f

5B - -

3B - -

66

R1R2 represent two numeric character values that specify the row address and C1C2
represent two numeric characters that specify the column address. For example,
R1R2 would be '3132'X for a row address of 12, C1C2 would be '3637'X for a column
address of 67. When the ASCII workstation controller sends this command to thescreen, the values in this command for the row and column address at any timedepend on the position on the screen that is currently being addressed.
When specifying this command for the CSRADR (set cursor address) tag for the
update screen table, some default values need to be specified for the row andcolumn values in the Data parameter of the command. The default values specified
should represent a screen address of row 1 and column 1. The following shows
how the CSRADR tag should be specified for this particular example::CSRADRROWTENS = 3

100

OS/400 Workstation Customization Programming V4R3

ROWONES = 4
COLHUNDS = 0
COLTENS = 6
COLONES = 7
DATA = '1B5B30313B303166'X.

Notes:
1. It is very important that the address on the screen for the data specified in thecommand corresponds to a screen address of row 1 and column 1. The ASCII
workstation controller saves the row and column information specified here andlater uses these saved values as a base in calculating the row and column
values to be used when sending the Set Cursor Address command for aparticular screen address. Characters may not be positioned properly on an
ASCII display screen if the row and column values specified do not correspondto row 1 and column 1.
2. The ROWTENS, ROWONES, COLTENS, and COLONES parameters are each
set to the offset into the DATA sequence of the byte representing that address
unit. The third byte in the data is the tens unit of the row address, so
ROWTENS is set to 3. The sixth byte in the DATA sequence is the tens unit
column address, so COLTENS is set to 6.
Some ASCII displays use a zero-based addressing scheme for addressing dataon the screen. For example, the first screen position may be referenced by thedisplay as row 0 and column 0. In this case, the initial values specified in theset cursor address command should reflect this zero-based addressing scheme.
For this example, the Data value specified on the CSRADR tag for a displaythat uses zero-based addressing would look like the following::CSRADRDATA = '1B5B30303B303066'X.

3. The COLHUNDS byte has been set to zero in this example. This indicates that
the Set Cursor Address command format for this device does not provide for ahundreds unit in the column address. This is the case for most ASCII displays
supported by numeric character addressing. When specifying the CSRADR tag,you should be sure not to set the COLHUNDS parameter unless the Set Cursor
Address command format for the display absolutely requires it.
4. None of the ASCII displays that use numeric character addressing and that are
currently supported by the ASCII workstation controller have a hundreds
parameter byte in their column address. The COLHUNDS parameter will always
be zero when retrieving the source tables for these displays.

Binary value addressing: For ASCII displays that support binary value addressing,
the address locations on the screen are specified in commands for positioning data
by ASCII character code values that are arbitrarily assigned to row and column
positions. Most ASCII displays that support binary addressing assign the ASCII
codes for graphic characters ('20'X through '7F'X) to consecutively represent agiven row or column position. Therefore, the first ASCII character code, '20'X, isassigned for a row or column value in the command for positioning data if the data
were to be positioned at row 1 or column 1. Following from this, a value of '21'X
would represent a row or column address of 2, '22'X would represent a row orcolumn address of 3, and so on.
Other displays that use binary value addressing for their Set Cursor Addresscommand may use a range of ASCII character code values other than '20'X through'7E'X. For example, some ASCII displays use a range of ASCII character codes

Chapter 8. Customizing ASCII Displays

101beginning at '00'X rather than '20'X. You should specify the value corresponding toan address of 1 for the data command sequence of the CSRADR (set cursor
address) tag.
When specifying data for the Set Cursor Address command of a display that uses
binary value addressing, the position of the row and column address bytes in thecommand sequence must be specified. These positions are indicated by the
ROWTENS and COLHUNDS parameter bytes of the CSRADR tag. This is shown in
the following example.
Assume that the Set Cursor Address command for a display has the following
format:
ESC X Pr Pc
1B 58 - -Pr and Pc are single-byte values representing the specific row and column to beaddressed. For this example, assume that the range of address values starts with
'20'X (so that a row or column value of 2 is specified by '21'X, and so on.).
When specifying this command on the CSRADR tag, the default row and column
values specified should be set to a screen address of row 1, column 1. The
following lists the specification of the CSRADR tag for this example:
CSRADRROWTENS = 3
ROWONES = 0
COLHUNDS = 4
COLTENS = 0
COLONES = 0
DATA = '1B582020'X.

Notes:
1. Only the ROWTENS and COLHUNDS parameters should be set to nonzero
values. The values set for each indicate which bytes in the command sequence
are the row and column parameters, respectively.
2. This command is used to address data on the screen using binary value
addressing whenever the position on the screen being addressed is in columns
1 through 80.
3. Most ASCII displays attached to the ASCII workstation controller are supported
as 24-row by 80-column screens. If the screen uses binary value addressing,but is being supported by the workstation controller as a screen with
132-column capability, this command is not used to address data beyond
column 80. Instead the Extended Set Cursor Address command (specified by
the XCSRADR tag) is used to address data in columns 81 through 132.
4. If the range of values used by the screen for its row and column address values
had been different, the default row and column values specified for the Data
value would still be set to represent a screen address of row 1 and column 1.
For example, if the range of address values started at '1F'X instead of '20'X thedata value in this example should have been specified as DATA='1B581F1F'X.
Whether supported by numeric character addressing or binary value addressing,specifying a Set Cursor Address command in the update screen table is a basic
requirement for any ASCII display that is to be supported by the ASCII workstation
controller. When customizing the update screen table for a supported ASCII display,102

OS/400 Workstation Customization Programming V4R3

this tag should not be removed. Likewise, when customizing this table for a new
ASCII device type (one not supported by the ASCII workstation controller), theupdate screen table tags you specify should always include the CSRADR tag.
The reference book for your ASCII display should describe the type of addressing
supported by the display. You should set the ADDRMOD parameter to correspondwith what your display supports.
Be aware that the way you set the ADDRMOD parameter determines how the
ASCII workstation controller subsequently uses data that is specified for the
CSRADR tag in the update screen table. The format of the data specified for the
CSRADR tag should agree with the type of addressing mode set by the ADDRMOD
parameter. After you have selected either numeric character or binary addressing,you should specify the data for the Set Cursor Address tag (CSRADR) in the
update screen table to agree with the selected type of addressing. See “Set Cursor
Address (CSRADR) Tag” on page 106 for a complete description of the format you
should use for the CSRADR tag for the different types of addressing.

The Text Symbol Parameter (TEXTSYM): This parameter specifies whether or
not the ASCII workstation controller displays text symbols on this ASCII display. Text
symbols are graphic symbols representing control characters that may appear on adisplay when using the OfficeVision/400 text editor on the AS/400 system.
As an example, text symbols are supported by the ASCII workstation controller for
the IBM 3151 displays. Table 26 shows an example of some of the graphic
characters that are shown on a 3151 ASCII display for the listed control characters.
Table 26. Graphics for Text Control Characters
Text Control Character

IBM 3151 Displayed Graphic

Carrier Return┘ (box lower-right)

Required Carrier Return

Í (solid left triangle)

Required TabÊ (solid right triangle)

Tab┤(box right junction)

The characters shown in Table 26 are in the graphic character set for the 3151
ASCII display. The ASCII workstation controller, when required by the
OfficeVision/400 editor, sends commands to the 3151 display to allow these graphic
characters to be displayed.
If text symbols support is not specified (TEXTSYM=NOSUPPORT), the ASCII workstation
controller never sends commands to display any text symbols. The OfficeVision/400
editor can still be used, but no graphic character appears for any of the text control
characters.
If text symbols support is specified (TEXTSYM=SUPPORT), the display should support a
special graphics character set (containing, for example, such graphics as line
drawing characters) and a command for selecting this graphics character set. Whenyou specify this support, the ASCII workstation controller uses the data specified forseveral of the other update screen table tags also. Therefore, these tags and data
should be specified in your workstation customizing source when you indicate text
symbols support. The affected tags are:CARRTNRQDCARRTN

Chapter 8. Customizing ASCII Displays

103

HLFIDXUP
HLFIDXDNPAGENDRQDSPCTABRQDTABSTOPCODEWORDUSGCS
The last tag listed (set graphic character set, GCS) specifies the command that the
ASCII workstation controller sends to an ASCII display to select the graphic
character set of the display. The other tags listed specify the character code values
in that graphic character set to which each of the text control symbols is mapped.
See the descriptions of these tags in “Update Screen Tags” for more information
about the specification of text symbols support.

Mapping Text Symbols: Of the update screen table tags shown in the previous list,
the TAB (tab function) and GCS (graphic character set) tags do not indicate the waythat text control characters are mapped. The remaining update screen table tags
specify how text control characters are to be mapped by the ASCII workstation
controller. For each of these tags, a single ASCII character code value should bespecified in the data parameter. The ASCII character code value should correspondto the value assigned to a graphic character in an ASCII display’s graphic characterset. The ASCII workstation controller sends a command to select the graphic
character set whenever it is going to display one of these text symbols. This
command is specified by the GCS tag.
When the ASCII workstation controller selects the ASCII graphic character set, it
assumes that the graphic character set is loaded into the upper range of an 8-bit
ASCII character space (the range of ASCII codes from '80'X through 'FF'X). Data
specified for the text symbol mapping tags should be within this range of values.
The data specified for the text symbol mapping tags is only used by the ASCII
workstation controller when the text symbols parameter for the update screen table
tag is set to indicate that text symbols are supported (TEXTSYM=SUPPORT).

The Automatic Scrolling Parameter (AUTOSCL): This parameter specifies
whether the display automatically moves all the data on the screen up one line
when data is written into the last screen position of the display.
If the ASCII display does not support this paging operation for the last screen
position, this parameter should be set to NO. If the display does support paging, set
the parameter to YES. When this parameter is set to YES, the ASCII workstation
controller does not write data in the last screen position of the display.
The following sections describe the individual tags that you can specify following the
DSCNTBL (update screen table) tag.

Update Screen Tags
The tags described in this section allow you to specify the ASCII control sequence
for an individual update screen function for an ASCII display. The update screen
tags must follow the DSCNTBL (update screen table) tag in your source.

104

OS/400 Workstation Customization Programming V4R3

The DSCNTBL tag and its entries define the update screen table for your ASCII
display. This table is limited to 512 bytes in size. The hexadecimal values for the
update screen tags that make up the entries for this table can be quite large.
Although the size restriction for many of the individual update screen tags is a
maximum of 255 bytes, when you specify values of this size for more than two
update screen tags you can run out of space in the update screen table for yourdisplay.
With some exceptions, the update screen tags have the same general syntax. The
tags that are exceptions to the general syntax are the ATRCMD (attributecommand), SCNSIZE (screen size), CSRADR (set cursor address) and XCSRADR(extended set cursor address) tags. The syntax for these tags is described
separately.
The general syntax for an update screen function tag is shown in the following
figure.
:xxxxxDATA = ASCII control sequence.

Figure 26. General Syntax for the Update Screen Tags

DATA
A required parameter. Specifies the ASCII control sequence for the screen
function. The maximum length of this value is 255 bytes, unless otherwise
noted. This data must be coded as a hexadecimal value.

ASCII control sequence
Hexadecimal values for mapping ASCII control sequences to ASCII display
functions.
Table 27 lists the update screen function tags.
Table 27. Descriptions of the Update Screen Tags
Update Screen Tag

Description

ACS

Set ASCII character set

ALARM

Sound alarm command
1

CARRTN

Carrier return

CLRSCN

Clear screen command

CSROFF

Set Cursor Display Off

CSRON

Set Cursor Display On

ENDBYP

End printer data bypass

GCS

Set graphic character set

HLFIDXDN1
1

Half index down

HLFIDXUP

Half index up

INSCSR

Insert cursor command

NLCS

Set national language character set

PAGEND1

Page end

RQDCARRTN1

Required carrier return

Chapter 8. Customizing ASCII Displays

105

Table 27. Descriptions of the Update Screen Tags (continued)
Update Screen Tag

Description

RQDSPC1

Required space

1

Required tab

RQDTAB

1

STOPCODE

Stop code

STRBYP

Start printer data bypass

TAB1

Tab
1

WORDUS
1

Word underscore

For these tags, the associated DATA value must be no more than 1 byte in length.
See “Update Screen Tags” on page 104 for information about coding these values.

Clear Screen Command
This command is specified by the CLRSCN (clear screen) tag. It is one of the basic
commands for setting up and using an unsupported ASCII display. The CLRSCN
tag specifies a command that is sent to the ASCII display to clear or erase all data
currently displayed on the screen.
In managing the appearance of data on an ASCII display, one of the operations
most frequently done by the ASCII workstation controller is to clear the display
screen. An ASCII display supported by the ASCII workstation controller depends onthe existence of a valid command for clearing the screen in the update screen table
so that the twinaxial device emulation works effectively. When customizing the
update screen table for a display already supported by the ASCII work station
controller, you should never delete the CLRSCRN tag and its associatedhexadecimal data. When customizing the update screen table for a new or
unsupported ASCII device type, the CLRSCN tag should always be present in the
update screen table for a display.

Set Cursor Address Command: To use this command, you need to specify the
CSRADR (set cursor address) tag in your workstation customizing source. This is
one of the basic commands used for setting up and using an unsupported ASCII
display. When this command is sent to an ASCII display to position the cursor or to
set the screen address, all subsequent data received by the display appears
beginning at that screen position.
The ASCII workstation controller supports two different formats for basic addressingof screen data on a 24-row by 80-column display screen. The format used isdetermined by the value you specify for the ADDRMOD parameter of the update
screen table tag. Data for the CSRADR tag needs to be set differently dependingon whether you select addressing by numeric characters or addressing by binary
values. See “The Address Mode Parameter (ADDRMOD)” on page 100 for a more
complete description of the two types of addressing and some examples of how the
CSRADR tag could be specified for each.

Set Cursor Address (CSRADR) Tag: The CSRADR tag specifies the ASCII control
sequence for the set cursor address command. The data you specify for this tag
should provide the ASCII control sequence for positioning the cursor at row 1,
column 1 on the screen. The ASCII workstation controller uses the values you
specify here to calculate the offsets to the other screen addresses. Therefore, it isimportant that you specify the correct address information to be used as a base for

106

OS/400 Workstation Customization Programming V4R3

calculating the offsets correctly. For an example showing how this tag is used, see“The Address Mode Parameter (ADDRMOD)” on page 100. The syntax for this tag
is::CSRADRROWTENS = row position tens byte
ROWONES = row position ones byte
COLHUNDS = column position hundreds byte
COLTENS = column position tens byte
COLONES = column position ones byte
DATA = ASCII control sequence.

Figure 27. Syntax for the Set Cursor Address Tag

Note: If one or more of these values do not apply to the device you arecustomizing, specify those values as 0 (zero).
ROWTENSA required parameter. Specifies the position of the Set Cursor Row (tens unit)
byte in the control sequence. This value must be an integer. For binary value
addressing, this specifies the position of the set cursor row byte in the control
sequence.
ROWONESA required parameter. Specifies the position of the Set Cursor Row (ones unit)
byte in the control sequence. This value must be an integer.
COLHUNDS
A required parameter. Specifies the position of the Set Cursor Column(hundreds unit) byte in the control sequence. This value must be an integer. For
binary value addressing, this specifies the position of the set cursor column byte
in the control sequence.
COLTENSA required parameter. Specifies the position of the Set Cursor Column (tensunit) byte in the control sequence. This value must be an integer.
COLONESA required parameter. Specifies the position of the Set Cursor Column (onesunit) byte in the control sequence. This value must be an integer.
DATA
A required parameter. Specifies the ASCII control sequence for the set cursor
address function. The maximum length for this value is 255 bytes. Thisparameter value must be coded as a hexadecimal value.

ASCII control sequence
Hexadecimal values for the ASCII control sequence for the set cursor
address function.
Sound Alarm Command: You can specify a command for sounding the audible
alarm on an ASCII display in the update screen table using the ALARM (alarm) tag.
For most ASCII displays, this command is the single ASCII control character with avalue of '07'X (BEL). If necessary, you can specify a multicharacter sequence.
The audible alarm command is sent to the display at various times by the ASCII
workstation controller, depending on the types of operations being performed at thedisplay. For example, the alarm command is sent to alert you when unrecognized
keyboard data is entered, when an operator error condition occurs, or possibly
when a message waiting condition becomes active.
Chapter 8. Customizing ASCII Displays

107

The ALARM tag is not required in an update screen table. If this tag is deleted, theaudible alarm is never sounded at that ASCII display.

Display Setup Commands
You can specify one or more setup commands using the SETUP update screen tag
in your workstation customizing source. The SETUP tag allows you to specify aseries of ASCII command sequences that are sent to an ASCII display to set thedisplay to some initial state.
The control sequences you specify for this tag are sent to the display when thedisplay is varied on. They are sent to the display again when the screen refresh
function is called from the keyboard.
The data you specify for the setup command usually consists of ASCII display
commands for initializing the state of the display, or for enabling or disabling display
functions that you cannot otherwise set during the local setup of the ASCII display.
If a number of different ASCII display parameters must be initialized, you can set
these different parameters by specifying the different ASCII command sequences
for each command in consecutive hexadecimal data strings following the SETUPtag.
For example, separate commands are sent to an IBM 3151 display that allow the
Reset key and the Print key to return data to the workstation controller when eachkey is pressed. These keys cannot be enabled during the device setup, but instead,must be enabled by sending command sequences to activate them. The commandsequences to enable each key are as follows:
ENABLE RESET KEY:
ENABLE PRINT KEY:

ESC ( :
ESC ) :

(1B 283A)(1B 293A)

Both of these commands can be specified in the setup tag as follows::SETUP DATA = '1B283A1B293A'X.

Note that the two different command sequences directly follow each other with nospaces in between. Additional command sequences to initialize other display
conditions can be specified by simply adding the ASCII command sequences to theend of the data already specified for the setup tag.
When you specify more than one command sequence for the SETUP tag data, theASCII workstation controller does not recognize the different command sequences
specified as unique command sequences. The controller views the entire data string
as a single command sequence and sends all the data to the display at the sametime. Some ASCII displays support commands that require some delay before
sending additional commands to the display. You should be aware that the display
may not be able to handle all the individual commands specified in the SETUP data
if one of the commands is one for which the display expects a delay before the next
command is sent.

Set ASCII Character Set Command: You can specify the Set ASCII Character
Set command using the ACS tag in the update screen table of your workstation
customizing source.

108

OS/400 Workstation Customization Programming V4R3

This command selects the ASCII character set that is used for the lower range ofan 8-bit ASCII character space. This covers the range of ASCII values for '00'X
through '7F'X. For the IBM family of ASCII displays, this character space is definedas the G0 character space (see “ASCII Character Sets and Code Pages” onpage 78 for the discussion of ASCII character spaces). When this command isspecified, the ASCII workstation controller sends the command to the display toinitialize the lower range of the character space when the device is varied on. This
command is also sent when the screen refresh function is called from the keyboard.
Most ASCII displays already use the US ASCII character set for the lower range ofan 8-bit character space, so in many cases, there is no need to specify this tag.
However, you should specify this tag when the default character set in the lower
range of the character space is required to be initialized for the display to function
properly.

Set National Language Character Set Command: You can specify the Set
National Language Character Set command using the NLCS (national language
character set) tag in the update screen table section of your workstation
customizing source. This command is sent to an ASCII display to select the national
language character set for the upper range of an 8-bit ASCII character space ('80'X
through 'FF'X.)
When you specify that text symbols are supported for a display, the ASCII
workstation controller assumes that the upper range character space is to beshared between the national language character set and the special graphics
character set. In this case, the national language character set is treated as thedefault character set for the upper range character space. When a text symbol
needs to be displayed, the ASCII workstation controller replaces the national
language character set in the upper range character space by sending thecommand to select the special graphics character set for the G1 space. After thecommands to display the appropriate symbol are sent, the ASCII workstation
controller sets the upper range character space back to the default by sending thecommand to select that national language character set.
When a display does not provide text symbols support, and the default characterset used for the upper range character space is the character set you want for the
language you are using, you do not need to specify the NLCS tag after the
DSCNTBL tag in your source.

Set Graphic Character Set Command
You can specify the Set Graphic Character Set command using the GCS (setgraphic character set) tag in the update screen table of your workstation
customizing source. This command is sent to an ASCII display to select a special
graphics character set whenever text symbols are to be displayed.
The ASCII workstation controller assumes that when the special graphics character
set is selected, it is loaded into the upper range of an 8-bit ASCII character space('80'X through 'FF'X.)
Note: IBM ASCII displays refer to this character space as the G1 character space.
See “ASCII Character Sets and Code Pages” on page 78 for more
information about ASCII character spaces.
The ASCII display uses the support provided by the Set Graphic Character Set
command when text symbols support is specified in the TEXTSYM parameter for
Chapter 8. Customizing ASCII Displays

109the DSCNTBL tag. When this parameter is set and the GCS tag is specified, yourASCII display should support different ASCII character spaces in a manner similar
to the IBM 3151 and 316x displays.

Set Cursor Display On and Set Cursor Display Off Commands
You can specify the Set Cursor On and Set Cursor Off commands by using the
CSRON (set cursor on) and CSROFF (set cursor off) tags in the update screen
table in your workstation customizing source. These commands are sent to an
ASCII display to turn display of the cursor on or off.
Applications can define certain types of fields on the display screen where thecursor disappears when it is moved into that field. The ASCII workstation controller
sends the command to turn the cursor off when such a field is entered. The
command to turn it back on is sent when the cursor is moved out of the field.
When you specify the tags for these commands in an update screen table, you
should be aware of the following:v You should not specify a command to turn the cursor off without also specifying
the command to turn it on. If the command to turn it off is the only one specified,the cursor disappears and does not come back after the first time the commandto turn it off is sent.
v The command to turn the cursor on can actually be a command to set the cursor
to a specific type, for example, a block cursor, an underscore cursor, or a blinking
cursor. You should be aware that when such a command is sent to the ASCII
display, it overrides any cursor style that you may have selected during the setup
for the display. In this case, you should select a command for setting the cursor
to a style that is not unpleasant to you when the cursor style override occurs.

Insert Cursor Command: You can specify the command to position the cursor byusing the INSCSR (insert cursor) tag in the update screen table in your workstation
customizing source. Some ASCII displays support the Insert Cursor command for
positioning the cursor on the display separately from the command for positioning
the data. For many ASCII displays, these commands are one and the same. IBM
ASCII displays provide separate commands for positioning the cursor andpositioning screen data. When the Insert Cursor command is sent to an ASCII
display, it positions the cursor to the current screen address (as previously set by
the Set Cursor Address command).
When the ASCII display positions the cursor to the same address that is set by the
Set Cursor Address command, this tag does not need to be specified in an update
screen table. If specified, the ASCII workstation controller uses this command for
positioning the cursor. If specified for a device type other than an IBM ASCII
display, the display should perform a function that is equivalent to the Insert Cursor
command performed by the IBM displays.

Start and End Printer Data Bypass: You can specify the commands to start andend printer data bypass by using the STRBYP (start printer bypass) and ENDBYP(end printer bypass) tags in the update screen table in your workstation customizing
source. These commands allow the ASCII workstation controller to support an
auxiliary printer attached to an ASCII display. The workstation controller sends thecommand sequence specified on the STRBYP tag to the display before sending thedata that is to be passed on to the printer. All subsequent data sent to the display
should be sent to the printer until the workstation controller sends the commandsequence to end printer bypass. When you specify these command sequences in

110

OS/400 Workstation Customization Programming V4R3

your workstation customizing source, be sure you specify both the start and end
command sequences; otherwise, your results could be unpredictable.

Display Attribute Commands
Applications sending data to a display attached to the AS/400 system also send
attribute control characters that specify the way data for display on the screen is tobe highlighted. These control characters are in the range of values from '20'X
through '3F'X, and each value indicates a specific type of highlighting that would
appear on a twinaxial display.
As part of its twinaxial device emulation function, the ASCII workstation controller
maps these attribute control characters into ASCII command sequences that set theway data is to be highlighted on an ASCII display. This allows the workstation
controller to format data on an ASCII display so that the highlighting is as close as
possible to what it would look like on a twinaxial display.
You can map the attribute control characters by specifying the ATRCMD (attributecommand) tag in the update screen table in your workstation customizing source.
The ATRCMD tag allows you to specify the ASCII control sequence that is sent to
set the highlighting for an ASCII display.

Attribute Command (ATRCMD) Tag
The ATRCMD (attribute command) tag specifies an ASCII control sequence to set ahighlighting attribute. The syntax for this tag is::ATRCMD

CTLCHAR = control character
DATA = ASCII control sequence.

Figure 28. Syntax for the Attribute Command Tag

CTLCHARA required parameter. Specifies a control character for a highlighting attribute.
(For a listing of the control characters for highlighting an ASCII display, see
Table 28 on page 112.)

control character
Hexadecimal value representing a highlighting attribute control character.
The range of values is '20'X through '3F'X.
DATA
A required parameter. Specifies the ASCII control sequence for the function.
The maximum length of this value is 255 bytes. This data must be coded as ahexadecimal value.

ASCII control sequence
Hexadecimal values for mapping a highlighting attribute control character toan ASCII control sequence.
The following table shows the highlighting codes that are associated with a twinaxial
display:

Chapter 8. Customizing ASCII Displays

111

Table 28. Control Characters for Highlighting an ASCII Display
Control
Character

Monochrome Display

Color Display'20'X

Normal

Green

'21'X

Reverse image

Green, Reverse image'22'X

High Intensity

White

'23'X

Reverse image, High intensity

White, Reverse image'24'X

Underscore

Green, Underscore'25'X

Reverse image, Underscore

Green, Underscore, Reverse image'26'X

High intensity, UnderscoreWhite, Underscore'27'X

Nondisplay

Nondisplay

'28'X

Blink

Red

'29'X

Reverse image, Blink

Red, Reverse image'2A'X

High intensity, Blink

Red, Blink'2B'X

Reverse image, High intensity, Blink

Red, Reverse image, Blink'2C'X

Underscore, Blink

Red, Underscore'2D'X

Reverse Image, Underscore, Blink

Red, Reverse Image, Underscore'2E'X

High Intensity, Underscore, Blink

Red, Underscore, Blink'2F'X

Nondisplay

Nondisplay'30'X

Column Separators

Turquoise, Column separators'31'X

Reverse image, Column separators

Turquoise, Reverse image, Column separators'32'X

High intensity, Column separators

Yellow, Column separators'33'X

Reverse image, High intensity, Column separators

Yellow, Reverse image, Column separators'34'X

Underscore, Column separators

Turquoise, Underscore'35'X

Reverse image, Underscore, Column separators

Turquoise, Reverse image, Underscore'36'X

High Intensity, Underscore, Column separators

Yellow, Underscore'37'X

Nondisplay

Nondisplay'38'X

Blink, Column separators

Pink

'39'X

Reverse image, Blink, Column separators

Pink, Reverse image'3A'X

High Intensity, Blink, Column separators

Blue

'3B'X

Reverse image, High intensity, Blink, Column
separators

Blue, Reverse image'3C'X

Underscore, Blink, Column separators

Pink, Underscore'3D'X

Reverse image, Underscore, Blink, Column
separators

Pink, Reverse image, Underscore'3E'X

High intensity, Underscore, Blink, Column
separators

Blue, Underscore'3F'X

Nondisplay

Nondisplay

The default attribute mappings that the ASCII workstation controller uses for eachsupported type of display map the control characters so that the appearance of dataon an ASCII display is as close as possible to what it would be on a twinaxial

112

OS/400 Workstation Customization Programming V4R3

display. These default mappings are contained in the workstation customizing
source you retrieve from the system mapping tables. The workstation customizing
functions allow you to change the attribute mappings, so that, if desired, theappearance of data on an ASCII display is quite different from what it would be on a
twinaxial display.
Notes:
1. Different attribute control characters can be mapped into the same ASCII
command sequence. This results in the same type of highlighting for different
attribute control characters.
2. Attribute control character values of '27'X, '2F'X, '37'X, and '3F'X are special
control characters that indicate the data following them is not displayed. The
ASCII workstation controller performs special processing to ensure that the dataassociated with these control characters is not displayed. Mappings can be
specified for these commands, but the ASCII workstation controller always
forces data for these attributes not to be displayed.
3. Most ASCII displays do not support the exact same set of highlighting
characteristics that may be supported on a twinaxial display. For example, mostASCII displays do not provide for a highlighting characteristic for column
separators. You can substitute some other type of highlighting available on an
ASCII display for showing such characteristics.
4. If you want to prevent the ASCII display from using an attribute command, thetags associated with those attributes need to be removed completely from theworkstation customizing source. For example, the IBM 3101 display does notsupport attributes. When you retrieve the source for this display type, you can
see that there are no ATRCMD tags in the source.

Set Screen Size Commands
The ASCII workstation controller can send commands to an ASCII display to set thescreen to different sizes, depending on the current requirements of the device
emulation. You specify the commands for setting the screen to different sizes using
the SCNSIZE (set screen size) tag in the update screen table in your workstation
customizing source.

Set Screen Size (SCNSIZE) Tag: The SCNSIZE (set screen size) tag specifies
the ASCII control sequence for setting a different screen size. You should set thescreen size based on the emulation you want to use. The syntax for this tag is::SCNSIZESIZE = 1920|2000|3564
DATA = ASCII control sequence.

Figure 29. Syntax for the Set Screen Size Tag

SIZE
A required parameter. Specifies the size of the screen (in characters) for the
ASCII display.
1920

The size of the screen is 1920 characters or 24 X 80 (lines X columns).

2000

The size of the screen is 2000 characters or 25 X 80.

3564

The size of the screen is 3564 characters or 27 X 132.

Chapter 8. Customizing ASCII Displays

113

DATA
A required parameter. Specifies the ASCII control sequence for the screen
sizing function. The maximum length of this value is 255 bytes. This data must
be coded as a hexadecimal value.

ASCII control sequence
Hexadecimal values for mapping the ASCII control sequence for the screen
size.
The ASCII workstation controller can set three screen sizes corresponding to thethree values that you can specify for the SIZE parameter on the SCNSIZE tag. You
can specify the SCNSIZE tag and its parameters up to three times in a workstation
customizing source.
Notes:
1. An ASCII display does not have to support a command that sets the screen size
to exactly 25x80 or exactly 27x132 for you to use these commands in the
update screen table. However, for each SCNSIZE tag you specify, the display
should be capable of showing at least as many rows and at least as manycolumns as are associated with the screen size specified. Therefore, acommand that sets the screen to 26 rows by 80 columns could be used for the
25x80 screen size, or a command to set the screen size to 28 rows by 132
columns could be used for the 27x132 screen size. When this is the case, theASCII workstation controller only writes data on those areas of the screen
associated with the sizes you select for the SCNSIZE tag.
2. The command to set the screen size to 24x80 is only sent if the twinaxial
display being emulated is one that runs in 24x80 mode. In this case, thecommand is sent when you first vary on the display. Many ASCII displays
always run in 24x80 mode. It is not necessary to specify this command in yourupdate screen table if your display is one that always runs with this screen size.
3. If the twinaxial device emulation selected during device configuration is one thatprovides 132-column support, the ASCII workstation controller switches backand forth between displaying data in a 25x80 format and a 27x132 format. The
ASCII workstation controller sends the two command sequences specified in the
SCNSIZE tag for size values of 2000 and 3564 to set these sizes.
4. If the twinaxial device emulation selected provides 132-column support, the
SCNSIZE tag should be specified in the update screen table with commands forboth of the screen sizes: 25x80 and 27x132. You should not specify only the
27X132 screen size.

Extended Set Cursor Address Command
When you configure an IBM 3151 or 3162 ASCII display, you can select thetwinaxial device emulation to be a twinaxial display that shows data for the screen
in both the 25x80 and 27x132 formats. When you select this type of emulation, theASCII workstation controller uses a separate command for addressing data incolumns 80 through 132. This command is called the Extended Set Cursor Addresscommand, which is specified in the update screen table by the XCSRADR(extended set cursor address) tag. This command is sent along with the command
you specified for the CSRADR tag to address data on the ASCII display for thistype of emulation.

Extended Set Cursor Address (XCSRADR) tag: The XCSRADR (extended set
cursor address) tag specifies the ASCII control sequence for the extended set
cursor address command. The syntax for this tag is:114

OS/400 Workstation Customization Programming V4R3

:XCSRADR
ROW = row position
COLHIGH = column position high byte
COLLOW = column position low byte
DATA = ASCII control sequence.

Figure 30. Syntax for the Extended Set Cursor Address Tag

ROW
A required parameter. Specifies the position of the Extended Set Cursor Row
byte in the control sequence. This value must be an integer.
COLHIGH
A required parameter. Specifies the position of the Extended Set Cursor Column(high) byte in the control sequence. This value must be an integer.
COLLOWA required parameter. Specifies the position of the Extended Set Cursor Column(low) byte in the control sequence. This value must be an integer.
DATA
A required parameter. Specifies the ASCII control sequence for the extended
set cursor address function. The maximum length of this value is 255 bytes.
This parameter value must be coded as a hexadecimal value.

ASCII control sequence
Hexadecimal values for the ASCII control sequence for the extended set
cursor address function.
If the XCSRADR tag and its parameters are present in an update screen table, theASCII workstation controller uses a format that is similar to that of the Extended Set
Cursor Address command for the IBM 3151 and 3162 displays. The Extended Set
Cursor Address command for the 3151 and 3162 displays has the following generalformat:
ESC X Prh Prl Pch Pcl
1B 58 - - - Prh - Row Parameter, high byte
Prl - Row Parameter, low byte
Pch - Column Parameter, high byte
Pcl - Column Parameter, low byte

The address parameter (either row or column) for the Extended Set Cursor Addresscommand on these displays is a 2-byte parameter. The following scheme is used
for the display in the specification of an address value for these 2 bytes.
Table 29. Address Parameter for the Extended Set Cursor Address Command
Decimal Address ValueHigh Byte

Low Byte

1 - 32'20'X'20'X - '3F'X

33 - 64'21'X'20'X - '3F'X

65 - 98'22'X'20'X - '3F'X

97 - 128'23'X'20'X - '3F'X

129 - 132

'24'X

'20'X - '3F'X

The 3151 and 3162 displays require certain bits within the last parameter byte of acommand that contains multiple parameters to be set a certain way. This allows thedisplay to determine which parameter is the last one in a multiple parameter
Chapter 8. Customizing ASCII Displays

115

command. Pcl is the last parameter byte in this case, and this requirement meansthat Pcl must always be set to a value that is '20'X greater than the value listed in
the above table for a particular column address.
The XCSRADR tag for this particular example is specified as follows::XCSRADR
ROW=4
COLHIGH=5
COLLOW=6
DATA='1B5820202040'X

The default address specified in the data for this example corresponds to a screen
address of row 1, column 1. The ROW, COLHIGH, and COLLOW parameters areeach set to the offset value in the command for that address parameter. The
XCSRADR tag does not provide a parameter to specify an index to the high byte of
the ROW parameter in the command. The only rows that can ever be addressed on
an ASCII display are in the range of 1 to 27. For a 2-byte addressing scheme, as
described above, only one of the bytes ever changes value in the row address. The
row parameter byte of the tag should point to the byte that changes value asdifferent rows are specified. You should also note that the last byte specified for thedata parameter in this example has a value of '40'X This value is specified to fulfill
the previously described 3151 and 3162 requirement for marking the last parameter
byte in a multiple parameter command.
The ASCII workstation controller uses this command only when the twinaxial display
being emulated is one that can operate in 132-column mode.

Considerations for 132-Column Support
Some of the commands in the update screen table are used by the ASCII
workstation controller only when the twinaxial device being emulated is one that
supports a wide screen capability. The specific commands that are used only during
this emulation are:v Extended Set Cursor Address Command (XCSRADR tag)v Set Screen Size to 25x80 command (SCNSIZE tag)v Set Screen Size to 27x132 command (SCNSIZE tag)
These tags are described in more detail in previous sections in this chapter. The
following information summarizes the different things you must keep in mind whencustomizing an ASCII display that is to be used in 132-column mode.
The only ASCII displays for which wide screen support is currently provided are the
IBM 3151, with an appropriate expansion cartridge, and the IBM 3162. You canspecify these commands that are specific to the 132-column support in any
customized update screen table. However, the commands are used only when theconfigured device type for which the customized table is being used is a 3151 or a
3162 (and the twinaxial device type selected for the emulation is one that supports
132 columns).
Notes:
1. The command to set the screen size to 25x80 is sent any time the application
data stream contains a command indicating that the default screen size (25x80)
is to be set at the display.

116

OS/400 Workstation Customization Programming V4R3

2. The command to set the screen size to 27x132 is sent any time the application
contains a command indicating that the display should be set to wide screenmode.
3. If the update screen table indicates that the display addresses data and the
cursor using binary values (ADDRMOD=BINARY), the Set Cursor Address commandis sent any time the screen position being addressed has a column value lessthan or equal to 80. When a position greater than column 80 is addressed, theExtended Set Cursor Address command is used.
The Extended Set Cursor Address command specified in the update screen
table in this case must conform to the format currently used by the IBM 3151
and 3162 ASCII displays. This is described in “Extended Set Cursor Address
Command” on page 114.
4. If the update screen table indicates that the display addresses data and the
cursor using decimal numeric characters (ADDRMOD=CHAR), the Set Cursor
Address command is always sent to the display.
Note that none of the currently supported ASCII displays that use decimal
numeric character addressing are supported with the wide screen emulation.
When you retrieve the source for an ASCII display that has numeric character
addressing, the hundreds column (COLHUNDS) parameter for the CSRADR tag
is always zero. To support wide screen emulation on a display that uses
numeric character addressing, this parameter must be nonzero and be a valid
command sequence for the hundreds unit.

Working with the EBCDIC-to-ASCII Code Mapping Table
The EBCDIC-to-ASCII mapping table handles the conversion of EBCDIC character
data in the range '40'X through 'FF'X (from the ASCII workstation controller’sinternal screen image buffer) into ASCII character data. This table also provides the
mappings for control character data in the range '00'X through '1F'X that canappear in the internal screen image buffer. To customize this table, you need tochange the entries in your workstation customizing source associated with the
EBCDIC-to-ASCII mapping table tag, DEBCTBL.

EBCDIC-to-ASCII Mapping Table (DEBCTBL) Tag
The DEBCTBL (EBCDIC-to-ASCII mapping table) tag defines the EBCDIC-to-ASCII
mapping table to be used for an ASCII display. The syntax for this tag is::DEBCTBL

DATA = table data.

Figure 31. Syntax for EBCDIC-to-ASCII Mapping Table Tag

DATA
A required parameter. Specifies the EBCDIC-to-ASCII mapping table data for
the ASCII display. The data are hexadecimal values used for the
EBCDIC-to-ASCII translation of system data to data the ASCII display can use.
The table data must be hexadecimal, and exactly 256 bytes in length.

table data
Hexadecimal values used for the EBCDIC to ASCII translation.
The EBCDIC-to-ASCII mapping table consists of 256 1-byte entries. Each entry
corresponds to an EBCDIC value in the range '00'X through 'FF'X. Figure 32 on

Chapter 8. Customizing ASCII Displays

117

page 118 illustrates the layout of this table in the retrieved source for an IBM 3151
display.
:DEBCTBL
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'20202020202020202020202020202020'X'2020202020202020202020202A202020'X'20202020202020202020202020202020'X'20202020202020202020202020202020'X'2020616161616161636E5B2E3C282B21'X'266565656569696969205D242A293B5E'X'2D2F414141414141434E7C2C255F3E3F'X'204545454549494949603A2340273D22'X'20616263646566676869202020792020'X'206A6B6C6D6E6F707172202020202020'X'207E737475767778797A213F20202020'X'20202020202020202B20207C20202720'X'7B4142434445464748492D6F6F6F6F6F'X'7D4A4B4C4D4E4F505152207575757579'X'5C20535455565758595A204F4F4F4F4F'X'30313233343536373839205555555520'X.

/* 0- *//* 1- *//* 2- *//* 3- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- */

Figure 32. EBCDIC-to-ASCII Mapping Table Format

Notes:
1. The ASCII workstation controller does not verify whether or not the ASCII
character code specified in an entry of this table corresponds to a code for avalid ASCII character. Entries from this table are accessed as they appear andare sent to the display.
2. Code values from '00'X through '1F'X are normally reserved for control
characters on twinaxial displays. If any of these character codes appear in the
EBCDIC screen image buffer for a display, they are mapped as specified in the
EBCDIC-to-ASCII mapping table and then transmitted to the display. The
EBCDIC-to-ASCII mapping table entries corresponding to these control
characters are usually coded so that the characters are mapped into ASCII
blanks ('20'X). One exception to this is the control character generated when
you press the Dup key on the keyboard. The control character put into thescreen image buffer for the Dup function is '1C'X. On twinaxial displays, thiscontrol character appears as an asterisk with a line above it. The
EBCDIC-to-ASCII mapping tables usually map this control character into asubstitute ASCII character (a plain asterisk).
Some of the control characters from '00'X through '1F'X are significant to thetext editing functions supported by the workstation controller, and the mappings
for these control characters can be overridden if the display of text symbols is
enabled (and the display supports these symbols).
3. Code values from '20'X through '3F'X are reserved for attribute control
characters on twinaxial displays. These entries in the EBCDIC-to-ASCII
mapping table are never used by the ASCII workstation controller.
4. A given ASCII character set often does not contain all the same characters as
an EBCDIC character set. When possible, the existing EBCDIC-to-ASCII
mapping tables map a character that is in an EBCDIC character set into asubstitute character, when that exact same character does not exist in thecorresponding ASCII character set. This is most often done for diacritic
characters. For example, the character ‘ä’ is often mapped to the letter ‘a’. If no
substitute character is selected, the EBCDIC characters that are not in an ASCII
character set are mapped to an ASCII space character.

118

OS/400 Workstation Customization Programming V4R3

When you customize the EBCDIC-to-ASCII mapping table, be sure to change any
substitute mappings that are not appropriate for your display.

Using the Tags to Customize an ASCII Display Keyboard
The two mapping tables you can change to customize the keyboard for an ASCII
display are:ASCII to keyboard function mapping table,
ASCII-to-EBCDIC mapping table
The ASCII to keyboard function mapping table is set up to recognize the specificcontrol codes and command sequences that are generated by the keyboard of an
ASCII display.
The ASCII-to-EBCDIC mapping table allows the workstation controller to convert the
ASCII character data entered from the keyboard to EBCDIC character data that an
AS/400 application can understand.

Working with the ASCII to Keyboard Function Mapping Table
The ASCII to keyboard function mapping table handles the mapping of ASCII
control characters and control character sequences to the following:v Twinaxial keyboard function codesv Local ASCII display functions
v Requests to set the display state for processing subsequent data received fromthe display
To change these mappings, you need to use the keyboard function tags that follow
the DKBDTBL (ASCII to keyboard function mapping table) tag.

ASCII to Keyboard Function Mapping Table (DKBDTBL) Tag
The DKBDTBL (ASCII to keyboard function mapping table) tag defines an ASCII to
keyboard function mapping table for an ASCII display. The syntax for this tag is::DKBDTBL.

Figure 33. Syntax for ASCII to Keyboard Function Mapping Table Tag

There are no keyword parameters associated with this tag. However, it isimmediately followed by a number of individual keyboard function tags, which makeup the table entries. See “Keyboard Function Tags” on page 120 for more
information about the keyboard function tags.
The size of the ASCII to keyboard function mapping table is limited. You need tokeep this in mind when adding a large number of keyboard function tags that havelong ASCII control sequences (hexadecimal data values).
The same keyboard function tag can be specified more than once in the same
ASCII to keyboard function mapping table as long as the ASCII control sequences
specified in each case are different. This allows the same keyboard function to becalled by more than one ASCII keyboard mapping. When customizing an ASCII to

Chapter 8. Customizing ASCII Displays

119

keyboard function table, you should use caution when deciding whether to delete oromit particular keyboard function tags from a workstation customizing source.
The absence of a specific keyboard function tag after the DKBDTBL tag implies thatparticular keyboard function is not mapped. If the same keyboard function tag
occurs multiple times (with different data values) following a DKBDTBL tag, theASCII workstation controller uses all the occurrences of the tag in the source tomap the function.
In general, keyboard function tags appearing in a workstation customizing sourcethat has been retrieved should not be deleted. Although, it may be acceptable forfunctions that are not required for certain users (for example, some users will never
have a need for the terminal disconnect function), deleting tags from the workstation
customizing source can cause your display to be unusable or behave in an
unpredictable way.
If a particular keyboard function tag does not appear in your retrieved source, you
cannot use that keyboard function on your ASCII display. You can, however, try
adding these functions by checking the tags that are available to add or change thefunction. Add the tag and the corresponding hexadecimal data to the source under
the appropriate primary tag and then create and test the customizing object for thatfunction.
Note: You cannot add a function that the workstation controller does not support for
the type of device you are trying to customize.
When customizing an ASCII to keyboard function table, you should be sure that the
ASCII control sequences you specify for the different keyboard function tags are
unique.

Keyboard Function Tags
The tags described in this section allow you to specify the ASCII control sequence
for an individual keyboard function of an ASCII display. The keyboard function tags
must follow the DKBDTBL (ASCII to keyboard function mapping table) tag in thesource. The same keyboard function tag can occur multiple times following theDKBDTBL tag, with different ASCII control sequences. Each occurrence results in aunique mapping entry in the final customizing object.
With one exception, all keyboard function tags have the same general syntax, as
described in the following section. The exception to the general syntax is the FKEY
tag, which is described separately.
The general syntax for a keyboard function tag is::xxxxxDATA = ASCII control sequence.

Figure 34. General Syntax for the Keyboard Function Tags

DATA
A required parameter. Specifies the ASCII control sequence for the keyboard
function. The maximum length for this value is 31 bytes. This data must be
coded as a hexadecimal value.

120

OS/400 Workstation Customization Programming V4R3

ASCII control sequence
Hexadecimal values for mapping ASCII control sequences to keyboard
functions.
Note: A control sequence is only recognized if the first byte is in the range'00'X through '1F'X or is equal to '7F'X as shown in Figure 18 on page 86.
Table 30 lists the keyboard function tags.
Table 30. Descriptions of the Keyboard Function Tags
Keyboard Function Tag

Tag Description

Keyboard Function Tag

Tag Description

ATN

Attention

HELP

Help

BASE

Base

HEX

Hex

BOLD

Bold

HLFIDXDN

Half index down

BOTPAG

Bottom of page

HLFIDXUP

Half index up

BSP

Backspace

HOME

Home

CARRTN

Carrier return

INSERT

InsertCENTER

CenterLATINON

Latin language on

CLEAR

Clear

NEWLINE

New line

CLOSE

Close

NEXTSTOP

Next stop

CSRUP

Cursor up

NTLON

National language on

CSRDOWN

Cursor down

PAGDOWN

Page down

CSRLEFT

Cursor left

PAGUP

Page up

CSRRIGHT

Cursor right

PAGEND

Page end

CSRSEL

Cursor select

PA1

PA1

DISC

Terminal disconnect

PA2

PA2

DLT

DeletePA3

PA3

DSPSYM

Display symbols

PRINT

Print

DUP

Duplicate

READSTS

Read Status

END

End

RQDSPC

Required space

ENDLINEEnd of line

RQDTAB

Required tab

ENTER

Enter

RVS

ReverseERSINP

Erase input

SCNREFRESH

Screen refresh

ERSEOF

Erase EOFSCNRVS

Screen reverse

ERRRESET

Error reset

SHIFTOUT

Set shift-out state

FCSRLEFT

Fast cursor left

SHIFTIN

Set shift-in state

FCSRRIGHT

Fast cursor right

STOPCODE

Stop code

FLDADV

Field advance

STRLINE

Beginning of line

FLDBSP

Field backspace

STRUS

Begin underscore

FLDEXIT

Field exit

SYSREQ

System request

FLDPLUS

Field plus

TOGIND

Toggle indicator

FLDMINUS

Field minus

TOPPAGTop of page
Chapter 8. Customizing ASCII Displays

121

Table 30. Descriptions of the Keyboard Function Tags (continued)
Keyboard Function Tag

Tag Description

Keyboard Function Tag

Tag Description

FLDMRK

Field markTSTREQ

Test request

FWDTAB

Forward tab

WORDUS

Word underscore

Function Key (FKEY) tag: The function key tag, FKEY, specifies the ASCII
control sequence to be mapped into a particular function key. The syntax for this tag
is:
:FKEY

KEY = F1|F2|F3|F4|F5|F6|F7|
F8|F9|F10|F11|F12|
F13|F14|F15|F16|F17|
F18|F19|F20|F21|F22|
F23|F24DATA = ASCII control sequence.

Figure 35. Syntax for the Function Key Tag

KEY
A required parameter. Specifies the function key to be mapped.
F1 - F24
The range of function keys you can set using this parameter.
DATA
A required parameter. Specifies the ASCII control sequence for the function key.
The maximum length for this value is 31 bytes. This value must be ahexadecimal value.

ASCII control sequence
Hexadecimal values that represent the ASCII control sequence you want tomap to the function key you specified for the KEY parameter.
For each keyboard function tag or function key tag (FKEY) that can be specified
following a DKBDTBL tag, you can specify data for the ASCII control sequence thatyou want to assign to that keyboard function.
When you specify the ASCII keystroke sequence for a given keyboard function tag,you need to be aware of the following programming considerations:
Notes:
1. You can specify a keystroke sequence that is anywhere from 1 to 31 bytes inlength.
2. The control character values of '11'X and '13'X should never be specified
anywhere in an ASCII control sequence. These values are reserved for the XON('11'X) and XOFF ('13'X) control characters, which are used by ASCII devices tocontrol the flow of data between devices. The ASCII workstation controller
performs special processing when this character is received from a display. It
does not map any ASCII control sequences containing this character into thespecified keyboard function.
3. The first byte of a control sequence must have one of the following values: '00'X
through '10'X, '12'X, '14'X to '1F'X, or '7F'X. The ASCII workstation controller will
not recognize any ASCII control sequences beginning with values other thanthese.

122

OS/400 Workstation Customization Programming V4R3

As an example, assume the cursor up (CSRUP) keyboard function tag is
specified as follows::CSRUP

DATA = '221B49'X.

The ASCII workstation controller will never map this control sequence into thecursor up keyboard function. Instead, the first character ('22'X) is treated as an
ASCII character code and mapped into an EBCDIC code. The remaining bytes
in the control sequence are ignored by the ASCII workstation controller.
4. If the same control sequence is specified for two or more different keyboard
function tags, the ASCII workstation controller maps the specified ASCII input
sequences into only one of the keyboard functions. The keyboard function into
which it is mapped depends on the relative location of the keyboard function
tags in the ASCII to keyboard function table.
5. If the ASCII control sequence specified for one keyboard function tag matches
the beginning of a longer sequence specified in another entry, the workstation
controller only recognizes the shorter sequence.
For example, assume the following three keyboard function tags are specified::CSRUP:CSRLEFT:CLEAR

DATA=X'1B32'
DATA=X'1B3203'
DATA=X'03'

The ASCII workstation controller never maps a control sequence for the cursor
left keyboard function in this example. If the control sequence assigned tocursor left (’1B3203’X) is received, the ASCII workstation controller performs the
cursor up keyboard function and then subsequently performs the clear keyboard
function. In this example, if no keyboard function is assigned the single value’03’X, the ASCII workstation controller still performs the cursor up function andthen ignores the ’03’X.

Working with the ASCII-to-EBCDIC Mapping Table
The ASCII-to-EBCDIC mapping table handles the conversion of ASCII character
data received from a display to an EBCDIC character code. You can change themapping of ASCII characters to EBCDIC characters by changing the data that
follows the DASCTBL (ASCII-to-EBCDIC mapping table) tag.

ASCII-to-EBCDIC Mapping Table (DASCTBL) Tag
The DASCTBL (ASCII-to-EBCDIC mapping table) tag defines the ASCII-to-EBCDIC
mapping table for an ASCII display. This mapping table is formatted so that it begins
at '20'X rather than '00'X; therefore, the size of this table is limited to 224 bytes. The
syntax for this tag is::DASCTBL

DATA = table data.

Figure 36. Syntax for the ASCII-to-EBCDIC Mapping Table Tag

DATA
A required parameter. Specifies the ASCII-to-EBCDIC mapping table data for
the ASCII display. The data are hexadecimal values used for the translation of
an ASCII character to an EBCDIC character. The table data must be
hexadecimal, and exactly 224 bytes in length.
Chapter 8. Customizing ASCII Displays

123

table data
Hexadecimal values used for the ASCII-to-EBCDIC translation.
The ASCII-to-EBCDIC mapping table consists of 224 1-byte entries. Each entry
corresponds to an ASCII character code value in the range '20'X through 'FF'X.
Each entry contains the EBCDIC character code to which a given ASCII characteris mapped. Figure 37 illustrates the layout of this table in your workstation
customizing source.
:DASCTBL
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'404F7F7B5B6C507D4D5D5C4E6B604B61'X'F0F1F2F3F4F5F6F7F8F97A5E4C7E6E6F'X'7CC1C2C3C4C5C6C7C8C9D1D2D3D4D5D6'X'D7D8D9E2E3E4E5E6E7E8E94AE05A5F6D'X'79818283848586878889919293949596'X'979899A2A3A4A5A6A7A8A9C0BBD0A100'X'00000000000000000000000000000000'X'00000000000000000000000000000000'X'00000000000000000000000000000000'X'00000000000000000000000000000000'X'00000000000000000000000000000000'X'00000000000000000000000000000000'X'00000000000000000000000000000000'X'00000000000000000000000000000000'X.

/* 2- *//* 3- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- */

Figure 37. ASCII-to-EBCDIC Mapping Table Format

The EBCDIC character code values in this table should be in the range of valid
EBCDIC characters ('40'X through 'FF'X) to be usable by the ASCII workstation
controller. The value '00'X can be specified for ASCII code points that either haveno ASCII graphic character assigned or for which there is no corresponding
character in the EBCDIC character set.
For example, ASCII code points in the range from '80'X through '9F'X usually haveno graphic character assigned to them. In the retrieved source, the entries in the
ASCII-to-EBCDIC mapping table that correspond to these ASCII code points containthe value '00'X. When the ASCII workstation controller receives an ASCII character
whose entry in the ASCII-to-EBCDIC mapping table has a value of '00'X, it is not
mapped to an EBCDIC character and the received ASCII character is ignored.
You should not specify values in the range from '01'X through '3F'X for entries in
the ASCII-to-EBCDIC mapping table. When a value in this range appears in a tableentry and the ASCII code corresponding to this entry is received from the display,
the ASCII workstation controller sends an error message to the display. Thisappears as a blinking 0002 on the bottom line of the display.
The ASCII workstation controller treats the ASCII code point, '7F'X as a control
character. Although the entry for this ASCII code point is in the ASCII-to-EBCDIC
mapping table, it is never used.
The ASCII-to-EBCDIC mapping table you retrieve when you customize an ASCII
display comes from one of the AS/400 system ASCII-to-EBCDIC display mappingtables. There are a limited number of these source tables on the system,
corresponding to the limited ASCII device type and language type combinations thatcan be configured when an ASCII display is not customized. ASCII-to-EBCDIC

124

OS/400 Workstation Customization Programming V4R3

mapping tables that handle the mapping to every EBCDIC code page on thesystem do not exist. Default ASCII-to-EBCDIC mappings are provided in the
retrieved source when you specify a device type and language combination that is
not normally supported for ASCII displays. This default ASCII-to-EBCDIC mapping
converts the US ASCII code page into EBCDIC code page 500. When you retrieve
the source for such a device type and language combination, you need to be sure
to change the ASCII-to-EBCDIC mapping data to suit the particular needs of yourdisplay.

Customizing a DEC VT-320 Display in VT-300 ModeIn this example, you are customizing a DEC VT-320 ASCII display. The DEC
VT-320 ASCII display is currently not supported by the AS/400 system.
It is assumed that the VT-320 ASCII workstation is physically attached to thesystem, partly configured to work with the AS/400 system (appropriate controller
and device descriptions created), and is powered on.

Step 1: Planning the Customizing
Familiarize yourself with the display by looking over the reference book. Look at thefunctional capabilities and the character sets (languages) the display supports.
Check the VT-220 characteristics listed in the ASCII Work Station Reference
against the VT-320 characteristics listed in the VT-320 reference book. This
comparison tells you that the VT-320 display is functionally similar to the DEC
VT-220.
To begin, use the default setup for the display hardware. Because the VT-320 is anunsupported ASCII display, and its functions are similar to the VT-220, you need tochange the device type to TYPE(V220) in the device description. Check the default
values for the communications parameters used in the setup for the display andthen specify these same values for the device description. For the VT-320, thefollowing parameter values were specified:Line speed

19200

Word length (Data Bits)

8

ParityEven

Stop Bits

1

Vary on the device with the default mapping tables for a VT-220 display by
specifying *NONE for the work station customizing object (WSCST) parameter inthe device description.
The Sign On Screen appears and is clear. The tests provided by the DISPLAYTEST function for the VT-320 display also work correctly. This indicates that thecommands for updating the screen match those supported by the display.
Using the work sheet for the ASCII update screen table, experiment with the display
functions to verify the commands that are supported by the display are actuallyworking. Be sure to look at those commands that have the most effect on thedisplay, such as the values for the basic update screen table (DSCNTBL) tag,cursor addressing (CSRADR) tag, and clearing the screen (CLRSCN) tag. Some

Chapter 8. Customizing ASCII Displays

125degree of trial and error is required in the planning process for customizing. Use therecovery actions described in the messages in your job log to correct any errorsthat occur during experimentation.
The VT-320 display supports several different modes. The only major difference
between the 320 mode of the VT-320 display and the VT-220 display is that the
VT-220 display does not have function keys. The VT-320 function keys, F6 throughF10 and F14, can be customized. (The other function keys cannot be customized
because they provide local ASCII functions.)
Look at the VT-320 reference book to find the hexadecimal code sequences sent by
the F6, F7, and F8 keys and fill in the ASCII to keyboard function mapping table
work sheet as shown in the following figure. This allows you to more easily makethe changes to the workstation customizing source. (You can have more than one
entry for each function key.)
Note: The VT-320 ASCII display provides a function that allows you to check thecode generated by each key when you set the display to DISPLAYCONTROL mode.
ASCII to Keyboard Function Mapping Table (Function Keys)
Function Key

Key Sequence

Hexadecimal Data

F6

F6

1B5B31377E

F7F7

1B5B31387E

F8F8

1B5B31397E

F1
F2
F3
F4
F5

F16

Figure 38. ASCII to Keyboard Function Mapping Table (Function Key)–Example Work Sheet

Step 2: Retrieving the Workstation Customizing Source
To create a workstation customizing source, you use the Retrieve Work Station
Customizing Object Source (RTVWSCST) command and specify the following:
Device type

DEVTYPE(V220)

Keyboard language type¹

KBDTYPE(USI)

Source member

SRCMBR(CSTV320)

Source file

SRCFILE(CSTSRC)

Library

LIB(CSTLIB)Text

TEXT(‘WSCST source for VT-320 function keys’)¹This value must match the keyboard language type you specified in the device description
for the display; otherwise the display will not vary on.

126

OS/400 Workstation Customization Programming V4R3

Step 3: Changing the Source
After you retrieve the source, use the source entry utility (SEU) to change thefunction key definitions. The command is:
STRSEU SRCFILE(CSTLIB/CSTSRC) SRCMBR(CSTV320)

The following example source shows the code for the function keys that you want tomap to your ASCII display keyboard. In the data parameter for each function key,
type the ASCII hexadecimal data string for the command that the display sends
when that key is pressed. (These are the hexadecimal values you wrote down on
your work sheet in the planning part of the workstation customizing process.) This
maps the display’s code for a function key to the AS/400 function for that key.
.
.
:FKEY
:FKEY
:FKEY
.
.
.

KEY = F6DATA = '1B5B31377E'X.
KEY = F7DATA = '1B5B31387E'X.
KEY = F8DATA = '1B5B31397E'X.

Step 4: Creating the Workstation Customizing Object
After you change and save the source, create the workstation customizing object
using the Create Work Station Customizing Object (CRTWSCST) command.
Specify the following parameter values:
Workstation customizing object name

WSCST(CSTV320)

Library

LIB(CSTLIB)

Source member

SRCMBR(CSTV320)

Text

TEXT(‘Workstation Customizing Object for
VT-320 function keys’)

Source file

SRCFILE(CSTSRC)

Library

LIB(CSTLIB)

If errors occur while the object is being created, messages are sent to the job log.
Use the recovery actions provided in the help information for the message tocorrect any errors and try to create the customizing object again.

Step 5: Varying On the Device
Vary off the VT-320 display and change the device description specifying yourcustomizing object, CSTV320, for the workstation customizing object (WSCST)
parameter.
To activate the workstation customizing function, vary on the display again so thatthe customizing object is downloaded to the ASCII workstation controller. The F6,
F7, and F8 function keys on the VT-320 keyboard now call the appropriate AS/400
functions for those keys.
Chapter 8. Customizing ASCII Displays

127

128

OS/400 Workstation Customization Programming V4R3

Part 3. Printer Customization Technical Reference
Chapter 9. Customizing Printers . . . . . . . . . . . . . .
Determining Whether an ASCII Printer Can Be Customized . . . . .
Understanding ASCII Printer Function Support . . . . . . . . . .
Choosing a Method for Customizing Printer Functions . . . . . . .
Printers that Use Host Print Transform Function . . . . . . . .
The Mapping Table (Transform Table) . . . . . . . . . . .
Customizing the Mapping Table . . . . . . . . . . . . .
Advantages of Using the Host Print Transform Function . . . .
Limitations of Using the Emulator on the AS/400 System . . . .
Printers that Use the Emulator on the Display . . . . . . . . .
The Mapping Table (Printer Definition Table). . . . . . . . .
Customizing the Mapping Table . . . . . . . . . . . . .
Advantages of Using the Emulator on the Display. . . . . . .
Limitations of Using the Emulator on the Display . . . . . . .
Printers that Use the Emulator on the Workstation Controller . . .
The Mapping Tables (Default EBCDIC-to-ASCII, Function, andMultilanguage EBCDIC-to-ASCII) . . . . . . . . . . . .
Customizing the Mapping Tables . . . . . . . . . . . . .
Advantages of Using the Emulator on the Workstation Controller .
Limitations of Using the Emulator on the Workstation Controller .

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

. 135
. 135
. 135
. 138
. 139
. 139
. 139
. 140
. 140
. 140
. 140
. 141
. 141
. 141
. 142

.
.
.
.

.
.
.
.

. 142
. 143
. 143
. 143

Chapter 10. Customizing ASCII Printers That Use the Host Print Transform
Function . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Preparing to Customize an ASCII Printer . . . . . . . . . . . . . . . 145
Gathering Source Materials . . . . . . . . . . . . . . . . . . . 145
Completing Printer Setup . . . . . . . . . . . . . . . . . . . . 145
Planning the Customization Schedule . . . . . . . . . . . . . . . 146
Customizing Unsupported ASCII Printers . . . . . . . . . . . . . . 146
Retrieving the Workstation Customizing Source . . . . . . . . . . . . 146
Understanding the Transform Table . . . . . . . . . . . . . . . . 146
Choosing the Customizing Source . . . . . . . . . . . . . . . . 147
Changing the Source . . . . . . . . . . . . . . . . . . . . . . 147
Transform Table (TRNSFRMTBL) Tag . . . . . . . . . . . . . . . 147
Using the Tags . . . . . . . . . . . . . . . . . . . . . . . 148
Programming Considerations . . . . . . . . . . . . . . . . . . 148
Customizing Printer Information . . . . . . . . . . . . . . . . . . 149
Printer Data Stream (PRTDTASTRM) Tag. . . . . . . . . . . . . . 149
Raster Mode (RASTERMODE) Tag . . . . . . . . . . . . . . . . 150
No-print Border (NOPRTBDR) Tag . . . . . . . . . . . . . . . . 151
Drawer Page Size . . . . . . . . . . . . . . . . . . . . . . 152
Drawer Page Size (DWRPAGSIZ) Tag . . . . . . . . . . . . . . 152
Drawer Page Size Entry (DWRPAGSIZE) Tag . . . . . . . . . . . 152
End Drawer Page Size (EDWRPAGSIZ) Tag . . . . . . . . . . . 153
Customizing Printer Controls . . . . . . . . . . . . . . . . . . . 153
Bell (BELL) Tag . . . . . . . . . . . . . . . . . . . . . . . 153
Carrier Return (CARRTN) Tag . . . . . . . . . . . . . . . . . . 153
Initialize Printer (INITPRT) Tag . . . . . . . . . . . . . . . . . . 153
Reset Printer (RESETPRT) Tag . . . . . . . . . . . . . . . . . 154
Raster Graphics End (RASEND) Tag . . . . . . . . . . . . . . . 154
Print All Characters (PRTALLCHR) Tag . . . . . . . . . . . . . . 154
Print Next Character (PRTNXTCHR) Tag . . . . . . . . . . . . . . 155
Customizing Print Media Size . . . . . . . . . . . . . . . . . . . 155
Envelope Size . . . . . . . . . . . . . . . . . . . . . . . . 155© Copyright IBM Corp. 1998

129

Envelope Size for Transform (ENVSIZXFM) Tag . . .
Envelope Size Entry (ENVSIZE) Tag . . . . . . .
End Envelope Size for Transform (EENVSIZXFM) Tag .
Paper Size . . . . . . . . . . . . . . . . . .
Page Size for Transform (PAGSIZXFM) Tag . . . . .
Page Size Entry (PAGSIZE) Tag . . . . . . . . .
End Page Size for Transform (EPAGSIZXFM) Tag . .
Page Length . . . . . . . . . . . . . . . . .
Page Length in Inches (PAGLENI) Tag . . . . . . .
Page Length in Lines (PAGLENL) Tag . . . . . . .
Printable Area . . . . . . . . . . . . . . . . .
Text Length in Lines (TEXTLENL) Tag . . . . . . .
Top Margin in Inches (TOPMARGINI) Tag . . . . .
Customizing Highlighting . . . . . . . . . . . . . .
Bold . . . . . . . . . . . . . . . . . . . .
Start Bold Printing (STRBOLD) Tag . . . . . . . .
End Bold Printing (ENDBOLD) Tag . . . . . . . .
Underscore . . . . . . . . . . . . . . . . . .
Start Underscore Function (STRUS) Tag . . . . . .
End Underscore (ENDUS) Tag . . . . . . . . . .
Customizing Horizontal Movement . . . . . . . . . .
Backspace (BSP) Tag . . . . . . . . . . . . . .
Characters Per Inch. . . . . . . . . . . . . . .
Characters per Inch in Normal Print Mode (CPI) Tag. .
Characters per Inch in COR Mode (CPICOR) Tag. . .
Horizontal Absolute Movement (HORAMOV) Tag . . . .
Horizontal Relative Movement (HORRMOV) Tag . . . .
Proportional Spacing . . . . . . . . . . . . . .
Start Proportional Space (STRPROP) Tag . . . . .
End Proportional Space (ENDPROP) Tag. . . . . .
Space (SPACE) Tag . . . . . . . . . . . . . .
Customizing Vertical Movement . . . . . . . . . . .
Form Feed (FORMFEED) Tag . . . . . . . . . . .
Half Line Feed (HLFLINEFEED) Tag . . . . . . . .
Line Feed (LINEFEED) Tag . . . . . . . . . . . .
Vertical Absolute Movement (VERAMOV) Tag . . . . .
Vertical Relative Movement (VERRMOV) Tag . . . . .
Reverse Half Line Feed (RVSHLFLINEFEED) Tag . . .
Reverse Line Feed (RVSLINEFEED) Tag . . . . . . .
Vertical Line Spacing . . . . . . . . . . . . . .
Lines per Inch (LPI) Tag . . . . . . . . . . . .
Variable Line Spacing (VARLSPC) Tag . . . . . . .
Customizing Indexing . . . . . . . . . . . . . . .
Subscript. . . . . . . . . . . . . . . . . . .
Start Subscript Function (STRSUBS) Tag . . . . . .
End Subscript Function (ENDSUBS) Tag . . . . . .
Superscript . . . . . . . . . . . . . . . . . .
Start Superscript Function (STRSUPS) Tag . . . . .
End Superscript Function (ENDSUPS) Tag . . . . .
Customizing Color . . . . . . . . . . . . . . . .
Foreground Color (FOREGRND) Tag . . . . . . . .
Customizing Paper Input . . . . . . . . . . . . . .
Paper Drawer Selection (DWRSLT) Tag . . . . . . .
Selecting Paper Drawer Number (DWRNBR) Tag . . . .
Additional Paper Drawer Selection . . . . . . . . .
Additional Drawer Selection (ADDDRWTBL) Tag . . .

130

OS/400 Workstation Customization Programming V4R3

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

. 156
. 156
. 156
. 156
. 157
. 157
. 157
. 157
. 157
. 158
. 159
. 159
. 160
. 161
. 161
. 161
. 161
. 162
. 162
. 162
. 162
. 162
. 162
. 163
. 163
. 164
. 165
. 167
. 167
. 167
. 167
. 167
. 168
. 168
. 168
. 168
. 169
. 171
. 171
. 171
. 171
. 171
. 173
. 173
. 173
. 173
. 173
. 173
. 173
. 174
. 174
. 174
. 174
. 175
. 175
. 176

Additional Paper Drawer Selection Entry (ADDDRWTBLE) Tag . . . . . 176
End Additional Paper Drawer Selection (EADDDRWTBL) Tag . . . . . 176
Customizing Paper Output . . . . . . . . . . . . . . . . . . . . 176
Output Bin Selection . . . . . . . . . . . . . . . . . . . . . 176
Output Bin Selection (OUTBINTBL) Tag . . . . . . . . . . . . . 177
Output Bin Selection Entry (OUTBINTBLE) Tag . . . . . . . . . . 177
End Output Bin Selection (EOUTBINTBL) Tag . . . . . . . . . . . 177
Jog Output Tray . . . . . . . . . . . . . . . . . . . . . . . 177
Jog Output Tray (JOGOUTTRAY) Tag . . . . . . . . . . . . . . 177
Duplex . . . . . . . . . . . . . . . . . . . . . . . . . . 178
Set Duplex Printing (DUPXPRT) Tag . . . . . . . . . . . . . . 178
Select Next Side Printing in Duplex (NXTDUPXPRT) Tag . . . . . . . 178
Set Tumble Duplex Printing (TUMDUPXPRT) Tag. . . . . . . . . . 178
Simplex . . . . . . . . . . . . . . . . . . . . . . . . . . 178
Set Simplex Printing (SMPXPRT) Tag . . . . . . . . . . . . . . 178
Customizing Print Orientation . . . . . . . . . . . . . . . . . . . 179
Print Angle (PRTANGLE) Tag . . . . . . . . . . . . . . . . . . 179
Paper Orientation (PRTORIENT) Tag . . . . . . . . . . . . . . . 179
Customizing Print Quality. . . . . . . . . . . . . . . . . . . . . 180
Print Quality (PRTQLTY) Tag . . . . . . . . . . . . . . . . . . 180
Customizing Fonts . . . . . . . . . . . . . . . . . . . . . . . 180
Font Groups . . . . . . . . . . . . . . . . . . . . . . . . 181
Font Group (FNTGRP) Tag . . . . . . . . . . . . . . . . . . 181
Font Group Entry (FNTGRPE) Tag . . . . . . . . . . . . . . . 181
End Font Group (EFNTGRP) Tag. . . . . . . . . . . . . . . . 182
Individual Fonts . . . . . . . . . . . . . . . . . . . . . . . 182
Individual Font (INDFNT) Tag . . . . . . . . . . . . . . . . . 182
Individual Font Entry (INDFNTE) Tag . . . . . . . . . . . . . . 182
End Individual Font (EINDFNT) Tag . . . . . . . . . . . . . . . 183
Font Mapping . . . . . . . . . . . . . . . . . . . . . . . . 183
Font Mapping (FNTMAPTBL) Tag . . . . . . . . . . . . . . . 184
Font Mapping Entry (FNTMAPE) Tag . . . . . . . . . . . . . . 184
End Font Mapping (EFNTMAPTBL) Tag . . . . . . . . . . . . . 184
Customizing Code Page Support . . . . . . . . . . . . . . . . . . 184
Customizing EBCDIC-to-ASCII Code Page Mapping . . . . . . . . . . 185
EBCDIC-to-ASCII Mapping Table (EBCASCTBL) Tag . . . . . . . . 186
EBCDIC-to-ASCII Mapping Table Entry (EBCASCTBLE) Tag. . . . . . 186
End EBCDIC-to-ASCII Mapping Table (EEBCASCTBL) Tag . . . . . . 187
Supporting Additional ASCII Code Pages . . . . . . . . . . . . . . 187
ASCII Code Page Information (ASCCPINFO) Tag . . . . . . . . . . 188
Code Page (CODEPAGE) Tag . . . . . . . . . . . . . . . . . 188
ASCII Control Code Mapping (ASCIICTL) Tag . . . . . . . . . . . 188
End ASCII Code Page Information (EASCCPINFO) Tag . . . . . . . 189
Overriding the Default ASCII Code Page (DFTASCCP) Tag . . . . . . . 189
Customizing Fax Support. . . . . . . . . . . . . . . . . . . . . 189
Fax Size . . . . . . . . . . . . . . . . . . . . . . . . . . 190
Fax Size for Transform (FAXSIZXFM) Tag . . . . . . . . . . . . 190
Fax Size Entry (FAXSIZE) Tag . . . . . . . . . . . . . . . . . 190
End Fax Size for Transform (EFAXSIZXFM) Tag . . . . . . . . . . 190
Customizing Double-Byte Character Set (DBCS) Support . . . . . . . . . 191
CCSID Mapping . . . . . . . . . . . . . . . . . . . . . . . 191
EBCDIC-to-ASCII CSSID mapping (EBCASCCSID) Tag . . . . . . . 191
EBCDIC-to-ASCII CSSID mapping entry (EBCASCCSIDE) Tag . . . . . 191
End EBCDIC-to-ASCII CSSID mapping table entry (EEBCASCCSID) Tag . 192
Shift In (SI) Tag . . . . . . . . . . . . . . . . . . . . . . . 192
Shift Out (SO) Tag . . . . . . . . . . . . . . . . . . . . . . 192
Part 3. Printer Customization Technical Reference

131

DBCS Space (DBSPACE) Tag . . . . . . . . . . . . .
Character Orientation (CHRORIENT) Tag . . . . . . . . .
Set Character Pitch (SCPITCH) Tag . . . . . . . . . . .
Set Line Pitch (SLPITCH) Tag . . . . . . . . . . . . .
Set Font Size Scaling (FONTSCALING) Tag. . . . . . . .
Set Font Size Scale (FONTSCALE) Tag . . . . . . . . .
CPI (Set Characters per Inch) . . . . . . . . . . . . .
Set Grid Type (GLTYPE) Tag . . . . . . . . . . . . .
Set Grid Line Width (GLWIDTH) Tag . . . . . . . . . .
Draw Grid Line (DRAWLINE) Tag. . . . . . . . . . . .
Printer Data Stream (PRTDTASTRM) Tag. . . . . . . . .
Creating the Workstation Customizing Object . . . . . . . .
Specifying the Workstation Customizing Object. . . . . . . .
Deleting the Workstation Customizing Object . . . . . . . .
Customizing a Hewlett-Packard LaserJet 4 Printer . . . . . .
Setting up the Hewlett-Packard LaserJet 4 Printer . . . . .
Step 1: Planning the Customizing. . . . . . . . . . . .
Step 2: Retrieving the Workstation Customizing Object Source .
Step 3: Changing the Source . . . . . . . . . . . . .
Step 4: Creating the Workstation Customizing Object . . . .
Step 5: Specifying the Workstation Customizing Object. . . .
Step 6: Varying On the Device . . . . . . . . . . . . .

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

Chapter 11. Customizing ASCII Printers That Use the Emulator on the
Display . . . . . . . . . . . . . . . . . . . . . . . . .
Supported ASCII Printers Attached to Twinaxial Displays . . . . . . . .
Customizing Unsupported ASCII Printers Attached to Twinaxial Displays . .
Printer Mapping Table for ASCII Printers Attached to Twinaxial Displays . .
ASCII Printer Definition Table . . . . . . . . . . . . . . . . .
Determining Which ASCII Printer Tables to Use . . . . . . . . . . .
Working with the Tag Language for ASCII Printers Attached to Twinaxial
Displays . . . . . . . . . . . . . . . . . . . . . . . . .
Using the Tags to Customize ASCII Printers Attached to Twinaxial Displays .
ASCII Printer Definition Table (PDFNTBL) Tag . . . . . . . . . . .
Printer Function Tags . . . . . . . . . . . . . . . . . . . .
Printer Function Tags for 3477 Model H, 3486, 3487, and 3488 Displays . .
Printer Function Tags with Variable and Relative Movement . . . . . .
Backspace (BSP) Tag . . . . . . . . . . . . . . . . . . . .
Bell (BELL) Tag . . . . . . . . . . . . . . . . . . . . . .
Start Bold Printing Function (STRBOLD) Tag . . . . . . . . . . .
End Bold Printing (ENDBOLD) Tag . . . . . . . . . . . . . . .
Carrier Return (CARRTN) Tag . . . . . . . . . . . . . . . . .
Set Characters per Inch (CPI) Tag . . . . . . . . . . . . . . .
Set Code Page (CODEPAGE) Tag . . . . . . . . . . . . . . .
Set Double Character Height (DBLCHRH) Tag . . . . . . . . . . .
Start Double-Wide Continuous (STRWIDE) Tag . . . . . . . . . .
End Double-Wide Continuous (ENDWIDE) Tag. . . . . . . . . . .
Drawer Selection (DWRSLT) Tag . . . . . . . . . . . . . . . .
Global Fonts for Printer Definition Table (FNTGPDT) Tag . . . . . . .
End Global Fonts for PDT (EFNTGPDT) Tag . . . . . . . . . . .
Global Font Range (FNTGRNG) Tag . . . . . . . . . . . . . .
Foreground Color (FOREGRND) Tag . . . . . . . . . . . . . .
Form feed (FORMFEED) Tag . . . . . . . . . . . . . . . . .
Initialize Printer (INITPRT) Tag . . . . . . . . . . . . . . . . .
Line Feed (LINEFEED) Tag . . . . . . . . . . . . . . . . . .
Set Lines per Inch (LPI) Tag . . . . . . . . . . . . . . . . .

132

OS/400 Workstation Customization Programming V4R3

. 192
. 192
. 193
. 194
. 195
. 196
. 196
. 197
. 197
. 198
. 199
. 200
. 200
. 200
. 201
. 201
. 201
. 202
. 202
. 203
. 203
. 204

. 205
. 205
. 206
. 206
. 207
. 207
. 207
. 208
. 208
. 209
. 209
. 209
. 211
. 211
. 211
. 211
. 212
. 212
. 212
. 213
. 213
. 213
. 213
. 214
. 214
. 214
. 215
. 215
. 215
. 215
. 216

Set Page Length in Lines (PAGLENL) Tag . . . . . . . . . . . . . 216
Paper Feed (PRTFEED) Tag . . . . . . . . . . . . . . . . . . 217
Paper Orientation (PRTORIENT) Tag . . . . . . . . . . . . . . . 217
Print Quality (PRTQLTY) Tag . . . . . . . . . . . . . . . . . . 218
Start Proportional Space (STRPROP) Tag . . . . . . . . . . . . . 218
End Proportional Space (ENDPROP) Tag. . . . . . . . . . . . . . 218
Quality Font Download (SETQLTY) Tag . . . . . . . . . . . . . . 219
Space (SPACE) Tag . . . . . . . . . . . . . . . . . . . . . 219
Set Standard Character Height (STDCHRH) Tag . . . . . . . . . . . 219
Start Subscript (STRSUBS) Tag . . . . . . . . . . . . . . . . . 219
End Subscript (ENDSUBS) Tag . . . . . . . . . . . . . . . . . 220
Start Superscript (STRSUPS) Tag . . . . . . . . . . . . . . . . 220
End Superscript (ENDSUPS) Tag. . . . . . . . . . . . . . . . . 220
Table Name (TBLNAME) Tag . . . . . . . . . . . . . . . . . . 220
Translation Printer Definition Table (TRNEBCDIC) Tag . . . . . . . . . 221
End Translation Printer Definition Table (ETRNEBCDIC) Tag . . . . . . . 221
Translation Entry (TRNEBCDICE) Tag . . . . . . . . . . . . . . . 221
Start Underscore (STRUS) Tag . . . . . . . . . . . . . . . . . 221
End Underscore (ENDUS) Tag . . . . . . . . . . . . . . . . . . 221
Set Vertical Units (VERUNT) Tag . . . . . . . . . . . . . . . . . 222
Additional Tags for Use with 3486, 3487, and 3488 Displays . . . . . . . . 222
Adjust Horizontal Origin (ADJHRZORG) Tag. . . . . . . . . . . . . 222
Adjust Vertical Origin (ADJVERORG) Tag. . . . . . . . . . . . . . 222
Set Characters per Inch (CPI) Tag . . . . . . . . . . . . . . . . 223
Set Characters per Inch in COR Mode (CPICOR) Tag . . . . . . . . . 223
Duplex Printing (DUPXPRT) Tag . . . . . . . . . . . . . . . . . 224
Half Line Feed (HLFLINEFEED) Tag . . . . . . . . . . . . . . . 224
Jog Output Tray (JOGOUTTRAY) Tag . . . . . . . . . . . . . . . 225
Select Next Side Printing in Duplex (NXTDUPXPRT) Tag . . . . . . . . 225
Paper Orientation (PRTORIENT) Tag . . . . . . . . . . . . . . . 225
Reverse Half Line Feed (RVSHLFLINEFEED) Tag . . . . . . . . . . 226
Reverse Line Feed (RVSLINEFEED) Tag . . . . . . . . . . . . . . 226
Set Simplex Printing (SMPXPRT) Tag . . . . . . . . . . . . . . . 226
Set Tumble Duplex Printing (TUMDUPXPRT) Tag. . . . . . . . . . . 226
Set Vertical Units in Half (VERUNTHLF) Tag . . . . . . . . . . . . 227
Customizing a Hewlett-Packard LaserJet Series IIP Printer Attached to a 3477
Twinaxial Display . . . . . . . . . . . . . . . . . . . . . . . 227
Setting up the 3477 Model H Display . . . . . . . . . . . . . . . 227
Step 1: Planning the Customizing. . . . . . . . . . . . . . . . . 228
Step 2: Retrieving the Workstation Customizing Object Source . . . . . . 231
Step 3: Changing the Source . . . . . . . . . . . . . . . . . . 232
Step 4: Creating the Workstation Customizing Object . . . . . . . . . 233
Step 5: Varying On the Device . . . . . . . . . . . . . . . . . . 234
Chapter 12. Customizing ASCII Printers That Use the Emulator on theController . . . . . . . . . . . . . . . . . . . . . . .
Supported ASCII Printers . . . . . . . . . . . . . . . . . . .
Customizing Unsupported ASCII Printers . . . . . . . . . . . . .
Mapping Tables for ASCII Printers . . . . . . . . . . . . . . .
Default EBCDIC-to-ASCII Mapping Table . . . . . . . . . . . .
ASCII Printer Function Table . . . . . . . . . . . . . . . .
Printer Multilanguage EBCDIC-to-ASCII Mapping Table. . . . . . .
Determining Which ASCII Printer Tables to Use . . . . . . . . . .
Working with the Tag Language for Directly Attached ASCII Printers . . .
Using the Tags to Customize ASCII Printers . . . . . . . . . . . .
Default EBCDIC-to-ASCII Mapping Table (PDFTMAPTBL) Tag . . . .

.
.
.
.
.
.
.
.
.
.
.

. 237
. 237
. 237
. 239
. 239
. 241
. 241
. 243
. 244
. 246
. 246

Part 3. Printer Customization Technical Reference

133End Default EBCDIC-to-ASCII Mapping Table (EPDFTMAPTBL) Tag. . . . 246
EBCDIC-to-ASCII Mapping Table (PDFTEBCTBL) Tag . . . . . . . . . 246
Font Width Mapping Table (PFNTWTH) Tag . . . . . . . . . . . . . 247
ASCII Printer Function Table (PFCNTBL) Tag . . . . . . . . . . . . 247
Multilanguage EBCDIC-to-ASCII Mapping Table (PMLGMAPTBL) Tag . . . 247
End Multilanguage EBCDIC-to-ASCII Mapping Table (EPMLGMAPTBL) Tag . 248
EBCDIC-to-ASCII Mapping Table (PMLGEBCTBL) Tag . . . . . . . . . 248
Printer Function Tags . . . . . . . . . . . . . . . . . . . . . 250
Syntax for Printer Function Tags with the Data Parameter Only . . . . . 250
Syntax for Printer Function Tags with a Variable . . . . . . . . . . . 251
Syntax for Printer Function Tags with Variable and Relative Movement . . . 253
ASCII Control Code Mapping (ASCIICTL) Tag . . . . . . . . . . . . 254
Collate Width (COLLATE) Tag . . . . . . . . . . . . . . . . . . 255
Set Characters per Inch (CPI) Tag . . . . . . . . . . . . . . . . 255
Default Font ID (DFTFNTID) Tag . . . . . . . . . . . . . . . . . 256
Drawer Selection (DWRSLT) Tag . . . . . . . . . . . . . . . . . 256
Font ID Mapping (FNTMAP) Tag . . . . . . . . . . . . . . . . . 257
End Font ID Mapping (EFNTMAP) Tag . . . . . . . . . . . . . . . 258
Font Mapping Table Entry (FNTMAPE) Tag . . . . . . . . . . . . . 258
Font Quality (FONTQLTY) Tag . . . . . . . . . . . . . . . . . . 258
Set Margin (MARGIN) Tag . . . . . . . . . . . . . . . . . . . 259
Set Page Length in Lines (PAGLENL) Tag . . . . . . . . . . . . . 259
Page Size for Printer Function Table (PAGSIZPFT) Tag . . . . . . . . 260
Paper Feed (PRTFEED) Tag . . . . . . . . . . . . . . . . . . 261
Paper Orientation (PRTORIENT) Tag . . . . . . . . . . . . . . . 261
Print Quality (PRTQLTY) Tag . . . . . . . . . . . . . . . . . . 262
Tag Considerations for Customizing a Directly Attached ASCII Printer . . . . 262
Using the Superscript and Subscript Tags. . . . . . . . . . . . . . 262
Using the Set Page Length Tag . . . . . . . . . . . . . . . . . 263
Using the Font Selection Tags . . . . . . . . . . . . . . . . . . 264
Customizing a Hewlett-Packard LaserJet Series III Printer that Uses theEmulator on the Workstation Controller . . . . . . . . . . . . . . . 266
Step 1: Planning the Customizing. . . . . . . . . . . . . . . . . 267
Step 2: Retrieving the Workstation Customizing Source . . . . . . . . 276
Step 3: Changing the Source . . . . . . . . . . . . . . . . . . 277
Step 4: Creating the Workstation Customizing Object . . . . . . . . . 304
Step 5: Varying On the Device . . . . . . . . . . . . . . . . . . 304

134

OS/400 Workstation Customization Programming V4R3

Chapter 9. Customizing Printers
This chapter provides a brief overview of the workstation customizing functions forprinters. It describes different methods you can use to customize the functions of
ASCII printers. A description of the differences between the methods should help
you choose the most appropriate method for customizing the functions of yourASCII printers.

Determining Whether an ASCII Printer Can Be Customized
To determine whether your ASCII printer should be customized, vary on the printerand print a small document or file. (Do not forget to start the printer writer andrelease the print job.) If your printout shows unusual characters or is missing
highlighting or characters, you will probably want to customize the printer functions.
By using a process of experimentation and trial and error, you can determine
whether or not an ASCII printer can be customized. Experiment with the printer after
it has been connected and varied on. Use the information in this chapter todetermine the method you should use to retrieve and customize the workstation
customizing source for your ASCII printer. Workstation customizing functions
support only the characters and functions that the device and the workstation
controller, the display, or the host print transform function supports.

Understanding ASCII Printer Function Support
ASCII printers process data using an ASCII data stream. The AS/400 systemproduces an EBCDIC data stream. Therefore, the EBCDIC data stream from thesystem must be converted to an ASCII data stream to support ASCII printerfunctions.
Mapping tables are used to convert EBCDIC data streams into ASCII data streams.
AS/400 EBCDIC data streams are converted into ASCII data streams for a printer.
The way you choose to convert the EBCDIC data stream into an ASCII data stream
determines which printer customization method you use. The various conversion
methods are described as follows.
1. You can use the host print transform function on the AS/400 system to convert
the EBCDIC data stream to an ASCII data stream for ASCII printers attached in
the following ways:
v ASCII printers attached to twinaxial displays
v ASCII printers attached to a personal computer or Personal System/2 through5250 emulation products (such as Client Access/400)v ASCII printers directly attached to the AS/400 system through a serialinterface
See Figure 39 on page 136 for an illustration of how ASCII printers that use thehost print transform function can be attached to the AS/400 system.

© Copyright IBM Corp. 1998135┌────────┐││┌──────────────────┐│││ 3477(H)│┌───────┐│││ 3486││ASCII ││├───────────────┤ 3487 Work Station│──────────────┤Printer│││ Twinaxial│ 3488│ Printer Cable││││└──────────────────┘ (parallel) └───────┘││││┌────────┐┌───────┐│││Personal││ASCII ││├────────────────────────┤Computer├───────────────┤Printer│││ Twinaxial│or PS/2*│ Printer Cable ││││└────────┘└───────┘│││ AS/400 │....................
┌────────┐┌───────┐│ System │ Communications.
│Personal││ASCII │││ Line....... │Computer│──────────────┤Printer││││or PS/2 │ Printer Cable││││└────────┘└───────┘││││┌─────┐┌─────────┐┌───────┐│││Token││ Personal││ASCII ││├───────┤ Ring├─────────┤ Computer├───────────────┤Printer││││││ or PS/2 │ Printer Cable││││└─────┘└─────────┘└───────┘│ ┌────┤│ ││┌─────────┐┌───────┐│ │ A │
│Personal ││ASCII ││ │ S ├──────────────────────┤Computer ├────────────────┤Printer││ │ C │ Asynchronous│or PS/2 │Printer Cable│││ │ I │ Attachment└─────────┘└───────┘│ │ I ││ ││┌───────┐┌───────┐│ │││ASCII ││ASCII ││ │├──────────────────────────┤ Work ├──────────────┤Printer││ │ W │ Serial Interface│Station│ Serial Cable │││ │ S │
└───────┘└───────┘│ │ C ││ ││┌───────┐│ │││ASCII ││ │├──────────────────────────│Printer││ ││ Serial Interface└───────┘└───┴────┘Figure 39. ASCII Printers That Use the Host Print Transform Function. This figure indicates
the ways an ASCII printer that uses the host print transform function can be attached to the
AS/400 system and can be customized. In this figure, WSC is an abbreviation for workstation
controller.

When the host print transform function converts the data stream, the same
ASCII data stream is always sent to a specific type of printer. The ASCII data
stream sent to the printer does not depend on how the printer is attached to the
AS/400 system.
The method of customizing printers that use the host print transform function
provides more function, for more printer types, than other methods ofcustomizing printers.
2. You can use an emulator on the display to convert the EBCDIC data stream to
an ASCII data stream for printers attached to twinaxial displays. This conversion
method may send a different ASCII data stream to a printer, depending on thetype of display to which the printer is attached.

136

OS/400 Workstation Customization Programming V4R3

Figure 40 illustrates how ASCII printers that use the emulator on the display
can be attached to the AS/400 system.
┌────────┐││┌────────────┐│││3477(H)│┌─────────┐│ AS/400 ││3486││ ASCII││ System ├──────────┤3487 Work├───────────────┤ Printer ││ ┌────┤ Twinaxial│
Station│ Printer Cable │││ │ A ││3488
│ (parallel)└─────────┘│ │ S │
└────────────┘│ │ C │
│ │ I │
│ │ I │
│ │││ │ W ││ │ S ││ │ C │
└───┴────┘Figure 40. ASCII Printers That Use the Emulator on the Display. This figure indicates the way
an ASCII printer that uses the emulator on the display can be attached to the AS/400 systemand can be customized. In this figure, WSC is an abbreviation for workstation controller.

This conversion method maps to customizing printer functions for printers that
use the emulator on the display. This customization method provides lessfunction and consistency, for fewer printer types, than customizing printers thatuse host print transform function. The amount of printer function you can
support with this method is determined by the type of display to which theprinter is attached.
3. You can use an emulator on the workstation controller to convert the EBCDIC
data stream to an ASCII data stream for directly attached printers. When an
emulator on the local workstation controller converts the data stream, the samedata stream is sent to a specific type of ASCII printer. It makes no difference
which workstation controller attaches the printer to the AS/400 system. For
example, the IBM 2637 ASCII Local Workstation Controller and IBM 6141 ASCII
Local Workstation Controller send the same data stream to IBM 4019
LaserPrinters.
Figure 41 on page 138 illustrates how ASCII printers that use the emulator on
the workstation controller can be attached to the AS/400 system.

Chapter 9. Customizing Printers137┌────────┐│ AS/400 ││ System ││││ ┌────┤│ │ A │
┌───────┐┌───────┐│ │ S ││ASCII ││ASCII ││ │ C ├──────────────────────────┤ Work ├──────────────┤Printer││ │ I │ Serial Interface│Station│ Serial Cable │││ │ I │
└───────┘└───────┘│ │││ │ W │
┌───────┐│ │ S ││ASCII ││ │ C ├──────────────────────────│Printer││ ││ Serial Interface└───────┘└───┴────┘Figure 41. ASCII Printers That Use the Emulator on the Workstation Controller. This figure
indicates the ways an ASCII printer that uses the emulator on the workstation controller canbe attached to the AS/400 system and can be customized.

In this figure, WSC is an abbreviation for workstation controller.
This conversion method maps to customizing printer function for printers that
use the emulator on the workstation controller. This method of customization
provides less function, for fewer printer types, than customizing printers that use
the host print transform function. Customizing printers that use the emulator on
the workstation controller provides as much consistency, however, as
customizing printers that use host print transform function.

Choosing a Method for Customizing Printer Functions
The OS/400 workstation customizing functions allow you to customize the mappingtables used to define the functions supported by the ASCII printer. You cancustomize ASCII printers supported by IBM and ASCII printers that are notsupported by IBM.
To customize printer functions, retrieve the source for the mapping tables thatdefine printer functions. Then add to or change the source to customize printerfunctions for your printer. The content of the source you retrieve is determined by
the type of printer customized and the method of customizing printer functions you
use. You must choose the method of customizing printer functions that most closely
matches your customization needs.
The way you choose to convert the EBCDIC data stream to an ASCII data stream
determines which of the printer function customization methods you use.
v For ASCII printers that use the host print transform function, you customize theprinter by changing the source containing the transform table. The printer can be
attached to the AS/400 system in any of the ways shown in Figure 39 on
page 136 .
v For ASCII printers that use the emulator on the display, you customize the printerby changing the source containing the printer definition table. The printer must be
attached to a 3477 Model H, 3486, 3487, or 3488 twinaxial display station.
v For ASCII printers that use the emulator on the workstation controller, you
customize the printer by changing the source containing:– The default printer EBCDIC-to-ASCII mapping table

138

OS/400 Workstation Customization Programming V4R3

– The printer function table– The printer multilanguage EBCDIC-to-ASCII mapping table
The printer must be attached directly to the AS/400 system by way of a local
ASCII workstation controller or attached to an ASCII display station.

Printers that Use Host Print Transform Function
The printer data stream sent to the host print transform for ASCII printers attachedto the AS/400 system is a data stream supported by twinaxial printers. A mappingtable converts the twinaxial printer data stream into ASCII printer commands. The
ASCII printer commands perform the same (or nearly the same) functions as thosespecified in the twinaxial printer data stream. It also converts character data
specified in the application data stream as EBCDIC character code values into
ASCII code values corresponding to those same characters.
To customize an ASCII printer that uses the host print transform function, you
retrieve the source for the mapping table that defines printer functions. You need toknow the printer manufacturer, type, and model to successfully retrieve the correct
workstation customizing source for your printer.
The OS/400 workstation customizing functions provide source you can use whencustomizing printer functions for many printers sold by the following companies:
Epson America Incorporated
Hewlett-Packard Company
IBM Corporation
NEC Corporation
Okidata Corporation
Panasonic Corporation
Note: Customizing printer functions for ASCII printers that use the host print
transform function is described in detail in Chapter 10. Customizing ASCII
Printers That Use the Host Print Transform Function.

The Mapping Table (Transform Table)
The host print transform function uses a specific mapping table (the transform table)
to transform the printer data stream sent by the AS/400 system to a specific type of
ASCII printer. Tags and commands that are part of the tag language for workstation
customizing allow you to add the print characteristics that are not included in thesystem-provided transform table for the printer.

Customizing the Mapping Table
To begin customizing an ASCII printer, you must retrieve the source file memberthat contains the workstation customizing source for the characteristics of yourprinter. When retrieving the source, you specify the manufacturer, type, and modelof your ASCII printer.
The source you retrieve contains tags only for the specified printer. You add orcustomize tags to change the functions supported by the specified printer. To
remove a function for the specified printer, remove tags from the source. Exceptions

Chapter 9. Customizing Printers

139are the EBCDIC-to-ASCII code page table and the font width values. These
functions are read from default, system-provided mapping tables, even if you
remove the tags from your source.

Advantages of Using the Host Print Transform Function
Choosing to customize an ASCII printer that uses the host print transform function
has advantages. The host print transform function provides:v Support for more ASCII printers than are supported by a particular device
emulator.
v Support for more printer functions than are supported by a specific device
emulator.
v Consistent function across all connection methods.

Limitations of Using the Emulator on the AS/400 System
When you consider customizing an ASCII printer, keep in mind the following
limitation of the workstation customizing functions. Host print transform function
cannot be used with double-byte character set (DBCS) printers, such as device
types 5553 and 5583.

Printers that Use the Emulator on the Display
Printers that use the emulator on the display can be customized only if the twinaxial
display is a 3477 Model H, 3486, 3487, or 3488. Applications send printer data
streams to these twinaxial displays through workstation controllers. The printer data
stream sent for ASCII printers attached to these displays is a data stream supported
by twinaxial printers.
The twinaxial display uses one mapping table (the printer definition table) to convert
the twinaxial printer data stream into ASCII printer commands. The ASCII printercommands perform the same (or nearly the same) functions as those specified in
the twinaxial printer data stream. It also converts character data specified in theapplication data stream as EBCDIC character code values into ASCII code values
corresponding to those same characters. Many IBM ASCII printers are currently
supported by the twinaxial displays.
Note: Customizing printer function for ASCII printers that use the emulator on thedisplay is described in detail in Chapter 11. Customizing ASCII Printers That
Use the Emulator on the Display.

The Mapping Table (Printer Definition Table)
When you customize a printer definition table, it is downloaded from the workstation
controller to the twinaxial display. It is then stored in the memory of the twinaxial
display. When you set up the display, you specify a character set for the display.
You also indicate that a specific type of ASCII printer is attached to the display.
When you vary on the display and printer, the character set and the printerdefinition table are used. They are used to convert the twinaxial printer data stream
sent by an application to the ASCII characters and the ASCII function codes usedby the printer.
The display station uses the printer definition table to convert the twinaxial printerdata stream to an ASCII data stream for the printer. This table contains information

140

OS/400 Workstation Customization Programming V4R3

on the functional capabilities of the printer. It also contains information on thecommand sequences that must be sent to the printer to perform specific printfunctions.
The printer definition table used by the twinaxial display for a particular printerdepends on the type of printer and the setup in the display. The twinaxial displaysthat support the connection of an ASCII printer support only a subset of theavailable print functions. This is a limitation of the display.

Customizing the Mapping TableThe system provides you with a printer definition table for the device type you
specify. It is this table that provides the source for an ASCII printer attached to a
twinaxial display. Tags and commands that are part of the tag language forworkstation customizing allow you to add the print characteristics that are notincluded in the system-provided printer definition table.
The primary tags for the workstation customizing source for an ASCII printerattached to a twinaxial display are the TKBDTBL (keyboard translation table) tag,and the PDFNTBL (ASCII printer definition table) tag. These tags denote thebeginning of specific groups of tags that may occur in any order following the
primary tags. Because the order and placement of the primary tags in each source
file member are strictly enforced by the workstation customizing object compiler, thetag groups must remain intact. You add or customize tags to change the functions
supported by the specified printer. You must set the ASCII data value to null('0000'X) for a tag to remove a function for the specified printer.
If you remove a tag from the source, a value for the tag is read fromsystem-provided tables when the device is varied on. Therefore, if you want tocustomize only printer functions, you can delete all tags for keyboard functions fromyour customized object.

Advantages of Using the Emulator on the Display
Choosing to customize an ASCII printer that uses the emulator on the display
allows you to continue to use existing customizing source for printers. You may
want to continue using existing customizing source instead of creating newcustomizing objects for the host print transform function.

Limitations of Using the Emulator on the Display
When you consider customizing an ASCII printer attached to a twinaxial display,keep in mind the following limitations of the workstation customizing functions.
v If you want to customize an ASCII printer attached to a 3477 display, the 3477
must be a Model H. If it is not a Model H, the 3477 display must be upgraded toa Model H. The workstation customizing functions do not support the earlier
models of this display. To determine whether or not your 3477 is a Model H, see“Setting Up a 3477 Twinaxial Display” on page 371.
v Depending on the device type and the print characteristics you need tocustomize, a lot of trial and error is involved in the customizing process. It could
take anywhere from a few hours to a few days to perform a complete
customization. The amount of time depends on the complexity of the printer(laser or line-oriented) and on the number of changes you need to make.
v The system-provided source for the printer definition table is for a line-oriented
printer. If you are customizing to use a laser printer, you will need to make manychanges to the retrieved source.
Chapter 9. Customizing Printers

141

Printers that Use the Emulator on the Workstation Controller
The ASCII workstation controller supports ASCII printers as emulated twinaxial
printers. The printer data stream sent to the workstation controller by an application
is a data stream supported by twinaxial printers. Using twinaxial printer emulation,
the ASCII workstation controller converts the twinaxial printer data stream into ASCII
printer commands. The ASCII printer commands perform the same (or nearly thesame) functions as those specified in the twinaxial printer data stream. The
workstation controller also maps character data specified in the application data
stream as EBCDIC code values into their corresponding ASCII code values.
When you retrieve source to customize an ASCII printer that uses the emulator on
the workstation controller, you retrieve customization source for the specified printer.
To successfully retrieve the correct workstation customizing source for your printer,you must know the printer device type and the keyboard language type. The
OS/400 workstation customizing functions provide mapping tables you can use assource for many IBM ASCII printers.
Note: Customizing printer function for ASCII printers that use the emulator on theworkstation controller is described in detail in Chapter 12. Customizing ASCII
Printers That Use the Emulator on the Controller.

The Mapping Tables (Default EBCDIC-to-ASCII, Function, andMultilanguage EBCDIC-to-ASCII)The ASCII workstation controller uses these tables to map commands and data to
an ASCII format for a specified printer:
1. Default printer EBCDIC-to-ASCII mapping table. The default EBCDIC-to-ASCII
mapping table converts an EBCDIC character specified in an application data
stream into a single ASCII character code value (for that same character).
2. Printer function table. The ASCII printer function table contains information usedin the process of converting the twinaxial printer data stream into an ASCII data
stream. This table provides the ASCII workstation controller with information on
the functional capabilities of the printer. It also provides information on thecommand sequences that must be sent to the printer for particular printfunctions.
Generally, each unique type of ASCII printer is supported by a unique printerfunction table. For a given type of printer, the same printer function table is usedregardless of the language configured for the printer.
3. Printer multilanguage EBCDIC-to-ASCII mapping table. The multilanguage
EBCDIC-to-ASCII mapping table contains EBCDIC-to-ASCII mapping
information for all the EBCDIC code pages that an application sending data to
an ASCII printer can select. The workstation controller uses information in thistable (rather than information in the default EBCDIC-to-ASCII table) when thedata stream sent to the printer contains a command to use a different code
page.
These tables are downloaded to the workstation controller when the printer is varied
on. The workstation controller downloads a particular multilanguage
EBCDIC-to-ASCII mapping table when a printer is varied on, only if the same table
has not previously been downloaded for another printer.

142

OS/400 Workstation Customization Programming V4R3

Customizing the Mapping Tables
When you retrieve source to customize a printer that uses the emulator on theworkstation controller, you must do the following:v Specify an ASCII printer for the device type.
v Specify the same language type as you did when you created the device
description.
The source you retrieve contains three mapping tables for the specified printer. The
three particular tables you see depend on the type of printer and the language
configured for the printer.
After you retrieve the workstation customizing source, determine which of the
mapping tables in the source you need to change. Verify that the printer is capableof printing the characters you need and performing any special functions you wantto add. Then print a file from the application that is to use this printer for its output.
For example, if your organization uses the OfficeVision/400 program word
processing function, you can print a single-page document. You should print the
document from the printer you intend to use with the application. The document
should include some of the formatting characteristics you want to add or change.
Printing a document from the application allows you to determine which charactersand functions are not usable from that application data stream. You can change thecharacters and the formatting characteristics that do not print correctly.
Use the reference manual for the printer and the tags in your retrieved source tochange the existing printer mapping tables. By changing the existing printermapping tables, you can add any new, supported print functions you need.

Advantages of Using the Emulator on the Workstation Controller
Choosing to customize an ASCII printer that uses the emulator on the workstation
controller allows you to continue to use existing customizing source for printers. You
may want to continue using existing customizing source instead of creating newcustomizing objects for the host print transform function.

Limitations of Using the Emulator on the Workstation Controller
When considering the customizing of a directly attached ASCII printer, keep in mind
the following limitations of the OS/400 workstation customizing functions:v Depending on the device type and the print characteristics you need tocustomize, a lot of trial and error is involved in the customizing process. It could
take anywhere from a few hours to a few days to perform a complete
customization. The amount of time you spend depends on whether or not theprinter is a currently supported device. The amount of time also depends on thenumber of changes and additions you need to make.
v The workstation controller has limited storage for storing the mapping tables used
for any device type. Many of the tags you can use to customize an ASCII printerrequire an ASCII control sequence (hexadecimal value) for a parameter value.
The maximum acceptable length of the hexadecimal value is 240 bytes. The
maximum length allowed for a complete printer function table is 3584 bytes offunctional data. Use a combination of the printer reference manual and trial anderror to keep the ASCII control sequences to a reasonable length.

Chapter 9. Customizing Printers

143

v You must specify the same language type for the Retrieve Work Station
Customizing Object Source (RTVWSCST) command as you specified in theprinter device description. Otherwise, the device cannot be varied on.

144

OS/400 Workstation Customization Programming V4R3

Chapter 10. Customizing ASCII Printers That Use the Host
Print Transform Function
This chapter describes how you can use the workstation customizing functions tocustomize the functions of ASCII printers that use the host print transform function.
Using the workstation customizing functions you can:v Customize the functional characteristics of a supported ASCII printerv Customize the functional characteristics and specify all necessary parameters
required to support a normally unsupported ASCII printerUse the following steps to customize the functional characteristics of an ASCII
printer:
1. Prepare for the customization.
2. Retrieve the workstation customization source.
3. Change the workstation customization source.
4. Create a customizing object that contains the changed printer attributes.
5. Change the printer device description to specify the customizing object.
Note: Refer to “Appendix B. Source Code Examples” on page 311 for examples
that will help you understand and work with the values for the tags that aredescribed in this chapter.

Preparing to Customize an ASCII PrinterYou must gather source materials, complete printer set-up, and plan adequate timein your schedule to customize an ASCII printer.

Gathering Source Materials
Before you can begin customizing an ASCII printer, you must have information on
the functions the ASCII printer supports. (You can only add or change printing
functions that a printer supports.) You also need the hexadecimal values for thesefunctions. The hexadecimal code information for your device is critical to theworkstation customizing process. Often, the reference manual for the printerprovides this information.

Completing Printer Setup
Before you begin printer customization, complete the following steps to set up bothsupported and unsupported printers:v Set up all the necessary hardware to connect the printer to the AS/400 system.
v Set up any programmable features that are provided by the printer.
This may involve some internal programming on the printer itself, setting device
independent programming (DIP) switches, or selecting a printer to emulate. If you
are using a non-IBM printer, check the reference manual to see if it emulates any
IBM printers. If it does, set the emulation for the IBM printer. This may simplify
the customizing process.
v Create the necessary controller and device descriptions, if they do not alreadyexist. Some device descriptions for printers can be automatically created using
automatic configuration.
© Copyright IBM Corp. 1998

145

After setting up and turning on the ASCII printer, use one of your usual applications
to print a short test document. This is the starting point for workstation customizing.

Planning the Customization Schedule
Customizing an ASCII printer may involve a trial-and-error process. The amount ofwork that is required to customize a printer depends on:
The type of printerWhether or not the printer is already printing
The completeness of the manual for the printer
You should plan anywhere from 1 to 5 days to complete a successful ASCII printercustomization.

Customizing Unsupported ASCII Printers
To customize an unsupported ASCII printer, ask the following questions:v Can the printer emulate a supported ASCII printer?
If so, set it up to use the emulation. It could make your customizing easier.
v What printer functions and national characters do I want this printer to support?
Write these down so that you can answer the next question.
v Does the printer itself support the functions I need?
Check the manual to determine this. If the printer cannot support the functions
you need, you cannot customize the printer to provide these functions.

Retrieving the Workstation Customizing Source
To begin customizing an ASCII printer that uses the host print transform function,
you must retrieve the source file member that contains the workstation customizing
source. You can then change your printer’s characteristics. When retrieving thesource, specify the manufacturer, type, and model of the ASCII printer you want tocustomize. The source you retrieve is a copy of the transform table for the printermanufacturer, type, and model you specify.

Understanding the Transform Table
The host print transform function uses a transform table to transform the printerdata stream that is sent by the AS/400 system to an attached ASCII printer. Someof the functional characteristics within the transform table include:
Line spacing
Pitch (characters per inch)
Page size
Highlighting characteristics (bold, underline)
Draft, letter, or text quality printing
Subscripting and superscripting
Initialization and reset sequences146

OS/400 Workstation Customization Programming V4R3

Choosing the Customizing Source
When you decide to customize an ASCII printer, you need to retrieve the correctsource for your printer. Use the Retrieve Work Station Customizing Object Source(RTVWSCST) command to retrieve the source.
1. Type RTVWSCST and press the Enter key.
2. Specify a device type of *TRANSFORM and press the Enter key.
3. Specify the printer manufacturer, type, and model (MFRTYPMDL parameter). To
see a complete list of ASCII printers supported, press F4 (Prompt) on the
Manufacturer type and model field.
Note: If you are customizing a laser printer that is not listed, you may want toselect the *HPII value. Many laser printers have printer functions similar
to those provided by the Hewlett-Packard LaserJet Series II.
4. Specify a name for the source file member to be created for the transform table
you want to retrieve. This should be a name you can easily remember.
5. Specify a library and source file name in which to store the source file member
you specified in the previous step. The library you specify must exist.
6. Specify a text description for the source file member if it does not already haveone. This description should be unique.
The system provides you with a transform table for a specific ASCII printer.

Changing the Source
You use printer function tags to change the ASCII control sequence for an individual
printer function. You change, add, or delete the printer function tags by editing thesource file member for the retrieved source using the source entry utility (SEU). See“Using Source Entry Utility to Change the Tags and Keywords” on page 19 forcomplete instructions on using SEU to change the source file member.
The source file member has the following format::WSCST DEVCLASS=TRANSFORM.
:TRNSFRMTBL.
.
.
tag or comment.
.
:EWSCST.

Note: A period must follow the last data element within a tag entry.

Transform Table (TRNSFRMTBL) Tag
The TRNSFRMTBL (transform table) tag defines a transform table for an ASCII
printer that uses the host print transform function. The syntax for this tag is::TRNSFRMTBL.

There are no parameters that are associated with this tag. The tag is immediately
followed by a number of separate printer function tags that make up the table
entries. See “Using the Tags” on page 148 for more information about the individual
printer function tags.

Chapter 10. Customizing ASCII Printers That Use the Host Print Transform Function

147

Using the Tags
Following are descriptions of the valid printer functions and corresponding tags for adevice class of TRANSFORM. These tags must follow the transform table tag(TRNSFRMTBL) in your source.
The syntax for each tag is shown and is followed by the tag description. Some tags
have only a data parameter. Other tags have more than one parameter to describe
variables within the functions.
Note: A period must follow the last data element within a tag entry.
The printer function tags are divided into the following general tasks forcustomizing:
Printer information
Printer controls
Print media size
Highlighting
Horizontal movement

|
|

|
|

Vertical movement|

Indexing
Color
Paper input
Paper output
Print orientation|

Print quality
Fonts
Code page support
Fax support
Double-byte character set (DBCS) support|

Note: Refer to “Customizing Double-Byte Character Set (DBCS) Support” onpage 191 for information about DBCS support.

||

Programming Considerations
In general, when you customize a transform table, the host print transform functionuses only tags that are defined in your customizing object. You can delete function
tags from the retrieved source when creating your customizing object. The hostprint transform function then assumes a null value for the ASCII control sequence
for that function.
The absence of a specific printer function tag after the TRNSFRMTBL tag implies
that particular printer function is not mapped and cannot be used. If the same
printer function tag occurs multiple times following a TRNSFRMTBL tag, warning
messages are not sent to the job log. The customizing object uses the last
occurrence of the tag in the source to map the printer function.
Programming considerations for specific tags, or specific tag sets, are included in
the description of those tags.

|

148

OS/400 Workstation Customization Programming V4R3

||

Customizing Printer Information||

Customizing printer information allows you to control how the host print transform
processes AS/400 print jobs.

|

You can customize the following printer information:
Printer data stream
Raster mode

|
|
|
|
|

No-print borders
Drawer page size

Printer Data Stream (PRTDTASTRM) Tag||

The PRTDTASTRM (printer data stream) tag identifies the printer data stream orraster image format generated by the host print transform. The syntax for this tag is:

|
|
|
|
|
|
|

:PRTDTASTRMDATASTREAM = NULL|IBMPPDS1|IBM3812|HPPCL4|
IBMPPDS2|EPSON|NEC|IBMGRAPHICS|HPPCL5|HPPCL4I|HPPCL5I|IBMPPDS3|IBMPPDS3I|IBMPDS4|IBMPPDS4I|
TIFF_PB|TIFF_G4|IOCA_G3MH|IOCA_G3MRK2|
IOCA_G3MRK4|IOCA_IBMMMR|IOCA_NOCOMP.

|||DATASTREAM
A required parameter. The DATASTREAM tag specifies the type of printer data
stream supported. Values are:

||
|

Value

Description

Raster Mode
Supported

|

EPSON

The Epson printer data stream is supported.

No

|
|

HPPCL4

The Hewlett-Packard PCL4 printer data stream is
supported.

Yes

|
|
|
|
|

HPPCL4I ₁

The Hewlett-Packard PCL4 printer data stream is
supported in raster mode. This value means the sameto the SCS-to-ASCII transform as HPPCL4. For the
AFP-to-ASCII transform, this value causes it to go intoraster mode for a PCL4 printer.

Yes

|
|

HPPCL5

The Hewlett-Packard PCL5 printer data stream is
supported.

Yes

|
|
|
|
|

HPPCL5I ₁

The Hewlett-Packard PCL5 printer data stream is
supported in raster mode. This value means the sameto the SCS-to-ASCII transform as HPPCL5. For the
AFP-to-ASCII transform, this value causes it to go intoraster mode for a PCL5 printer.

Yes|

IBMGRAPHICS The IBM graphics printer data stream is supported.

|

IBMPPDS1

The IBM page printer data stream level 1 is supported. No|

IBMPPDS2

The IBM page printer data stream level 2 is supported. No

|
|
|
|

IBMPPDS3

The IBM personal printer data stream level 3 is
supported. This is used for the IBM 4019 printer.
Supported functions over level 2 are rotation andimage.

No

Yes

Chapter 10. Customizing ASCII Printers That Use the Host Print Transform Function

149

|
|

Value

Description

Raster Mode
Supported

|
|
|
|
|
|

IBMPPDS3I₁

The IBM personal printer data stream level 3 is
supported in raster mode. This value means the sameto the SCS-to-ASCII transform as IBMPPDS3. For the
AFP-to-ASCII transform, this value causes the printerdata stream to go into raster mode for a PDS level 3(4019) printer.

Yes

|
|
|
|

IBMPPDS4

The IBM personal printer data stream level 4 is
supported. This is used for the IBM 4029 printer.
Supported functions over level 3 are multiple rotations
on a page and compressed image.

Yes

|
|
|
|
|
|

IBMPPDS4I₁

The IBM personal printer data stream level 4 is
supported in raster mode. This value means the sameto the SCS-to-ASCII transform as IBMPPDS4. For the
AFP-to-ASCII transform, this value causes the printerdata stream to go into raster mode for a PPDS level 3(4029) printer.

Yes|

IBM3812The IBM 3812 printer data stream is supported.

No

|
|

IOCA_G3MH

IBM IOCA raster image format with G3 modified
Huffman compression.

Yes

|
|

IOCA_G3MRK2 IBM IOCA raster image format with G3 modified read
K=2 compression.

Yes

|
|

IOCA_G3MRK4 IBM IOCA raster image format with G3 modified read
K=4 compression.

Yes

|
|

IOCA_IBMMMR IBM IOCA raster image format with IBM modified
modified read compression.

Yes|

IOCA_NOCOMP IBM IOCA raster image format with no compression.

Yes

|

NEC

The NEC printer data stream is supported.

No

|

NULL

The printer data stream supported is not known.

No|

TIFF_G4

Tagged Image File Format with G4 compression.

Yes

|
|

TIFF_PB

Tagged Image File Format with packed bitcompression.

Yes|

Notes:|

1. These types are valid, but it is recommended that you should use the raster mode tag.

||

Raster Mode (RASTERMODE) Tag

|
|
|
|

The host print transform supports two output modes mapping mode and rastermode. In mapping mode, AS/400 printer commands and data are converted tosimilar ASCII printer commands and data. In raster mode, a raster image of the
AS/400 print job is created.

|
|
|
|

The default mode is mapping mode. The RASTERMODE (raster mode) tag allows
you to specify that the host print transform should generate raster image output.
The PRTDTASTRM (printer data stream) tag determines the format of the raster
image output.

150

OS/400 Workstation Customization Programming V4R3

||

Note: All data streams values do not support raster mode. Refer to “Printer Data
Stream (PRTDTASTRM) Tag” on page 149.

||

The RASTERMODE tag enables raster mode that is based on the AS/400 print job
type. The syntax is:|||:RASTERMODESCS = YES | NO
AFP = YES | NO.

|
|
|
|

SCS
This is a required parameter. SCS determines if the host print transformconverts the SCS print data stream to the raster mode image format that is
specified in the printer data stream tag.

|
|
|
|

AFP
This is a required parameter. AFP determines if the host print transformconverts the AFP print data stream to the raster mode image format that is
specified in the printer data stream tag.

|No-print Border (NOPRTBDR) Tag

|
|
|
|

The NOPRTBDR (no-print border) tag allows you to define the physical area on
which printing cannot be done. The no-print border size is based on the physicalrestrictions of your printer. You may find the no-print border referred to as the“unprintable area,” when looking it up in your printer manual.

|
|
|
|
|

If the no-print border is defined, it is included in the top, bottom, left, and rightmargins that are used for an AS/400 print job. For example, if you specify a value of
1/2 inch for the top, portrait no print border, and the AS/400 document sets a top
margin of 1 inch, the host print transform only advances your ASCII printer position
1/2 inch. The effect is that the printed document has a 1-inch top margin.

|

The syntax for this tag is:

|
|
|
|
|

:NOPRTBDROPTION = TOP|LEFT|RIGHT|BOTTOMORIENT = PORTRAIT|LANDSCAPEDATA = no print border size in
1440ths of an inch (integer).

||

OPTIONA required parameter. Defines the border type.

||

TOP

Sets no-print border at the top of the paper.

|

LEFT

Sets no-print border on the left side of the paper.

|

RIGHT

Sets no-print border on the right side of the paper.

|

BOTTOM

Sets no-print border at the bottom of the paper.

|||

ORIENT
A required parameter. Defines the type of paper orientation. Some printers havedifferent unprintable areas based on the orientation of the printed output.

||

PORTRAITThe no-print border specified is for portrait-oriented print.

|

LANDSCAPE

The no-print border specified is for landscape-oriented print.

|
|
|

DATA
A required parameter. Specifies the size of the no print in 1/1440-inch
increments. This value must be an integer.
Chapter 10. Customizing ASCII Printers That Use the Host Print Transform Function

151

|

Drawer Page Size||

The DWRPAGSIZ (drawer page size) tag defines the size of the paper present in a
specific source paper drawer.

||

In raster mode, this paper size is used to allocate the raster page buffer. The SCS
to ASCII transform uses this paper size to determine if COR mode is required.

||If the drawer size is not defined, the host print transform uses the page size that is
specified in the AS/400 print job.

|
|
|
|

You can define a drawer size for one or more of the source drawers. You begin
support for the drawer page size with the DWRPAGSIZ tag and end the support
with the EDWRPAGSIZE tag. The DWRPAGSIZE tags fall between, defining adrawer and its size.

||

Using the drawer page size tags, your source could look something like this for a
printer supporting two different source drawers.

|
|
|
|
|

:DWRPAGSIZ.
:DWRPAGSIZE...
:DWRPAGSIZE...
:EDWRPAGSIZ.

|

The following sections describes the tags used to support different drawer sizes.

|

Drawer Page Size (DWRPAGSIZ) Tag|||

The DWRPAGSIZ tag defines the page size for a source drawer. This tag must be
followed by one or more DWRPAGSIZE tags that contain the drawer size. There
are no parameters on this tag. The syntax is:|:DWRPAGSIZ.

|

Drawer Page Size Entry (DWRPAGSIZE) Tag|||

The DWRPAGSIZE tag defines the page size for a particular source drawer. The
DWRPAGSIZ tag must be follows by one or more DWRPAGSIZE tags. TheEDWRPAGSIZE tag must follow a group of DWRPAGSIZE tags. The syntax is:

|
|
|
|

:DWRPAGSIZE
DRAWER = 0-255
PAGWTH = Page width
PAGLEN = Page length.

||

DRAWER
This is a required parameter. This parameter defines the source drawer.

|0

The envelope drawer is specified.

|

1-255

The drawer 1-255 is specified.

|
|
|
|

PAGWTHThis is a required parameter. This parameter specifies the drawer page width in
1/1440 inch increments. This value must be an integer. The width is theleft-to-right dimension of a piece of paper.

|
|
|
|

PAGLEN
This is a required parameter. This parameter specifies the drawer page length
1/1440 inch increments. This value must be an integer. The width is the
top-to-bottom dimension of a piece of paper.

152

OS/400 Workstation Customization Programming V4R3

|

End Drawer Page Size (EDWRPAGSIZ) Tag||

The EDWRPAGSIZ tag is used to end a group of drawer page size entries in thecustomizing source. There are no parameters on this tag. The syntax is:|:EDWRPAGSIZ.

Customizing Printer Controls
You can customize the following general printer control functions:
Bell
Carrier return
Initialize printerReset printerEnd raster graphics
Print all characters
Print next character

Bell (BELL) Tag
The BELL (bell) tag defines the ASCII control sequence for the bell function for an
ASCII printer. The bell function sounds the printer bell or beeper briefly. The syntax
for this tag is::BELL

DATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the bell function.
This must be a hexadecimal value.

Carrier Return (CARRTN) Tag
The CARRTN (carrier return) tag defines the ASCII control sequence for the carrier
return function for an ASCII printer. The CARRTN function returns the carrier to theleft margin, without advancing a line. The syntax for this tag is::CARRTNDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the carrier
return function. This must be a hexadecimal value.

Initialize Printer (INITPRT) Tag|||

The INITPRT (initialize printer) tag defines the ASCII control sequence for the
initialize printer function for an ASCII printer. The host print transform function uses
the INITPRT tag at the beginning of each print job. The syntax for this tag is:||:INITPRT

|
|
|

DATA
A required parameter. Specifies the ASCII control sequence for the initialize
printer function. This must be a hexadecimal value.

DATA = ASCII control sequence.

Chapter 10. Customizing ASCII Printers That Use the Host Print Transform Function

153

Reset Printer (RESETPRT) Tag
The RESETPRT (reset printer) tag defines the ASCII control sequence for the reset
printer function for an ASCII printer. The RESETPRT tag is used by the host print
transform at the end of each print job. The syntax for this tag is::RESETPRTDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the reset printerfunction. This must be a hexadecimal value.

Raster Graphics End (RASEND) Tag
This tag causes the printer to end raster graphics (image) mode. The syntax of thistag is::RASEND

DATA= ASCII control sequence.

DATA
A required parameter. This parameter specifies the printer control sequence forthe raster graphics end printer function. This must be a hexadecimal value.

Print All Characters (PRTALLCHR) Tag
The PRTALLCHR tag causes the printer to interpret the bytes that follow as
printable characters rather then control codes. The PRTNXTCHR provides thesayme function for one byte. The syntax is::PRTALLCHRVAROFFSET = variable offset in control sequence
VARLEN = variable length
VARTYPE = HIGHLOW|LOWHIGH|CHRDEC| CHRHEX|CHRANDATA = ASCII control sequence.

VAROFFSETThis is a required parameter. This parameter specifies the offset for the variable
portion of the control sequence. This value must be an integer.
Note: This offset is relative to the beginning of the control sequence.
Therefore, a value of 0 implies that the variable starts in the first byte of
the control sequence.
VARLEN
This is a required parameter. This parameter specifies the length of the variable
portion of the control sequence. This value must be an integer (number ofbytes).
VARTYPA required parameter. This parameter specifies the type of variable that is usedwith the category of printer function tags.

154

HIGHLOW

The byte order of the variable is in high-low order. The mostsignificant byte is first.

LOWHIGHThe byte order of the variable is in low-high order. The mostsignificant byte is last.

OS/400 Workstation Customization Programming V4R3

CHRDEC

The variable is in character decimal format with no byte orderconsideration. All characters are in the range of 0 to 9. Many
Hewlett-Packard ASCII printers use this type of variable.

CHRHEX

The variable is in character hexadecimal format with no byteorder consideration. All characters are in the range of A to F.

CHRAN

The variable is in character alphanumeric format with no byteorder consideration. All characters are in the range of 0 to 9, A
to Z.

DATA
A required parameter. This parameter specifies the ASCII control sequence forthe set top margin (inches) printer function. This must be a hexadecimal value.

Print Next Character (PRTNXTCHR) Tag
This tag causes the next byte of data to be treated as a character rather than aprinter control. The syntax of this tag is::PRTNXTCHRDATA= ASCII control sequence.

DATA
A required parameter. This parameter specifies the ASCII control sequence forthe print-next character printer function. This must be a hexadecimal value.

Customizing Print Media Size
The workstation customizing functions allow you to customize print media size for
an ASCII printer. You can:Customize envelope size
Customize paper size
Customize page length
Customize printable area|

Envelope Size
You can customize selecting various sizes of envelopes. You begin support forvarious envelope sizes with an ENVSIZXFM tag, and end the support with an
EENVSIZXFM tag. The ENVSIZE tags fall between the start and end tags to define
each different envelope size.
Using the envelope definition tags, your source could look something like this for a
printer supporting two different envelope sizes::ENVSIZXFM.
:ENVSIZE....
:ENVSIZE....
:EENVSIZXFM.

Following is a description of each of the tags used to support different envelope
sizes for an ASCII printer.

Chapter 10. Customizing ASCII Printers That Use the Host Print Transform Function

155

Envelope Size for Transform (ENVSIZXFM) Tag
The ENVSIZXFM (envelope size for transform) tag begins a group of different
envelope size entry tags. The ENVSIZXFM tag must be followed by one or moreenvelope size entry tags (ENVSIZE) containing the envelope sizes. The syntax for
the ENVSIZXFM tag is::ENVSIZXFM.

Envelope Size Entry (ENVSIZE) Tag
The ENVSIZE (envelope size entry) tag defines an ASCII control sequence to set
one envelope size for the transform table. One or more of these tags follow an
ENVSIZXFM tag. A group of one or more of these tags must be followed by an
EENVSIZXFM tag. The syntax for the ENVSIZE tag is::ENVSIZEENVWTH = envelope width
ENVLEN = envelope length
DATA = ASCII control sequence.

ENVWTHA required parameter. Specifies the envelope width in 1/1440-inch increments.
This value must be an integer. The width is the left-to-right dimension when theenvelope is in its normal orientation.
ENVLENA required parameter. Specifies the envelope length in 1/1440-inch increments.
This value must be an integer. The length is the top-to-bottom dimension whenthe envelope is in its normal orientation.
DATA
A required parameter. Specifies the ASCII control sequence for the specified
envelope size entry. This must be a hexadecimal value.

End Envelope Size for Transform (EENVSIZXFM) Tag
The EENVSIZXFM (end envelope size for transform) tag ends a group of envelope
size entries. The syntax for this tag is::EENVSIZXFM.

Paper Size
You can customize selecting various sizes of paper. You begin support for various
paper sizes with a PAGSIZXFM tag, and end the support with an EPAGSIZXFM
tag. The PAGSIZE tags fall between the start and end tags to define each different
page size.
Using the page size definition tags, your source could look something like this for a
printer supporting five separate page sizes::PAGSIZXFM.
:PAGSIZE....
:PAGSIZE....
:PAGSIZE....
:PAGSIZE....
:PAGSIZE....
:EPAGSIZXFM.

Following is a description of each of the tags used to support different page sizes
for an ASCII printer.

156

OS/400 Workstation Customization Programming V4R3

Page Size for Transform (PAGSIZXFM) Tag
The PAGSIZXFM (page size for transform) tag defines the ASCII control sequences
for a group of different page sizes. The PAGSIZXFM tag must be followed by one
or more PAGSIZE (page size entry) tags containing the page sizes. The syntax for
the PAGSIZXFM tag is::PAGSIZXFM.

Page Size Entry (PAGSIZE) Tag
The PAGSIZE (page size entry) tag defines the ASCII control sequence to set one
page size. One or more of these tags must follow the PAGSIZXFM (set page sizefor transform) tag. A group of PAGSIZE tags must be followed by an EPAGSIZXFM(end set page size for transform) tag. The syntax for this tag is::PAGSIZEPAGWTH = page width
PAGLEN = page length
DATA = ASCII control sequence.

PAGWTHA required parameter. Specifies the page width in 1/1440-inch increments. Thisvalue must be an integer. The width is the left-to-right dimension of a piece of
paper when it is in its normal orientation.
PAGLENA required parameter. Specifies the page length in 1/1440-inch increments. Thisvalue must be an integer. The length is the top-to-bottom dimension of a pieceof paper when it is in its normal orientation.
DATA
A required parameter. Specifies the ASCII control sequence for selecting a
specific page size entry. This must be a hexadecimal value.

End Page Size for Transform (EPAGSIZXFM) Tag
The EPAGSIZXFM (end page size for transform) tag ends a group of page size
entries in the customizing source. The syntax for this tag is::EPAGSIZXFM.

Page Length
You can set page length in lines or in inches. Following is a description of the tags
used to customize page length.

Page Length in Inches (PAGLENI) Tag
The PAGLENI (page length in inches) tag sets the page length in terms of inches.
The syntax for this tag is::PAGLENI

VAROFFSET = variable offset incontrol sequence
VARLEN = variable length
VARTYPE = HIGHLOW|LOWHIGH|CHRDEC|CHRHEX|CHRAN
CNVNUM = conversion ratio
numerator
CNVDEN = conversion ratio
denominator
DATA = ASCII control sequence.
Chapter 10. Customizing ASCII Printers That Use the Host Print Transform Function

157

VAROFFSET
A required parameter. Defines the offset for the variable portion of the control
sequence. This value must be an integer.
Note: This offset is relative to the beginning of the control sequence.
Therefore, a value of zero (0) implies that the variable starts in the first
byte of the control sequence.
VARLENA required parameter. Defines the length of the variable portion of the control
sequence. This value must be an integer (number of bytes).
Note: When specifying this parameter, ensure that the length of the offset
specified is large enough to accommodate the maximum size of yourvariable data.
VARTYPE
A required parameter. Defines the type of variable used with the set page length
in inches tag.
HIGHLOW

The byte order of the variable is in high-low order. The first
byte is the most significant.

LOWHIGHThe byte order of the variable is in low-high order. The lastbyte is the most significant.

CHRDECThe variable is in character decimal format with no byte orderconsideration. All characters are in the range from 0 to 9.
Many Hewlett-Packard printers use this variable type.

CHRHEX

The variable is in character hexadecimal format with no byteorder consideration. All characters are in the range from 0 to
9, A to F.

CHRAN

The variable is in character alphanumeric format with no byteorder consideration. All characters are in the range from 0 to
9, A to Z.

CNVNUMA required parameter. Defines the numerator of the conversion ratio. This value
must be an integer. The most common value for CNVNUM is 1.
CNVDENA required parameter. Defines the denominator of the conversion ratio. Thisvalue must be a nonzero integer. The most common value for CNVDEN is 1.
DATA
A required parameter. Specifies the ASCII control sequence for setting the page
length in inches. This must be a hexadecimal value.

Page Length in Lines (PAGLENL) Tag
The PAGLENL (page length in lines) tag sets the page length in terms of thenumber of lines. The number of lines is carried as a variable in the control
sequence for page length. The syntax for this tag is::PAGLENL

158

VAROFFSET = variable offset incontrol sequence
VARLEN = variable length
VARTYPE = HIGHLOW|LOWHIGH|CHRDEC|CHRHEX|CHRANDATA = ASCII control sequence.

OS/400 Workstation Customization Programming V4R3

VAROFFSET
A required parameter. Defines the offset for the variable portion of the control
sequence. This value must be an integer.
Note: This offset is relative to the beginning of the control sequence.
Therefore, a value of zero (0) implies that the variable starts in the first
byte of the control sequence.
VARLENA required parameter. Defines the length of the variable portion of the control
sequence. This value must be an integer (number of bytes).
VARTYPE
A required parameter. This attribute defines the type of variable. Possible values
are:
HIGHLOW

The byte order of the variable is in high-low order. The first
byte is the most significant.

LOWHIGHThe byte order of the variable is in low-high order. The lastbyte is the most significant.

CHRDECThe variable is in character decimal format with no byte orderconsideration. All characters are in the range 0 to 9. Many
Hewlett-Packard printers use this variable type.

CHRHEX

The variable is in character hexadecimal format with no byteorder consideration. All characters are in the range 0 to 9, A to
F.

CHRAN

The variable is in character alphanumeric format with no byteorder consideration. All characters are in the range 0 to 9, A toZ.

DATA
A required parameter. Specifies the ASCII control sequence for setting the page
length in lines. This must be a hexadecimal value.

Printable Area
Text Length in Lines (TEXTLENL) Tag
This tag specifies the text length in lines. The syntax of this tag is::TEXTLENLVAROFFSET = variable offset incontrol sequence
VARLEN= variable length
VARTYPE= HIGHLOW|LOWHIGH|CHRDEC|CHRHEX|CHRANDATA= ASCII control sequence.

VAROFFSET
A required parameter. This parameter specifies the offset for the variable portionof the control sequence. This value must be an integer.
Note: This offset is relative to the beginning of the control sequence.
Therefore, a value of 0 implies that the variable starts in the first byte of
the control sequence.
VARLENA required parameter. This parameter specifies the length of the variable portionof the control sequence. This value must be an integer (number of bytes).
Chapter 10. Customizing ASCII Printers That Use the Host Print Transform Function

159

VARTYP
A required parameter. This parameter specifies the type of variable that is usedwith the category of printer function tags.
HIGHLOW

The byte order of the variable is in high-low order. The mostsignificant byte is first.

LOWHIGHThe byte order of the variable is in low-high order. The mostsignificant byte is last.

CHRDECThe variable is in character decimal format with no byte orderconsideration. All characters are in the range of 0 to 9. Many
Hewlett-Packard ASCII printers use this type of variable.

CHRHEX

The variable is in character hexadecimal format with no byteorder consideration. All characters are in the range of A to F.

CHRAN

The variable is in character alphanumeric format with no byteorder consideration. All characters are in the range of 0 to 9, A
to Z.

DATA
A required parameter. This parameter specifies the ASCII control sequence forthe set-text-length-in-lines printer function. This must be a hexadecimal value.

Top Margin in Inches (TOPMARGINI) Tag
This tag specifies the top margin in inches. The syntax of this tag is::TOPMARGINIVAROFFSET = variable offset incontrol sequence
VARLEN= variable length
VARTYPE = HIGHLOW|LOWHIGH|CHRDEC|CHRHEX|CHRAN
CNVNUM= conversion ratio
numerator
CNVDEN= conversion ratio
denominator
DATA= ASCII control sequence.

VAROFFSETThis is a required parameter. This parameter specifies the offset for the variable
portion of the control sequence. This value must be an integer.
Note: This offset is relative to the beginning of the control sequence.
Therefore, a value of 0 implies that the variable starts in the first byte of
the control sequence.
VARLEN
This is a required parameter. This parameter specifies the length of the variable
portion of the control sequence. This value must be an integer (number ofbytes).
VARTYPA required parameter. This parameter specifies the type of variable that is usedwith the category of printer function tags.

160

HIGHLOW

The byte order of the variable is in high-low order. The mostsignificant byte is first.

LOWHIGHThe byte order of the variable is in low-high order. The mostsignificant byte is last.

OS/400 Workstation Customization Programming V4R3

CHRDEC

The variable is in character decimal format with no byte orderconsideration. All characters are in the range of 0 to 9. Many
Hewlett-Packard ASCII printers use this type of variable.

CHRHEX

The variable is in character hexadecimal format with no byteorder consideration. All characters are in the range of A to F.

CHRAN

The variable is in character alphanumeric format with no byteorder consideration. All characters are in the range of 0 to 9, A
to Z.

CNVNUMA required parameter. This parameter specifies the numerator of the conversion
ratio. This value must be an integer. The most commonly used value for
CNVNUM is 1.
CNVDENA required parameter. This parameter specifies the denominator of theconversion ratio. This value must be a nonzero integer.
CNVDEN defines the units that are used for the variable portion. For example, if
movement is in 1/300ths, CNVNUM should be defined as 1 and CNVDEN
should be defined as 300.
DATA
A required parameter. This parameter specifies the ASCII control sequence forthe set top margin (inches) printer function. This must be a hexadecimal value.

Customizing Highlighting
You can customize highlighting functions, such as underlining and bold printing for
an ASCII printer.

|
|

Bold
Start Bold Printing (STRBOLD) Tag
The STRBOLD (start bold printing) tag defines the ASCII control sequence forstarting the bold printing function for an ASCII printer. The syntax for this tag is::STRBOLDDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the start boldprinting function. This must be a hexadecimal value.

End Bold Printing (ENDBOLD) Tag
The ENDBOLD (end bold printing) tag defines the ASCII control sequence forending the bold printing function for an ASCII printer. The syntax for this tag is::ENDBOLDDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the end boldprinting function. This must be a hexadecimal value.

Chapter 10. Customizing ASCII Printers That Use the Host Print Transform Function161

Underscore
Start Underscore Function (STRUS) Tag
The STRUS (start underscore) tag defines the ASCII control sequence for starting
the underscore function for an ASCII printer. The syntax for this tag is::STRUSDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the startunderscore function. This must be a hexadecimal value.

End Underscore (ENDUS) Tag
The ENDUS (end underscore) tag defines the ASCII control sequence for ending
the underscore function for an ASCII printer. The syntax for this tag is::ENDUSDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the end
underscore function. This must be a hexadecimal value.

Customizing Horizontal Movement
You can customize the following horizontal movement functions:
Backspace
Characters per inch
Characters per inch in computer output reduction (COR) mode
Horizontal relative movement
Horizontal absolute movement
Proportional spacing
Space

Backspace (BSP) Tag
The BSP (backspace) tag defines the ASCII control sequence for the backspacefunction for an ASCII printer. The syntax for this tag is::BSP

DATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the backspacefunction. This must be a hexadecimal value.

Characters Per Inch
You can set the number of characters per horizontal inch of printing. You can set
the number of characters per inch in normal printing mode or in computer output
reduction (COR) mode. Computer output reduction consists of:
Rotating the paper to a landscape right orientation
Reducing the character size
Changing the line density

162

OS/400 Workstation Customization Programming V4R3

Changing the left and top margins
Following is a description of the tags used to customize horizontal character
spacing.

Characters per Inch in Normal Print Mode (CPI) Tag
The CPI (set characters per inch) tag defines the ASCII control sequence for setting
the number of characters per inch. The syntax for this tag is::CPI

CPI = 5|10|12|133|15|166|
171|20|25|27
DATA = ASCII control sequence.

CPI
A required parameter. Specifies the number of characters per inch.
5

5 characters per inch

10

10 characters per inch

12

12 characters per inch

133

13.3 characters per inch

15

15 characters per inch

166

16.6 characters per inch

17117.1 characters per inch

20

20 characters per inch

25

25 characters per inch

27

27 characters per inch

DATA
A required parameter. Specifies the ASCII control sequence for setting thenumber of characters per inch. This must be a hexadecimal value.

Characters per Inch in COR Mode (CPICOR) Tag
The CPICOR (set characters per inch in computer output reduction (COR) mode)tag defines the control sequence for setting the number of characters per inch while
in COR mode. For example, you can define all print jobs that normally use a
10-pitch type style use a particular 17-pitch type style when COR (reduction) is
applied. The syntax for this tag is::CPICORCPI = 10|12|15
ASCIIFNT = font identifier number (integer)
FNTWTH = font width (integer)
FNTATR = font attribute (integer)
DATA = ASCII control sequence.

CPI
A required parameter. This is the current number of characters per inch before
the reduction is applied. For example, to define the type style to use for COR in
a 10-pitch print job, specify CPI=10.
10

10 characters per inch

12

12 characters per inch

15

15 characters per inch
Chapter 10. Customizing ASCII Printers That Use the Host Print Transform Function

163

ASCIIFNT
A required parameter. Specifies the ASCII type style (the global font ID (FGID))
to be used when reduction is applied. This value must be an integer.
For example, the FGID for a Courier 17-pitch font (17 characters per inch) is
254. Therefore, you specify ASCIIFNT=254 for a Courier 17-pitch font. For
information on global font IDs, see the Printer Device Programming book.
FNTWTHA required parameter. Specifies the width, in 1/1440-inch increments, of the fontused when reduction is applied. This value must be an integer.
For example, if you use a 17-pitch font when reduction is applied, divide theincrement by the number of characters per inch (1440 divided by 17). This
gives you a font width of 85 (rounded off) for the substituted font. Therefore,
you specify FNTWTH=85.
FNTATRA required parameter. Specifies the attribute value for the substituted font. Thisvalue must be an integer. In most cases, you specify a fixed-pitch type style(FNTATR=1) for the substitute font attribute value.
Integer

Attribute value

01

Fixed-pitch font

02

Proportional-spaced font04

Typographic font

DATA
An optional parameter. Specifies the ASCII control sequence to select thesubstituted font. This must be a hexadecimal value. You find the ASCII control
sequence in the technical reference manual for your printer under thedescription of selecting type styles. If there is no control sequence, ''X must be
specified. When a control sequence of ''X is specified, the values specified for
ASCIIFNT, FNTWTH, and FNTATR are used to select the COR font.

Horizontal Absolute Movement (HORAMOV) Tag
The HORAMOV (horizontal absolute movement) tag is used to set the current
horizontal print position. The host print transform requires the HORAMOV tag to be
defined for the AFPDS to ASCII transform. The syntax of this tag is::HORAMOVVAROFFSET = variable offset incontrol sequence
VARLEN= variable length
VARTYPE = HIGHLOW|LOWHIGH|CHRDEC|CHRHEX|CHRAN
CNVNUM= conversion ratio
numerator
CNVDEN= conversion ratio
denominator
DATA= ASCII control sequence.

VAROFFSET
A required parameter. Specifies the offset for the variable portion of the control
sequence. This value must be an integer.

164

OS/400 Workstation Customization Programming V4R3

Note: This offset is relative to the beginning of the control sequence.
Therefore, a value of 0 implies that the variable starts in the first byte of
the control sequence.
VARLENA required parameter. Specifies the length of the variable portion of the control
sequence. This value must be an integer (number of bytes).
VARTYPA required parameter. Specifies the type of variable that is used with thecategory of printer function tags.
HIGHLOW

The byte order of the variable is in high-low order. The mostsignificant byte is first.

LOWHIGHThe byte order of the variable is in low-high order. The mostsignificant byte is last.

CHRDECThe variable is in character decimal format with no byte orderconsideration. All characters are in the range of 0 to 9. Many
Hewlett-Packard ASCII printers use this type of variable.

CHRHEX

The variable is in character hexadecimal format with no byteorder consideration. All characters are in the range of A to F.

CHRAN

The variable is in character alphanumeric format with no byteorder consideration. All characters are in the range of 0 to 9, A
to Z.

CNVNUMA required parameter. Specifies the numerator of the conversion ratio. Thisvalue must be an integer. The most commonly used value for CNVNUM is 1.
CNVDENA required parameter. Specifies the denominator of the conversion ratio. Thisvalue must be a nonzero integer.
CNVDEN defines the units to be used for the variable portion. For example, if
movement is in 1/300ths, CNVNUM should be defined as 1 and CNVDEN
should be defined as 300.
DATA
A required parameter. Specifies the ASCII control sequence for the horizontal
absolute movement printer function. This must be a hexadecimal value.

Horizontal Relative Movement (HORRMOV) Tag
The HORRMOV (horizontal relative movement) tag specifies the print position
backward or forward relative to the current print position. You may find thehorizontal relative movement function referred to as horizontal positioning, whenlooking it up in your printer manual.
You can have up to two HORRMOV tags in the same source file. If you specify two
HORRMOV tags in the same source file, one must have a direction of forward andthe other a direction of backward. The syntax of this tag is::HORRMOVDIRECTION = FWD|BCK|FWDBCKVAROFFSET = variable offset incontrol sequence
VARLEN = variable length
VARTYPE = HIGHLOW|LOWHIGH|CHRDEC|
Chapter 10. Customizing ASCII Printers That Use the Host Print Transform Function

165

CHRHEX|CHRAN
CNVNUM = conversion ratio
numerator
CNVDEN = conversion ratio
denominator
DATA = ASCII control sequence.

DIRECTION
A required parameter. Specifies the direction of the relative movement
command.
FWD

Specifies the horizontal relative movement forward.

BCK

Specifies the horizontal relative movement backward.

FWDBCK

Specifies the horizontal relative movement command forward
and backward.

VAROFFSET
A required parameter. Specifies the offset for the variable portion of the control
sequence. This value must be an integer.
Note: This offset is relative to the beginning of the control sequence.
Therefore, a value of 0 implies that the variable starts in the first byte of
the control sequence.
VARLENA required parameter. Specifies the length of the variable portion of the control
sequence. This value must be an integer (number of bytes).
VARTYPE
A required parameter. Specifies the type of variable used with this category of
printer function tags.
HIGHLOW

The byte order of the variable is in high-low order. The mostsignificant byte is first.

LOWHIGHThe byte order of the variable is in low-high order. The mostsignificant byte is last.

CHRDECThe variable is in character decimal format with no byte orderconsideration. All characters are in the range from 0 to 9. Many
Hewlett-Packard ASCII printers use this type of variable.

CHRHEX

The variable is in character hexadecimal format with no byteorder consideration. All characters are in the range from 0 to 9,
A to F.

CHRAN

The variable is in character alphanumeric format with no byteorder consideration. All characters are in the range from 0 to 9,
A to Z.

CNVNUMA required parameter. Defines the numerator of the conversion ratio. This value
must be an integer. The most commonly used value for CVNUM is 1.
CNVDENA required parameter. Specifies the denominator of the conversion ratio. Thisvalue must be a nonzero integer.
CNVDEN defines the units to be used for the variable portion. For example, if
movement is in 1/300ths, CNVNUM should be defined as 1 and CNVDEN
should be defined as 300.

166

OS/400 Workstation Customization Programming V4R3

DATA
A required parameter. Specifies the ASCII control sequence for the horizontal
relative movement printer function. This must be a hexadecimal value.

Proportional Spacing
Start Proportional Space (STRPROP) Tag
The STRPROP (start proportional space) tag defines the ASCII control sequence
for starting the proportional space mode for an ASCII printer. The syntax for this tag
is::STRPROPDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the start
proportional space function. This must be a hexadecimal value.

End Proportional Space (ENDPROP) Tag
The ENDPROP (end proportional space) tag defines the ASCII control sequence forending the proportional space mode for an ASCII printer. The syntax for this tag is::ENDPROPDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the end
proportional space function. This must be a hexadecimal value.

Space (SPACE) Tag
The SPACE (space) tag defines the ASCII control sequence for the space control
function for an ASCII printer. The syntax for this tag is::SPACEDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the spacefunction. This must be a hexadecimal value.

Customizing Vertical Movement
You can customize the following vertical movement functions:
Form feed
Half line feedLine feed
Relative vertical movement
Absolute vertical movement
Reverse half line feed
Reverse line feed
Vertical line spacing

Chapter 10. Customizing ASCII Printers That Use the Host Print Transform Function

167Form Feed (FORMFEED) Tag
The FORMFEED (form feed) tag defines the ASCII control sequence for the form
feed function for an ASCII printer. The FORMFEED control advances the paper tothe top of the next page. The syntax for this tag is::FORMFEEDDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the form feed
function. This must be a hexadecimal value.

Half Line Feed (HLFLINEFEED) Tag
The HLFLINEFEED (half line feed) tag defines the ASCII control sequence for thehalf line feed function for an ASCII printer. The HLFLINEFEED control advances thepaper one half of a line. The syntax for this tag is::HLFLINEFEEDDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the half line
feed function. This must be a hexadecimal value.

Line Feed (LINEFEED) Tag
The LINEFEED (line feed) tag defines the ASCII control sequence for the line feed
function for an ASCII printer. The line feed function advances the paper one line.
The syntax for this tag is::LINEFEEDDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the line feed
function. This must be a hexadecimal value.

Vertical Absolute Movement (VERAMOV) Tag
The VERAMOV (vertical absolute movement) tag is used to set the current verticalprint position. The host print transform requires the VERAMOV tag to be defined for
the AFPDS to ASCII transform. The syntax of this tag is::VERAMOVVAROFFSET = variable offset incontrol sequence
VARLEN= variable length
VARTYPE = HIGHLOW|LOWHIGH|CHRDEC|CHRHEX|CHRAN
CNVNUM= conversion ratio
numerator
CNVDEN= conversion ratio
denominator
DATA= ASCII control sequence.

VAROFFSET
A required parameter. Specifies the offset for the variable portion of the control
sequence. This value must be an integer.

168

OS/400 Workstation Customization Programming V4R3

Note: This offset is relative to the beginning of the control sequence.
Therefore, a value of 0 implies that the variable starts in the first byte of
the control sequence.
VARLENA required parameter. Specifies the length of the variable portion of the control
sequence. This value must be an integer (number of bytes).
VARTYPA required parameter. Specifies the type of variable used with category of
printer function tags.
HIGHLOW

The byte order of the variable is in high-low order.
The most significant byte is first.

LOWHIGHThe byte order of the variable is in low-high order.
The most significant byte is last.

CHRDECThe variable is in character decimal format with nobyte order consideration. All characters are in therange of 0 to 9. Many Hewlett-Packard ASCII printers
use this type of variable.

CHRHEX

The variable is in character hexadecimal format withno byte order consideration. All characters are in therange of A to F.

CHRAN

The variable is in character alphanumeric format withno byte order consideration. All characters are in therange of 0 to 9, A to Z.

CNVNUMA required parameter. Specifies the numerator of the conversion ratio. Thisvalue must be an integer. The most commonly used value for CNVNUM is 1.
CNVDENA required parameter. Specifies the denominator of the conversion ratio. Thisvalue must be a nonzero integer.
CNVDEN defines the units to be used for the variable portion. For example, if
movement is in 1/300ths, CNVNUM should be defined as 1 and CNVDEN
should be defined as 300.
DATA
A required parameter. Specifies the ASCII control sequence for the horizontal
absolute movement printer function. This must be a hexadecimal value.

Vertical Relative Movement (VERRMOV) Tag
The VERRMOV (vertical relative movement) tag is used to move the print position
upward or downward relative to the current print position. You may find the relative
movement function referred to as vertical positioning, when looking it up in yourprinter manual.
You can have up to two VERRMOV tags in the same source file. If you specify two
VERRMOV tags in the same source file, one must have a direction of upward andthe other a direction of downward. The syntax of this command is::VERRMOVDIRECTION = UP|DOWN|UPDOWNVAROFFSET = variable offset incontrol sequence
Chapter 10. Customizing ASCII Printers That Use the Host Print Transform Function

169

VARLEN = variable length
VARTYPE = HIGHLOW|LOWHIGH|CHRDEC|CHRHEX|CHRAN
CNVNUM = conversion ratio
numerator
CNVDEN = conversion ratio
denominator
DATA = ASCII control sequence.

DIRECTION
Defines the direction of the relative movement command. This is a required
parameter.
UP

Defines the vertical relative movement upward.

DOWN

Defines the vertical relative movement downward.

UPDOWN

Defines the vertical relative movement command upward anddownward.

VAROFFSET
A required parameter. Defines the offset for the variable portion of the control
sequence. This value must be an integer.
Note: This offset is relative to the beginning of the control sequence.
Therefore, a value of zero (0) implies that the variable starts in the first
byte of the control sequence.
VARLENA required parameter. Defines the length of the variable portion of the control
sequence. This value must be an integer (number of bytes).
VARTYPE
A required parameter. Defines the type of variable used with this category of
printer function tags.
HIGHLOW

The byte order of the variable is in high-low order. The first
byte is the most significant.

LOWHIGHThe byte order of the variable is in low-high order. The lastbyte is the most significant.

CHRDECThe variable is in character decimal format with no byte orderconsideration. All characters are in the range from 0 to 9. Many
Hewlett-Packard printers use this variable type.

CHRHEX

The variable is in character hexadecimal format with no byteorder consideration. All characters are in the range from 0 to 9,
A to F.

CHRAN

The variable is in character alphanumeric format with no byteorder consideration. All characters are in the range from 0 to 9,
A to Z.

CNVNUMA required parameter. Defines the numerator of the conversion ratio. This value
must be an integer. The most common value is 1.
CNVDENA required parameter. Defines the denominator of the conversion ratio. Thisvalue must be a nonzero integer. Defines the units of measure to be used forthe variable portion. For example, if movement is in 1/300ths, specify CNVNUM
as 1 and CNVDEN as 300.

170

OS/400 Workstation Customization Programming V4R3

DATA
A required parameter. Specifies the ASCII control sequence for the printerfunction. This must be a hexadecimal value.

Reverse Half Line Feed (RVSHLFLINEFEED) Tag
The RVSHLFLINEFEED (reverse half line feed) tag defines the ASCII control
sequence for the reverse half line feed function for an ASCII printer. The reverse
half line feed function moves the paper back up one half line. The syntax for thistag is::RVSHLFLINEFEEDDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the reverse halfline feed function. This must be a hexadecimal value.

Reverse Line Feed (RVSLINEFEED) Tag
The RVSLINEFEED (reverse line feed) tag defines the ASCII control sequence forthe reverse line feed function for an ASCII printer. The reverse line feed function
moves the paper back up one line. The syntax for this tag is::RVSLINEFEEDDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the reverse line
feed function. This must be a hexadecimal value.

Vertical Line Spacing
You can set the distance between printed lines in one of two ways. You can specify
the number of lines per inch or you can set line spacing to a variable value.
Following is a description of the tags used to customize vertical line spacing.

Lines per Inch (LPI) Tag
The LPI (set lines per inch) tag defines the control sequence for setting the numberof lines per inch you want to print. Variable line spacing, if defined, overrides
fixed-pitch line spacing. The syntax for this tag is::LPI

LPI = 3|4|6|8
DATA = ASCII control sequence.

LPI
A required parameter. Defines the number of lines per inch. The valid values forthis parameter are 3, 4, 6, and 8. The most common vertical spacing is 6 or 8lines per inch.
DATA
A required parameter. Specifies the ASCII control sequence for setting lines perinch. This must be a hexadecimal value.

Variable Line Spacing (VARLSPC) Tag
The VARLSPC (variable line spacing) tag is used to set variable line spacing on theprinter. Variable line spacing, if defined, overrides fixed-pitch line spacing. If you do

Chapter 10. Customizing ASCII Printers That Use the Host Print Transform Function

171

not define variable line spacing, the customizing source is searched for a fixed pitchtag, for example, 8 lines per inch. The syntax for this tag is::VARLSPCVAROFFSET = variable offset incontrol sequence
VARLEN = variable length
VARTYPE = HIGHLOW|LOWHIGH|CHRDEC|CHRHEX|CHRAN
CNVNUM = conversion ratio
numerator
CNVDEN = conversion ratio
denominator
DATA = ASCII control sequence.

VAROFFSET
A required parameter. Defines the offset for the variable portion of the control
sequence. This value must be an integer.
Note: This offset is relative to the beginning of the control sequence.
Therefore, a value of zero (0) implies that the variable starts in the first
byte of the control sequence.
VARLENA required parameter. Defines the length of the variable portion of the control
sequence. This value must be an integer (number of bytes).
VARTYPE
A required parameter. Defines the type of variable used with the set page length
in inches tag.
HIGHLOW

The byte order of the variable is in high-low order. The first
byte is the most significant.

LOWHIGHThe byte order of the variable is in low-high order. The lastbyte is the most significant.

CHRDECThe variable is in character decimal format with no byte orderconsideration. All characters are in the range from 0 to 9. Many
Hewlett-Packard printers use this variable type.

CHRHEX

The variable is in character hexadecimal format with no byteorder consideration. All characters are in the range from 0 to 9,
A to F.

CHRAN

The variable is in character alphanumeric format with no byteorder consideration. All characters are in the range from 0 to 9,
A to Z.

CNVNUMA required parameter. Defines the numerator of the conversion ratio. This value
must be an integer. The most common value for CNVNUM is 1.
CNVDENA required parameter. Defines the denominator of the conversion ratio. Thisvalue must be a nonzero integer. Defines the units of measure used for thevariable portion.
DATA
A required parameter. Specifies the ASCII control sequence for variable line
spacing. This must be a hexadecimal value.

172

OS/400 Workstation Customization Programming V4R3

Customizing Indexing
You can customize superscript and subscript controls for an ASCII printer. On someprinters, these controls move the print position up or down 1/2 line spaces. Other
printers create superscripts and subscripts by compressing the height of thecharacters.

Subscript
Start Subscript Function (STRSUBS) Tag
The STRSUBS (start subscript) tag defines the ASCII control sequence for starting
the subscript function for an ASCII printer. The syntax for this tag is::STRSUBSDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the start
subscript function. This must be a hexadecimal value.

End Subscript Function (ENDSUBS) Tag
The ENDSUBS (end subscript) tag defines the ASCII control sequence for ending
the subscript function for an ASCII printer. The syntax for this tag is::ENDSUBSDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the end
subscript function. This must be a hexadecimal value.

Superscript
Start Superscript Function (STRSUPS) Tag
The STRSUPS (start superscript) tag defines the ASCII control sequence forstarting the superscript function for an ASCII printer. The syntax for this tag is::STRSUPSDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the startsuperscript function. This must be a hexadecimal value.

End Superscript Function (ENDSUPS) Tag
The ENDSUPS (end superscript) tag defines the ASCII control sequence for ending
the superscript function for an ASCII printer. The syntax for this tag is::ENDSUPSDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the end
superscript function. This must be a hexadecimal value.

Chapter 10. Customizing ASCII Printers That Use the Host Print Transform Function

173

Customizing Color
Foreground Color (FOREGRND) Tag
The FOREGRND (foreground color) tag defines the ASCII control sequence forsetting different colors when the printer supports color. The syntax for this tag is::FOREGRNDCOLOR = BLACK|BLUE|RED|PINK|GREEN|
CYAN|YELLOW|WHITE|DRKBLUE|
ORANGE|PURPLE|DRKGREEN|
TURQ|MUSTARD|GREY|BROWNDATA = ASCII control sequence.

COLOR
A required parameter. Defines the color to be used by the printer when it
supports different colors for printing.
BLACK

DRKBLUE (darkblue)
DRKGREEN (darkgreen)
GREEN
GREY

BLUE
BROWN
CYAN

MUSTARDRED

ORANGE

TURQ (turquoise)PINK
PURPLEWHITEYELLOWDATA
A required parameter. Specifies the ASCII control sequence for setting theforeground color. This must be a hexadecimal value.

Customizing Paper Input
You can customize the following paper input functions:
Paper drawer selection
Selecting paper drawer number
Additional paper drawer selection

Paper Drawer Selection (DWRSLT) Tag
The DWRSLT (drawer selection) tag defines the control sequences available forpaper drawer selection. This tag is only used for drawer 1, drawer 2, and theenvelope drawer. The syntax for this tag is::DWRSLTDRAWER = PAPER|ENVELOPE|
DRAWER1|DRAWER2DATA = ASCII control sequence.

DRAWERA required parameter. Defines the drawer selection.

174

PAPER

The drawer selection is manual paper feed.

ENVELOPE

The drawer selection is envelope.

DRAWER1

The drawer selection is drawer 1.

DRAWER2

The drawer selection is drawer 2.

OS/400 Workstation Customization Programming V4R3

DATA
A required parameter. Specifies the ASCII control sequence for paper drawer
selection. This must be a hexadecimal value.

Selecting Paper Drawer Number (DWRNBR) Tag
The DWRNBR (select paper drawer number) tag selects the printer paper drawer.
The drawer number is a variable in the ASCII control sequence. This tag is onlyused if the drawer number is greater than two (2). The syntax for this tag is::DWRNBR

VAROFFSET = variable offset incontrol sequence
VARLEN = variable length
VARTYPE = HIGHLOW|LOWHIGH|CHRDEC|CHRHEX|DATA = ASCII control sequence.

VAROFFSET
A required parameter. Defines the offset for the variable portion of the control
sequence. This value must be an integer.
Note: This offset is relative to the beginning of the control sequence.
Therefore, a value of zero (0) implies that the variable starts in the first
byte of the control sequence.
VARLENA required parameter. Defines the length of the variable portion of the control
sequence. This value must be an integer (number of bytes). If this value is zero(0), the ASCII sequence is used without a variable.
VARTYPE
A required parameter. This attribute defines the type of variable. Possible values
are:
HIGHLOW

The byte order of the variable is in high-low order. The first
byte is the most significant.

LOWHIGHThe byte order of the variable is in low-high order. The lastbyte is the most significant.

CHRDECThe variable is in character decimal format with no byte orderconsideration. All characters are in the range 0 to 9. Many
Hewlett-Packard printers use this variable type.

CHRHEX

The variable is in character hexadecimal format with no byteorder consideration. All characters are in the range 0 to 9, A toF.

DATA
A required parameter. Specifies the ASCII control sequence for selecting thepaper drawer number. This must be a hexadecimal value.

Additional Paper Drawer Selection
The ADDDRWTBL (Additional Paper Drawer Selection) tag is used to selectadditional paper source drawers. This tag is only used if the drawer number isgreater that two (2). The paper drawer selection tag is used to specify drawer 1 anddrawer 2.

Chapter 10. Customizing ASCII Printers That Use the Host Print Transform Function

175

You begin the support for additional paper drawer selection with the ADDDRWTBL
tag and end the support with the EADDDRWRTBL tag. The ADDDRWTBLE tags
falls between defining each additional drawer.
Using the additional paper drawer selection tags, your source could look something
like this for a printer supporting two additional source drawers.
:ADDDRWTBL.
:ADDDRWTBLE...
:ADDDRWTBLE...
:EADDDRWTBL.

Following is a description of each of the tags used to support different drawer
selection.

Additional Drawer Selection (ADDDRWTBL) Tag
The ADDDRWTBL tag defines additional source drawer entries. One or more ofthese tags must follow the ADDDRWTBLE tag containing the additional source
drawer. There are no parameters on this tag. The syntax is::ADDDRWTBL.

Additional Paper Drawer Selection Entry (ADDDRWTBLE) Tag
The ADDDRWTBLE tag defines additional source drawer entries. The ADDDRWTBL
tag must be follows by one or more ADDDRWTBLE tags. A group of
ADDDRWTBLE tags must be followed by the EADDDRWTBLE tag. The syntax is::ADDDRWTABLENUMBER = 3-255
DATA = ' 'X.

NUMBER
This is a required parameter. This parameter defines the source drawer.
DATA
This is a required parameter. This parameter specifies the ASCII control
sequence for the drawer specified. This must be a hexadecimal value.

End Additional Paper Drawer Selection (EADDDRWTBL) Tag
The EADDDRWTBL tag is used to end a group of additional drawer entries in thecustomizing source. There are no parameters on this tag. The syntax is::EADDDRWTBL.
||

Customizing Paper Output|

You can customize the following paper output functions:v Output bin selectionv Jog output trayv Duplex|

v Simplex

|
|
|

|

Output Bin Selection
You can define support for multiple output bins. You begin the support for output bin
selection with the OUTBINTBL tag and end the support with the EOUTBINTBL tag.
The OUTBINTBLE tags fall between the defining each output bin.

|
|
|

176

OS/400 Workstation Customization Programming V4R3

||Using this output bin tags, your source could look something like this for a printersupporting multiple output bins.

|
|
|
|

:OUTBINTBL.
:OUTBINTBLE....
:OUTBINTBLE....
:EOUTBINTBL.

||

The following section describes the tags that are used to support output bin
selection.

|

Output Bin Selection (OUTBINTBL) Tag

|
|
|
|

The OUTBINTBL tag allows the Host Print Transform workstation customizing
objects to support multiple output bins. This tag must be followed by one or more
OUTBINTBLE tags that contain the output bins. There are no parameters on thistag. The syntax is:|:OUTBINTBL.

|

Output Bin Selection Entry (OUTBINTBLE) Tag|||

The OUTBINTBLE tag defines a particular output destination. This tag must be
follows by one or more OUTBINTBL tage. The EOUTBINTBL tag must follow agroup of OUTBINTBLE tags. The syntax is:|||:OUTBINTBLENUMBER = 1-65535
DATA = ' 'X.

||

NUMBER
This is a required parameter. This parameter defines the output destination.

|
|
|

DATA
This is a required parameter. This parameter specifies the ASCII control
sequence for the output destination. This must be a hexadecimal value.

|

End Output Bin Selection (EOUTBINTBL) Tag||

The EOUTBINTBL tag is used to end a group of output bin table entries in thecustomizing source. There are no parameters on this tag. The syntax is:|:EOUTBINTBL.

|

Jog Output Tray|

Jog Output Tray (JOGOUTTRAY) Tag||

The JOGOUTTRAY (jog output tray) tag defines the ASCII control sequence for thejob output tray function for an ASCII printer. The syntax for this tag is:||:JOGOUTTRAYDATA = ASCII control sequence.

|
|
|

DATA
A required parameter. Specifies the ASCII control sequence for the jog output
tray function. This must be a hexadecimal value.

Chapter 10. Customizing ASCII Printers That Use the Host Print Transform Function

177

|

Duplex|Set Duplex Printing (DUPXPRT) Tag

|
|
|
|

The DUPXPRT (duplex printing) tag defines the ASCII control sequence for the
duplex printing function for an ASCII printer. The DUPXPRT control prints on bothsides of a sheet of paper, from left to right. (Contrast the DUPXPRT control with the
TUMDUPXPRT control.) The syntax for this tag is:||:DUPXPRT

|
|
|

DATA
A required parameter. Specifies the ASCII control sequence for the duplex
printing function. This must be a hexadecimal value.

|

Select Next Side Printing in Duplex (NXTDUPXPRT) Tag

|
|
|
|

The NXTDUPXPRT (select next side printing in duplex) tag defines the ASCII
control sequence for the select next side printing in duplex function for an ASCII
printer. If you do not define this tag, but the host print transform function requests it,a form feed is substituted for the NXTDUPXPRT tag. The syntax for this tag is:||:NXTDUPXPRTDATA = ASCII control sequence.

|
|
|

DATA
A required parameter. Specifies the ASCII control sequence for the select next
side printing in duplex function. This must be a hexadecimal value.

|

Set Tumble Duplex Printing (TUMDUPXPRT) Tag

|
|
|
|
|

The TUMDUPXPRT (set tumble duplex printing) tag defines the ASCII control
sequence for the set tumble duplex printing function for an ASCII printer. The
TUMDUPXPRT control prints on both sides of a sheet of paper, from top-to-bottom.
(Contrast the TUMDUPXPRT control with the DUPXPRT control.) The syntax for
this tag is:||:TUMDUPXPRTDATA = ASCII control sequence.

|
|
|

DATA
A required parameter. Specifies the ASCII control sequence for the set tumble
duplex printing function. This must be a hexadecimal value.

|

DATA = ASCII control sequence.

Simplex|Set Simplex Printing (SMPXPRT) Tag|||

The SMPXPRT (set simplex printing) tag defines the ASCII control sequence for theset simplex printing function for an ASCII printer. The SMPXPRT tag sets the printerto print on one side of the paper. The syntax for this tag is:||:SMPXPRT

|
|
|

DATA
A required parameter. Specifies the ASCII control sequence for the set simplex
printing function. This must be a hexadecimal value.

178

DATA = ASCII control sequence.

OS/400 Workstation Customization Programming V4R3

Customizing Print Orientation
You can customize the following print orientation functions:v Print angle
v Paper Orientation

Print Angle (PRTANGLE) Tag
This tag defines the control sequence for setting the print direction on the page.
This allows printing in all four orientations on the same page. The syntax of this tag
is::PRTANGLE
ANGLE
DATA

= 0|90|180|270= ASCII control sequence.

ANGLE
A required parameter. Specifies the angle at which the output prints. This value
must be an integer.
0

The angle of printing is 0 degrees.

90 The angle of printing is 90 degrees.
180
The angle of printing is 180 degrees.
270
The angle of printing is 270 degrees.
DATA
A required parameter. This parameter specifies the ASCII control sequence forthe print angle printer function. This must be a hexadecimal value.

Paper Orientation (PRTORIENT) Tag
The PRTORIENT (paper orientation) tag defines the control sequence for setting
different paper orientations. The syntax for this tag is::PRTORIENTORIENT = PORTRAIT|LANDSCAPE|
RTT180|RTT270
DATA = ASCII control sequence.

ORIENT
A required parameter. The orientation in which a job prints.
PORTRAITThe print job prints in an orientation rotated 0 degrees.

LANDSCAPE

The print job prints in an orientation rotated 90 degrees.

RTT180The print job prints in an orientation rotated 180 degrees.

RTT270The print job prints in an orientation rotated 270 degrees.

DATA
A required parameter. Specifies the ASCII control sequence for setting thepaper orientation for the printer. This must be a hexadecimal value.

Chapter 10. Customizing ASCII Printers That Use the Host Print Transform Function

179

Customizing Print Quality
Print Quality (PRTQLTY) Tag
The PRTQLTY (print quality) tag defines the control sequence for selecting the levelof print quality (such as draft or letter) an ASCII printer provides. The syntax for thistag is::PRTQLTYQLTYTYPE = DRAFT|LETTER|TEXTDATA = ASCII control sequence.

QLTYTYPE
A required parameter. Defines the quality of print.
DRAFT

The print quality is draft quality. This is equivalent to the *DRAFT typeused in the OS/400 printer file commands.

LETTER

The print quality is letter quality. This is equivalent to the *NLQ typeused in the OS/400 printer file commands.

TEXT

The print quality is text quality. This is equivalent to the *STD type usedin the OS/400 printer file commands.

DATA
A required parameter. Specifies the ASCII control sequence for the function.
This is a hexadecimal value.

Customizing Fonts
You can change the appearance of characters printed by an ASCII printer byselecting and customizing fonts. You can choose a range of fonts to be used by theprinter. You can also customize individual fonts that are used by the printer.
When customizing fonts, consider the following:v Individual font definitions are read before group font definitions.
v The first group definition that satisfies the font request is used.
v If you do not specify font-width data, a system-supplied font width is used.
v You do not have to define font widths for fixed-pitch type styles unless the font
identifier you specify is outside the normal range of font identifiers for a particularpitch.
For example, the normal range of font identifiers is from 1 to 65 for a 10-pitch
type style. If you specify a font identifier greater than 65 for a 10-pitch type style,
you must also define a font width for that type style.
v If you specify font-width data, the data values must be either 256 or 512 bytes inlength. A maximum width of 255/1440ths of an inch per character can fit in asingle byte. If the font widths of all characters can fit in a single byte, the data
values are 256 bytes in length. If the font width of any one character exceeds
255/1440ths of an inch in width, use a 2-byte value for each character. The data
values are then 512 bytes in length.
v To ensure your print jobs look similar to print jobs generated from the host, youmust specify font-width data equal to, or less than, the font-width data used by
the host application.
For example, if you use the justify function with a proportional-spaced font in an
OfficeVision/400 document, the OfficeVision/400 program uses its own internal

180

OS/400 Workstation Customization Programming V4R3

font widths. If the OfficeVision/400 font widths are narrower, on average, than the
font width defined in the workstation customizing object, your document may notjustify properly.
v For fixed-pitch fonts, character per inch (CPI) definitions are read last.
v Type style requests are automatically generated for IBM page printer data stream
level 2, Hewlett-Packard PCL4, and Hewlett-Packard PCL5 tables.
v For proportional and typographic fonts, start proportional mode tags and end
proportional mode tags are read last.
Following is a description of the tags used to customize fonts.

Font Groups
You can choose font groups used by an ASCII printer. Using the font group tags,
your source could look something like this for a printer supporting five separate fontgroups::FNTGRP.
:FNTGRPE....
:FNTGRPE....
:FNTGRPE....
:FNTGRPE....
:FNTGRPE....
:EFNTGRP.

Following is a description of each of the tags used to support font groups for an
ASCII printer.

Font Group (FNTGRP) Tag
The FNTGRP (font group) tag defines the beginning of one or more font groupentry (FNTGRPE) tags. It must be followed by one or more FNTGRPE tags. The
syntax for the FNTGRP tag is::FNTGRP.

Font Group Entry (FNTGRPE) Tag
The FNTGRPE (font group entry) tag defines a range of fonts. The FNTGRPE tag
must follow either a FNTGRP (font group) tag or another FNTGRPE tag in yoursource. A group of one or more of these tags must be followed by an EFNTGRP
tag. The syntax for this tag is::FNTGRPEMINFID = font identifier (integer)
MAXFID = font identifier (integer)
FNTSTR = start font ASCII control
sequence
FNTEND = end font ASCII control
sequenceFNTWTH = character width data of
the font.

MINFID
A required parameter. Defines the smallest font identifier in a group. This value
must be an integer.
MAXFID
A required parameter. Defines the largest font identifier in a group. This value
must be an integer.

Chapter 10. Customizing ASCII Printers That Use the Host Print Transform Function

181

FNTSTRA required parameter. Defines the ASCII control sequence to start a fontrequest.
FNTENDAn optional parameter. Defines the ASCII control sequence to end a fontrequest. If no ASCII control sequence is defined to end a font request, ''X must
be entered.
FNTWTHAn optional parameter. Specifies the individual character widths in 1/1440-inch
increments for the font group range. If specified, this must be either a 256-byteor 512-byte hexadecimal value. If no font-width data is defined, ''X must beentered.
Notes:
1. The ranges specified for MINFID and MAXFID are not validated for different
FNTGRPE tags to ensure that they do not overlap.
2. Validation is not performed to ensure individual fonts (INDFNTE) are not definedwithin a range of fonts specified in a FNTGRPE tag.
3. For information on font identifiers, see the Printer Device Programming book.

End Font Group (EFNTGRP) Tag
The EFNTGRP (end font group) tag ends the font group definition for a transform
table. The syntax for this tag is::EFNTGRP.

Individual Fonts
You can customize individual fonts used by an ASCII printer. Using the individual
font tags, your source could look something like::INDFNT.
:INDFNTE....
:INDFNTE....
:INDFNTE....
:INDFNTE....
:INDFNTE....
:EINDFNT.

Following is a description of each of the tags used to support individual fonts for an
ASCII printer.

Individual Font (INDFNT) Tag
The INDFNT (individual font) tag defines the beginning of one or more INDFNTE
tags. The INDFNT tag must be followed by one or more individual font entry(INDFNTE) tags. The syntax for this tag is::INDFNT.

Individual Font Entry (INDFNTE) Tag
The INDFNTE (individual font entry) tag defines an individual font. One or moreindividual font entry tags can be defined, but must follow the INDFNT tag. The
INDFNTE tag or tags must be followed by the EINDFNT tag. The syntax for this tag
is:

182

OS/400 Workstation Customization Programming V4R3

:INDFNTEFID = font identifier (integer)
POINTSIZE = font point size
(integer)
FNTSTR = start font ASCII control
sequence
FNTEND = end font ASCII control
sequenceFNTWTH = character width data of
the font.

FID
A required parameter. Identifies the individual font. This value must be an
integer. For information on font identifiers, see the Printer Device Programming
book.
POINTSIZE
Specifies the point size of the individual font in 1/72-inch increments. This value
must be an integer. If the font point size is not required (for example, if you are
defining a fixed-pitch font), 0 (zero) must be entered.
FNTSTRA required parameter. The ASCII control sequence for the start of the font.
FNTEND
The ASCII control sequence for the end of the individual font. If there is no end
font ASCII control sequence, ''X must be specified.
FNTWTHSpecifies the individual character widths in 1/1440-inch increments for theindividual font. This must be specified as a 256-byte or 512-byte hexadecimalvalue. If there is no font-width data, ''X must be specified.
Notes:
1. The last data element within this tag entry must be followed by a period.
2. The FID and POINTSIZE parameter pairs are not validated to ensure they are
not duplicated.
3. The FID parameter is not checked to see if it is already defined in a font group(FNTGRPE) tag.

End Individual Font (EINDFNT) Tag
The EINDFNT (end individual font) tag defines the end of one or more INDFNTE
tags. The syntax for this tag is::EINDFNT.

Font Mapping
Font global identifiers (FGID) can be mapped to AS/400 AFP bit map fonts. You
begin support for font mapping with the FNTMAPTBL tag and end the support with
the EFNTMAPTBL tag. The FNTMAPE tags fall between defining each FGID that is
mapped to an AS/400 bit map font.
Using the font mapping tags, your source could look like the following::FNTMAPTBL.
:FNTMAPE....
:FNTMAPE....
:FNTMAPE....
:EFNTMAPTBL.

Chapter 10. Customizing ASCII Printers That Use the Host Print Transform Function

183

Following is a description of each of the tags used to support font mapping.

Font Mapping (FNTMAPTBL) Tag
The FNTMAPTBL tag defines the mapping of Font Global Identifiers (FGID) to
AS/400 AFP bit map fonts. This tag must be followed by one or more FNTMAPE
tag containing the font mapping. There are no parameters to this tag. The syntax is::FNTMAPTBL.

Font Mapping Entry (FNTMAPE) Tag
The FNTMAPE tag defines the font mapping of Font Global Identifiers (FGID) to
AS/400 AFP bit map fonts. One or more of these tags must be follow theFNTMAPTBL tag. A group of FNTMAPE tags must be followed by the
EFNTMAPTBL tag. The syntax is::FNTMAPE
FGID = Integer (FGID value)
POINTSIZE = font point size
Name = 8 character set name
LIBRARY = 10 character set library name.

FGID
This is a required parameter. This parameter defines the font type global
identifier.
POINTSIZE
This parameter specifies the point size of the individual font in 1/72-inch
increments. This value must be an integer. If the font point size is not required(for example, if you are defining a fixed point font), 0 must be entered.
NAME
This is a required parameter. This parameter specifies the name of the resident
bitmap font character set. This is 8 characters.
LIBRARY
This is a required parameter. This parameter specifies the library where thecharacter set resides. This is 10 characters.

End Font Mapping (EFNTMAPTBL) Tag
The EFNTMAPTBL tag is used to end a group of font map table entries in thecustomizing source. There are no parameters on this tag. The syntax is::EFNTMAPTBL.

Customizing Code Page Support
The workstation customizing functions allow you to customize code page support
for an ASCII printer. You can:Customize EBCDIC-to-ASCII code page mapping
Support additional ASCII code pages
Override the default ASCII code page
When you specify code page information in a customizing object, the customizing
object information takes precedence over information in system-supplied code pagetables. If you remove code page tags from a customizing object, code page
information continues to be read from the system-supplied tables.

184

OS/400 Workstation Customization Programming V4R3

Customizing EBCDIC-to-ASCII Code Page Mapping
EBCDIC-to-ASCII mapping tables convert an EBCDIC character specified in an
application data stream into an ASCII character code value (for that samecharacter). The EBCDIC-to-ASCII mapping table used for a given ASCII printerdepends on the manufacturer, type, and model configured for the printer. Different
types of ASCII printers support different ASCII code pages. The code page in use at
any time is determined by a command to select the ASCII code page.
You can customize the EBCDIC-to-ASCII mapping that should be used for an ASCII
printer. You can customize the mapping to replace the entire ASCII code page
mapped to an EBCDIC code page. For example, the U.S. English EBCDIC code
page 037 normally maps to the ASCII code page 437. You could use these tags to
map EBCDIC code page 037 to an ASCII code page other than 437 (such as ASCII
code page 850).
The following code page mapping tables are available on the AS/400 system foruse by the host print transform function. The default mapping table is the mappingtable used if you do not override the default table using a customizing object.
Default
ASCII Code
Page

Alternate
ASCII Code
Page

Alternate
ASCII Code
Page

Alternate
ASCII Code
Page

Alternate
ASCII Code
Page

037

437

850

860

863

1051

273

850

437

1051

277

850

865

1051

278

850

437

865

280

850

437

1051

282

850

860

1051

284

850

437

1051

285

850

437

1051

297

850

437

1051

420

864

1051

423

851

1051

424

856

862

1051

500

850

437

860

861

838

874

1051

870

852

1051

871

850

437

861

1051

875

869

1051

880

850

1051

905

857

1051

1025

850

1051

1026

857

1051

EBCDIC
Code Page
Used

Alternate
ASCII Code
Page

Alternate
ASCII Code
Page

865

1051

1051

863

In addition, you can map the EBCDIC symbols code page (code page 259) to an
ASCII code page. If you configure a printer to support the ASCII symbols code page
Chapter 10. Customizing ASCII Printers That Use the Host Print Transform Function185

(code page 899), the complete mapping from EBCDIC code page 259 to ASCII
code page 899 is used. Otherwise, a partial mapping is done from EBCDIC code
page 259 to the currently defined ASCII code page. The partial mapping can bedone from EBCDIC code page 259 to any of the following ASCII code pages:
437

850

851

852

856

857

860

861

862

863

864

865

869

874

899

1051

For more information on specific code pages, see the International Application
Development book. For information on generating your own code page mappingtable in QUSRSYS, see the Create Table (CRTTBL) command in the CL Reference(Abridged) book.
You can also customize EBCDIC-to-ASCII mapping for an individual code point
within an EBCDIC code page. When you customize the mapping for an individual
code point, though, you must indicate data values for every code point within thecode page. You cannot just indicate the data value for the code point you wantcustomized.
You begin support for various mapping tables with an EBCASCTBL tag, and end
the support with an EEBCASCTBL tag. The EBCASCTBLE tags fall between thestart and end tags to define the EBCDIC-to-ASCII mapping using the DATA
parameter.
Using the EBCDIC-to-ASCII definition tags, your source could look something likethis:
:EBCASCTBL.
:EBCASCTBLE...
.
.
:EBCASCTBLE...
.
.
:EEBCASCTBL.

Following is a description of each of the tags used to support EBCDIC-to-ASCII
mapping for an ASCII printer.

EBCDIC-to-ASCII Mapping Table (EBCASCTBL) Tag
You use the EBCASCTBL tag to begin a group of one or more EBCASCTBLE tags.
This tag must be followed by one or more mapping table entry (EBCASCTBLE)
tags. There are no parameters on this tag. The syntax for this tag is::EBCASCTBL.

EBCDIC-to-ASCII Mapping Table Entry (EBCASCTBLE) Tag
You specify the EBCDIC-to-ASCII conversion table for an ASCII printer using the
DATA parameter of the EBCASCTBLE (EBCDIC-to-ASCII mapping table entry) tag.
The EBCASCTBLE tag must follow an EBCASCTBL tag. The syntax for this tag is::EBCASCTBLE
EBCDICCP = EBCDIC code page
identifier (integer)

186

OS/400 Workstation Customization Programming V4R3

ASCIICP = ASCII code page
identifier (integer)
DATA = EBCDIC to ASCII table data.

EBCDICCP
A required parameter. Specifies the EBCDIC code page identifier.

code page ID
A registered identifier used to specify a particular assignment of code points
to graphic characters.
ASCIICPA required parameter. Specifies the ASCII code page identifier.

code page ID
A registered identifier used to specify a particular assignment of code points
to graphic characters.
DATA
A required parameter. Specifies the hexadecimal data that is used to map
EBCDIC codes from the AS/400 system to the ASCII codes needed by the
ASCII printer.
When you customize to replace the entire ASCII code page mapped to an
EBCDIC code page, you set the DATA value to ''X (null). For example, EBCDIC
code page 277 maps to ASCII code page 865 by default. If you prefer to map
EBCDIC code page 277 to ASCII code page 1051 (Roman 8), enter thefollowing in your customizing source::EBCASCTBLE
EBCDICCP = 277
ASCIICP = 1051
DATA = ''X.

When you customize for an individual code point within an ASCII code page,
you must indicate data values for every code point within the code page. You
cannot just indicate the data value for the code point you want customized. The
data must be hexadecimal, and exactly 192 bytes in length. For example,
EBCDIC code page 277 maps to ASCII code page 865 by default. You like thisEBCDIC-to-ASCII code page mapping, except for the mapping of one character.
To change the code page mapping for that character, you must indicate data
values for every code point within the code page, not just for the code point you
want changed.

End EBCDIC-to-ASCII Mapping Table (EEBCASCTBL) Tag
You use the EEBCASCTBL (end EBCDIC-to-ASCII mapping table) tag to end the
EBCDIC-to-ASCII mapping customization. The syntax for this tag is::EEBCASCTBL.

Supporting Additional ASCII Code Pages
Support for each ASCII code page begins with an ASCCPINFO tag and ends with
an EASCCPINFO tag. The following tags fall between the start and end tags to fully
define the support of additional code pages:
CODEPAGEASCIICTL

Chapter 10. Customizing ASCII Printers That Use the Host Print Transform Function

187

Using the ASCII code page support tags, your source could look something like thisfor a printer supporting five separate code pages::ASCCPINFO.
:CODEPAGE....
:ASCIICTL....
:ASCIICTL....
:CODEPAGE....
:ASCIICTL....
:CODEPAGE....
:CODEPAGE....
:CODEPAGE....
:ASCIICTL....
:ASCIICTL....
:ASCIICTL....
:EASCCPINFO.

Following is a description of each of the tags used to support code pages for an
ASCII printer.

ASCII Code Page Information (ASCCPINFO) Tag
The ASCCPINFO (ASCII code page information) tag defines the beginning of agroup of different ASCII code points within a specified ASCII code page. The
ASCCPINFO tag must immediately precede a CODEPAGE tag in your source. The
syntax for this tag is::ASCCPINFO.

Code Page (CODEPAGE) Tag
The CODEPAGE (code page) tag defines the ASCII control sequence for selecting
the ASCII code page. The CODEPAGE tag must follow the ASCCPINFO tag,
another CODEPAGE tag, or an ASCIICTL tag in your source. You can use morethan one CODEPAGE tag, but these tags must come between the ASCCPINFO
and EASCCPINFO tags. The syntax for this tag is::CODEPAGE
CODEPAGE = ASCII code page (integer)
DATA = ASCII control sequence.

CODEPAGE
A required parameter. Specifies the identifier (ID) of the ASCII code page to be
selected. Any integer value is accepted.
DATA
A required parameter. Specifies the ASCII control sequence for selecting the
ASCII code page on the ASCII printer. This must be a hexadecimal value. The
ASCII control sequence for selecting an ASCII code page is sent to the printerwhen that code page is requested in the data stream.

ASCII Control Code Mapping (ASCIICTL) Tag
The ASCIICTL (ASCII control code mapping) tag defines the ASCII control
sequence for an ASCII control code. The ASCIICTL tag must immediately follow the
CODEPAGE tag or another ASCIICTL tag in your source. You can use more thanone ASCIICTL tag, but these tags must follow a CODEPAGE tag. The syntax for
this tag is::ASCIICTLASCII = control code
DATA = ASCII control sequence.

188

OS/400 Workstation Customization Programming V4R3

ASCII
A required parameter. Specifies an ASCII control code. This must be ahexadecimal value from '01'X to 'FF'X.
DATA
A required parameter. Specifies the ASCII control sequence that is substituted
for the ASCII control code you want to map. This must be a hexadecimal value.
Specifying the ASCIICTL tag allows you to convert a single-byte control code to a
multiple-byte control sequence. For example, you could use this code to have theprinter print characters that are not normally in the range of printable characters(such as a heart or a diamond shape). You could also use this tag to allow theprinter to change to a different code page to print a single character. Then you canhave the printer change back to the original code page.

End ASCII Code Page Information (EASCCPINFO) Tag
The EASCCPINFO (end ASCII code page information) tag ends a group of
CODEPAGE and ASCIICTL tags defining ASCII code page support for an ASCII
printer. This tag must come after an ASCCPINFO tag, and immediately following
either a CODEPAGE or an ASCIICTL tag in your source. The syntax for this tag is::EASCCPINFO.

Overriding the Default ASCII Code Page (DFTASCCP) Tag
The DFTASCCP (default ASCII code page) tag allows you to override the default
ASCII code page for all EBCDIC code page values. You might use this tag toreplace an IBM-defined code page with the code page defined by anothermanufacturer for a specific printer. For example, Hewlett-Packard printers havecode pages defined that differ from the code pages defined by IBM. With the
DFTASCCP tag, you can support a Hewlett-Packard defined code page. TheDFTASCCP tag is used only when searching the system-supplied tables. The
syntax for this tag is::DFTASCCPASCIICP = default ASCII code page
identifier (integer).

ASCIICPA required parameter. Specifies the ASCII code page identifier that should be
used in place of the recommended ASCII code page for all EBCDIC code pagevalues. The identifier must be an integer. The code page identifier is not
validated to ensure you have entered a valid code page.
|
|
|
|
|
|
|
|

Customizing Fax Support
Facismile Support/400 with a modem connection is supported by host print
transform customizing. The tags can only be used when the printer data stream
values are:
IOCA_G3MH
IOCA_G3MRK2
IOCA_G3MRK4Chapter 10. Customizing ASCII Printers That Use the Host Print Transform Function

189

|

Fax Size|||

You can customize printing for various fax sizes. You begin support for various fax
sizes with an FAXSIZXFM tag, and end the support with an EFAXSIZXFM tag. The
FAXSIZE tags fall between the start and end tags to define each different fax size.

||

Using the fax size tags, your source could look something like this for two different
fax sizes:

|
|
|
|

:FAXSIZXFM.
:FAXSIZE....
:FAXSIZE....
:EFAXSIZXFM.

|

The following section describes the tags used to support different fax sizes.

|

Fax Size for Transform (FAXSIZXFM) Tag|||

The FAXSIZXFM (fax size for transform) tag defines the image output size for eachdrawer number. This tag must be followed by one or more fax size entry (ENVSIZE)
tags that contain the fax sizes. The syntax for the FAXSIZXFM tag is:|:FAXSIZXFM.

|Fax Size Entry (FAXSIZE) Tag

|
|
|
|

The FAXSIZE (fax size entry) tag defines the image output size for a particulardrawer number. One or more of these tags follows an FAXSIZXFM tag. An
EFAXSIZXFM tag must follow a group of one or more of these tags. The syntax for
the ENVSIZE tag is:

|
|
|
|

:FAXSIZE||

DRAWERA required parameter. Defines the drawer number for the output size.

DRAWER = 0-255
IMGWTH = image width in pels
IMGLEN = image length in pels.

|

0

The envelope drawer is specified.

|

1-255

The drawer 1-255 is specified.

|||

IMGWTHA required parameter. Specifies the output image width in pels. This value must
be an integer.

|||

IMGLENA required parameter. Specifies the output image in length pels. This value
must be an integer.

|

End Fax Size for Transform (EFAXSIZXFM) Tag||

The EFAXSIZXFM (end fax size for transform) tag ends a group of fax size entries.
The syntax for this tag is:||:EFAXSIZXFM.

190

OS/400 Workstation Customization Programming V4R3

||

Customizing Double-Byte Character Set (DBCS) Support|

CCSID Mapping

|
|
|
|

You can customize the mapping of EBCDIC to ASCII CCSID’s for double-bytecharacter conversion. You begin the support for the EBCDIC to ASCII CCSID
mapping with the EBCASCCSID tag and end the support with the EEBCASCCSID
tag. The EBCASCCSIDE tags fall between defining each CCSID mapping.

||

Using the EBCDIC to ASCII CCSID mapping tags, your source could looksomething like this for a printer supporting DBCS.

|
|
|
|

:EBCASCCSID.
:EEBACASCCSIDE....
:EEBACASCCSIDE....
:EEBCASCCSID.

|

If no tag is specified, the CCSID mapping is made according to the following table.

|

Table 31. Default CCSID Mapping Table|

From CCSID

Default CCSID

Language

|

5026

932

Japanese

|

5035

932

Japanese

|

930

932

Japanese

|

931

932

Japanese

|

939

932

Japanese

|

933

949

Korean

|

937

950

Traditional Chinese

|

935

1381

Simplified Chinese||

The following section describes the tags used to support specification of mapping of
EBCDIC to ASCII CCSIDs.

|

EBCDIC-to-ASCII CSSID mapping (EBCASCCSID) Tag|||

The EBCASCCSID tag is used to begin a group of one or more EBCASCCSIDE
tags. One or more CCSID mapping entries must follow this tag. There are no
parameters on this tag. The syntax is:|:EBASCCSID.

|EBCDIC-to-ASCII CSSID mapping entry (EBCASCCSIDE) Tag|||

The EBCACCSIDE tag defines the mapping of double-byte EBCDIC CCSIDs totheir ASCII CCSID. The EBCACCSIDE tags must follow an EBCASCCSID tag. The
syntax is:|||:EBCASCCSIDEEBCDICCSID = EBCDIC CCSID (integer)
ASCIICCSID = ASCII CCSID (integer).

|
|
|
|

EBCDICCSID
This is a required parameter. This parameter defines the EBCDIC CCSID
identifier. The CCSID is a registered ASCII identifier that is used to specify the
CCSID of the source characters.

Chapter 10. Customizing ASCII Printers That Use the Host Print Transform Function

191

|
|
|
|

ASCIICCSID
This is a required parameter. This parameter defines the ASCII CCSID identifier.
The CCSID is a registered ASCII identifier that is used to specify the CCSID of
the target characters.

||

End EBCDIC-to-ASCII CSSID mapping table entry(EEBCASCCSID) Tag||

The EEBCASCCSID tag is used to end the EBCDIC-to-ASCII CCSID mapping
customization. The syntax is:|:EEBCASCCSID.

|

Shift In (SI) Tag||

The SI tag defines the ASCII control sequence to select single-byte mode for an
ASCII printer. One byte of data represents printable characters. The syntax is:

|
|

:SI

|
|
|

DATA
A required parameter. Specifies the ASCII control sequence for the printerfunction. This must be a hexadecimal value.

|

DATA = ASCII control sequence.

Shift Out (SO) Tag||

The SO tag defines the ASCII control sequence to select double-byte mode for an
ASCII printer. Two bytes of data represent printable characters. The syntax is:

|
|

:SO

|
|
|

DATA
A required parameter. Specifies the ASCII control sequence for the printerfunction. This must be a hexadecimal value.

|

DATA = ASCII control sequence.

DBCS Space (DBSPACE) Tag||

The DBSPACE tag defines the ASCII control sequence for the double-byte spacecontrol function for an ASCII printer. The syntax is:||:DBSPACEDATA = ASCII control sequence.

|
|
|

DATA
A required parameter. Specifies the ASCII control sequence for the printerfunction. This must be a hexadecimal value.

|

Character Orientation (CHRORIENT) Tag||

The CHRORIENT tag defines the control sequence for setting different characterorientations. The syntax is:|||:CHRORIENTORIENT = PORTRAIT|LANDSCAPE|RTT180|RTT270
DATA = ASCII control sequence.

||

ORIENT
A required parameter. Specifies the orientation that a character prints.

||

PORTRAIT192

Characters print in an orientation rotated 0 degrees.

OS/400 Workstation Customization Programming V4R3

|LANDSCAPE

Characters print in an orientation rotated 90 degrees.

|

RTT180Characters print in an orientation rotated at 180 degrees.

|

RTT270Characters print in an orientation rotated at 270 degrees.

|
|
|

DATA
A required parameter. Specifies the ASCII control sequence for the printerfunction. This must be a hexadecimal value.

|

Set Character Pitch (SCPITCH) Tag||

The SCPITCH tag defines the control sequence for setting the number ofcharacters per inch. The syntax is:

|
|
|
|
|
|
|

:SCPITCH
VAROFFSET = variable offset in control sequence
VARLEN = variable length
VARTYPE = HIGHLOW|LOWHIGH|CHRDEC|CHRHEX|CHRAN
CNVNUM = conversion ratio numerator
CNVDEN = conversion ratio denominator
DATA = ASCII control sequence.

|||

VAROFFSETThis is a required parameter. This parameter specifies the offset for the variable
portion of the control sequence. This value must be an integer.

|||

Note: This offset is relative to the beginning of the control sequence.
Therefore, a value of 0 implies that the variable starts in the first byte of
the control sequence.

|
|
|
|

VARLEN
This is a required parameter. This parameter specifies the length of the variable
portion of the control sequence. This value must be an integer (number ofbytes).

|||VARTYPA required parameter. This parameter specifies the type of variable that is usedwith the category of printer function tags.

|||

HIGHLOW

The byte order of the variable is in high-low order. The mostsignificant byte is first.

||

LOWHIGHThe byte order of the variable is in low-high order. The mostsignificant byte is last.

|||

CHRDECThe variable is in character decimal format with no byte orderconsideration. All characters are in the range of 0 to 9. Many
Hewlett-Packard ASCII printers use this type of variable.

||

CHRHEX

The variable is in character hexadecimal format with no byteorder consideration. All characters are in the range of A to F.

|
|
|

CHRAN

The variable is in character alphanumeric format with no byteorder consideration. All characters are in the range of 0 to 9, A
to Z.

|
|
|
|

CNVNUMA required parameter. This parameter specifies the numerator of the conversion
ratio. This value must be an integer. The most commonly used value for
CNVNUM is 1.

Chapter 10. Customizing ASCII Printers That Use the Host Print Transform Function

193

CNVDEN
A required parameter. This parameter specifies the denominator of theconversion ratio. This value must be a nonzero integer.

|||

CNVDEN defines the units that are used for the variable portion. For example, if
movement is in 1/300ths, CNVNUM should be defined as 1 and CNVDEN
should be defined as 300.

|
|
|

DATA
A required parameter. This parameter specifies the ASCII control sequence forthe set top margin (inches) printer function. This must be a hexadecimal value.

|
|
|
|

Set Line Pitch (SLPITCH) Tag||

The SCPITCH tag defines the control sequence for setting the number of lines perinch. The syntax is:

|
|
|
|
|
|
|

:SCPITCH
VAROFFSET = variable offset in control sequence
VARLEN = variable length
VARTYPE = HIGHLOW|LOWHIGH|CHRDEC|CHRHEX|CHRAN
CNVNUM = conversion ratio numerator
CNVDEN = conversion ratio denominator
DATA = ASCII control sequence.

|||

VAROFFSETThis is a required parameter. This parameter specifies the offset for the variable
portion of the control sequence. This value must be an integer.

|||

Note: This offset is relative to the beginning of the control sequence.
Therefore, a value of 0 implies that the variable starts in the first byte of
the control sequence.

|
|
|
|

VARLEN
This is a required parameter. This parameter specifies the length of the variable
portion of the control sequence. This value must be an integer (number ofbytes).

|||VARTYPA required parameter. This parameter specifies the type of variable that is usedwith the category of printer function tags.

|||

HIGHLOW

The byte order of the variable is in high-low order. The mostsignificant byte is first.

||

LOWHIGHThe byte order of the variable is in low-high order. The mostsignificant byte is last.

|||

CHRDECThe variable is in character decimal format with no byte orderconsideration. All characters are in the range of 0 to 9. Many
Hewlett-Packard ASCII printers use this type of variable.

||

CHRHEX

The variable is in character hexadecimal format with no byteorder consideration. All characters are in the range of A to F.

|
|
|

CHRAN

The variable is in character alphanumeric format with no byteorder consideration. All characters are in the range of 0 to 9, A
to Z.

194

OS/400 Workstation Customization Programming V4R3

|
|
|
|

CNVNUMA required parameter. This parameter specifies the numerator of the conversion
ratio. This value must be an integer. The most commonly used value for
CNVNUM is 1.

|||

CNVDENA required parameter. This parameter specifies the denominator of theconversion ratio. This value must be a nonzero integer.

|
|
|
|
|
|
|

CNVDEN defines the units that are used for the variable portion. For example, if
movement is in 1/300ths, CNVNUM should be defined as 1 and CNVDEN
should be defined as 300.
DATA
A required parameter. This parameter specifies the ASCII control sequence forthe set top margin (inches) printer function. This must be a hexadecimal value.

Set Font Size Scaling (FONTSCALING) Tag||

The FONTSCALING tag defines the control sequence for setting the font size
scaling. The syntax is:

|
|
|
|
|
|
|

:FONTSCALING
VAROFFSET = variable offset in control sequence
VARLEN = variable length
VARTYPE = variable type
CNVNUM = conversion ratio numerator
CNVDEV = conversion ratio denominator
DATA = ASCII control sequence.

|||

VAROFFSETThis is a required parameter. This parameter specifies the offset for the variable
portion of the control sequence. This value must be an integer.

|||

Note: This offset is relative to the beginning of the control sequence.
Therefore, a value of 0 implies that the variable starts in the first byte of
the control sequence.

|
|
|
|

VARLEN
This is a required parameter. This parameter specifies the length of the variable
portion of the control sequence. This value must be an integer (number ofbytes).

|||VARTYPA required parameter. This parameter specifies the type of variable that is usedwith the category of printer function tags.

|||

HIGHLOW

The byte order of the variable is in high-low order. The mostsignificant byte is first.

||

LOWHIGHThe byte order of the variable is in low-high order. The mostsignificant byte is last.

|||

CHRDECThe variable is in character decimal format with no byte orderconsideration. All characters are in the range of 0 to 9. Many
Hewlett-Packard ASCII printers use this type of variable.

||

CHRHEX

The variable is in character hexadecimal format with no byteorder consideration. All characters are in the range of A to F.

Chapter 10. Customizing ASCII Printers That Use the Host Print Transform Function

195

|
|
|

CHRAN

|
|
|
|

CNVNUMA required parameter. This parameter specifies the numerator of the conversion
ratio. This value must be an integer. The most commonly used value for
CNVNUM is 1.

|||

CNVDENA required parameter. This parameter specifies the denominator of theconversion ratio. This value must be a nonzero integer.
CNVDEN defines the units that are used for the variable portion. For example, if
movement is in 1/300ths, CNVNUM should be defined as 1 and CNVDEN
should be defined as 300.

|
|
|

DATA
A required parameter. This parameter specifies the ASCII control sequence forthe set top margin (inches) printer function. This must be a hexadecimal value.

|
|
|
|

The variable is in character alphanumeric format with no byteorder consideration. All characters are in the range of 0 to 9, A
to Z.

Set Font Size Scale (FONTSCALE) Tag||

The FONTSCALE tag defines the control sequence for setting the font size scale.
The syntax is:|||:FONTSCALESCALE = 1VX1H | 2VX1H | 1VX2H | 2VX2HDATA = ASCII control sequence.

|
|

SCALE
A required parameter. Specifies the font size scaling.

||

1VX1H

Normal vertical, normal horizontal

|

2VX1H

Double vertical, normal horizontal

|

1VX2H

Normal vertical, double horizontal

|

2VX2H

Double vertical, double horizontal

|
|
|

DATA
A required parameter. Specifies the ASCII control sequence for the printerfunction. This must be a hexadecimal value.

|

CPI (Set Characters per Inch)||

The CPI tag defines the control sequence for setting the number of character perinch. To support DBCS printing, the additional values were added. The syntax is:

|
|
|

:CPI
CPI = 6|67|75|18|
DATA = ASCII control sequence.

|
|

CPI
A required parameter. Specifies the number of characters per inch.

|

6

6 characters per inch|

67

6.7 characters per inch|75

7.5 characters per inch|

18

18 characters per inch

196

OS/400 Workstation Customization Programming V4R3

|
|
|
|

DATA
A required parameter. Specifies the ASCII control sequence for setting thenumber of characters per inch. This must be a hexadecimal value.

Set Grid Type (GLTYPE) Tag||

The GLTYPE tag defines the control sequence for setting the grid line type. The
syntax is:

|
|
|
|
|

:GLTYPE
VAROFFSET = variable offset in control sequence
VARLEN = variable length
VARTYPE = variable type
DATA = ASCII control sequence.

|||

VAROFFSETThis is a required parameter. This parameter specifies the offset for the variable
portion of the control sequence. This value must be an integer.

|||

Note: This offset is relative to the beginning of the control sequence.
Therefore, a value of 0 implies that the variable starts in the first byte of
the control sequence.

|
|
|
|

VARLEN
This is a required parameter. This parameter specifies the length of the variable
portion of the control sequence. This value must be an integer (number ofbytes).

|||VARTYPA required parameter. This parameter specifies the type of variable that is usedwith the category of printer function tags.

|||

HIGHLOW

The byte order of the variable is in high-low order. The mostsignificant byte is first.

||

LOWHIGHThe byte order of the variable is in low-high order. The mostsignificant byte is last.

|||

CHRDECThe variable is in character decimal format with no byte orderconsideration. All characters are in the range of 0 to 9. Many
Hewlett-Packard ASCII printers use this type of variable.

||

CHRHEX

The variable is in character hexadecimal format with no byteorder consideration. All characters are in the range of A to F.

|
|
|

CHRAN

The variable is in character alphanumeric format with no byteorder consideration. All characters are in the range of 0 to 9, A
to Z.

|
|
|

DATA
A required parameter. This parameter specifies the ASCII control sequence forthe set top margin (inches) printer function. This must be a hexadecimal value.

|

Set Grid Line Width (GLWIDTH) Tag||

The GLWIDTH tag defines the control sequence for setting the grid line width. The
syntax is:

|
|
|
|
|

:GLWIDTH
VAROFFSET = varable offset in control sequence
VARLEN = variable length
VARTYPE = variable type
DATA = ASCII control sequence.
Chapter 10. Customizing ASCII Printers That Use the Host Print Transform Function

197

|
|
|

VAROFFSETThis is a required parameter. This parameter specifies the offset for the variable
portion of the control sequence. This value must be an integer.

|||

Note: This offset is relative to the beginning of the control sequence.
Therefore, a value of 0 implies that the variable starts in the first byte of
the control sequence.

|
|
|
|

VARLEN
This is a required parameter. This parameter specifies the length of the variable
portion of the control sequence. This value must be an integer (number ofbytes).

|||VARTYPA required parameter. This parameter specifies the type of variable that is usedwith the category of printer function tags.

|||

HIGHLOW

The byte order of the variable is in high-low order. The mostsignificant byte is first.

||

LOWHIGHThe byte order of the variable is in low-high order. The mostsignificant byte is last.

|||

CHRDECThe variable is in character decimal format with no byte orderconsideration. All characters are in the range of 0 to 9. Many
Hewlett-Packard ASCII printers use this type of variable.

||

CHRHEX

The variable is in character hexadecimal format with no byteorder consideration. All characters are in the range of A to F.

|
|
|

CHRAN

The variable is in character alphanumeric format with no byteorder consideration. All characters are in the range of 0 to 9, A
to Z.

|
|
|

DATA
A required parameter. This parameter specifies the ASCII control sequence forthe set top margin (inches) printer function. This must be a hexadecimal value.

|

Draw Grid Line (DRAWLINE) Tag||

The DRAWLINE tag defines the control sequence for the draw grid line function.
The syntax is:

|
|
|
|
|
|
|

:DRAWLINE
VAROFFSET = variable offset in control sequence
VARLEN = variable length
VARTYPE = variable type
CNVNUM = conversion ratio numerator
CNVNUM = conversion ration denominator
DATA = ASCII control sequence.

|||

VAROFFSETThis is a required parameter. This parameter specifies the offset for the variable
portion of the control sequence. This value must be an integer.

|||

Note: This offset is relative to the beginning of the control sequence.
Therefore, a value of 0 implies that the variable starts in the first byte of
the control sequence.

198

OS/400 Workstation Customization Programming V4R3

|
|
|
|

VARLEN
This is a required parameter. This parameter specifies the length of the variable
portion of the control sequence. This value must be an integer (number ofbytes).

|||VARTYPA required parameter. This parameter specifies the type of variable that is usedwith the category of printer function tags.

|||

HIGHLOW

The byte order of the variable is in high-low order. The mostsignificant byte is first.

||

LOWHIGHThe byte order of the variable is in low-high order. The mostsignificant byte is last.

|||

CHRDECThe variable is in character decimal format with no byte orderconsideration. All characters are in the range of 0 to 9. Many
Hewlett-Packard ASCII printers use this type of variable.

||

CHRHEX

The variable is in character hexadecimal format with no byteorder consideration. All characters are in the range of A to F.

|
|
|

CHRAN

The variable is in character alphanumeric format with no byteorder consideration. All characters are in the range of 0 to 9, A
to Z.

|
|
|
|

CNVNUMA required parameter. This parameter specifies the numerator of the conversion
ratio. This value must be an integer. The most commonly used value for
CNVNUM is 1.

|||

CNVDENA required parameter. This parameter specifies the denominator of theconversion ratio. This value must be a nonzero integer.

|
|
|
|
|
|
|

CNVDEN defines the units that are used for the variable portion. For example, if
movement is in 1/300ths, CNVNUM should be defined as 1 and CNVDEN
should be defined as 300.
DATA
A required parameter. This parameter specifies the ASCII control sequence forthe set top margin (inches) printer function. This must be a hexadecimal value.

Printer Data Stream (PRTDTASTRM) Tag|||

The PRTDTASTRM tag identifies the printer data stream that is supported by the
ASCII printer. The following additional values have been added to support DBCS
printing. The syntax is:||:PRTDTASTRMDATASTREAM = IBMNONPAGES|IBMPAGES|ESC/P|LIPS2+|LIPS3|201PL.

||
|

Value

Description

Raster Mode
Supported

|

ECS/P

The Epson DBCS ESC/P data stream is supported.

No

|
|

IBMNONPAGES The IBM DBCS Nonpages (dot matrix printers) data
stream is supported.

No|

IBMPAGES

The IBM DBCS Pages data stream is supported.

Yes|

LIPS2+The Cannon DBCS LIPS2+ data stream is supported.

No

Chapter 10. Customizing ASCII Printers That Use the Host Print Transform Function

199

|
|

Value

Description

Raster Mode
Supported

|

LIPS3

The Cannon DBCS LIPS3 data stream is supported.

No

|

201PL

The NEC DBCS data stream is supported.

No

Creating the Workstation Customizing Object
After you complete your changes to the workstation customizing source table in thesource file member, use the Create Workstation Customizing Object (CRTWSCST)
command. The CRTWSCST command creates a customizing object. For complete
instructions on compiling and creating the workstation customizing object, see“Compiling and Creating the Workstation Customizing Object” on page 23.

Specifying the Workstation Customizing Object
After you create the workstation customizing object, you need to specify thecustomizing object in the device description for a printer. Vary off the ASCII printeryou want to customize and change the device description. Use the Change Device
Description (Printer) (CHGDEVPRT) command to specify the customizing object inthe device description for a printer.
1. Enable the host print transform function by specifying *Yes in Host print
transform prompt of the device description.
2. Specify *WSCST for the Manufacturer type and model prompt in the MFRTYPMDL
parameter.
3. Specify the name of the object for the Workstation customizing object prompt.
Specifying the name of the object in the device description links the object tothe device.
For complete instructions on changing the device description, see Chapter 5.
Testing the Customizing Object.
Vary on the ASCII printer. The host print transform function uses the customized
source to map the data sent by the AS/400 system to the printer:v When you start the printer writer (using the STRPRTWTR command), for spooled
print jobs
v When you print the job, for nonspooled print jobs

Deleting the Workstation Customizing Object
Because customization involves a process of trial and error, you may need to delete
customizing objects you have created. Use the Delete Workstation Customizing
Object (DLTWSCST) command to delete a customized object that did not work as
expected or that is no longer needed.

200

OS/400 Workstation Customization Programming V4R3

Customizing a Hewlett-Packard LaserJet 4 PrinterThis example shows the steps for customizing a Hewlett-Packard LaserJet 4 ASCII
printer that uses the host print transform function. The objective for this example isto have the printer use the Roman 8 symbol set. The Roman 8 symbol set uses thecode page normally supported by the Hewlett-Packard LaserJet 4 printer.
It is assumed that your printer is physically attached to the system and configured
to work with the AS/400 system. The device type for the Hewlett-Packard printer is
set to 3812, which is a comparable IBM laser printer.

Setting up the Hewlett-Packard LaserJet 4 PrinterSet up the Hewlett-Packard LaserJet 4 ASCII printer using the following setup
values:Device Type

3812

Device model0

Host print transform*YES

Manufacturer type and model*HP4

Paper source 1*MFRTYPMDLPaper source 2*MFRTYPMDLEnvelope source*MFRTYPMDLASCII code page 899 support*NO

When this is done, you can vary on the printer.

Step 1: Planning the Customizing
For this example, you specifically want to support the Roman 8 symbol set.
Customizing an ASCII printer involves trial and error. You may have to go throughthe workstation customizing procedure several times before the characteristics you
want to add or change are working correctly.
To support the Roman 8 symbol set, you find that you need to set the default ASCII
code page to Roman 8. You then need to define the ASCII command sequence toselect the Roman 8 code page at the printer.
Using the International Application Development book, you determine that the IBM
code page identifier (ID) for the Roman 8 symbol set is code page 1051. Next,
using “Overriding the Default ASCII Code Page (DFTASCCP) Tag” on page 189,
you determine that you change the default code page by specifying the 1051 code
page ID in the DFTASCCP tag. In addition, you determine that you define the ASCII
command sequence to select the Roman 8 code page at the printer using the
CODEPAGE tag as described in “Code Page (CODEPAGE) Tag” on page 188.
Table 32. Printer Function Tags–Example Work Sheet
Tag

Description

Hexadecimal DataDFTASCCP

Overriding the default code page

ASCIICP=1051

CODEPAGE

Support for a code page

CODEPAGE=1051
DATA='1B283855'X.

Chapter 10. Customizing ASCII Printers That Use the Host Print Transform Function

201

Step 2: Retrieving the Workstation Customizing Object Source
To create the workstation customizing source, you use the Retrieve Work Station
Customizing Object Source (RTVWSCST) command and specify the following:
Device type

*TRANSFORM

Manufacturer type and model*HP4

Source member

SRCMBR(CSTHP4)

Source file

SRCFILE(CSTSRC)

Library¹

LIB(CSTLIB)Text

TEXT(’Customizing source for HP 4 LASERJET Printer’)

Note:

1

You must specify an existing library.

Step 3: Changing the Source
After you retrieve the source, use the source entry utility (SEU) to change theprinter characteristics and add the special character support. The command looks
like the following:
STRSEU SRCFILE(CSTLIB/CSTSRC) SRCMBR(CSTHP4)

When you edit the file, only make changes, do not delete any of the tags even if nochange is made. If tags are deleted, the functions and characteristics associatedwith those tags are no longer mapped and do not work anymore. This step and thenext two steps are performed several times. Each time a few more changes are
made to the workstation customizing source, which is then compiled and the device
and controller are varied off and on. Print the test document each time you vary on
the printer and start the printer writer to see if the changes are effective.
The following listing shows part of the source that you changed to customize theprinter. For an example of retrieved source, see Appendix B. Source Code
Examples.
:WSCST DEVCLASS=TRANSFORM.
:TRNSFRMTBL.
.
.
.
/* Add tag here to override the default code page */:DFTASCCPASCIICP=1051.
/* End of new tag. *//* ASCII Code Page */:ASCCPINFO.
:CODEPAGE
CODEPAGE=437
DATA='1B28313055'X.
:CODEPAGE
CODEPAGE=850
DATA='1B28313255'X.
/* Add tag here to define the Roman 8 code page */202

OS/400 Workstation Customization Programming V4R3

:CODEPAGE
CODEPAGE=1051
DATA='1B283855'X.
/* End of new tag. */:EASCCPINFO.
:EWSCST.

Step 4: Creating the Workstation Customizing Object
After you change and save the source, create the workstation customizing object
using the Create Work Station Customizing Object (CRTWSCST) command. Follow
these steps:
1. Type CRTWSCST on any command line and press F4 (Prompt).
2. Specify a name for the customizing object. This name must be unique to thedevice for which the object is being created. In this example, you might namethe customizing object MYHP4.
3. Press F10 (Additional parameters) to display the remaining parameters.
4. Specify the name of the source file member you created and changed. In thisexample, you specified:
Source member

SRCMBR(CSTHP4)

Source file

SRCFILE(CSTSRC)

Library

LIB(CSTLIB)

5. Specify the authority you want to grant to users who do not have specificauthority to the object.
6. Indicate whether or not this customizing object should replace an existingcustomizing object of the same name. In this example, you would indicate *NO in
the Replace prompt.
7. Specify a description of the customizing object. For this example, you might
specify 'Customizing object for HP 4 LaserJet Printer' for the Text prompt.
8. Press Enter.
9. Press F10 (Include detailed messages) on the Command Entry display to verify
the command completed successfully.

Step 5: Specifying the Workstation Customizing Object
After you create the workstation customizing object, use the CHGDEVPRT
command to specify the customizing object in the device description for the printer.
Follow these steps:
1. Vary off the ASCII printer you want to customize.
2. Type CHGDEVPRT on any command line and press F4 (Prompt).
3. Change the Manufacturer type and model prompt from *HP4 to *WSCST.
4. Press F10 (Additional parameters) and page through the information until theWorkstation customizing object prompt is shown. At the Workstation customizing
object prompt change the value to the unique name you create for the object. In
this example, you would change the value to MYHP4.

Chapter 10. Customizing ASCII Printers That Use the Host Print Transform Function203

Step 6: Varying On the Device
To activate the workstation customizing function, vary off and then vary on theprinter. Then start the printer writer for the printer. Print the test document on the
Hewlett-Packard printer. The document is printed using the Roman 8 symbol set.

204

OS/400 Workstation Customization Programming V4R3

Chapter 11. Customizing ASCII Printers That Use the Emulator
on the Display
This chapter describes the workstation customizing source you use to customize an
ASCII printer that does not use the host print transform function. This ASCII printermust be attached to one of the following twinaxial displays:3477 Model H
3486
3487
3488
Notes:
1. To customize a 3477 Model H printer attached to a twinaxial display, the ASCII
ID byte must be set to the default of 00 on the offline setup panel.
2. Differences exist between the customizing objects for the twinaxial displays. You
should create separate customizing objects for the different device types, even if
the customizing object source is the same. This is because some tags are
ignored or handled differently when the device is varied on. These differences
are only done once per customizing object so different device types cannot bevaried on from the same object.
The OS/400 workstation customizing functions for ASCII printers attached totwinaxial displays allow you to do the following:v Customize the functional characteristics of a supported ASCII printer attached toa twinaxial display
v Customize the functional characteristics and specify all the necessary parameters
required to support a normally unsupported ASCII printer attached to a twinaxial
display
To perform these customizations, the OS/400 licensed program provides a way tochange the mapping tables used by the twinaxial display to support an ASCII
printer. You must have the reference manual for both the twinaxial display (to set itup) and the ASCII printer in order to provide the new values for the printer mappingtables.
Note: This particular type of customizing may involve a lot of trial-and-error,
depending on the type of printer, whether or not the device is alreadyprinting, and the completeness of the reference manual for the printer. You
may spend anywhere from one to five days to complete a successful ASCII
printer customization.

Supported ASCII Printers Attached to Twinaxial Displays
Many IBM ASCII printers are currently supported by twinaxial displays. If the printersupports a character or function, you can add to or change the printing
characteristics of these printers. To do this, make changes to a source member that
contains the mapping tables used by the display to convert the AS/400 data stream
to an ASCII data stream.

© Copyright IBM Corp. 1998

205

Customizing Unsupported ASCII Printers Attached to Twinaxial
Displays
To customize an ASCII printer not currently supported by IBM that is attached to a
twinaxial display, ask the following questions:v What printer functions or characteristics and national characters do I want thisprinter to support?
Write these down so that you can answer the next question.
v Does the printer itself support the functions I need?
Check the reference manual to determine this. If neither the printer nor the
twinaxial display can support the functions you need, you cannot customize theprinter to provide these functions.
v Does the printer emulate or support the emulation of an IBM printer?
If so, set it up to use the emulation because it could make your customizing
easier.
v Is it a laser printer or a line/listing printer?
Laser printers attached to twinaxial displays are somewhat more difficult tocustomize and the customizing may require more time than you expect.
The reference manual is especially important when you customize an unsupported
device. The hexadecimal code information provided by the reference manual foryour device is critical to the workstation customizing process. Without the reference
manual you cannot customize the device.
After you have answered the previous questions, you also need to do the following:v Set up all the necessary hardware to connect the printer to the display
This is usually a parallel connection.
v Set up any programmable features provided by the printerThis is the time to set up IBM emulation (if supported), as well as any DIP
switches and other parameters that affect the printer.
v Create the necessary controller and device descriptions if needed
The controller description is for a twinaxial controller and the device description
for the printer can be automatically created using automatic configuration.
After you have set up and turned on the display and printer, do not forget to set up
for the display to acknowledge the printer. When the display setup is complete, use
one of your usual applications, such as OfficeVision/400, to print a short test
document. This is the starting point for workstation customizing.

Printer Mapping Table for ASCII Printers Attached to Twinaxial
Displays
When you customize a printer definition table, it is downloaded from the workstation
controller to the twinaxial display. It is then stored in the memory of the twinaxial
display. The workstation controller does not download a particular EBCDIC-to-ASCII
mapping table when a printer is varied on if the same table has previously been
downloaded for another printer.

206

OS/400 Workstation Customization Programming V4R3

Note: For ASCII printers attached to 3477 Model H displays, you must sign off andturn off the display when you replace a printer definition table. This allows a
new printer definition table to be downloaded to the display station.

ASCII Printer Definition Table
The following printer support characteristics and capabilities can be specified withina printer definition table:v Line spacingv Pitch (characters per inch)v Page lengthv Highlighting characteristics (bold, underscore)v Draft, letter, or text quality printing
v
v
v
v
v

Paper feed capabilities
Subscripting and superscripting
Initialization and reset sequences
Set global fonts
Relative forward and backward movement

At first glance, the source for the printer definition table does not look like itsupports all the functions listed previously. However, the tags and commands thatare part of the tag language for workstation customizing allow you to add the print
characteristics that are not included in the default printer definition table. The
system provides you with a default printer definition table. It is this table which
provides the source for an ASCII printer attached to a twinaxial display. This table isbased on a line-oriented printer that has limited printing capabilities.

Determining Which ASCII Printer Tables to Use
When you decide to customize an ASCII printer that is attached to a twinaxial
display, you need to be sure you have retrieved the correct source for your twinaxial
display and printer using the Retrieve Work Station Customizing Object Source(RTVWSCST) command. When you use the RTVWSCST command to retrieve asource file for twinaxial displays, you also retrieve the printer definition table forattached ASCII printers. Even though the default source for this printer definition
table is for a line-oriented printer, you can still use this source as a basis forcustomizing a laser printer. (See “Customizing a Hewlett-Packard LaserJet Series
IIP Printer Attached to a 3477 Twinaxial Display” on page 227 for an example
showing the customizing of a laser printer using this table.) You can customize bothyour display and ASCII printer using this workstation customizing source.

Working with the Tag Language for ASCII Printers Attached toTwinaxial Displays
When you specify a twinaxial display for the device type parameter on the Retrieve
Work Station Customizing Object Source (RTVWSCST) command, the device classspecified in the retrieved source is DEVCLASS = TWINAXPRT. The basic structure of
the source file member looks like the following figure:

Chapter 11. Customizing ASCII Printers That Use the Emulator on the Display

207

:WSCST DEVCLASS=TWINAXPRT.
:TKBDTBL with parameters.
:TKSTATE with parameters.
/*one keyboard state table*/.
.
/*from 1 - 5 additional state tables *//* depending on keyboard type */.
.
:PDFNTBL.

/*no parameters*/.
.
printer function tag.
.
.
.

/*tag with parameters*/:EWSCST.

Figure 42. Source Structure for ASCII Printers Attached to Twinaxial Displays

When using a workstation customizing object in which either a TKBDTBL or
PDFNTBL tag is not present, the default system tables are used when the device isvaried on. For more information about customizing the keyboards for twinaxial
displays, see the description of the TKBDTBL tag in “Keyboard Translation Table(TKBDTBL) Tag” on page 63. This section provides the information you need tochange the keyboard state tables required for specific combinations of parameters.
The following sections describe the additional tags that appear in the source you
retrieve to customize an ASCII printer attached to a twinaxial display.

Using the Tags to Customize ASCII Printers Attached to Twinaxial
Displays
When you retrieve a source file for customizing an ASCII printer attached to a
twinaxial display, specify the device type of the twinaxial display. Be sure you
specify 3477, 3486, or 3487 for the device type on the Retrieve Work Station
Customizing Object Source (RTVWSCST) command.
Note: When you retrieve a source file for customizing an ASCII printer attached toa 3488 display, specify 3487 as the device type. The OS/400 customizing
functions support a 3488 display station as a 3487 display station.

ASCII Printer Definition Table (PDFNTBL) Tag
The PDFNTBL (ASCII printer definition table) tag defines an ASCII printer definition
table for an ASCII printer attached to a twinaxial display. The syntax for this tag is:

208

OS/400 Workstation Customization Programming V4R3

:PDFNTBL.

Figure 43. Syntax for the ASCII Printer Definition Table Tag

There are no keyword parameters associated with this tag. However, it isimmediately followed by a number of separate printer function tags, which make up
the table entries. See “Printer Function Tags” for more information about theindividual printer function tags.
If you delete a printer function tag from your customizing source, the value for thattag is read from the default ASCII printer definition table stored in the emulator. If
the same printer function tag occurs multiple times following a PDFNTBL tag,warning messages are sent to the job log. The customizing object uses the last
occurrence of the tag in the source to map the printer function.

Printer Function Tags
Printer function tags allow you to specify the ASCII control sequence for anindividual printer function. The following sections describe the valid functions andcorresponding tags for the device class of ASCII printer attached to a twinaxial
display (DEVCLASS=TWINAXPRT). These tags must follow an ASCII printer definition
table tag (PDFNTBL) in your source. Although some of these tags are valid for thedevice class of ASCII printer (DEVCLASS=ASCIIPRT), the parameters and values may
differ. If you are customizing an ASCII printer that is directly attached to the ASCII
workstation controller, use the tags described in Chapter 12. Customizing ASCII
Printers That Use the Emulator on the Controller.

Printer Function Tags for 3477 Model H, 3486, 3487, and 3488 Displays
The following printer function tags work for all 3477 Model H, 3486, 3487, and 3488
displays. The syntax for each tag is shown, following the tag description. Some tags
have only a data parameter. Other tags have more than one parameter to describe
variables within functions.

Printer Function Tags with Variable and Relative Movement
The following table shows the printer function tags that have a variable and relative
movement for the ASCII printer attached to a twinaxial display. Following the table
is a description of the syntax for these tags and an example of how to change thevalues associated with the tags.
Table 33. Printer Function Tags with a Variable and Relative Movement
Tag
Description
FWDRMOVBCKRMOVPAGLENI
VARLSPC

Forward Relative Movement
Backward Relative Movement
Set Page Length in Inches
Variable Line Spacing

The general syntax for a printer function tag with a variable and relative movementis::xxxxxxxxxx
VAROFFSET = variable offset incontrol sequence
VARLEN = variable length
Chapter 11. Customizing ASCII Printers That Use the Emulator on the Display

209

VARTYPE = HIGHLOW|LOWHIGH|CHRDEC|CHRHEX|CHRANVARMAX = maximum variable value
ADJUST = adjustment
CNVNUM = conversion ratio numerator
CNVDEN = conversion ratio denominator
DATA = ASCII control sequence.

VAROFFSET
A required parameter. Defines the offset for the variable portion of the control
sequence. This value must be an integer.
Note: This offset is relative to the beginning of the control sequence.
Therefore, a value of zero (0) implies that the variable starts in the first
byte of the control sequence.
VARLENA required parameter. Defines the length of the variable portion of the control
sequence. This value must be an integer (number of bytes).
VARTYPE
A required parameter. Defines the type of variable used with this category of
printer function tags.
HIGHLOW

The byte order of the variable is in high-low order. The mostsignificant byte is first.

LOWHIGHThe byte order of the variable is in low-high order. The mostsignificant byte is last.

CHRDECThe variable is in character decimal format with no byte orderconsideration. All characters are in the range from 0 to 9. Many
Hewlett-Packard ASCII printers use this type of variable.

CHRHEX

The variable is in character hexadecimal format with no byteorder consideration. All characters are in the range from 0 to 9,
A to F.

CHRAN

The variable is in character alphanumeric format with no byteorder consideration. All characters are in the range from 0 to 9,
A to Z.

VARMAXA required parameter. Defines the maximum variable value. This value must be
an integer.
ADJUST
A required parameter. Defines the adjustment value for the variable. This value
must be a signed integer.
CNVNUMA required parameter. Defines the numerator of the conversion ratio. This value
must be an integer. The most commonly used value for CVNUM is 1.
CNVDENA required parameter. Defines the denominator of the conversion ratio. Thisvalue must be an integer other than zero.
CNVDEN defines the units to be used for the variable portion. For example, if
movement is in 1/300ths, CNVNUM should be defined as 1 and CNVDEN
should be defined as 300.
DATA
A required parameter. Specifies the ASCII control sequence for the printer210

OS/400 Workstation Customization Programming V4R3

function. The maximum length of this value is 240 bytes. This value is thehexadecimal string associated with the function that is defined in the reference
manual for the device.

Backspace (BSP) Tag
The BSP (backspace) tag defines the ASCII control sequence for the backspacefunction for an ASCII printer. The syntax for this tag is::BSP

DATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the backspacefunction. This data must be coded as a hexadecimal value. The maximum
length of this value is 240 bytes.

Bell (BELL) Tag
The BELL (bell) tag defines the ASCII control sequence for the bell function for an
ASCII printer. The bell function sounds the printer bell or beeper briefly. The syntax
for this tag is::BELL

DATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the bell function.
This data must be coded as a hexadecimal value. The maximum length of thisvalue is 240 bytes.

Start Bold Printing Function (STRBOLD) Tag
The STRBOLD (start bold printing) tag defines the ASCII control sequence for thestart bold printing function for an ASCII printer. The syntax for this tag is::STRBOLDDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the start boldprinting function. This data must be coded as a hexadecimal value. The
maximum length of this value is 240 bytes.

End Bold Printing (ENDBOLD) Tag
The ENDBOLD (end bold printing) tag defines the ASCII control sequence for theend bold printing function for an ASCII printer. The syntax for this tag is::ENDBOLDDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the end boldprinting function. This data must be coded as a hexadecimal value. The
maximum length of this value is 240 bytes.

Chapter 11. Customizing ASCII Printers That Use the Emulator on the Display

211

Carrier Return (CARRTN) Tag
The CARRTN (carrier return) tag defines the ASCII control sequence for the carrier
return function for an ASCII printer. The CARRTN function returns the carrier to theleft margin, without advancing a line. The syntax for this tag is::CARRTNDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the carrier
return function. This data must be coded as a hexadecimal value. The
maximum length of this value is 240 bytes.

Set Characters per Inch (CPI) Tag
The CPI (set characters per inch) tag defines the control sequence for setting thenumber of characters per inch. The CPI tag must follow a PDFNTBL tag in yoursource. The syntax for this tag is::CPI

CPI = 5|6|855|10|12|15|171
DATA = ASCII control sequence.

CPI
A required parameter. Defines the number of characters per inch.
5

5 characters per inch

6

6 characters per inch

855

8.55 characters per inch

10

10 characters per inch

12

12 characters per inch

15

15 characters per inch

17117.1 characters per inch

DATA
A required parameter. Specifies the ASCII control sequence for setting thenumber of characters per inch. This must be a hexadecimal value. The
maximum length of this value is 240 bytes.
Note: See “Set Characters per Inch (CPI) Tag” on page 223 for additionalparameter values for this tag when used with 3486, 3487, and 3488 displays.

Set Code Page (CODEPAGE) Tag
The CODEPAGE (set code page) tag defines the ASCII control sequence for setting
different code pages. The CODEPAGE tag must follow a PDFNTBL tag in yoursource. The syntax for this tag is::CODEPAGE
CODEPAGE = 850|899
DATA = ASCII control sequence.

CODEPAGE
A required parameter. Specifies the identifier (ID) of the code page to be set.

212

850

ASCII code page value

899

ASCII code page value

OS/400 Workstation Customization Programming V4R3

DATA
A required parameter. Specifies the ASCII control sequence for setting the code
pages for an ASCII printer attached to a twinaxial display. This must be ahexadecimal value. The maximum length of this value is 240 bytes.

Set Double Character Height (DBLCHRH) Tag
The DBLCHRH (set double character height) tag defines the ASCII control
sequence for doubling the character height for an ASCII printer. The syntax for thistag is::DBLCHRHDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the set double
character height function. This data must be coded as a hexadecimal value.
The maximum length of this value is 240 bytes.

Start Double-Wide Continuous (STRWIDE) Tag
The STRWIDE (start double-wide continuous) tag defines the ASCII control
sequence for starting double-wide character spacing for an ASCII printer. The
syntax for this tag is::STRWIDEDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the start
double-wide continuous spacing function. This data must be coded as ahexadecimal value. The maximum length of this value is 240 bytes.

End Double-Wide Continuous (ENDWIDE) Tag
The ENDWIDE (end double-wide continuous) tag defines the ASCII control
sequence for ending double-wide character spacing for an ASCII printer. The syntax
for this tag is::ENDWIDEDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the end
double-wide continuous spacing function. This data must be coded as ahexadecimal value. The maximum length of this value is 240 bytes.

Drawer Selection (DWRSLT) Tag
The DWRSLT (drawer selection) tag defines the control sequence for drawer
selection. Drawer selection refers to the slots on the printer in which various sizes(or types) of paper are stored for use by the printer. The DWRSLT tag must follow
the PDFNTBL tag in your source. The syntax for this tag is::DWRSLTDRAWER = PAPER|ENVELOPE|
DRAWER1|DRAWER2DATA = ASCII control sequence.

DRAWERA required parameter. Defines the drawer or slot from which paper is to be used
Chapter 11. Customizing ASCII Printers That Use the Emulator on the Display

213

for printing.
PAPER

Selects manual paper feed as the source of paper for
documents that are to be printed.

ENVELOPE

Selects the envelope drawer as the source of paper for
documents that are to be printed.

DRAWER1

Selects drawer 1 as the source of paper for documents thatare to be printed.

DRAWER2

Selects drawer 2 as the source of paper for documents thatare to be printed.

DATA
A required parameter. Specifies the ASCII control sequence for the function.
This must be a hexadecimal value. The maximum length of this value is 240
bytes.

Global Fonts for Printer Definition Table (FNTGPDT) Tag
The FNTGPDT (global fonts for printer definition table (PDT)) tag defines the
beginning of the global font ranges for a printer definition table. The FNTGPDT tag
must follow the PDFNTBL tag in your source. It must be followed by at least one
FNTGRNG (global font range) tag. The FNTGRNG tag must in turn be followed by
an EFNTGPDT (end global fonts for printer definition table) tag. The syntax for the
FNTGPDT tag is::FNTGPDT.

End Global Fonts for PDT (EFNTGPDT) Tag
The EFNTGPDT (end global fonts for printer definition table (PDT)) tag ends the setof global font ranges for a PDT. The syntax for this tag is::EFNTGPDT.

Global Font Range (FNTGRNG) Tag
The FNTGRNG (global font range) tag defines a range of global fonts for a printerdefinition table (PDT). The FNTGRNG tag must follow either a FNTGPDT (global
fonts for printer definition table) tag or another FNTGRNG tag in your source. You
can define a maximum of five fonts for use with the 3477 Model H display. The
syntax for this tag is::FNTGRNGMINFID = font id
MAXFID = font id
DATA = ASCII control sequence.

MINFID
A required parameter. Defines the smallest global font ID in a group. This value
must be an integer.
MAXFID
A required parameter. Defines the largest global font ID in a group. This value
must be an integer.
DATA
A required parameter. Specifies the ASCII control sequence for the global fontrange. This must be a hexadecimal value. The maximum length of this value is
37 bytes.

214

OS/400 Workstation Customization Programming V4R3

Foreground Color (FOREGRND) Tag
The FOREGRND (foreground color) tag defines the ASCII control sequence forsetting different print or ink colors when the printer supports color. The FOREGRND
tag must follow the PDFNTBL tag in your source. The syntax for this tag is::FOREGRNDCOLOR = BLACK|BLUE|RED|PINK|GREEN|
CYAN|YELLOW|WHITE|DRKBLUE|
ORANGE|PURPLE|DRKGREEN|
TURQ|MUSTARD|GREY|BROWNDATA = ASCII control sequence.

COLOR
A required parameter. Defines the color of the ink or print to be used by theprinter when it supports different colors for printing.
BLACK

DRKBLUE (dark blue)

MUSTARDREDBLUE

DRKGREEN (dark green)

ORANGE

TURQ (turquoise)

BROWN

GREEN

PINK

WHITE

CYAN

GREY

PURPLEYELLOWDATA
A required parameter. Specifies the ASCII control sequence for setting theforeground color. This must be a hexadecimal value. The maximum length of
this value is 240 bytes.

Form feed (FORMFEED) Tag
The FORMFEED (form feed) tag defines the ASCII control sequence for the form
feed function for an ASCII printer. The FORMFEED control advances the paper tothe top of the next page. The syntax for this tag is::FORMFEEDDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the form feed
function. This data must be coded as a hexadecimal value. The maximum
length of this value is 240 bytes.

Initialize Printer (INITPRT) Tag
The INITPRT (initialize printer) tag defines the ASCII control sequence for the
initialize printer function for an ASCII printer. The syntax for this tag is::INITPRTDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the initialize
printer function. This data must be coded as a hexadecimal value. The
maximum length of this value is 240 bytes.

Line Feed (LINEFEED) Tag
The LINEFEED (line feed) tag defines the ASCII control sequence for the line feed
function for an ASCII printer. The line feed function advances the paper one line.
The syntax for this tag is:
Chapter 11. Customizing ASCII Printers That Use the Emulator on the Display

215

:LINEFEEDDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the line feed
function. This data must be coded as a hexadecimal value. The maximum
length of this value is 240 bytes.

Set Lines per Inch (LPI) Tag
The LPI (set lines per inch) tag defines the control sequence for setting the numberof lines per inch you want to print. The LPI tag must follow the PDFNTBL tag inyour source. The syntax for this tag is::LPI

LPI = 3|4|6|8
DATA = ASCII control sequence.

LPI
A required parameter. Defines the number of lines per inch. The valid values forthis parameter are 3, 4, 6, and 8.
DATA
A required parameter. Specifies the ASCII control sequence for the function.
This must be a hexadecimal value. The maximum length of this value is 240
bytes.

Set Page Length in Lines (PAGLENL) Tag
The PAGLENL (set page length in lines) tag sets the page length in terms of thenumber of lines. The number of lines is carried as a variable in the control
sequence for page length. The PAGLENL tag must follow the PDFNTBL tag in yoursource. The syntax for this tag is::PAGLENL

VAROFFSET = variable offset incontrol sequence
VARLEN = variable length
VARTYPE = HIGHLOW|LOWHIGH|CHRDEC|CHRHEX|CHRANVARMAX = maximum variable value
ADJUST = adjustment
DATA = ASCII control sequence.

VAROFFSET
A required parameter. Defines the offset for the variable in the control
sequence. This value must be an integer.
Note: This offset is relative to the beginning of the control sequence.
Therefore, a value of zero (0) implies that the variable starts in the first
byte of the control sequence.
VARLENA required parameter. Defines the length of the variable. This value must be an
integer.
VARTYPE
A required parameter. This attribute defines the type of variable. Possible values
are:
HIGHLOW216

The byte order of the variable is in high-low order.

OS/400 Workstation Customization Programming V4R3

LOWHIGH

The byte order of the variable is in low-high order.

CHRDECThe variable is in characters with no byte order consideration.
All characters are in the range 0 to 9.

CHRHEX

The variable is in characters with no byte order consideration.
All characters are in the range 0 to 9, A to F.

CHRAN

The variable is in characters with no byte order consideration.
All characters are in the range 0 to 9, A to Z.

VARMAXA required parameter. Defines the maximum variable value. This value must be
an integer.
ADJUST
A required parameter. Defines the adjustment value to the variable. This value
must be a signed integer.
DATA
A required parameter. Specifies the ASCII control sequence for the printerfunction. This must be a hexadecimal value. The maximum length of this valueis 240 bytes.

Paper Feed (PRTFEED) Tag
The PRTFEED (paper feed) tag defines the control sequence for different types of
paper feeding. The PRTFEED tag must follow the PDFNTBL tag in your source.
The syntax for this tag is::PRTFEEDFEEDTYPE = EJECT|MANUAL|AUTO
DATA = ASCII control sequence.

FEEDTYPE
A required parameter. Defines the type of paper feeding.
EJECT

The paper is ejected from the printer

MANUALThe paper is fed to the printer manually (by hand).

AUTO

The paper is fed to the printer automatically.

DATA
A required parameter. Specifies the ASCII control sequence for the function.
This must be a hexadecimal value. The maximum length of this value is 240
bytes.

Paper Orientation (PRTORIENT) Tag
The PRTORIENT (paper orientation) tag defines the control sequence for setting
different paper orientations. The PRTORIENT tag must follow the PDFNTBL tag inyour source. The syntax for this tag is::PRTORIENTORIENT = PORTRAIT|LANDSCAPEDATA = ASCII control sequence.

ORIENT
A required parameter. Defines the orientation in which a job prints.
PORTRAITThe print job prints in an orientation rotated 0 degrees.

LANDSCAPE

The print job prints in an orientation rotated 90 degrees.
Chapter 11. Customizing ASCII Printers That Use the Emulator on the Display

217

DATA
A required parameter. Specifies the ASCII control sequence for setting thepaper orientation for the printer. This must be a hexadecimal value. The
maximum length of this value is 240 bytes.
Note: For additional parameter values for this tag when used with 3486, 3487, and
3488 displays, see “Paper Orientation (PRTORIENT) Tag” on page 225.

Print Quality (PRTQLTY) Tag
The PRTQLTY (print quality) tag defines the print quality control sequence. The
PRTQLTY tag must follow the PDFNTBL tag in your source. The syntax for this tag
is::PRTQLTYQLTYTYPE = DRAFT|LETTER|TEXTDATA = ASCII control sequence.

QLTYTYPE
A required parameter. Defines the quality of print.
DRAFT

The print quality is draft quality. This is equivalent to the*DRAFT type used in the OS/400 printer file commands.

LETTER

The print quality is letter quality. This is equivalent to the *NLQ
type used in the OS/400 printer file commands.

TEXT

The print quality is text quality. This is equivalent to the *STD
type used in the OS/400 printer file commands.

DATA
A required parameter. Specifies the ASCII control sequence for the function.
This must be a hexadecimal value. The maximum length of this value is 240
bytes.

Start Proportional Space (STRPROP) Tag
The STRPROP (start proportional space mode) tag defines the ASCII control
sequence for the start proportional space mode for an ASCII printer. The syntax for
this tag is::STRPROPDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the start
proportional space mode function. This data must be coded as a hexadecimalvalue. The maximum length of this value is 240 bytes.

End Proportional Space (ENDPROP) Tag
The ENDPROP (end proportional space mode) tag defines the ASCII control
sequence for the end proportional space mode function for an ASCII printer. The
syntax for this tag is::ENDPROPDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the end

218

OS/400 Workstation Customization Programming V4R3

proportional space mode function. This data must be coded as a hexadecimalvalue. The maximum length of this value is 240 bytes.

Quality Font Download (SETQLTY) Tag
The SETQLTY (quality font download) tag defines the ASCII control sequence thatsets the print quality for specific fonts. The SETQLTY tag must follow the PDFNTBL
tag in your source. The syntax for this tag is::SETQLTYQLTYTYPE = DRAFT|LETTERDATA = ASCII control sequence.

QLTYTYPE
A required parameter. Defines the quality for the font to be downloaded.
DRAFT

The font is a draft quality font.

LETTER

The font is a letter quality font.

DATA
A required parameter. Specifies the ASCII control sequence for downloading thequality font. This must be a hexadecimal value. The maximum length of thisvalue is 240 bytes.

Space (SPACE) Tag
The SPACE (space) tag defines the ASCII control sequence for the space control
function for an ASCII printer. The syntax for this tag is::SPACEDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the spacefunction. This data must be coded as a hexadecimal value. The maximum
length of this value is 240 bytes.

Set Standard Character Height (STDCHRH) Tag
The STDCHRH (set standard character height) tag defines the ASCII control
sequence for the set standard character height function for an ASCII printer. The
syntax for this tag is::STDCHRHDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the set standard
character height function. This data must be coded as a hexadecimal value.
The maximum length of this value is 240 bytes.

Start Subscript (STRSUBS) Tag
The STRSUBS (start subscript) tag defines the ASCII control sequence for the start
subscript function for an ASCII printer. The syntax for this tag is::STRSUBSDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the start
Chapter 11. Customizing ASCII Printers That Use the Emulator on the Display219

subscript function. This data must be coded as a hexadecimal value. The
maximum length of this value is 240 bytes.

End Subscript (ENDSUBS) Tag
The ENDSUBS (end subscript) tag defines the ASCII control sequence for the end
subscript function for an ASCII printer. The syntax for this tag is::ENDSUBSDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the end
subscript function. This data must be coded as a hexadecimal value. The
maximum length of this value is 240 bytes.

Start Superscript (STRSUPS) Tag
The STRSUPS (start superscript) tag defines the ASCII control sequence for thestart superscript function for an ASCII printer. The syntax for this tag is::STRSUPSDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the startsuperscript function. This data must be coded as a hexadecimal value. The
maximum length of this value is 240 bytes.

End Superscript (ENDSUPS) Tag
The ENDSUPS (end superscript) tag defines the ASCII control sequence for theend superscript function for an ASCII printer. The syntax for this tag is::ENDSUPSDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the end
superscript function. This data must be coded as a hexadecimal value. The
maximum length of this value is 240 bytes.

Table Name (TBLNAME) Tag
The TBLNAME (table name) tag specifies a name for the printer definition table.
The TBLNAME tag must follow the PDFNTBL tag in your source. The syntax for
this tag is::TBLNAMEDATA = name.

DATA
A required parameter. Specifies a table name for the printer definition table.

nameA 1- to 8-character string used to name the printer definition table. Only
characters defined in code page 500 may appear in the name.

220

OS/400 Workstation Customization Programming V4R3

Translation Printer Definition Table (TRNEBCDIC) Tag
The TRNEBCDIC (translation printer definition table) tag defines the beginning of
the translation mappings for a printer definition table (PDT). The TRNEBCDIC tag
must follow the PDFNTBL tag in your source. It must be followed by at least one
TRNEBCDICE (translation entry) tag, which must be followed by an ETRNEBCDIC(end translation PDT) tag. The syntax for this tag is::TRNEBCDIC.

End Translation Printer Definition Table (ETRNEBCDIC) Tag
The ETRNEBCDIC (end translation printer definition table (PDT)) tag ends the setof translation mappings for a PDT. The syntax for this tag is::ETRNEBCDIC.

Translation Entry (TRNEBCDICE) Tag
The TRNEBCDICE (translation entry) tag defines the ASCII control sequence formapping one EBCDIC character to one ASCII character. The TRNEBCDICE tag
must follow either a TRNEBCDIC (translation printer definition table (PDT)) tag or
another TRNEBCDICE tag in your source. The syntax for this tag is::TRNEBCDICEEBCDIC = code
DATA = ASCII control sequence.

EBCDICA required parameter. Specifies the EBCDIC code you want to map. This must
be a hexadecimal value.
DATA
A required parameter. Specifies the ASCII control sequence for the EBCDIC
character to ASCII character mapping. This must be a hexadecimal value. The
maximum length of this value is 240 bytes.

Start Underscore (STRUS) Tag
The STRUS (start underscore) tag defines the ASCII control sequence for the startunderscore function for an ASCII printer. The syntax for this tag is::STRUSDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the startunderscore function. This data must be coded as a hexadecimal value. The
maximum length of this value is 240 bytes.

End Underscore (ENDUS) Tag
The ENDUS (end underscore) tag defines the ASCII control sequence for the end
underscore function for an ASCII printer. The syntax for this tag is::ENDUSDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the end

Chapter 11. Customizing ASCII Printers That Use the Emulator on the Display

221

underscore function. This data must be coded as a hexadecimal value. The
maximum length of this value is 240 bytes.

Set Vertical Units (VERUNT) Tag
The VERUNT (set vertical units) tag defines the ASCII control sequence for the set
vertical units function for an ASCII printer. The syntax for this tag is::VERUNTDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the set verticalunits function. This data must be coded as a hexadecimal value. The maximum
length of this value is 240 bytes.

Additional Tags for Use with 3486, 3487, and 3488 Displays
The following tags, or additional parameters described with tags, work with 3486,
3487, and 3488 displays. These tags or additional parameters do not work for 3477
Model H displays.
The following tags define more printer functions and must also follow the PDFNTBL
tag in your workstation source.

Adjust Horizontal Origin (ADJHRZORG) Tag
The ADJHRZORG (adjust horizontal origin) tag specifies the horizontal print head
positioning. The ADJHRZORG tag must follow an ASCII printer definition table(PDFNTBL) tag in your source. The syntax for this tag is::ADJHRZORG
ADJUST = adjustment.

ADJUST
A required parameter. Specifies the size of the adjustment for horizontal print
head positioning in 1/1440-inch increments. This value must be a signed
integer.

adjustment
Integer value for the adjustment size for horizontal print head positioning.

Adjust Vertical Origin (ADJVERORG) Tag
The ADJVERORG (adjust vertical origin) tag specifies the vertical print head
positioning. This is the vertical position on the physical page where printing should
begin. The ADJVERORG tag must follow an ASCII printer definition table tag(PDFNTBL) in your source. The syntax for this tag is::ADJVERORG
ADJUST = adjustment.

ADJUST
A required parameter. Specifies the size of the adjustment for vertical print head
positioning in 1/1440-inch increments. This value must be a signed integer.

adjustment
Integer value for the adjustment size for vertical print head positioning.

222

OS/400 Workstation Customization Programming V4R3

Set Characters per Inch (CPI) Tag
The CPI (set characters per inch) tag defines the control sequence for setting thenumber of characters per inch. The CPI tag must follow a PDFNTBL tag in yoursource. The syntax for this tag is::CPI

CPI = 5|6|855|10|12|15|171|20|25
DATA = ASCII control sequence.

CPI
A required parameter. Defines the number of characters per inch.
5

5 characters per inch

6

6 characters per inch

855

8.55 characters per inch

10

10 characters per inch

12

12 characters per inch

15

15 characters per inch

17117.1 characters per inch

20

20 characters per inch

25

25 characters per inch

Note: The 20 CPI and 25 CPI values are supported only when your ASCII
printer is attached to a 3486, 3487, or 3488 twinaxial display.
DATA
A required parameter. Specifies the ASCII control sequence for setting thenumber of characters per inch. This must be a hexadecimal value. The
maximum length of this value is 240 bytes.

Set Characters per Inch in COR Mode (CPICOR) Tag
The CPICOR (set characters per inch in computer output reduction (COR) mode)tag defines the control sequence for setting the number of characters per inch while
in COR mode. For example, you can define all print jobs that normally use a
10-pitch type style use a particular 17-pitch type style when COR (reduction) is
applied.
The CPICOR tag must follow the PDFNTBL tag in your source. The syntax for thistag is::CPICORCPI = 10|12|15
ASCIIFNT = type style
FNTWTH = integer
FNTATR = integer
DATA = ASCII control sequence.

CPI
A required parameter. This is the current number of characters per inch before
the reduction is applied. For example, to define the type style to use for COR in
a 10-pitch print job, specify CPI=10.
10

10 characters per inch

12

12 characters per inch
Chapter 11. Customizing ASCII Printers That Use the Emulator on the Display

223

15

15 characters per inch

ASCIIFNT
A required parameter. Specifies the ASCII type style (the global font ID (FGID))
to be used when reduction is applied. This value must be an integer.
For example, the FGID for a Courier 17-pitch font (17 characters per inch) is
254. Therefore, you specify ASCIIFNT=254 for a Courier 17-pitch font. For
information on global font IDs, see the Printer Device Programming book.
FNTWTHA required parameter. Specifies the width, in 1/1440-inch increments, of the fontused when reduction is applied, This value must be an integer.
For example, if you use a 17-pitch font when reduction is applied, divide theincrement by the number of characters per inch (1440/17). This gives you a font
width of 85 (rounded off) for the substituted font. Therefore, you specify
FNTWTH=85.
FNTATRA required parameter. Specifies the attribute value for the substituted font. Thisvalue must be an integer.
For example, the technical reference manual for the IBM 4029 printer lists 0
through 4 as possible attribute values for the substituted font. In most cases,
you specify a fixed-pitch type style (FNTATR=1) for the substitute font attributevalue.
DATA
A required parameter. Specifies the ASCII control sequence to select thesubstituted font. This must be a hexadecimal value. The maximum length of thisvalue is 240 bytes. You find the ASCII control sequence in the technicalreference manual for your printer under the description of selecting type styles.
For example, the control sequence for selecting type styles for an IBM 4029
printer is in the 4029 technical reference manual under the description of theSelect Font Global command. To select a font group ID of 254 for an IBM 4029
printer, you specify DATA='1B5B49050000FE005401'X.

Duplex Printing (DUPXPRT) Tag
The DUPXPRT (duplex printing) tag defines the ASCII control sequence for the
duplex printing function for an ASCII printer. The DUPXPRT control prints on bothsides of a sheet of paper. The syntax for this tag is::DUPXPRTDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the duplex
printing function. This data must be coded as a hexadecimal value. The
maximum length of this value is 240 bytes.

Half Line Feed (HLFLINEFEED) Tag
The HLFLINEFEED (half line feed) tag defines the ASCII control sequence for thehalf line feed function for an ASCII printer. The HLFLINEFEED control advances thepaper one half of a line. The syntax for this tag is:224

OS/400 Workstation Customization Programming V4R3

:HLFLINEFEEDDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the half line
feed function. This data must be coded as a hexadecimal value. The maximum
length of this value is 240 bytes.

Jog Output Tray (JOGOUTTRAY) Tag
The JOGOUTTRAY (jog output tray) tag defines the ASCII control sequence for thejog output tray function for an ASCII printer. The syntax for this tag is::JOGOUTTRAYDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the jog output
tray function. This data must be coded as a hexadecimal value. The maximum
length of this value is 240 bytes.

Select Next Side Printing in Duplex (NXTDUPXPRT) Tag
The NXTDUPXPRT (select next side printing in duplex) tag defines the ASCII
control sequence for the select next side printing in duplex function for an ASCII
printer. The syntax for this tag is::NXTDUPXPRTDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the select next
side printing in duplex function. This data must be coded as a hexadecimalvalue. The maximum length of this value is 240 bytes.

Paper Orientation (PRTORIENT) Tag
The PRTORIENT (paper orientation) tag defines the control sequence for setting
different paper orientations. The PRTORIENT tag must follow the PDFNTBL tag inyour source. The syntax for this tag is::PRTORIENTORIENT = PORTRAIT|LANDSCAPE|
RTT180|RTT270
DATA = ASCII control sequence.

ORIENT
A required parameter. The orientation in which a print job prints.
PORTRAITThe print job prints in an orientation rotated 0 degrees.

LANDSCAPE

The print job prints in an orientation rotated 90 degrees.

RTT180¹

The print job prints in an orientation rotated 180 degrees.

RTT270¹

The print job prints in an orientation rotated 270 degrees.

¹The RTT180 and RTT270 values are supported only when your ASCII printer is attached
to a 3486, 3487, or 3488 twinaxial display.

DATA
A required parameter. Specifies the ASCII control sequence for setting thepaper orientation for the printer. This must be a hexadecimal value. The
maximum length of this value is 240 bytes.
Chapter 11. Customizing ASCII Printers That Use the Emulator on the Display

225

Reverse Half Line Feed (RVSHLFLINEFEED) Tag
The RVSHLFLINEFEED (reverse half line feed) tag defines the ASCII control
sequence for the reverse half line feed function for an ASCII printer. The reverse
half line feed function moves the paper back up one half line. The syntax for thistag is::RVSHLFLINEFEEDDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the reverse halfline feed function. This data must be coded as a hexadecimal value. The
maximum length of this value is 240 bytes.

Reverse Line Feed (RVSLINEFEED) Tag
The RVSLINEFEED (reverse line feed) tag defines the ASCII control sequence forthe reverse line feed function for an ASCII printer. The reverse line feed function
moves the paper back up one line. The syntax for this tag is::RVSLINEFEEDDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the reverse line
feed function. This data must be coded as a hexadecimal value. The maximum
length of this value is 240 bytes.

Set Simplex Printing (SMPXPRT) Tag
The SMPXPRT (set simplex printing) tag defines the ASCII control sequence for theset simplex printing function for an ASCII printer. The SMPXPRT tag sets the printerto print on one side of the paper. The syntax for this tag is::SMPXPRTDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the set simplex
printing function. This data must be coded as a hexadecimal value. The
maximum length of this value is 240 bytes.

Set Tumble Duplex Printing (TUMDUPXPRT) Tag
The TUMDUPXPRT (set tumble duplex printing) tag defines the ASCII control
sequence for the set tumble duplex printing function for an ASCII printer. The syntax
for this tag is::TUMDUPXPRTDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the set tumble
duplex printing function. This data must be coded as a hexadecimal value. The
maximum length of this value is 240 bytes.

226

OS/400 Workstation Customization Programming V4R3

Set Vertical Units in Half (VERUNTHLF) Tag
The VERUNTHLF (set vertical units in half) tag defines the ASCII control sequence
for the set vertical units in half function for an ASCII printer. The syntax for this tag
is::VERUNTHLFDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the set verticalunits in half function. This data must be coded as a hexadecimal value. The
maximum length of this value is 240 bytes.

Customizing a Hewlett-Packard LaserJet Series IIP Printer Attached toa 3477 Twinaxial Display
This example shows the steps for the customizing of a Hewlett-Packard LaserJet
Series IIP ASCII printer attached to a 3477 Model H twinaxial display with a
122-key typewriter keyboard. The objective, for this example, is having the printerwork effectively with simple OfficeVision/400 documents.
It is assumed that your twinaxial workstation is physically attached to the system,
configured to work with the AS/400 system (appropriate controller and device
descriptions are created), and is varied on. It is also assumed that the AS/400
system has automatically configured the attached printer (system value
QAUTOCFG = 1). When you do this, the device type for the Hewlett-Packard printeris set to 5219, which is a comparable IBM laser printer.

Setting up the 3477 Model H Display
First, set up the 3477 display station to handle a printer. Select the following setup
values to accommodate the Hewlett-Packard LaserJet Series IIP ASCII printer.
Terminal mode

Display-Printer

Display address

0

Printer address

1

Printer character set

Multilingual4

Printer emulation

5219

Keyboard type

Standard

ASCII printer typeUser-Defined

ASCII print ID

01 (The ASCII printer ID cannot be set to 00 because oflimitations of the twinaxial display.

Next, change the setup for the printer so that the connection to the 3477 display isparallel. You should also check the DIP switch settings and the other setup values
that are programmed on the printer itself. When this is done, you can vary on theprinter.

Chapter 11. Customizing ASCII Printers That Use the Emulator on the Display

227

Step 1: Planning the Customizing
Customizing an ASCII printer attached to a 3477 Model H display involves
trial-and-error. You may have to go through the workstation customizing procedureseveral times before all the characteristics you want to add or change are working
correctly.
First, create a simple one-page document using the OfficeVision/400 editor as
shown in Figure 44. Print this document to test the characteristics that you expectfrom your printer. For this example, you specifically want to support the following
print characteristics:
v Bold printing
v Centeringv Underlined printing
v Line spacingv Portrait/Landscape printing
You may need to change more than just these characteristics, but you do not knowthat until you have tried customizing and seen what the results are.
Example Showing Printer Functions Before and After Customizing
This is a test for bold printing.
This is a test for underscored printing.
This is a test for centering.
The following two lines will be separated by a 6-lines-per-inch
spacing. The following two lines will be separated by a
6-lines-per-inch spacing.
The following two lines will be separated by an 8-lines-per-inch
spacing. The following two lines will be separated by an
8-lines-per-inch spacing.
This is a test for print orientation in portrait.
This is a test for print orientation in landscape. (Rotate 90)
This is a test to show the customized special characters thatwould not print without customizing:(not used for ASCII printer attached to 3477 test)ä ö ü Ä Ö ÜFigure 44. OfficeVision/400 Printer Test Document

The first time you print this document, extra pages are generated, some strange
characters are printed on the top of the page, the title appears alone on the second

228

OS/400 Workstation Customization Programming V4R3

page, and none of the other print characteristics are apparent except for centering.
The strange character string at the top of the page looks like this:@RV2H486-0

The last page of the test document when printed the first time looked something like
Figure 45.
?This is a test for bold printing.
?
?
?This is a test for underscored printing.
?
?
?
This is a test for centering.
?
?
?The following two lines will be separated by a 6-lines-per-inch?spacing. The following two lines will be separated by a
?6-lines-per-inch spacing.
?
?
?The following two lines will be separated by an 8-lines-per-inch?spacing. The following two lines will be separated by an?8-lines-per-inch spacing.
?
?
?This is a test for print orientation in portrait.
?
?
?This is a test for print orientation in landscape. (Rotate 90)?
?
?This is a test to show the customized special characters that?would not print without customizing:?(not used for ASCII printer attached to 3477 test)?
?
?ä ö ü Ä Ö ÜFigure 45. OfficeVision/400 Test Document First Printout

To remove the strange characters, you investigate the printer initialization sequence.
You find that you need to set the variable line spacing, page length in lines andinches, forward and backward relative movement, paper feed to the printer, anddrawer selection.
After you know what needs to be changed, check to see if the printer itself can
support these functions. If so, then you need to fill in the printer customizing work
sheet showing the printer characteristic and the associated hexadecimal value fromthe printer reference manual. Remember, if the device does not support a characteror function, then workstation customizing cannot provide it either.
After checking the reference manual for the Hewlett-Packard LaserJet Series IIP
printer, you find that subscripts and superscripts are not supported at all (with thebasic font cartridge). As you are going through the manual, you write down thehexadecimal codes that the printer uses to call the other functions andChapter 11. Customizing ASCII Printers That Use the Emulator on the Display229

characteristics you want to support. The list is shown in Table 34, Table 35 on page
230, and Table 36 on page 231.
You also find that Hewlett-Packard uses some terminology that is different from IBM
terminology when referring to some of the printer characteristics. For example, IBM
uses the terms code page and character set to describe different sets of national
language and graphics characters. Hewlett-Packard provides support for different
character sets, but refers to them as symbol sets. Knowing that there are somedifferences in terminology helps you find some of the hexadecimal codes needed
for customizing.
Table 34. Printer Function Tags with Only a Data Parameter – Example Work Sheet
Tag

Description

Hexadecimal Data

INITPRT

Initialize Printer

DATA='1B5B4B03000031011B5B5C020090001B5B5405000000035200'X

ENDBOLDEnd Bold Printing

DATA='1B46'X

ENDUS

End Underscore

DATA='1B2D00'X

STRBOLD

Start Bold Printing

DATA='1B45'X

STRUS

Start Underscore

DATA='1B2D01'X

Table 35. Printer Function Tags with Variable and Relative Movement – Example Work Sheet
Tag

Description

Data (see Note)

FWDRMOV

Forward Relative
Movement

VAROFFSET= 2
VARLEN= 2
VARTYPE= LOWHIGH
VARMAX= 32767
ADJUST= 0
CNVNUM= 12
CNVDEN= 1
DATA='1B640F00'X

BCKRMOV

Backward Relative
Movement

VAROFFSET= 2
VARLEN= 2
VARTYPE= LOWHIGH
VARMAX=32767
ADJUST=0
CNVNUM=12
CNVDEN=1
DATA='1B650F00'X

PAGLENI

Set Page Length in
InchesVAROFFSET= 3
VARLEN= 1
VARTYPE= LOWHIGH
VARMAX= 255
ADJUST= 0
CNVNUM= 1440
CNVDEN= 1
DATA='1B43000B'X

230

OS/400 Workstation Customization Programming V4R3

Table 35. Printer Function Tags with Variable and Relative Movement – Example Work Sheet (continued)
Tag

Description

Data (see Note)

VARLSPC

Variable Line Spacing

VAROFFSET= 11
VARLEN= 1
VARTYPE= LOWHIGH
VARMAX= 255
ADJUST= 0
CNVNUM= 10
CNVDEN= 1
DATA='1B5B5C040090009 0001B41101B32'X.

Note: Values in the Data column can be hexadecimal or integer.

Table 36. Other Printer Function Tags – Example Work Sheet
Tag

Description

Data

DWRSLT

Drawer selection

DRAWER= DRAWER1DATA='1B5B460300030101'X

DWRSLT

Drawer selection

DRAWER= DRAWER2DATA='1B5B460300030102'X

DWRSLT

Drawer selection

DRAWER= ENVELOPEDATA='1B5B460300030200'X

PAGLENL

Set page length in lines

VAROFFSET= 2
VARLEN= 1
VARTYPE= LOWHIGH
VARMAX= 255
ADJUST= 0
DATA='1B4342'X

PRTFEED

Paper feed

FEEDTYPE= MANUALDATA='1B5B460300010100'X

PRTORIENT

Paper orientation

ORIENT= PORTRAITDATA='1B266C304F'X

PRTORIENT

Paper orientation

ORIENT= LANDSCAPEDATA='1B266C314F'X

Step 2: Retrieving the Workstation Customizing Object Source
To create the workstation customizing source, you use the Retrieve Work Station
Customizing Object Source (RTVWSCST) command and specify the following:
Device type

DEVTYPE(3477)

Keyboard language type

KBDTYPE(USI) (This value must match the keyboard
language type you specified in the device description for the
display; otherwise, the display will not vary on.)Source member

SRCMBR(CST3477P)

Keyboard attached

KBD(*TYPE122)

Source file

SRCFILE(CSTSRC)

Library

LIB(CSTLIB)Text

TEXT(’Workstation customizing source for 3477 with attached
ASCII Printer’)Chapter 11. Customizing ASCII Printers That Use the Emulator on the Display

231

Step 3: Changing the Source
After you retrieve the source, use the source entry utility (SEU) to change theprinter characteristics and add the special character support. The command looks
like the following:
STRSEU SRCFILE(CSTLIB/CSTSRC) SRCMBR(CST3477P)

This step and the next two steps are performed several times. Each time a few
more changes are made to the workstation customizing source, which is thencompiled and the device and controller are varied off and on. Print the test
document each time you vary on the printer to see if the changes are effective.
If you delete a printer function tag from your customizing source, the value for thattag is read from the default ASCII printer definition table stored in the emulator. If
you perform a hexadecimal trace, you may see escape sequences for tags that areread from the default table, in addition to the tags read from the customizing
source. Therefore, to remove support for printer functions, you must specify thetags for those functions in your customizing source. You then assign a hexadecimalvalue of null (''X) to the tags to remove support for those functions.
The following listing shows part of the source that you changed to customize theprinter. For an example of the original retrieved source, see Appendix B. Source
Code Examples.
.
.
.
:PDFNTBL.
.
.
.
:VARLSPCVAROFFSET= 11
VARLEN=1
VARTYPE=LOWHIGH
VARMAX= 255
ADJUST= 0
CNVNUM= 10
CNVDEN=
1
DATA ='1B5B5C0400900090001B41101B32'X.
:PAGLENI
VAROFFSET=
3
VARLEN=1
VARTYPE=LOWHIGH
VARMAX= 255
ADJUST= 0
CNVNUM= 1440
CNVDEN=
1
DATA ='1B43000B'X.
:PAGLENL
VAROFFSET=
2
VARLEN=1
VARTYPE=LOWHIGH
VARMAX= 255
ADJUST= 0
DATA ='1B4342'X.
:FWDRMOVVAROFFSET=
2
VARLEN=2
VARTYPE=LOWHIGH
VARMAX=32767
ADJUST= 0
CNVNUM= 12

232

OS/400 Workstation Customization Programming V4R3

CNVDEN=
1
DATA ='1B640F00'X.
:BCKRMOVVAROFFSET=
2
VARLEN=2
VARTYPE=LOWHIGH
VARMAX=32767
ADJUST= 0
CNVNUM= 12
CNVDEN=
1
DATA ='1B650F00'X.
:STRBOLDDATA ='1B45'X.
:ENDBOLDDATA ='1B46'X.
:PRTFEEDFEEDTYPE=MANUALDATA ='1B5B460300010100'X.
:DWRSLTDRAWER=DRAWER1DATA ='1B5B460300030101'X.
:DWRSLTDRAWER=DRAWER2DATA ='1B5B460300030102'X.
:DWRSLTDRAWER=ENVELOPEDATA ='1B5B460300030200'X.
:PRTORIENTORIENT=PORTRAITDATA ='1B266C304F'X.
:PRTORIENTORIENT=LANDSCAPEDATA ='1B266C314F'X.
:STRUSDATA ='1B2D01'X.
:ENDUSDATA ='1B2D00'X.
:STRSUPSDATA ='1B5300'X.
:ENDSUPSDATA ='1B54'X.
:STRSUBSDATA ='1B5301'X.
:ENDSUBSDATA ='1B54'X.
:INITPRTDATA ='1B5B4B03000031011B5B5C0200
90001B5B5405000000035200'X.
.
.
.

Step 4: Creating the Workstation Customizing Object
After you change and save the source, create the workstation customizing object
using the Create Work Station Customizing Object (CRTWSCST) command, specify
the following parameter values:
Workstation customizing
objectWSCST(CST3477P)

Library

LIB(CSTLIB)

Source member

SRCMBR(CSTSRC)

Source file

SRCFILE(CSTSRC)
Chapter 11. Customizing ASCII Printers That Use the Emulator on the Display

233

Library

LIB(CSTLIB)Text

TEXT(’Workstation customizing object for 3477 with ASCII
printer’)Note: This step is performed several times.

Step 5: Varying On the Device
Finally, you change the device description for the 3477 Model H display and specify
your customizing object CST3477P for the workstation customizing object (WSCST)
parameter.
To activate the workstation customizing function, vary off and then vary on thedisplay so that the customizing object is downloaded to the workstation controller
and then to the display. Then print the test document on the Hewlett-Packard
printer. As shown in Figure 46 on page 235, the document is printed showing thecharacteristics you customized for, as well as the removal of the strange charactersthat were appearing at the top of each printed page.
Note: This step is performed several times.

234

OS/400 Workstation Customization Programming V4R3

Example Showing Printer Functions Before and After Customization

This is a test for bold printing.

This is a test for underscored printing.

This is a test for centering.

The following two lines will be separated by a 6-lines-per-inch
spacing.

The following two lines will be separated by a 6-lines-

per-inch spacing.

The following two lines will be separated by an 8-lines-per-inch
spacing.

The following two lines will be separated by an 8-lines-

per-inch spacing.

This is a test for print orientation in portrait.

This is a test for print orientation in landscape.

(Rotate 90 )RV2H485-1

Figure 46. Final OfficeVision/400 Printer Test Document

Chapter 11. Customizing ASCII Printers That Use the Emulator on the Display

235

236

OS/400 Workstation Customization Programming V4R3

Chapter 12. Customizing ASCII Printers That Use the Emulator
on the Controller
This chapter describes the mapping tables and the tags you use to customize thesupport for an ASCII printer directly attached to the AS/400 system by way of the
ASCII workstation controller. This ASCII printer does not use the host print
transform function.
The workstation customizing functions for directly attached ASCII printers provide
you with the following capabilities:v Allow you to customize the functional characteristics of a supported ASCII printerv Allow you to customize the functional characteristics and specify all thenecessary parameters required to support a normally unsupported ASCII printer.
To perform these customizations, the OS/400 licensed program provides a way tochange one or more of the various mapping tables used by the ASCII workstation
controller to support an ASCII printer.

Supported ASCII Printers
Many IBM ASCII printers are supported by the workstation customizing functions. If
the printer and the ASCII workstation controller support a character or function, you
can add to or change the printing characteristics of these printers. All you need to
do is retrieve the workstation customizing source for your ASCII printer type andthen add the printer function tag and the corresponding hexadecimal value (orchange the existing hexadecimal value).
The workstation customizing procedure for directly attached ASCII printers may
involve some trial and error. You may need to add or change more than one tag to
add or change the printer functions. If you have a lot of additions or changes tomake, you may want to do this by making one or two changes to the source at atime, creating the customizing object, and then testing your changes. Doing this canhelp you avoid compiling errors and unpredictable results from the printer.
If you are customizing a supported ASCII printer, you can skip the next section andgo on to the technical overview about the ASCII printer mapping tables. The
remaining sections in this chapter provide more detailed technical information about
the printer mapping tables and the tags you can use to customize your printer.

Customizing Unsupported ASCII Printers
When you want to customize an ASCII printer that is not currently supported byIBM, you need to retrieve a source file member based on a supported IBM device
type and language type. If your ASCII printer is not an IBM printer and it provides afunction for emulating an IBM printer, use this setting. Be sure to specify theemulated printer in the device description for the printer.
To find out which IBM device type is most like your unsupported printer, you need toanswer the following questions:v What printer functions or characteristics and national characters do I want thisprinter to support?
Write these down so that you can answer the next question.
© Copyright IBM Corp. 1998

237

v Does the printer itself support the functions I need?
Check the reference manual to determine this. If the printer cannot support thefunctions you need, you cannot customize the printer to provide these functions.
v Does the printer emulate or support the emulation of an IBM printer?
If so, set it up to use the emulation because it could make your customizing
process easier.
v Is it a laser printer or a line/listing printer?
Laser printers are more complex and can be somewhat more difficult tocustomize. The customization may require more time than you expect.
v Which supported ASCII printer has similar print characteristics to my unsupported
ASCII printer?
To find out more about the characteristics of the printers supported by IBM andthe AS/400 system, you can do one or more of the following:– Check the reference manuals for the supported printers. These may beavailable through your technical support specialist or marketing representative.
You may already be using one or more of the supported printers and have amanual on hand, or you could contact the manufacturer of the supported
printer and ask for a list of the print characteristics or the manual for the
supported printer.
– The print characteristics for many of the ASCII printers supported by the
AS/400 system are listed in the Printer Device Programming book.
When you know or have an idea which supported printer your printer is most like,you can use the device type for the supported printer to retrieve a workstation
customizing source file member to be the basis of your workstation customizing
object.
After you have answered the previous questions, you also need to do the following:v Set up all the necessary hardware to connect the printer to the ASCII workstation
controller
This is usually a serial connection.
v Set up any programmable features provided by the printerThis is the time to set up IBM emulation (if supported), as well as any switches
and other parameters that affect the printer.
v Create the necessary controller and device descriptions if needed
The controller description is for the ASCII workstation controller and may alreadyexist. The device description is for the ASCII printer.
After you have set up and turned on the printer, try to print a test document using
one of your usual applications, such as OfficeVision/400. This is the starting point
for workstation customizing.
The workstation customizing procedure for directly attached ASCII printers that are
not currently supported can involve a lot of trial-and-error. For an unsupported
printer, you usually have a lot of additions or changes to make. To avoid compilingerrors, you should do this by making one or two changes to the source at a time
and then creating the workstation customizing object. Test the object (vary off theprinter, specify the workstation customizing object in the device description, vary theprinter back on, and print a test document) to see if the results are what you
expected. If so, then make the next changes; otherwise, go back to your source
and the printer reference manual to determine the cause of any problems withthese changes before going further with the workstation customizing procedure.

238

OS/400 Workstation Customization Programming V4R3

The remaining sections in this chapter provide more detailed technical information
about the printer mapping tables and the tags you can use to customize yourprinter.

Mapping Tables for ASCII Printers
The ASCII workstation controller uses three tables to map commands and data to
an ASCII format for a given printer. These tables are:v Default Printer EBCDIC-to-ASCII Mapping Tablev Printer Function Tablev Printer Multilanguage EBCDIC-to-ASCII Mapping Table

Default EBCDIC-to-ASCII Mapping Table
The default EBCDIC-to-ASCII mapping table converts an EBCDIC character
specified in an application data stream into a single ASCII character code value (forthat same character).
The EBCDIC-to-ASCII mapping table used for a given printer depends on thedevice type and the language configured for the printer. Different types of printers
support different ASCII code pages. Also, certain ASCII printers are capable ofsupporting different national-language-dependent ASCII code pages (the code pagein use at any time is determined by a command to select the ASCII code page).
The following list shows the values and value ranges you can enter in the
EBCDIC-to-ASCII mapping table.
00

Nonprintable character

01–1E Converts the ASCII code to a multiple-byte code
20–FF Character data
Note: See “ASCII Control Code Mapping (ASCIICTL) Tag” on page 254 for more
information about using the values in the range 01-1E for converting the
ASCII code to a multiple-byte code. The AS/400 system provides a separate
EBCDIC-to-ASCII mapping table for each unique combination of EBCDIC
code page and ASCII character set based on the device type and thelanguage configured for the device. The following example shows the source
retrieved for the default EBCDIC-to-ASCII mapping table for an IBM 4219
printer that is configured with a language type of USI.

Chapter 12. Customizing ASCII Printers That Use the Emulator on the Controller

239

.
.
.
:PDFTMAPTBL.
:PDFTEBCTBLDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A0C68687A45B2E3C282B21'X'268288898AA18C8B8DE15D242A293B5E'X'2D2FB68EB7B5C78F80A5DD2C255F3E3F'X'9B90D2D3D4D6D7D8DE603A2340273D22'X'9D616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A791F792CF'X'E67E737475767778797AADA8D1EDE8A9'X'BD9CBE169FF5F4ACABF3AA7CEEF9EFF2'X'7B4142434445464748492D939495A2E4'X'7D4A4B4C4D4E4F505152FB968197A398'X'5C20535455565758595AFDE299E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0A0A0A0A0A0A0A0C0A0A0A0A0A0A'X'0C0A0A0A0A060606060C0A0A0A0A0A0A'X'0A0A0E0E0E0E0E0E0E0E0A0A0A0A0A0A'X'0A0C0C0C0C080808080A0A0A0A060A0A'X'0E0A0C0A0C0A080C0C060E0E0C0C0C0A'X'0A060C060E0C0A0C0C0A0A0A0E0A0E0A'X'0C0A0A080C0C0E0C0C0A0A0A0E0E0E0A'X'0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A'X'0A0E0E0E0E0C0C0E0E080A0A0A0A0A0A'X'0A0A0E0C0E0E0E0C0E0E060C0C0C0C0C'X'0A0A0C0E0E0E0E0E0E0C0A0E0E0E0E0E'X'0A0A0A0A0A0A0A0A0A0A0A0E0E0E0E0A'X.
:EPDFTMAPTBL.
.
.
.

/* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- */

Figure 47. Source for the Default EBCDIC-to-ASCII Mapping Table

This table cannot be used to map EBCDIC characters into ASCII data when an
application data stream being sent to the printer contains a command indicating thata different EBCDIC code page should be used for character conversion. When thisoccurs, the ASCII workstation controller uses the EBCDIC-to-ASCII mapping datacontained in the multilanguage EBCDIC-to-ASCII mapping table. The controller
goes back to using the default EBCDIC-to-ASCII mapping table if a command isreceived to set the printer to initial conditions or when the printer is varied off andthen varied back on.
The PFNTWTH (font width) portion of the table contains the font width informationfor each EBCDIC character being mapped into ASCII code. Font widths arenormally specified in 1/120-inch units. The only exception to this occurs when you
specify the PRTCTL (print control flag) tag with the value, '80'X. When you do this,the font widths should be specified in 1/1440-inch units.
The ASCII workstation controller uses the font width data to calculate the character
width when proportional spacing mode is used. For example, the value 20 in the
EBCDIC-to-ASCII mapping table in Figure 47 is mapped to a font width of '0A'X.
The ASCII character for the value 20 is the space character (blank). This mapping
indicates that when the printer is printing in proportional space mode, the spacecharacter (blank) is (10 x 1/120) = 1/12 inch wide.

240

OS/400 Workstation Customization Programming V4R3

ASCII Printer Function Table
The following are among the printer characteristics and capabilities that you canspecify within a printer function table:
Line spacing
Pitch (characters per inch)
Form length
Highlighting characteristics (bold, underscore)
Draft, letter, or text quality printing
Paper feed capabilities
Subscripting and superscripting
Initialization and reset sequences
Selecting character sets
Selecting fonts
Relative forward and backward movement
Margins
Font quality
Type styles
More information about the content and format of the ASCII printer function table isavailable in “Printer Function Tags” on page 250.

Printer Multilanguage EBCDIC-to-ASCII Mapping Table
The multilanguage EBCDIC-to-ASCII mapping table contains EBCDIC-to-ASCII
mapping information for all the EBCDIC code pages that an application sending
data to an ASCII printer can select. The ASCII workstation controller uses
information in this table (rather than information in the default EBCDIC-to-ASCII
table) when the data stream sent to the printer contains a command to use a
different code page.
As shown in the following figure, the multilanguage EBCDIC-to-ASCII mapping table
is actually a series of EBCDIC-to-ASCII mapping tables, each one in the series
having the same format as a default EBCDIC-to-ASCII mapping table (consisting ofcharacter mapping and font width data).
.

.
.
:PMLGMAPTBL.
:PMLGEBCTBLEBCDICCP=
29
ASCIICP= 850
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A0C68687A4E82E3C282B21'X'268288898AA18C8B8DE192242A293B99'X'2D2FB68EB7B5C78F80A5DD2C255F3E3F'X'9B90D2D3D4D6D7D8DED03A23D1273D22'X'9D616263646566676869AEAF60EC7BF1'X'F86A6B6C6D6E6F707172A6A77DF75DCF'X'E694737475767778797AADA840ED5BA9'X'BD9CBEFAB8F5F4ACABF3AA7CEEF95C9E'X'E7414243444546474849F0937E95A2E4'X'914A4B4C4D4E4F505152FB968197A398'X/* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- */

Chapter 12. Customizing ASCII Printers That Use the Emulator on the Controller

241

'EFF6535455565758595AFDE25EE3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0A0A0A0A0A0A0A0C0E0A0A0A0A0A'X'0C0A0A0A0A060606060C0E0A0A0A0A0E'X'0A0A0E0E0E0E0E0E0E0E0A0A0A0A0A0A'X'0A0C0C0C0C080808080C0A0A0E060A0A'X'0E0A0C0A0C0A080C0C060E0E0A0C0A0A'X'0A060C060E0C0A0C0C0A0A0A0A0A0A0A'X'0C0A0A080C0C0E0C0C0A0A0A0A0E0A0A'X'0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A'X'0C0E0E0E0E0C0C0E0E080A0A0A0A0A0A'X'0E0A0E0C0E0E0E0C0E0E060C0C0C0C0C'X'0A0A0C0E0E0E0E0E0E0C0A0E0A0E0E0E'X'0A0A0A0A0A0A0A0A0A0A0A0E0E0E0E0A'X.

:PMLGEBCTBLEBCDICCP= 30
ASCIICP= 853
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A000917BA4802E3C282B21'X'268288898AA18C8B8DE1A6982A293B5E'X'2D2FB686B7B500925BA5AD2C255F3E3F'X'0090D2D3D4D6D7D8DED53A99B8273D9A'X'F4616263646566676869E886C7ED007C'X'F86A6B6C6D6E6F707172A99B9FF700CF'X'E694737475767778797AE78FC6EC0040'X'FA9CBE7DBD155D00AB24A89DACF9EF9E'X'87414243444546474849F0937E95A2E5'X'A74A4B4C4D4E4F50515260965C81A300'X'81F6535455565758595AFDE223E3E0E4'X'30313233343536373839FCEA22EBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0A0A0A0A0A0A0A0C0E0A0A0A0A0A'X'0C0A0A0A0A060606060C0E080A0A0A0A'X'0A0A0E0E0E0E0E0E0A0E0A0A0A0A0A0A'X'0A0C0C0C0C08080808060A0E0C060A0E'X'0A0A0C0A0C0A080C0C060C0A0A0C0C0A'X'0A060C060E0C0A0C0C0A0C0C060A0E0A'X'0C0A0A080C0C0E0C0C0A0E0E0C0E0E0A'X'0A0A0A0A0C0A0A0A0A0A0E0E0C0E0A0A'X'0A0E0E0E0E0C0C0E0E080A0A0A0A0A0C'X'0C0A0E0C0E0E0E0C0E0E0A0C0A0C0C0C'X'0C0A0C0E0E0E0E0E0E0C0A0E0A0E0E0E'X'0A0A0A0A0A0A0A0A0A0A0A0E0A0E0E0A'X.
.
.
.

/* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- */

Figure 48. Source for the Multilanguage EBCDIC-to-ASCII Mapping Table

Besides containing EBCDIC-to-ASCII mapping and character font width information,
the multilanguage table also contains the following:

242

OS/400 Workstation Customization Programming V4R3

v ASCII character set ID values that are sent to an ASCII printer when a new
ASCII code page is selected (a different ASCII code page may need to be
activated in the printer when the application switches to a different EBCDIC codepage).
v A table indicating which EBCDIC code pages are valid when selected by theapplication.
There are separate multilanguage EBCDIC-to-ASCII mapping tables for printers
attached to the ASCII workstation controller. Which multilanguage EBCDIC-to-ASCII
mapping table the ASCII workstation controller uses for a given printer depends onwhich multinational ASCII character set is supported by that printer. The following
are the main multinational character sets for printers that attach to the ASCII
workstation controller:v Character Set 437 (Personal Computer Character Set 2), used on IBM 4201-2,
4202-1, 4202-2, 4207-1, and 4208-1 printers.
v Character Set 256 (International Number 1 Character Set), used on IBM 4224
printers.
v Character Set 850 (Personal Computer Multinational Character Set), used on
IBM 5204, 4201-3, 4202-3, 4207-2, 4208-2, 4216-10, 4234-13, 4019, and6252-A58 printers.

Determining Which ASCII Printer Tables to Use
The three ASCII printer tables described in “Mapping Tables for ASCII Printers” onpage 239 are downloaded to the ASCII workstation controller when a printer isvaried on. The particular tables that are downloaded when a device is varied on
depend on the type of printer and the language configured for the printer. The
system determines which set of tables to download for a given printer by searchinga table of tables. This table contains the names of each of the tables that must be
used for a given type of printer configured for a particular language.
When you use the Retrieve Work Station Customizing Object Source (RTVWSCST)
command to create your workstation customizing source, you must specify an ASCII
printer for the device type. You must also specify the same language type as you
did when you created the device description. This provides the correct mappingtables to use as a base and the correct printer functions for your specific ASCII
printer.
If you are adding support for a device that is not supported by IBM, specify a device
type that is similar to your unsupported device. For example, if you are trying tocustomize an unsupported ASCII laser printer, you might choose a device type of4019 on the RTVWSCST command. The 4019 is a supported ASCII laser printerwith some similar functional characteristics to non-IBM laser printers.
Use the following list as a guideline to help you determine which tables in yourworkstation customizing source you want to customize.
v Characters do not appear or are not the characters that are expected.
To change the characters that are supported for the printer’s default code pageand character set, you need to change one or more entries in your default
EBCDIC-to-ASCII mapping table, which is denoted in your workstation
customizing source by the PDFTEBCTBL (EBCDIC-to-ASCII mapping table) tag.
v Adding or changing the print characteristics.

Chapter 12. Customizing ASCII Printers That Use the Emulator on the Controller

243

If you want to add or change the printing characteristics of your ASCII printer,such as the margins, line and page spacing, paper drawer selection, paper feed,
paper orientation, and so on, you need to add to or change the existing printerfunction tags in your source. The printer function table in a retrieved workstation
customizing source begins with the PFCNTBL (ASCII printer function table) tag.
This tag is followed by a number of individual printer function tags with theirparameters and data values that, when compiled, make up the actual printerfunction table. See “Printer Function Tags” on page 250 for more information
about the individual printer function tags.
v The data stream from your application contains commands that tell the printer to
use a different code page.
If you know that your application is capable of producing documents that containcommands to use a different code page, you need to change the entries in one
or more of the multilanguage EBCDIC-to-ASCII mapping tables that are denotedby the PMLGMAPTBL (multilanguage EBCDIC-to-ASCII mapping table) tag inyour source. This tag is followed by the PMLGEBCTBL (EBCDIC-to-ASCII
mapping table) tag and the corresponding PFNTWTH (font width mapping table)
tag and its entries. There must be at least 30 of these matched pairs of mappingtables in a single workstation customizing source, each containing the
EBCDIC-to-ASCII mapping and its corresponding font width mapping for adifferent code page. See “Multilanguage EBCDIC-to-ASCII Mapping Table(PMLGMAPTBL) Tag” on page 247 for more information about these mappingtable pairs.
Using the reference manual for the printer and the tags in your retrieved source,
you can now change the existing printer mapping tables and add any new,
supported print functions you need.
After you have made your changes to the source, you should create thecustomizing object from the retrieved source using the Create Work Station
Customizing Object (CRTWSCST) command. Use the Work with Configuration
Status (WRKCFGSTS) command to vary the printer off and then on again. Now, try
printing your test document again.

Working with the Tag Language for Directly Attached ASCII Printers
When you specify an ASCII printer for the device type on the Retrieve Work Station
Customizing Object Source (RTVWSCST) command, the device class is specified
in the source as an ASCII printer (DEVCLASS = ASCIIPRT). The source structure forthis device class looks like the following:

244

OS/400 Workstation Customization Programming V4R3

:WSCST DEVCLASS=ASCIIPRT.
:PDFTMAPTBL. /*default EBCDIC-to-ASCII mapping table*/:PDFTEBCTBL with parameters. /*mapping table entries*/:PFNTWTH with parameters. /*font width map table entries*/:EPDFTMAPTBL.
:PMLGMAPTBL. /*multilanguage EBCDIC-to-ASCII mapping table*/:PMLGEBCTBL with parameters.

(mapping table entries):PFNTWTH with parameters. /*font width map table entries*/.
.
( PMLGEBCTBL/PFNTWTH pairs).
.
:PMLGEBCTBL with parameters. /*mapping table entries*/:PFNTWTH with parameters. /*font width map table entries*/:EPMLGMAPTBL.
:PFCNTBL. /*printer function table*/.
.
printer function tag/*tag with parameters*/.
.
.
.
:EWSCST.

Figure 49. Source Structure for ASCII Printers

The source structure provides the basic outline of a source file member retrieved for
an ASCII printer.
The primary tags for the ASCII printer source structure are the following:
PDFTMAPTBL

Default EBCDIC-to-ASCII mapping table tag

PMLGMAPTBL

Multilanguage EBCDIC-to-ASCII mapping table tag

PFCNTBLASCII printer function table tag

The order and placement of the primary tags in each source file member is strictly
enforced by the workstation customizing object compiler. When a primary tag is
missing in the source, the system default table associated with the missing primary
tag may be used in place of a customized table. The default table chosen is basedon the device type and national language type you specified when you used the
RTVWSCST command. When you make changes to your workstation customizing
source, you should leave the tags in the order they were in when you retrieved thesource. This helps to avoid possible errors and unpredictable results when you
create and use the workstation customizing object.
Chapter 12. Customizing ASCII Printers That Use the Emulator on the Controller

245

Following the PMLGMAPTBL tag, the number of PMLGEBCTBL (EBCDIC-to-ASCII
mapping table) and PFNTWTH (font width mapping table) tag pairs determines thesize of the customized multilanguage mapping table. Each tag pair represents one
code page to character set mapping table. For a complete description of the
PMLGEBCTBL tag, see “EBCDIC-to-ASCII Mapping Table (PMLGEBCTBL) Tag” onpage 248 .
When a PFCNTBL (ASCII printer function table) tag is present in the source, but
has no printer function tags following it, the system default printer function table is
not used. Instead, no printer functions are mapped when this customizing object isused by the workstation controller. This can cause your printer to produce
unpredictable results.

Using the Tags to Customize ASCII Printers
The following sections describe the tags in the source you retrieved for customizing
an ASCII printer. If you have not already retrieved the workstation customizing
source for customizing an ASCII printer, be sure to specify a supported ASCII
printer for the device type when you use the Retrieve Work Station Customizing
Object Source (RTVWSCST) command.

Default EBCDIC-to-ASCII Mapping Table (PDFTMAPTBL) Tag
The PDFTMAPTBL (default EBCDIC-to-ASCII mapping table) tag defines a default
EBCDIC-to-ASCII mapping table for an ASCII printer. The syntax for this tag is::PDFTMAPTBL.

There are no keyword parameters associated with this tag. However, it must be
immediately followed by an PDFTEBCTBL (EBCDIC-to-ASCII mapping table) tag
and a PFNTWTH (font width mapping table) tag. This pair of tags indicates that thecontents of the tables are to be used for customizing the ASCII printer. An example
showing these tags and source for these tables is shown in Figure 47 on page 240.

End Default EBCDIC-to-ASCII Mapping Table (EPDFTMAPTBL) Tag
The EPDFTMAPTBL (end default EBCDIC-to-ASCII mapping table) tag ends thedefault EBCDIC-to-ASCII mapping table. This tag follows the PDFTMAPTBL,PDFTEBCTBL, and PFNTWTH tags. The syntax for this tag is::EPDFTMAPTBL.

EBCDIC-to-ASCII Mapping Table (PDFTEBCTBL) Tag
The PDFTEBCTBL (EBCDIC-to-ASCII mapping table) tag defines the mapping table
entries for the default EBCDIC-to-ASCII mapping table for an ASCII printer. The
PDFTEBCTBL tag must always follow a PDFTMAPTBL tag and it must always bepaired with an accompanying PFNTWTH (font width mapping table) tag. The syntax
for this tag is::PDFTEBCTBLDATA = table data.

DATA
A required parameter. Specifies the hexadecimal EBCDIC-to-ASCII mapping

246

OS/400 Workstation Customization Programming V4R3

table data that is used to map EBCDIC codes from the AS/400 system to the
ASCII code needed by the ASCII printer. The table data must be hexadecimal,and exactly 192 bytes in length.

table data
Hexadecimal values for mapping EBCDIC codes to ASCII codes for the
ASCII printer.

Font Width Mapping Table (PFNTWTH) Tag
The PFNTWTH (font width mapping table) tag defines the font width mapping table
for an ASCII printer. The font width mapping table tag must follow either a
PDFTMAPTBL tag or a PMLGMAPTBL tag. Also, it must always be paired with anaccompanying PDFTEBCTBL or PMLGEBCTBL tag. The syntax for this tag is::PFNTWTHDATA = table data.

DATA
A required parameter. Specifies the hexadecimal font width mapping codes. The
table data must be hexadecimal, and exactly 192 bytes in length.

table data
Hexadecimal values for mapping the necessary font widths for the ASCII
printer.
The ASCII workstation controller uses the font width data to calculate the character
width when proportional spacing mode is used. Font widths are normally specified
in 1/120-inch units. The only exception to this occurs when you specify the PRTCTL(print control flag) tag with the value, '80'X. When you do this, the font widths
should be specified in 1/1440-inch units.

ASCII Printer Function Table (PFCNTBL) Tag
The PFCNTBL (ASCII printer function table) tag defines the printer function table tobe used for an ASCII printer. The syntax for this tag is::PFCNTBL.

There are no keyword parameters for this tag. However, it must be immediately
followed by a number of individual printer function tags, which make up the function
table entries. See “Printer Function Tags” on page 250 for more information about
the individual printer function tags. The absence of a specific printer function tag
following the PFCNTBL tag implies that particular printer function is not mapped.
When the same printer function tag occurs multiple times following a PFCNTBL tag,the workstation controller uses the last occurrence of the tag in the source to map
the printer function.

Multilanguage EBCDIC-to-ASCII Mapping Table (PMLGMAPTBL) Tag
The PMLGMAPTBL (multilanguage EBCDIC-to-ASCII mapping table) tag defines
the multilanguage EBCDIC-to-ASCII mapping table for customizing an ASCII printer.
The syntax for this tag is::PMLGMAPTBL.

There are no keywords associated with this tag. However, it is immediately followed
by one or more occurrences of a PMLGEBCTBL (EBCDIC-to-ASCII mapping table)
tag and a PFNTWTH (font width mapping table) tag. These pairs of tags specify the
Chapter 12. Customizing ASCII Printers That Use the Emulator on the Controller

247table contents. The maximum number of pairs allowed is 150. The minimum
number of pairs required is 30. See “EBCDIC-to-ASCII Mapping Table(PMLGEBCTBL) Tag” for a description of the PMLGEBCTBL tag and more
information on the required pairs.

End Multilanguage EBCDIC-to-ASCII Mapping Table (EPMLGMAPTBL)
Tag
The EPMLGMAPTBL (end multilanguage EBCDIC-to-ASCII mapping table) tag
ends the multilanguage EBCDIC-to-ASCII mapping table. The syntax for this tag is::EPMLGMAPTBL.

EBCDIC-to-ASCII Mapping Table (PMLGEBCTBL) Tag
The PMLGEBCTBL (EBCDIC-to-ASCII mapping table) tag defines an
EBCDIC-to-ASCII mapping table for an ASCII printer. The PMLGEBCTBL tag must
follow a PMLGMAPTBL tag. Also, it must always be paired with an accompanying
PFNTWTH tag. The syntax for this tag is::PMLGEBCTBLEBCDICCP = code page ID
ASCIICP = code page ID
DATA = table data.

EBCDICCP
A required parameter. Specifies the EBCDIC code page identifier. The value forthis parameter is an integer value, from 1 to 32767 without leading zeros.

code page ID
A 5-digit registered identifier used to specify a particular assignment of code
points to graphic characters. The code page ID is the second part of the
QCHRID system value or the CHRID parameter value.
ASCIICPA required parameter. Specifies the ASCII code page identifier. The value forthis parameter is an integer value, from 1 to 32767 without leading zeros.

code page ID
A 5-digit registered identifier used to specify a particular assignment of code
points to graphic characters. The code page ID is the second part of the
QCHRID system value or the CHRID parameter value.
Note: For unsupported printers, this value is tied to the variable type parameter(VARTYPE) on the CODEPAGVAR (code page variable) tag.
DATA
A required parameter. Specifies the hexadecimal table data that is used to map
EBCDIC codes from the AS/400 system to the ASCII code needed by the ASCII
printer. The table data must be hexadecimal, and exactly 192 bytes in length.

table data
Hexadecimal values for mapping EBCDIC codes to ASCII codes needed by
the ASCII printer.
A minimum set of thirty PMLGEBCTBL/PFNTWTH tag pairs is required. This isbecause the workstation controller uses an offset value to select the code page fora given data stream. One each of the EBCDICCP (code page) values shown in
Table 37 on page 249 must be present on the PMLGEBCTBL tags of this minimum
set. There is no requirement for the PMLGEBCTBL tags to be in any particular248

OS/400 Workstation Customization Programming V4R3

order, only that the required ones must each exist once, and only once, between
the PMLGMAPTBL tag and the EPMLGMAPTBL tag.
Note: The code page values supported by the workstation controller differ fromthose supported for twinaxial-connected displays, as shown in Table 22 on
page 63 . It is strongly recommended that you do not delete the original 30
pairs you find in the retrieved source. Unpredictable results may appear on
your printed output. You are free to add as many new pairs of
PMLGEBCTBL/PFNTWTH tags as you need.
Table 37. Required Code Page Identifiers
EBCDICCP Parameter Valuefor PMLGEBCTBL Tag
EBCDIC Code Page
037

United States

256

International

273

Austria/Germany

274

Belgium

275

Brazil276

Canadian French

277

Denmark/Norway

278

Finland/Sweden

280

Italy

281

Japan English

282

Portugal

283

Spain

284

Spanish Speaking

285

United Kingdom

290

Japan Katakana

297

France330

Languages of the former Yugoslavia

340

OCR

420

Arabic423

Greece424

Hebrew

500

International

870

ROECE/Latin 2871

Icelandic

880

ROECE/Cyrillic

892

OCR-A

893

OCR-B

905

TurkeyChapter 12. Customizing ASCII Printers That Use the Emulator on the Controller

249

Table 37. Required Code Page Identifiers (continued)
EBCDICCP Parameter Valuefor PMLGEBCTBL Tag
EBCDIC Code Page
259

Map to ASCII character set 899
Note: You must have the ASCIICP set to 899 for the
PMLGEBCTBL tag.

259

Map to ASCII character set 850, or ASCII character set 437
Note: You must have set the ASCIICP set to 850 or 437
for the PMLGEBCTBL tag.

Printer Function Tags
These tags allow you to specify the ASCII control sequence for an individual printerfunction. The tags for these functions must follow a PFCNTBL (ASCII printerfunction table) tag in your source.
Most of the printer function tags fall into one of following general formats.
v Tags with only the data parameterv Tags that provide additional parameters to describe variables within functions
v Tags for functions that support relative movement combined with the first two tag
formats
The remaining printer functions that are described are functions with specialized
parameters that do not meet any of the general formats.

Syntax for Printer Function Tags with the Data Parameter Only
The following table lists the tags that have only a data parameter that you can use
to set or change printer characteristics.
Table 38. Printer Function Tags with Data Parameter Only

250

Tag

Description

BELL

Bell

BSP

Backspace

CARRTN

Carrier Return

ENDBOLDEnd Bold Printing

ENDSUBSEnd Subscript

ENDSUPSEnd Superscript

ENDUS

End Underscore

FNTGPFT

Set Global Font for PFT

FORMFEEDForm Feed

INITPRT

Initialize Printer

INITVON

Initialization at Vary On

LINEFEEDLine Feed

OS/400 Workstation Customization Programming V4R3

Table 38. Printer Function Tags with Data Parameter Only (continued)
Tag

Description

PRTCTL

Printer Control Flags
Valid values are:'00'X

No flags set'01'X

Printer response allowed'02'X

Page length change in middle of page not allowed'30'X

Inhibit computer output reduction (COR) mode

'80'X

Font widths in 1/1440-inch units

RVSIDX

Reverse Index

SPACE

Space

STRBOLD

Start Bold Printing

STRPROP

Start Proportional Space Mode

STRSUBS

Start Subscript

STRSUPS

Start Superscript

STRUS

Start Underscore

The general syntax for a printer function tag that uses only the data parameter is::xxxxxDATA = ASCII control sequence.

DATA
A required parameter. Specifies the ASCII control sequence for the printerfunction. This data must be coded as a hexadecimal value. The maximum
length of this value is 240 bytes.

ASCII control sequence
Hexadecimal values for mapping the ASCII control sequence for the printerfunction.
The FNTGPFT (set global font for PFT) tag allows you to set the base font for
printing. It is this font that is used for all printed characters until the printer receives
a command to change to another font.
The printer control flags (PRTCTL tag) are bit-mapped flags that allow you tocontrol certain print characteristics, such as the font width units for the FNTGPFT(set global font) tag. The hexadecimal values for the PRTCTL tag that are definedin Table 38 on page 250 can all be specified on a single occurrence of the tag. To
do this you can use a logical OR operation to combine the values. For example,
when you combine the values '01'X. and '02'X. using a logical OR operation, theresult is '03'X. Specifying '03'X. for the PRTCTL tag allows you to set both the flag
for allowing a printer response and the flag for not allowing a page length change in
mid-page.

Syntax for Printer Function Tags with a Variable
The following table lists the tags that you can use to set or change printercharacteristics that involve a variable.

Chapter 12. Customizing ASCII Printers That Use the Emulator on the Controller

251

Table 39. Printer Function Tags with a Variable
Tag

Description

CODPAGVAR

Set Code Page

FNTTYPE

Font TypePRISPCMSet Primary Spacing Mode

PRISTYLE

Set Primary Style

The general syntax for a printer function tag with a variable is::xxxxxVAROFFSET = variable offset incontrol sequence
VARLEN = variable length
VARTYPE = HIGHLOW|LOWHIGH|CHRDEC|CHRHEX|CHRANDATA = ASCII control sequence.

VAROFFSET
A required parameter. Defines the offset of the variable in the control sequence.
This value must be an integer.
Note: This offset is relative to the beginning of the control sequence.
Therefore, a value of zero (0) implies that the variable starts in the first
byte of the control sequence.
VARLENA required parameter. Defines the length of the variable. This value must be an
integer.
VARTYPE
A required parameter. Defines the type of variable. The choices are:
HIGHLOW

The byte order of the variable is in high-low order.

LOWHIGHThe byte order of the variable is in low-high order.

CHRDECThe variable is in characters and there is no byte orderconsideration. All characters are in the range from 0 to 9.

CHRHEX

The variable is in characters and there is no byte orderconsideration. All characters are in the range from 0 to 9, A to
F.

CHRAN

The variable is in characters and there is no byte orderconsideration. All characters are in the range from 0 to 9, A toZ.

DATA
A required parameter. Specifies the ASCII control sequence for the printerfunction. This must be a hexadecimal value. The maximum length of this valueis 240 bytes.

ASCII control sequence
Hexadecimal values for mapping the ASCII control sequence for the printerfunction.
The PRISPCM (primary spacing mode) tag and the PRISTYLE (set primary style)tag, in combination with the PRICHRH (set primary character height) tag are used
for font selection when an ASCII printer does not support global fonts or provide
font quality and characters per inch (CPI) support.

252

OS/400 Workstation Customization Programming V4R3

Setting the primary spacing mode allows you to indicate whether the spacing should
be fixed or proportional.
Primary style is related to the font map identifier. When the value of a font mappingtable entry is greater than 255, the high order byte of the font map identifier is used
to set the print to a particular style within the specified font. For example, when an
ASCII printer is set up to print in a Gothic font, the primary style might be italic or
upright print within the Gothic font.

Syntax for Printer Function Tags with Variable and Relative Movement
The following table lists the tags that you can use to set or change printercharacteristics that involve a variable and some relative movement.
Table 40. Printer Function Tags with Variable and Relative Movement
Tag

Description

BCKRMOV

Backward Relative Movement

FWDRMOV

Forward Relative Movement

PAGLENI

Set Page Length in Inches

PRICHRH

Set Primary Character Height

VARCPI

Variable Characters Per Inch

VARLSPC

Variable Line Spacing

The general syntax for a printer function tag with a variable is::xxxxxxxxxx
VAROFFSET = variable offset incontrol sequence
VARLEN = variable length
VARTYPE = HIGHLOW|LOWHIGH|CHRDEC|CHRHEX|CHRANVARMAX = maximum variable value
ADJUST = adjustment
CNVNUM = conversion ratio numerator
CNVDEN = conversion ratio denominator
DATA = ASCII control sequence.

VAROFFSET
A required parameter. Defines the offset position of the variable in the control
sequence. This value must be an integer.
Note: This offset position is relative to the beginning of the control sequence.
Therefore, a value of zero (0) implies that the variable starts in the first
byte of the control sequence.
VARLENA required parameter. Defines the length of the variable. This value must be an
integer.
VARTYPE
A required parameter. Defines the type of variable used with this category of
printer function tags
HIGHLOW

The byte order of the variable is in high-low order.

LOWHIGHThe byte order of the variable is in low-high order

Chapter 12. Customizing ASCII Printers That Use the Emulator on the Controller

253

CHRDEC

The variable is in characters and there is no byte orderconsideration. All characters are in the range from 0 to 9.

CHRHEX

The variable is in characters and there is no byte orderconsideration. All characters are in the range from 0 to 9, A to
F.

CHRAN

The variable is in characters and there is no byte orderconsideration. All characters are in the range from 0 to 9, A toZ.

VARMAXA required parameter. Defines the maximum variable value. This value must be
an integer.
ADJUST
A required parameter. Defines the adjustment value for the variable. This value
must be a signed integer.
CNVNUMA required parameter. Defines the numerator of the conversion ratio. This value
must be an integer.
CNVDENA required parameter. Defines the denominator of the conversion ratio. Thisvalue must be a nonzero integer.
DATA
A required parameter. Specifies the ASCII control sequence for the printerfunction. This must be a hexadecimal value. The maximum length of this valueis 240 bytes.

ASCII control sequence
Hexadecimal values for mapping the ASCII control sequence for the printerfunction.
For variable line spacing (VARLSPC tag), the conversion ratio specified convertsline spacing parameter values in the application data stream from units of 1/1440
inch to whatever units are used by the ASCII printer. For example, if the line
spacing units used by an ASCII printer in its variable spacing command are in unitsof 1/72 inch, then the conversion ratio specified in the command header should be
20.
For setting the page length, the ASCII workstation controller only recognizes thefirst occurrence of the PAGLENI tag. If more than one of these tags is specified, thevalues in the first occurrence are used and all other occurrences are ignored.

ASCII Control Code Mapping (ASCIICTL) Tag
The ASCIICTL (ASCII control code mapping) tag defines the ASCII control
sequence for an ASCII control code. The ASCIICTL tag must follow the PFCNTBL
tag in your source. The syntax for this tag is::ASCIICTLASCII = control code
DATA = ASCII control sequence.

ASCII
A required parameter. Specifies an ASCII control code. This must be ahexadecimal value from '01'X to '1E'X.

254

OS/400 Workstation Customization Programming V4R3

DATA
A required parameter. Specifies the ASCII control sequence for the ASCII
control code you want to map. This must be a hexadecimal value. The
maximum length of this value is 240 bytes.

ASCII control sequence
Hexadecimal value for mapping an ASCII control sequence to an ASCII
control code.
Specifying the ASCIICTL tag allows you to convert a single-byte character code to a
multiple-byte sequence. For example, you could use this code to have the printerprint control characters, such as a face and §, that are not normally in its range ofprintable characters. You could also use this tag to allow the printer to change to adifferent code page to print a single character and then change back to the originalcode page.

Collate Width (COLLATE) Tag
The COLLATE (collate width) tag sets the collate width. Collate width is the printeroffset between overstruck characters when a type-over method is used to createbold highlighting for printed data. The printer offset referred to here is the offset
between the first and second character when the printer reverses the print direction
to print over previously printed characters and there is a slight space between them.
The COLLATE tag must follow the PFCNTBL tag in your source. The syntax for thistag is::COLLATEDATA = collate width.

DATA
A required parameter. Defines the collate width. This value must be an integer
denoting the number of 1/1440-inch increments.

Collate width
Integer value for defining the collate width to the ASCII printer.

Set Characters per Inch (CPI) Tag
The CPI (set characters per inch) tag defines the control sequence for setting thenumber of characters per inch. The CPI tag must follow the PFCNTBL tag in yoursource. You can specify this tag more than one time in a workstation customizing
source when you specify different hexadecimal values for the different spacings.
The syntax for this tag is::CPI

CPI = 5|855|10|12|133|15|
171|20|27
DATA = ASCII control sequence.

Note: Use the STRPROP tag for proportional space mode.
CPI
A required parameter. Defines the number of characters per inch. Possible
values include:5

5 characters per inch

855

8.55 characters per inch

10

10 characters per inch

12

12 characters per inch
Chapter 12. Customizing ASCII Printers That Use the Emulator on the Controller

255

133

13.3 characters per inch

15

15 characters per inch

17117.1 characters per inch

20

20 characters per inch

27

27 characters per inch

DATA
A required parameter. Specifies the ASCII control sequence for setting thenumber of characters per inch. This must be a hexadecimal value. The
maximum length of this value is 240 bytes.

ASCII control sequence
Hexadecimal value for mapping an ASCII control sequence to define thenumber of characters that are to be printed per inch of paper

Default Font ID (DFTFNTID) Tag
The DFTFNTID (default font ID) tag defines the ASCII printer function table default
font IDs for different fonts. The DFTFNTID tag must follow the PFCNTBL tag in yoursource. The syntax for this tag is::DFTFNTID
CPI = 5|855|10|12|133|15|171|
20|27|PROP
DEFAULT = font ID.

CPI
A required parameter. Defines the font in characters per inch using the values
shown in the following list:
5

5 characters per inch

855

8.55 characters per inch

10

10 characters per inch

12

12 characters per inch

133

13.3 characters per inch

15

15 characters per inch

17117.1 characters per inch

20

20 characters per inch

27

27 characters per inch

PROP Proportional spacing
DEFAULTA required parameter. Specifies the default font ID. This font ID must be onethat is recognized by the AS/400 system. This value must be an integer.

Drawer Selection (DWRSLT) Tag
The DWRSLT (drawer selection) tag defines the control sequence for drawer
selection. A drawer selection defines the source of paper to be used for printing.
The DWRSLT tag must follow the PFCNTBL tag in your source. The syntax for thistag is:256

OS/400 Workstation Customization Programming V4R3

:DWRSLTDRAWER = ENVELOPE|DRAWER1|DRAWER2DATA = ASCII control sequence.

DRAWERA required parameter. Defines the drawer from which paper is to be selected.
ENVELOPE

Selects the envelope drawer as the source of paper for
documents that are to be printed.

DRAWER1

Selects drawer 1 as the source of paper for documents thatare to be printed.

DRAWER2

Selects drawer 2 as the source of paper for documents thatare to be printed.

DATA
A required parameter. Specifies the ASCII control sequence for the drawer
selection function. This must be a hexadecimal value. The maximum length of
this value is 240 bytes.

ASCII control sequence
Hexadecimal value for mapping an ASCII control sequence to define thedrawer selection for the ASCII printer.

Font ID Mapping (FNTMAP) Tag
The FNTMAP (font ID mapping) tag defines the ASCII printer function table font ID
mappings. The FNTMAP tag must follow the PFCNTBL tag in your source. It mustalso be followed by one or more FNTMAPE (font mapping table entry) tags
containing the font mapping pairs. These pairs are immediately followed by an
EFNTMAP (end font ID mapping) tag. The syntax for the FNTMAP tag is::FNTMAP

CPI = 5|855|10|12|133|15|171|
20|27|PROP
DEFAULT = default font id.

CPI
A required parameter. Defines the font in characters per inch. Possible values
include:5

5 characters per inch

855

8.55 characters per inch

10

10 characters per inch

12

12 characters per inch

133

13.3 characters per inch

15

15 characters per inch

17117.1 characters per inch

20

20 characters per inch

27

27 characters per inch

PROP Proportional spacing
DEFAULTA required parameter. Defines the default mapped font ID. This value must be
an integer. (See the reference manual for your device to find this value.)
Chapter 12. Customizing ASCII Printers That Use the Emulator on the Controller

257

End Font ID Mapping (EFNTMAP) Tag
The EFNTMAP (end font ID mapping) tag ends the ASCII printer function table font
ID mappings. The syntax for this tag is::EFNTMAP.

Font Mapping Table Entry (FNTMAPE) Tag
The FNTMAPE (font mapping table entry) tag defines one pair of font ID mappings,
which are placed into the ASCII printer function table font ID mapping table. One ormore of these tags follow a FNTMAP (font ID mapping) tag, and a group of thesetags must be followed by an EFNTMAP (end font ID mapping) tag. The syntax for
this tag is::FNTMAPEIBMFNT = font ID
ASCIIFNT = type style.

IBMFNT
A required parameter. Specifies an IBM printer font ID. This value must be an
integer.
ASCIIFNT
A required parameter. Specifies an ASCII type style. This value must be an
integer.

Font Quality (FONTQLTY) Tag
The FONTQLTY (font quality) tag defines the control sequence for setting different
font qualities. The FONTQLTY tag must follow the PFCNTBL tag in your source.
The syntax for this tag is::FONTQLTYFONTCPI = 10|12|15|171|PROPQLTYTYPE = DRAFT|LETTER|TEXTDATA = ASCII control sequence.

FONTCPIA required parameter. Defines the type of font in characters per inch.
10

10 characters per inch

12

12 characters per inch

15

15 characters per inch

17117.1 characters per inch

PROP Proportional spacing
Note: You cannot specify both 15 and 17.1 for the same ASCII printer.
QLTYTYPE
A required parameter, and Defines the quality of the printing for the ASCII
printer.

258

DRAFT

The print quality is draft quality

LETTER

The print quality is letter quality

TEXT

The print quality is text quality

OS/400 Workstation Customization Programming V4R3

DATA
A required parameter. Specifies the ASCII control sequence for the font qualityof the ASCII printer. This must be a hexadecimal value. The maximum length of
this value is 240 bytes.

ASCII control sequence
Hexadecimal value for mapping an ASCII control sequence to define thefont quality for the ASCII printer.

Set Margin (MARGIN) Tag
The MARGIN (set margin) tag allows you to set the margin size for different typesof paper and paper orientation. The MARGIN tag must follow the PFCNTBL tag inyour source. The syntax for this tag is::MARGIN

OPTION = TOP|LEFT|RIGHT|BOTTOMORIENT = PORTRAIT|LANDSCAPEDATA = margin size.

OPTIONA required parameter. Defines the margin type.
TOP

Set the margin for the top of the page

LEFT

Set the margin for the left side of the page

RIGHT

Set the margin for the right side of the page

BOTTOM

Set the margin for the bottom of the page

ORIENT
A required parameter. Defines the type of paper orientation.
PORTRAITThe paper is vertically aligned in the printerLANDSCAPE

The paper is horizontally aligned in the printerDATA
A required parameter. Specifies the size of the margin and denotes the numberof 1/1440-inch increments. This value must be an integer.

data
Integer value for the margin size

Set Page Length in Lines (PAGLENL) Tag
The PAGLENL (set page length in lines) tag sets the page length in terms of thenumber of lines per page. The number of lines is carried as a variable in the control
sequence for page length. The PAGLENL tag must follow the PFCNTBL tag in yoursource. The syntax for this tag is::PAGLENL

VAROFFSET = variable offset incontrol sequence
VARLEN = variable length
VARTYPE = HIGHLOW|LOWHIGH|CHRDEC|CHRHEX|CHRANVARMAX = maximum variable value
ADJUST = adjustment
DATA = ASCII control sequence.

Chapter 12. Customizing ASCII Printers That Use the Emulator on the Controller

259

VAROFFSET
A required parameter. Defines the offset of the variable in the control sequence.
This value must be an integer.
Note: This offset is relative to the beginning of the control sequence.
Therefore, a value of zero (0) implies that the variable starts in the first
byte of the control sequence.
VARLENA required parameter. Defines the length of the variable. This value must be an
integer.
VARTYPE
A required parameter. This attribute defines the type of variable. Possible values
are:
HIGHLOW

The byte order of the variable is in high-low order.

LOWHIGHThe byte order of the variable is in low-high order.

CHRDECThe variable is in characters and there is no byte orderconsideration. All characters are in the range 0 to 9.

CHRHEX

The variable is in characters and there is no byte orderconsideration. All characters are in the range 0 to 9, A to F.

CHRAN

The variable is in characters and there is no byte orderconsideration. All characters are in the range 0 to 9, A to Z.

VARMAXA required parameter. Defines the maximum variable value. This value must be
an integer.
ADJUST
A required parameter. Defines the adjustment value to the variable. This value
must be a signed integer.
DATA
A required parameter. Specifies the ASCII control sequence for the printerfunction. This must be a hexadecimal value. The maximum length of this valueis 240 bytes.

ASCII control sequence
Hexadecimal values for mapping the ASCII control sequence for the printerfunction.

Page Size for Printer Function Table (PAGSIZPFT) Tag
The PAGSIZPFT (page size for printer function table (PFT)) tag defines the page
size for different types of paper. The PAGSIZPFT tag must follow the PFCNTBL tag
in your source. The syntax for this tag is::PAGSIZPFT
PAGWTH = page width
PAGLEN = page length
PAPER = MANUAL|DRAWER1|DRAWER2|ENVELOPE

PAGWTHA required parameter. Defines the width of the page in the printer. This value
must be an integer denoting the number of 1/1440-inch increments.

260

OS/400 Workstation Customization Programming V4R3

PAGLEN
A required parameter. Defines the length of the page in the printer. This value
must be an integer denoting the number of 1/1440-inch increments.
PAPER
A required parameter. Defines the type of paper to be used by the printer.
MANUAL

Paper is fed to the printer manually (by hand).

DRAWER1

Paper is fed to the printer from the first drawer.

DRAWER2Paper is fed to the printer from the second drawer.

ENVELOPE

Paper is fed to the printer from the envelope drawer.

Paper Feed (PRTFEED) Tag
The PRTFEED (paper feed) tag defines the control sequence for feeding different
types of paper to the ASCII printer. The PRTFEED tag must follow the PFCNTBL
tag in your source. Most printers do not support all the paper feed characteristics
that can be specified using the parameters for this tag. If your printer does notsupport a certain characteristic, you should set the corresponding parameter value
to '00'X. (zero).
The syntax for this tag is::PRTFEEDFEEDTYPE = EJECT|MANUAL|AUTO
DATA = ASCII control sequence.

FEEDTYPE
A required parameter. Defines the type of paper feeding.
EJECT

The paper is ejected from the printer

MANUALThe paper is fed to the printer manually (by hand)

AUTO

The paper is fed to the printer automaticallyDATA
A required parameter. Specifies the ASCII control sequence for the function.
This must be a hexadecimal value. The maximum length of this value is 240
bytes.

ASCII control sequence
Hexadecimal value for mapping an ASCII control sequence to define theway paper is fed to the printer.

Paper Orientation (PRTORIENT) Tag
The PRTORIENT (paper orientation) tag defines the control sequence for setting
different paper orientations, such as portrait and landscape (rotate 90 degrees). The
PRTORIENT tag must follow the PFCNTBL tag in your source. The syntax for thistag is::PRTORIENTORIENT = PORTRAIT|LANDSCAPE|
RTT180|RTT270
DATA = ASCII control sequence.

ORIENT
A required parameter. Defines the orientation of the paper in the printer.

Chapter 12. Customizing ASCII Printers That Use the Emulator on the Controller

261

PORTRAIT

The paper is vertically aligned in the printerLANDSCAPE

The paper is horizontally aligned in the printer

RTT180The paper is rotated 180 degrees

RTT270The paper is rotated 270 degrees

DATA
A required parameter. Specifies the ASCII control sequence for setting thepaper orientation for the printer. This must be a hexadecimal value. The
maximum length of this value is 240 bytes.

ASCII control sequence
Hexadecimal value for mapping an ASCII control sequence to define theorientation for the paper to be used with printer.

Print Quality (PRTQLTY) Tag
The PRTQLTY (print quality) tag defines the control sequence for setting the print
quality. The PRTQLTY tag must follow the PFCNTBL tag in your source. The syntax
for this tag is::PRTQLTYQLTYTYPE = DRAFT|LETTER|TEXTDATA = ASCII control sequence.

QLTYTYPE
A required parameter. Defines the quality of print.
DRAFT

The print quality is draft quality. This is equivalent to the*DRAFT type used in the OS/400 printer file commands.

LETTER

The print quality is letter quality. This is equivalent to the *NLQ
type used in the OS/400 printer file commands.

TEXT

The print quality is text quality. This is equivalent to the *STD
type used in the OS/400 printer file commands.

DATA
A required parameter. Specifies the ASCII control sequence for the function.
This must be a hexadecimal value. The maximum length of this value is 240
bytes.

ASCII control sequence
Hexadecimal value for mapping an ASCII control sequence to define theprint quality for the ASCII printer.

Tag Considerations for Customizing a Directly Attached ASCII PrinterIn some cases there may be tags in your source that do not affect the printer or
may cause unpredictable results when paired with other tags. The following
sections describe these known error conditions and provide information to help you
determine which tags you should use together.

Using the Superscript and Subscript Tags
If your ASCII printer supports the superscript and subscript functions, you can use
the workstation customizing functions in one of two ways to allow them to work
properly.

262

OS/400 Workstation Customization Programming V4R3

When your printer is set up to emulate an IBM 3812 printer, you need to define thereverse index (RVSIDX) tag so that your printer receives the correct instructions
from the application data stream to move the paper up or down a half line and print.
When your printer does not emulate the IBM 3812 printer, you need to use the
STRSUPS-ENDSUPS and STRSUBS-ENDSUBS tags in pairs to turn on the
superscript and subscript functions. Figure 50 shows these considerations in a flow
chart format.

3812
EmulationN?
Y

RVSIDX:STRSUPSN

Defined:STRSUBS?

Defined?

N

YY

Function
notMove 1/2 line
and print
characters

Use

Defined:STRSUPS, :ENDSUPS:STRSUBS, :ENDSUBSRV2H482-0

Figure 50. Decision Structure for Selecting the Subscript and Superscript Tags

Using the Set Page Length Tag
There are two tags provided by the workstation customizing functions for setting thepage length for the printer. PAGLENL sets the page length by the number of linesthat should be on a single page. PAGLENI sets the page length by number ofinches. In general, you need to determine whether the number of lines on a pageexceeds 255 and then check the reference manual for the printer to determine
which measurement is used. In most cases, if the page length exceeds 255 lines,
you should use the PAGLENI tag and its parameters to set your page length.
Figure 51 on page 264 shows a flow chart to help you determine which of these twotags to use.

Chapter 12. Customizing ASCII Printers That Use the Emulator on the Controller

263

:PAGLENL
Defined?

NY:PAGLENI
Defined?
Numberof lines> 25 5?

NY

N

Function
notDefinedY
Use :PAGLENL:PAGELENI
Defined?

Use :PAGLENI

N
Use :PAGLENLY

Use :PAGLENIRV2H481-1

Figure 51. Decision Structure for Selecting the Correct Page Length Tags

Using the Font Selection Tags
The tags for font selection that are in your workstation customizing source arebased on the device type you specified when you retrieved the source. If you arecustomizing a supported ASCII printer, you should use the font selection tags thatare already in your source. You can add to or change the data that is associatedwith the type of tags that are retrieved; however, you need to be careful that you do
not specify tags for font selection that do not work together. If you are customizing
an unsupported ASCII printer, you need to check the font selection tags that areused in the workstation customizing source you retrieved and then compare thetags and their values to the font selection information in the reference manual forthe printer. Verify that the method the printer uses to select a font is supported by
the type of font selection tags that you retrieved in your source.
Figure 52 on page 265 shows a flow chart that provides a hierarchy for choosing thecorrect font selection tags for your ASCII printer. This chart is most helpful when
you are not sure how fonts are selected for an unsupported printer. A list following
the flow chart briefly describes the tag hierarchy for font selection.

264

OS/400 Workstation Customization Programming V4R3

Y
Use FNTGPFT:FNTGPFT
Defined
?
N

Y

CPI =
10, 12, 15, 17.1
or PSM

YN:PRISPCM
Defined?

:FONTQLTY
Defined?

N

Use FONQLTYYYUse PRISPCM:VARCPI
Defined?
N:PRICHRH
Defined?

Use VARCPI
Y

N

:CPI
Defined?

N

Y

Use PRICHRH

N
Use CPI
Function
notDefined:FNTMAPE
Defined?

N

Y

Use FNTMAPR:PRISTYLE
Defined?

N

Y

Use PRISTYLEN:FNTTYPE
Defined?
Y
Use FNTTYPE

N

CPI =
10, 12, 15, 17.1
or PSMY

RV2H480-0

Figure 52. Decision Structure for Selecting the Correct Font Selection Tags

v If your printer supports using the Set Global Font for PFT tag, FNTGPFT, then
you need specify no other tags for font selection.

Chapter 12. Customizing ASCII Printers That Use the Emulator on the Controller

265

v If you use the PRISTYLE (primary style), PRICHRH (primary character height),
PRISPCM (primary spacing mode), and FNTTYPE (font type) tags, you should
not use any of the other tags for font selection except for the CPI (characters perinch) tag.
v If your printer supports variable spacing, you should use the FONTQLTY (fontquality) tag and the VARCPI (variable characters per inch) tag.
Note: If variable characters per inch is not supported, you can use the CPI tag
to set the characters per inch that are supported along with the
FONTQLTY tag.
v If it is not apparent which method of font selection your printer uses, you should
begin by setting the appropriate CPI tags and then try the other combinations oftags with the CPI settings.

Customizing a Hewlett-Packard LaserJet Series III Printer that Uses theEmulator on the Workstation Controller
This example shows the steps for customizing a Hewlett-Packard LaserJet Series III
ASCII printer attached to the ASCII workstation controller. The objective for thisexample is to have the printer work effectively with simple OfficeVision/400
documents. This customization involves a lot of trial and error.
To begin the workstation customizing process you need to read the reference
manual for the printer. You then set up the printer using the setup instructions andhints provided in the manual. You should look at the following setup items:
v Character set: PC 850 (Hewlett-Packard calls this a symbol set)v Physical connection: Serial (parallel or serial)
v DIP switch settingsv Printer panel settings
After the printer is physically connected to the AS/400 system, and the appropriate
controller and device descriptions are created, you should go back and set thecontroller description parameters shown below to the values indicated. These are
the recommended settings for this type of printer.
v ROBUST XON(ON)v DTR POLARITY(HI)The printer should be powered on and varied on.
Use the following parameter values to create the device description for the
Hewlett-Packard LaserJet Series III ASCII printer:

266

Device type4019

Device model*ASCII

Emulated twinaxial device

3812

Physical attachment*WIRE4

Line speed

19200

Word length

8

ParityNONE

Stop bits

1

OS/400 Workstation Customization Programming V4R3

Step 1: Planning the Customizing
To begin customizing this ASCII printer, you need to see whether or not you can get
a document to print. Create a simple one-page document using the OfficeVision/400
editor. Use this document to test the characteristics that you expect from yourprinter.
When you try to print the test document, special characters are at the top of thepage on the initial printout. Some characters do not show at all, or are not thecharacters you expected to see. Some printer functions do not work, including thefollowing:v Printer initialization sequences
v Bold printing
v Underlined printing
v Marginsv Landscape printing
v Font selection
In addition, the data stream from your application contains commands that tell theprinter to use a different code page. Using this guide, you determine you mustchange all of the mapping tables to customize this printer.
Some characters are not shown or are not the characters you expected to see.
Therefore, you need to change the default EBCDIC-to-ASCII mapping table. Use
the reference manual for the printer to find the hexadecimal values you should
specify for the default EBCDIC-to-ASCII mapping table. Your customized default
EBCDIC-to-ASCII mapping table looks like this::PDFTEBCTBLDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A0C68687A4BD2E3C282B7C'X'26828889BAA18C8B8DE121242A293BAA'X'2D2FB68EB7B5C78F80A5DD2C255F3E3F'X'9B90D2D3D4D6D7D8DE603A2340273D22'X'9D616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A791F792CF'X'E67E737475767778797AADA8D1EDE8A9'X'5E9CBEFA9FF5F4ACABF35B5DEEF9EFF2'X'7B414243444546474849F0939495A2E4'X'7D4A4B4C4D4E4F505152D5968197A398'X'5C20535455565758595AFDE299E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.
:EPDFTMAPTBL.

/* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- */

Chapter 12. Customizing ASCII Printers That Use the Emulator on the Controller

267

You also want to add and change printer functions. Therefore, you need to change
the ASCII printer function table. Use the reference manual for the printer to find thehexadecimal values you should specify for the ASCII printer function table. You
need to find the hexadecimal values you should specify for the following printerfunctions and characteristics:
v Printer initialization. Use these values to change the INITPRT and INITVON tagsin the customizing source as follows::INITVONDATA ='1B451B283132551B266C3831411B
266C32411B266C303045'X.
:INITPRTDATA ='1B451B283132551B266C303045'X.

v Bold highlighting. Use these values to change the STRBOLD and ENDBOLD
tags in the customizing source as follows::STRBOLDDATA ='1B28733342'X.
:ENDBOLDDATA ='1B28733042'X.

v Underlining. Use these values to change the STRUS and ENDUS tags in thecustomizing source as follows::STRUSDATA ='1B26643044'X.
:ENDUSDATA ='1B266440'X.

v Margin setting. Use these values to change the MARGIN tags in the customizing
source as follows::MARGIN
OPTION=TOP
ORIENT=PORTRAITDATA = 720.
:MARGIN
OPTION=LEFT
ORIENT=PORTRAITDATA = 240.
:MARGIN
OPTION=RIGHTORIENT=PORTRAITDATA = 240.
:MARGIN
OPTION=BOTTOMORIENT=PORTRAITDATA = 240.
:MARGIN
OPTION=TOP
ORIENT=LANDSCAPEDATA = 720.
:MARGIN
OPTION=LEFT
ORIENT=LANDSCAPEDATA = 240.
:MARGIN
OPTION=RIGHTORIENT=LANDSCAPEDATA = 240.
:MARGIN
OPTION=BOTTOMORIENT=LANDSCAPEDATA = 240.

v Portrait and landscape printing orientation. Use these values to change the
PRTORIENT tags in the customizing source as follows:

268

OS/400 Workstation Customization Programming V4R3

:PRTORIENTORIENT=PORTRAITDATA ='1B266C304F'X.
:PRTORIENTORIENT=LANDSCAPEDATA ='1B266C314F'X.
:PRTORIENTORIENT=RTT180
DATA ='1B266C324F'X.
:PRTORIENTORIENT=RTT270
DATA ='1B266C334F'X.

v Page length set in lines. Use this value to change the PAGLENL tag in thecustomizing source as follows::PAGLENL
VAROFFSET=
3
VARLEN=3
VARTYPE=CHRDEC
VARMAX= 255
ADJUST= 0
DATA ='1B266C30303050'X.

You want to set page length in lines, even if the number of lines is greater than
255 per page. Therefore, delete the PAGLENI tag from the customizing source.
v ASCII control code mapping. To remove the existing ASCII control code mapping,delete the ASCIICTL tags.
v Font selection. Use these values to add tags to select the correct fonts, as
illustrated on Figure 52 on page 265. To select the correct fonts, you must do thefollowing:– Delete the FNTGPFT and FONTQLTY tags from the customizing source.
– Add PRISPCM, PRICHRH, FNTMAP, FNTMAPE, EFNTMAP, PRISTYLE,FNTTYPE, and VARCPI tags to the customizing source.
Specify the added tags as follows::FNTTYPEVAROFFSET=
3
VARLEN=3
VARTYPE=CHRDECDATA ='1B287330303054'X.
:PRISTYLE
VAROFFSET=
3
VARLEN=1
VARTYPE=CHRDECDATA ='1B28733053'X.
:PRISPCM
VAROFFSET=
3
VARLEN=1
VARTYPE=CHRDECDATA ='1B28733050'X.
:PRICHRH
VAROFFSET=
3
VARLEN=2
VARTYPE=CHRDEC
VARMAX=65535
ADJUST= 0
CNVNUM=
20
CNVDEN=
1
DATA ='1B2873303056'X.
:VARCPI
VAROFFSET=
3
VARLEN=2
VARTYPE=CHRDEC
Chapter 12. Customizing ASCII Printers That Use the Emulator on the Controller

269

VARMAX=255
ADJUST= 0
CNVNUM= 1440
CNVDEN= 1440
DATA ='1B2873303548'X.
:FNTMAP
CPI=5
DEFAULT=
11.
:FNTMAPEIBMFNT= 240
ASCIIFNT= 11.
:EFNTMAP.
:FNTMAP
CPI=855
DEFAULT=
11.
:FNTMAPEIBMFNT= 260
ASCIIFNT= 11.
:EFNTMAP.
:FNTMAP
CPI=10DEFAULT=
3.
:FNTMAPEIBMFNT=
3
ASCIIFNT= 110.
:FNTMAPEIBMFNT=
5
ASCIIFNT= 10.
:FNTMAPEIBMFNT=
11
ASCIIFNT=3.
:FNTMAPEIBMFNT=
12
ASCIIFNT=8.
:FNTMAPEIBMFNT=
18
ASCIIFNT= 259.
:FNTMAPEIBMFNT=
19
ASCIIFNT= 104.
:FNTMAPEIBMFNT=
30
ASCIIFNT=8.
:FNTMAPEIBMFNT=
38
ASCIIFNT= 10.
:FNTMAPEIBMFNT=
39
ASCIIFNT=6.
:FNTMAPEIBMFNT=
40
ASCIIFNT=6.
:FNTMAPEIBMFNT=
41
ASCIIFNT=5.
:FNTMAPEIBMFNT=
46
ASCIIFNT=3.
:FNTMAPEIBMFNT=
60
ASCIIFNT=
8.
:EFNTMAP.
:FNTMAP
CPI=PROPDEFAULT=
23.
:FNTMAPEIBMFNT=
160

270

OS/400 Workstation Customization Programming V4R3

ASCIIFNT=:FNTMAPEIBMFNT=ASCIIFNT=:FNTMAPEIBMFNT=ASCIIFNT=:FNTMAPEIBMFNT=ASCIIFNT=:FNTMAPEIBMFNT=ASCIIFNT=:FNTMAPEIBMFNT=ASCIIFNT=:FNTMAPEIBMFNT=ASCIIFNT=:FNTMAPEIBMFNT=ASCIIFNT=:FNTMAPEIBMFNT=ASCIIFNT=:FNTMAPEIBMFNT=ASCIIFNT=:FNTMAPEIBMFNT=ASCIIFNT=:EFNTMAP.
:FNTMAPCPI=DEFAULT=:FNTMAPEIBMFNT=ASCIIFNT=:FNTMAPEIBMFNT=ASCIIFNT=:FNTMAPEIBMFNT=ASCIIFNT=:FNTMAPEIBMFNT=ASCIIFNT=:FNTMAPEIBMFNT=ASCIIFNT=:FNTMAPEIBMFNT=ASCIIFNT=:FNTMAPEIBMFNT=ASCIIFNT=:FNTMAPEIBMFNT=ASCIIFNT=:FNTMAPEIBMFNT=ASCIIFNT=:FNTMAPEIBMFNT=ASCIIFNT=:FNTMAPEIBMFNT=

23.
155
308.
157
52.
158
4.
159
52.
162
279.
187
52.
188
279.
189
279.
194
279.
195
279.
12
6.
85
3.
66
6.
68
262.
84
7.
86
8.
91
262.
92
259.
108
3.
109
262.
110
6.
111

Chapter 12. Customizing ASCII Printers That Use the Emulator on the Controller

271

ASCIIFNT=8.
:FNTMAPEIBMFNT=
112
ASCIIFNT= 264.
:EFNTMAP.
:FNTMAPCPI=133
DEFAULT=
6.
:FNTMAPEIBMFNT=
204
ASCIIFNT=
6.
:EFNTMAP.
:FNTMAPCPI=15DEFAULT=
6.
:FNTMAPEIBMFNT=
230
ASCIIFNT=6.
:FNTMAPEIBMFNT=
231
ASCIIFNT=
6.
:EFNTMAP.
:FNTMAPCPI=171
DEFAULT=
3.
:FNTMAPEIBMFNT=
253
ASCIIFNT=3.
:FNTMAPEIBMFNT=
254
ASCIIFNT=3.
:FNTMAPEIBMFNT=
252
ASCIIFNT=3.
:FNTMAPEIBMFNT=
255
ASCIIFNT=
3.
:EFNTMAP.
:FNTMAPCPI=20DEFAULT=
6.
:FNTMAPEIBMFNT=
281
ASCIIFNT=
6.
:EFNTMAP.

v Superscript printing. Use these values to change the STRSUPS and ENDSUPS
tags in the customizing source as follows::STRSUPSDATA ='1B26612D2E3552'X.
:ENDSUPSDATA ='1B3D'X.

v Subscript printing. Use these values to change the STRSUBS and ENDSUBS
tags in the customizing source as follows::STRSUBSDATA ='1B3D'X.
:ENDSUBSDATA ='1B26612D2E3552'X.

v Forward and backward relative movement. Use these values to change the
FWDRMOV and BCKRMOV tags in the customizing source as follows::FWDRMOVVAROFFSET=
4
VARLEN=
5
VARTYPE=CHRDEC
VARMAX=32767

272

OS/400 Workstation Customization Programming V4R3

ADJUST= 0
CNVNUM=
2
CNVDEN=
1
DATA ='1B26612B303030303048'X.
:BCKRMOVVAROFFSET=
4
VARLEN=
5
VARTYPE=CHRDEC
VARMAX=32767
ADJUST= 0
CNVNUM=
2
CNVDEN=
1
DATA ='1B26612D303030303048'X.

v Default font identifiers for different fonts. Use these values to change the
DFTFNTID tags in the customizing source as follows::DFTFNTID
CPI=855
DEFAULT=:DFTFNTID
CPI=10DEFAULT=:DFTFNTID
CPI=12DEFAULT=:DFTFNTID
CPI=15DEFAULT=:DFTFNTID
CPI=171
DEFAULT=:DFTFNTID
CPI=PROPDEFAULT=:DFTFNTID
CPI=5
DEFAULT=:DFTFNTID
CPI=133
DEFAULT=:DFTFNTID
CPI=20DEFAULT=

265.
11.
85.
230.
253.
159.
244.
204.
281.

v Number of characters per inch. Use these values to change the CPI tags in thecustomizing source as follows::CPI
CPI=855DATA ='1B2873303848'X.
:CPI
CPI=10DATA ='1B2873313048'X.
:STRPROPDATA ='1B2873303150'X.
:CPI
CPI=12DATA ='1B2873313248'X.
:CPI
CPI=15DATA ='1B2873313548'X.
:CPI
CPI=171
DATA ='1B266B325300'X.

v Control sequence for feeding different types of paper to the printer. Use thesevalues to change the PRTFEED tags in the customizing source as follows:

Chapter 12. Customizing ASCII Printers That Use the Emulator on the Controller

273

:PRTFEED
FEEDTYPE=MANUALDATA ='1B266C3248'X.

v Control sequence for paper drawer selection. Use these values to change theDWRSLT tags in the customizing source as follows::DWRSLTDRAWER=DRAWER1DATA ='1B266C3148'X.
:DWRSLTDRAWER=DRAWER2DATA ='1B266C3448'X.
:DWRSLTDRAWER=ENVELOPEDATA ='1B266C3648'X.

v Reverse index. Use this value to change the RVSIDX tag in the customizing
source. as follows::RVSIDXDATA ='1B26612D3152'X.

v Printer control flags. The printer control flag values come from this guide, insteadof the printer reference manual. Use the values indicated in this guide to change
the PRTCTL tag in the customizing source. You set printer control flags to '82'X
to indicate:– Page length changes in the middle of the page are not allowed.
– Font widths are indicated in 1/1440-inch units.
v Page size for different types of paper. Use these values to change the
PAGSIZPFT tags in the customizing source. For legal size (8.5-inch by 14-inch)
paper, manually fed, specify::PAGSIZPFT
PAGWTH=12240
PAGLEN=20160
PAPER=MANUAL.

For letter size (8.5-inch by 11-inch) paper, in paper drawer 1, specify::PAGSIZPFT
PAGWTH=12240
PAGLEN=15840
PAPER=DRAWER1.

For letter size (8.5-inch by 11-inch) paper, in paper drawer 2, specify::PAGSIZPFT
PAGWTH=12240
PAGLEN=15840
PAPER=DRAWER2.

For commercial 10 (9.5-inch by 4.125-inch) envelopes, in the envelope feed,
specify::PAGSIZPFT
PAGWTH=12240
PAGLEN= 5760
PAPER=ENVELOPE.

v Code page. If your printer uses more than one ASCII code page symbol set, use
this value to change the :CODPAGVAR tag in your customizing source. If yourprinter uses only one ASCII code page, delete the CODPAGVAR tag from yourcustomizing source.

274

OS/400 Workstation Customization Programming V4R3

:CODPAGVARVAROFFSET=
2
VARLEN=3
VARTYPE=CHRANDATA ='1B28313255'X.

v Print quality. Use these values to add PRTQLTY tags to the customizing source
as follows::PRTQLTYQLTYTYPE=LETTERDATA ='1B28733053'X.
:PRTQLTYQLTYTYPE=DRAFTDATA ='1B28733053'X.
:PRTQLTYQLTYTYPE=TEXTDATA ='1B28733153'X.

The data stream from your application contains commands that tell the printer to
use a different code page. Therefore, you need to change the printer multi language
EBCDIC-to-ASCII mapping table. Use the reference manual for the printer to findthe hexadecimal values you should indicate for the printer multi language
EBCDIC-to-ASCII mapping table.
If your applications use only U.S. English and U.S. international code pages (codepage 037 and code page 038), the changed portion of the printer multi language
EBCDIC-to-ASCII mapping table looks like this:/* Following is the code page mapping for *//* EBCDIC code page 037 (USB) to ASCII*//* code page 3157 (PC 850)*/
:PMLGEBCTBLEBCDICCP= 37
ASCIICP= 3157
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A0C68687A4BD2E3C282B7C'X'26828889BAA18C8B8DE121242A293BAA'X'2D2FB68EB7B5C78F80A5DD2C255F3E3F'X'9B90D2D3D4D6D7D8DE603A2340273D22'X'9D616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A791F792CF'X'E67E737475767778797AADA8D1EDE8A9'X'5E9CBEFA9FF5F4ACABF35B5DEEF9EFF2'X'7B414243444546474849F0939495A2E4'X'7D4A4B4C4D4E4F505152D5968197A398'X'5C20535455565758595AFDE299E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.

/* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* Following is the code page mapping for */Chapter 12. Customizing ASCII Printers That Use the Emulator on the Controller

275

/* EBCDIC code page 038 (USI) to ASCII/* code page 3157 (PC 850).

*/*/:PMLGEBCTBLEBCDICCP= 38
ASCIICP= 3157
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A0C68687A45B2E3C282B21'X'268288898AA18C8B8DE15D242A293B5E'X'2D2FB68EB7B5C78F80A5DD2C255F3E3F'X'9B90D2D3D4D6D7D8DE603A2340273D22'X'9D616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A791F792CF'X'E67E737475767778797AADA8D1EDE8A9'X'BD9CBEFA9FF5F4ACABF3AA7CEEF9EFF2'X'7B4142434445464748492D939495A2E4'X'7D4A4B4C4D4E4F505152FB968197A398'X'5C20535455565758595AFDE299E3E0E5'X'30313233343536373839FCEA9AEBE900'X.

/* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- */:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A785252F052D352'X'BB6A6A6A6A4343434378527878525278'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.

/* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- */

If your applications use additional code pages, you must change the printermulti-language EBCDIC-to-ASCII mapping tables for each additional code page
used.

Step 2: Retrieving the Workstation Customizing Source
To create a workstation customizing source, you use the Retrieve Work Station
Customizing Object Source (RTVWSCST) command and specify the following:

276

Device type

DEVTYPE(4019)

Keyboard language type

KBDTYPE(USI) This value must match the language type you
specified in the device description for the printer; otherwise it
will not vary on.

Source member

SRCMBR(CSTHPDA)

Source file

SRCFILE(CSTSRC)

Library

LIB(CSTLIB)Text

TEXT(’Workstation customizing source for HPDA ASCII
Printer’)

OS/400 Workstation Customization Programming V4R3

Step 3: Changing the Source
After you retrieve the source, use the source entry utility (SEU) to change theprinter characteristics. The command looks like the following:
STRSEU SRCFILE(CSTLIB/CSTSRC) SRCMBR(CSTHPDA)

The copy of the source you retrieve contains all the mapping tables for the printer.
These mapping tables are downloaded to the workstation controller when the printeris varied on. When you edit the file, functions and characteristics associated withtags you delete are no longer mapped and do not work anymore.
Make a few changes at a time to the workstation customizing source. Then compile
the source. Vary off the printer and then vary it on. Print the test document eachtime you vary on the printer to see if your changes are effective.
Note: When you vary the device on and off many times, the workstation controller
storage can fill up. When this occurs, the device no longer varies on and anerror message is sent to the QSYSOPR message queue. To correct thissituation, it is necessary to vary off the workstation controller, and then varyit on again specifying RESET(*YES). This clears the storage in theworkstation controller and allows the mapping tables in the new workstation
customizing object to be loaded.
The following listing shows the customized source, after you have made allchanges. For an example of the original retrieved source, see Appendix B. Source
Code Examples.
:WSCST DEVCLASS=ASCIIPRT.
:PDFTMAPTBL.
:PDFTEBCTBLDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A0C68687A4BD2E3C282B7C'X'26828889BAA18C8B8DE121242A293BAA'X'2D2FB68EB7B5C78F80A5DD2C255F3E3F'X'9B90D2D3D4D6D7D8DE603A2340273D22'X'9D616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A791F792CF'X'E67E737475767778797AADA8D1EDE8A9'X'5E9CBEFA9FF5F4ACABF35B5DEEF9EFF2'X'7B414243444546474849F0939495A2E4'X'7D4A4B4C4D4E4F505152D5968197A398'X'5C20535455565758595AFDE299E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.
:EPDFTMAPTBL.

/* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- */

Chapter 12. Customizing ASCII Printers That Use the Emulator on the Controller

277

:PFCNTBL.
:DFTFNTID
CPI=855
DEFAULT= 265.
:DFTFNTID
CPI=10DEFAULT= 11.
:DFTFNTID
CPI=12DEFAULT= 85.
:DFTFNTID
CPI=15DEFAULT= 230.
:DFTFNTID
CPI=171
DEFAULT= 253.
:DFTFNTID
CPI=PROPDEFAULT= 159.
:DFTFNTID
CPI=5
DEFAULT= 244.
:DFTFNTID
CPI=133
DEFAULT= 204.
:DFTFNTID
CPI=20DEFAULT= 281.
:VARLSPCVAROFFSET=
3
VARLEN=2
VARTYPE=CHRDEC
VARMAX= 255
ADJUST= 0
CNVNUM= 30
CNVDEN=
1
DATA ='1B266C30302E303043'X.
/* Removed the PAGLENI tag here */:PAGLENL
VAROFFSET=
3
VARLEN=3
VARTYPE=CHRDEC
VARMAX= 255
ADJUST= 0
DATA ='1B266C30303050'X.
:CODPAGVARVAROFFSET=
2
VARLEN=3
VARTYPE=CHRANDATA ='1B28313255'X.
/* Removed the FNTGPFT tag here */:FWDRMOVVAROFFSET=
4
VARLEN=
5
VARTYPE=CHRDEC
VARMAX=32767
ADJUST= 0
CNVNUM=
2
CNVDEN=
1
DATA ='1B26612B303030303048'X.
:BCKRMOVVAROFFSET=
4
VARLEN=
5

278

OS/400 Workstation Customization Programming V4R3

VARTYPE=CHRDEC
VARMAX=32767
ADJUST= 0
CNVNUM=
2
CNVDEN=
1
DATA ='1B26612D303030303048'X.
/* Add the FNTTYPE, PRISTYLE, PRISPCM,/* PRICHRH, and VARCPI tags here.

*/*/:FNTTYPEVAROFFSET=
3
VARLEN=3
VARTYPE=CHRDECDATA ='1B287330303054'X.
:PRISTYLE
VAROFFSET=
3
VARLEN=1
VARTYPE=CHRDECDATA ='1B28733053'X.
:PRISPCM
VAROFFSET=
3
VARLEN=1
VARTYPE=CHRDECDATA ='1B28733050'X.
:PRICHRH
VAROFFSET=
3
VARLEN=2
VARTYPE=CHRDEC
VARMAX=65535
ADJUST= 0
CNVNUM= 20
CNVDEN=
1
DATA ='1B2873303056'X.
:VARCPI
VAROFFSET=
3
VARLEN=2
VARTYPE=CHRDEC
VARMAX=255
ADJUST= 0
CNVNUM= 1440
CNVDEN= 1440
DATA ='1B2873303548'X.
/* End of new tags. */:CPI
CPI=855DATA ='1B2873303848'X.
:CPI
CPI=10DATA ='1B2873313048'X.
:STRPROPDATA ='1B2873303150'X.
:CPI
CPI=12DATA ='1B2873313248'X.
:CPI
CPI=15DATA ='1B2873313548'X.
:CPI
CPI=171
DATA ='1B266B325300'X.
/* Removed the FONTQLTY tags here. */:STRBOLD
Chapter 12. Customizing ASCII Printers That Use the Emulator on the Controller

279

DATA ='1B28733342'X.
:ENDBOLDDATA ='1B28733042'X.
/* Add PRTQLTY tags here. */:PRTQLTYQLTYTYPE=LETTERDATA ='1B28733053'X.
:PRTQLTYQLTYTYPE=DRAFTDATA ='1B28733053'X.
:PRTQLTYQLTYTYPE=TEXTDATA ='1B28733153'X.
/* End of new tags. */:PRTFEEDFEEDTYPE=MANUALDATA ='1B266C3248'X.
:DWRSLTDRAWER=DRAWER1DATA ='1B266C3148'X.
:DWRSLTDRAWER=DRAWER2DATA ='1B266C3448'X.
:DWRSLTDRAWER=ENVELOPEDATA ='1B266C3648'X.
:PRTORIENTORIENT=PORTRAITDATA ='1B266C304F'X.
:PRTORIENTORIENT=LANDSCAPEDATA ='1B266C314F'X.
:PRTORIENTORIENT=RTT180
DATA ='1B266C324F'X.
:PRTORIENTORIENT=RTT270
DATA ='1B266C334F'X.
:STRUSDATA ='1B26643044'X.
:ENDUSDATA ='1B266440'X.
:STRSUPSDATA ='1B26612D2E3552'X.
:ENDSUPSDATA ='1B3D'X.
:STRSUBSDATA ='1B3D'X.
:ENDSUBSDATA ='1B26612D2E3552'X.
:RVSIDXDATA ='1B26612D3152'X.
:INITVONDATA ='1B451B283132551B266C3831411B266C32411B266C303045'X.
:INITPRTDATA ='1B451B283132551B266C303045'X.
:SPACEDATA ='20'X.
:BELL
DATA ='07'X.
:CARRTNDATA ='0D'X.
:LINEFEED

280

OS/400 Workstation Customization Programming V4R3

DATA ='0A'X.
:FORMFEEDDATA ='0C'X.
:PRTCTLDATA ='82'X.
:BSP
DATA ='08'X.
:COLLATEDATA = 12.
:PAGSIZPFT
PAGWTH=12240
PAGLEN=20160
PAPER=MANUAL.
:PAGSIZPFT
PAGWTH=12240
PAGLEN=15840
PAPER=DRAWER1.
:PAGSIZPFT
PAGWTH=12240
PAGLEN=15840
PAPER=DRAWER2.
:PAGSIZPFT
PAGWTH=12240
PAGLEN= 5760
PAPER=ENVELOPE.
:MARGIN
OPTION=TOP
ORIENT=PORTRAITDATA = 720.
:MARGIN
OPTION=LEFT
ORIENT=PORTRAITDATA = 240.
:MARGIN
OPTION=RIGHTORIENT=PORTRAITDATA = 240.
:MARGIN
OPTION=BOTTOMORIENT=PORTRAITDATA = 240.
:MARGIN
OPTION=TOP
ORIENT=LANDSCAPEDATA = 720.
:MARGIN
OPTION=LEFT
ORIENT=LANDSCAPEDATA = 240.
:MARGIN
OPTION=RIGHTORIENT=LANDSCAPEDATA = 240.
:MARGIN
OPTION=BOTTOMORIENT=LANDSCAPEDATA = 240.
/* Removed the ASCIICTL tags here.

*//* Add FNTMAP, FNTMAPE, and EFNTMAP tags here. */:FNTMAP
CPI=5
DEFAULT=:FNTMAPEIBMFNT=

11.
240

Chapter 12. Customizing ASCII Printers That Use the Emulator on the Controller

281

ASCIIFNT= 11.
:EFNTMAP.
:FNTMAP
CPI=855
DEFAULT=
11.
:FNTMAPEIBMFNT= 260
ASCIIFNT= 11.
:EFNTMAP.
:FNTMAP
CPI=10DEFAULT=
3.
:FNTMAPEIBMFNT=
3
ASCIIFNT= 110.
:FNTMAPEIBMFNT=
5
ASCIIFNT= 10.
:FNTMAPEIBMFNT=
11
ASCIIFNT=3.
:FNTMAPEIBMFNT=
12
ASCIIFNT=8.
:FNTMAPEIBMFNT=
18
ASCIIFNT= 259.
:FNTMAPEIBMFNT=
19
ASCIIFNT= 104.
:FNTMAPEIBMFNT=
30
ASCIIFNT=8.
:FNTMAPEIBMFNT=
38
ASCIIFNT= 10.
:FNTMAPEIBMFNT=
39
ASCIIFNT=6.
:FNTMAPEIBMFNT=
40
ASCIIFNT=6.
:FNTMAPEIBMFNT=
41
ASCIIFNT=5.
:FNTMAPEIBMFNT=
46
ASCIIFNT=3.
:FNTMAPEIBMFNT=
60
ASCIIFNT=
8.
:EFNTMAP.
:FNTMAP
CPI=PROPDEFAULT=
23.
:FNTMAPEIBMFNT=
160
ASCIIFNT= 23.
:FNTMAPEIBMFNT=
155
ASCIIFNT= 308.
:FNTMAPEIBMFNT=
157
ASCIIFNT= 52.
:FNTMAPEIBMFNT=
158
ASCIIFNT=
4.

282

OS/400 Workstation Customization Programming V4R3

:FNTMAPEIBMFNT=
159
ASCIIFNT= 52.
:FNTMAPEIBMFNT=
162
ASCIIFNT= 279.
:FNTMAPEIBMFNT=
187
ASCIIFNT= 52.
:FNTMAPEIBMFNT=
188
ASCIIFNT= 279.
:FNTMAPEIBMFNT=
189
ASCIIFNT= 279.
:FNTMAPEIBMFNT=
194
ASCIIFNT= 279.
:FNTMAPEIBMFNT=
195
ASCIIFNT= 279.
:EFNTMAP.
:FNTMAPCPI=12DEFAULT=
6.
:FNTMAPEIBMFNT=
85
ASCIIFNT=3.
:FNTMAPEIBMFNT=
66
ASCIIFNT=6.
:FNTMAPEIBMFNT=
68
ASCIIFNT= 262.
:FNTMAPEIBMFNT=
84
ASCIIFNT=7.
:FNTMAPEIBMFNT=
86
ASCIIFNT=8.
:FNTMAPEIBMFNT=
91
ASCIIFNT= 262.
:FNTMAPEIBMFNT=
92
ASCIIFNT= 259.
:FNTMAPEIBMFNT=
108
ASCIIFNT=3.
:FNTMAPEIBMFNT=
109
ASCIIFNT= 262.
:FNTMAPEIBMFNT=
110
ASCIIFNT=6.
:FNTMAPEIBMFNT=
111
ASCIIFNT=8.
:FNTMAPEIBMFNT=
112
ASCIIFNT= 264.
:EFNTMAP.
:FNTMAPCPI=133
DEFAULT=
6.
:FNTMAPEIBMFNT=
204
Chapter 12. Customizing ASCII Printers That Use the Emulator on the Controller

283

ASCIIFNT=
6.
:EFNTMAP.
:FNTMAPCPI=15DEFAULT=
6.
:FNTMAPEIBMFNT=
230
ASCIIFNT=6.
:FNTMAPEIBMFNT=
231
ASCIIFNT=
6.
:EFNTMAP.
:FNTMAPCPI=171
DEFAULT=
3.
:FNTMAPEIBMFNT=
253
ASCIIFNT=3.
:FNTMAPEIBMFNT=
254
ASCIIFNT=3.
:FNTMAPEIBMFNT=
252
ASCIIFNT=3.
:FNTMAPEIBMFNT=
255
ASCIIFNT=
3.
:EFNTMAP.
:FNTMAPCPI=20DEFAULT=
6.
:FNTMAPEIBMFNT=
281
ASCIIFNT=
6.
:EFNTMAP.
/* End of new tags. */:PMLGMAPTBL.
/* Following are the changed code page mappings.
:PMLGEBCTBLEBCDICCP= 29
ASCIICP= 3157
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A0C68687A4E82E3C282B21'X'268288898AA18C8B8DE192242A293B99'X'2D2FB68EB7B5C78F80A5DD2C255F3E3F'X'9B90D2D3D4D6D7D8DED03A23D1273D22'X'9D616263646566676869AEAF60EC7BF1'X'F86A6B6C6D6E6F707172A6A77DF75DCF'X'E694737475767778797AADA840ED5BA9'X'BD9CBEFAB8F5F4ACABF3AA7CEEF95C9E'X'E7414243444546474849F0937E95A2E4'X'914A4B4C4D4E4F505152FB968197A398'X'EFF6535455565758595AFDE25EE3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X

284

OS/400 Workstation Customization Programming V4R3*//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- */

'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.
:PMLGEBCTBLEBCDICCP= 30
ASCIICP= 3157
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A000917BA4802E3C282B21'X'268288898AA18C8B8DE1A6982A293B5E'X'2D2FB686B7B500925BA5AD2C255F3E3F'X'0090D2D3D4D6D7D8DED53A99B8273D9A'X'F4616263646566676869E886C7ED007C'X'F86A6B6C6D6E6F707172A99B9FF700CF'X'E694737475767778797AE78FC6EC0040'X'FA9CBE7DBDF55D00AB24A89DACF9EF9E'X'87414243444546474849F0937E95A2E5'X'A74A4B4C4D4E4F50515260965C81A300'X'81F6535455565758595AFDE223E3E0E4'X'30313233343536373839FCEA22EBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.
:PMLGEBCTBLEBCDICCP= 37
ASCIICP= 3157
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A0C68687A4BD2E3C282B7C'X'26828889BAA18C8B8DE121242A293BAA'X'2D2FB68EB7B5C78F80A5DD2C255F3E3F'X'9B90D2D3D4D6D7D8DE603A2340273D22'X'9D616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A791F792CF'X'E67E737475767778797AADA8D1EDE8A9'X'5E9CBEFA9FF5F4ACABF35B5DEEF9EFF2'X'7B414243444546474849F0939495A2E4'X'7D4A4B4C4D4E4F505152D5968197A398'X'5C20535455565758595AFDE299E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X/* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- */

Chapter 12. Customizing ASCII Printers That Use the Emulator on the Controller

285

'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.
:PMLGEBCTBLEBCDICCP= 38
ASCIICP= 3157
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A0C68687A45B2E3C282B21'X'268288898AA18C8B8DE15D242A293B5E'X'2D2FB68EB7B5C78F80A5DD2C255F3E3F'X'9B90D2D3D4D6D7D8DE603A2340273D22'X'9D616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A791F792CF'X'E67E737475767778797AADA8D1EDE8A9'X'BD9CBEFA9FF5F4ACABF3AA7CEEF9EFF2'X'7B414243444546474849F0939495A2E4'X'7D4A4B4C4D4E4F505152D5968197A398'X'5C20535455565758595AFDE299E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.
:PMLGEBCTBLEBCDICCP= 45
ASCIICP= 3157
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838461A0C79F87865B2E3C282B21'X'2682A98985A18C9692E15D242A293B5E'X'2D2FB68E41B5C6AC808FD82C255F3E3F'X'F390A8D3DED6D79591603A2340273D22'X'F461626364656667686998E5D0ECFDAD'X'F86A6B6C6D6E6F70717288E4E7F7F2CF'X'A5F1737475767778797AB8D5D1EDFCB8'X'FA4CBEDDBDF5A7ABA68D9DE3E6F9EFEE'X'D4414243444546474849F09394EAA28B'X'D24A4B4C4D4E4F505152B7FB819CA379'X'A420535455565758595A32E299E8E08A'X'3031323334353637383933EB9A9BE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X

286

OS/400 Workstation Customization Programming V4R3/* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- */

'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.
:PMLGEBCTBLEBCDICCP= 256
ASCIICP= 3157
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A0C68687A45B2E3C282B21'X'268288898AA18C8B8DE15D242A293B5E'X'2D2FB68EB7B5C78F80A5DD2C255F3E3F'X'9B90D2D3D4D6D7D8DE603A2340273D22'X'9D616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A791F792CF'X'E67E737475767778797AADA8D1EDE8A9'X'BD9CBE169FF5F4ACABF3AA7CEEF9EFF2'X'7B414243444546474849F0939495A2E4'X'7D4A4B4C4D4E4F505152D5968197A398'X'5C20535455565758595AFDE299E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.
:PMLGEBCTBLEBCDICCP= 257
ASCIICP= 3157
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'202080828486888A8C8E5B2E3C282B21'X'2690929496989A9EEF815D242A293B5E'X'2D2F838587898B8D8F917C2C255F3E3F'X'9395972D999B9CA0A2603A2340273D22'X'9A616263646566676869A6A8AAACB5B7'X'BD6A6B6C6D6E6F707172C6D0D2D4D6D8'X'DE7E737475767778797AE1E3E5E7E9EB'X'EDF1F3F5F7F9FB9E9DA1A3A5A7A9ABAD'X'7B414243444546474849B6B8BEC7D1D3'X'7D4A4B4C4D4E4F505152D5D7DDE0E2E4'X'5CCF535455565758595AE6E8EAECEEF2'X'30313233343536373839F4F6F8FAFC00'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X/* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- */

Chapter 12. Customizing ASCII Printers That Use the Emulator on the Controller287

'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.
:PMLGEBCTBLEBCDICCP= 258
ASCIICP= 3157
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'20208384EEA0C79F87865B2E3C282B21'X'2682A98985A18C9692E15D242A293B5E'X'2D2FB68EF1B5C6AC808F7C2C255F3E3F'X'F390A8D3DED6D79591603A2340273D22'X'F461626364656667686998E5D0ECFDAD'X'F86A6B6C6D6E6F70717288E4E7F7F2CF'X'A57E737475767778797AB8D5D1EDFCB8'X'FAA4BEDDBDF5A7ABA68D9DE3E6F9EF9E'X'7B414243444546474849F09394EAA28B'X'7D4A4B4C4D4E4F505152B7FB819CA3DB'X'5CF6535455565758595AD4E299E8E08A'X'30313233343536373839D2EB9A9BE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.
:PMLGEBCTBLEBCDICCP= 259
ASCIICP= 2125
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'20203D2D2B247044A22F00CE3C280021'X'5CB0FCF90000400000CF00CB5D290000'X'2D5EC6C5E9D7FCF9FD002700005F3ED5'X'B6B5BABBC00000C2000025FE23272200'X'B06162777A65706B6769E0D2E1F5E2E4'X'00796A786C6D6F716368B32BB400F2F4'X'EF0072736E2A64767466F0D1F1EC0000'X'00000000000000000000B400CC000000'X'E359245755A4504B00A1EC000000F600'X'F30000585A00A3004348000000B0E8EA'X'FB2052A24E26447D547C3FC80000E5E7'X'30313233343536373839D80000000000'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X

288

OS/400 Workstation Customization Programming V4R3/* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- */

'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.
:PMLGEBCTBLEBCDICCP= 260
ASCIICP= 3157
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A0C68687A45B2E3C282B21'X'268288898AA18C8B8DE15D242A293B5E'X'2D2FB68EB7B5C78F80A5DD2C255F3E3F'X'9B90D2D3D4D6D7D8DE603A2340273D22'X'9D616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A791F792CF'X'E67E737475767778797AADA8D1EDE8A9'X'BD9CBEFA9FF5F4ACABF3AA7CEEF9EFF2'X'7B414243444546474849F0939495A2E4'X'7D4A4B4C4D4E4F505152D5968197A398'X'5C20535455565758595AFDE299E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.
:PMLGEBCTBLEBCDICCP= 273
ASCIICP= 3157
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020837B85A0C68687A48E2E3C282B21'X'26828889BAA18C8B8D7E9A242A293B5E'X'2D2FB65BB7B5C78F80A5942C255F3E3F'X'9B90D2D3D4D6D7D8DE603A23F5273D22'X'9D616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A791F792CF'X'E6E1737475767778797AADA8D1EDE8A9'X'BD9CBEFA9F40F4ACABF3AA7CEEF9EFF2'X'84414243444546474849F093D095A2E4'X'814A4B4C4D4E4F505152D5967D97A398'X'9920535455565758595AFDE25CE3E0E5'X'30313233343536373839FCEA5DEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X/* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- */

Chapter 12. Customizing ASCII Printers That Use the Emulator on the Controller289

'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.
:PMLGEBCTBLEBCDICCP= 274
ASCIICP= 3157
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838440A0C6865CA45B2E3C282B21'X'267B88897DA18C8B8DE15D242A293B5E'X'2D2FB68EB7B5C78F80A5972C255F3E3F'X'9B90D2D3D4D6D7D8DE603A2385273D22'X'9D616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A791F792CF'X'E6F9737475767778797AADA8D1EDE8A9'X'BD9CBEFA9FF5F4ACABF3AA7CEE7EEFF2'X'82414243444546474849F0939495A2E4'X'8A4A4B4C4D4E4F505152D5968197A398'X'8720535455565758595AFDE299E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.
:PMLGEBCTBLEBCDICCP= 275
ASCIICP= 3157
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A06086D0A4902E3C282B21'X'267B8889BAA18C8B8DE124802A293B5E'X'2D2FB68EB7B5408F5DA5872C255F3E3F'X'9B5BD2D3D4D6D7D8DEC63AE5C7273D22'X'9D616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A791F792CF'X'E67E737475767778797AADA8D1EDE8A9'X'BD9CBEFA9FF5F4ACABF3AA7CEEF9EFF2'X'E4414243444546474849F0939495A27B'X'824A4B4C4D4E4F505152D5968197A398'X'5C20535455565758595AFDE299E3E023'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X

290

OS/400 Workstation Customization Programming V4R3/* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- */

'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.
:PMLGEBCTBLEBCDICCP= 276
ASCIICP= 3157
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'202083845BA0C68687A4852E3C282B21'X'267B88897DA18C8B8DE1EF242A293B5E'X'2D2FB68EB7B5C78F80A5972C255F3E3F'X'9B90D2D3D4D6D7D8DE603A2340273D22'X'9D616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A7915C92CF'X'E6F9737475767778797AADA8D1EDE8A9'X'BD9CBEFA9FF5F4ACABF3AA7CEE7E5DF2'X'82414243444546474849F0939495A2E4'X'8A4A4B4C4D4E4F505152D5968197A398'X'F720535455565758595AFDE299E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.
:PMLGEBCTBLEBCDICCP= 277
ASCIICP= 3157
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A0C67B87A4232E3C282B21'X'26828889BAA18C8B8DE1CF8F2A293B5E'X'2D2FB68EB7B5C72480A59B2C255F3E3F'X'D090D2D3D4D6D7D8DE603A929D273D22'X'40616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A77BF75B5D'X'E681737475767778797AADA8D1EDE8A9'X'BD9CBEFA9FF5F4ACABF3AA7CEEF9EFF2'X'91414243444546474849F0939495A2E4'X'864A4B4C4D4E4F505152D5967E97A398'X'5C20535455565758595AFDE299E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X/* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- */

Chapter 12. Customizing ASCII Printers That Use the Emulator on the Controller291

'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.
:PMLGEBCTBLEBCDICCP= 278
ASCIICP= 3157
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020837B85A0C67D87A4F52E3C282B21'X'26608889BAA18C8B8DE1CF8F2A293B5E'X'2D2FB623B7B5C72480A5942C255F3E3F'X'9B5CD2D3D4D6D7D8DE823A8E99273D22'X'9D616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A791F7925D'X'E681737475767778797AADA8D1EDE8A9'X'BD9CBEFA9F5BF4ACABF3AA7CEEF9EFF2'X'84414243444546474849F093D095A2E4'X'864A4B4C4D4E4F505152D5967E97A398'X'9020535455565758595AFDE240E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.
:PMLGEBCTBLEBCDICCP= 279
ASCIICP= 3157
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838440A0C6865CA4F82E3C282B21'X'267B88897DA18C8B8DE1F5242A293B5E'X'2D2FB68EB7B5C78F80A5972C255F3E3F'X'9B90D2D3D4D6D7D8DEE63A9C85273D22'X'9D616263646566676869AEAFD0ECE7F1'X'5B6A6B6C6D6E6F707172A6A791F792CF'X'60F9737475767778797AADA8D1EDE8A9'X'BD23BEFA9F5DF4ACABF3AA7CEE7EEFF2'X'82414243444546474849F0939495A2E4'X'8A4A4B4C4D4E4F505152D59681D0A398'X'8720535455565758595AFDE299E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X

292

OS/400 Workstation Customization Programming V4R3/* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- */

'7878787878787878787856B2B2B2B278'X.
:PMLGEBCTBLEBCDICCP= 280
ASCIICP= 3157
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'202083847BA0C6865CA4F82E3C282B21'X'265D88897DA18C8B7EE182242A293B5E'X'2D2FB68EB7B5C78F80A5952C255F3E3F'X'9B90D2D3D4D6D7D8DE973A9CF5273D22'X'9D616263646566676869AEAFD0ECE7F1'X'5B6A6B6C6D6E6F707172A6A791F792CF'X'E68D737475767778797AADA8D1EDE8A9'X'BD23BEFA9F40F4ACABF3AA7CEEF9EFF2'X'85414243444546474849F09394D0A2E4'X'8A4A4B4C4D4E4F505152D5968160A398'X'8720535455565758595AFDE299E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.
:PMLGEBCTBLEBCDICCP= 281
ASCIICP= 3157
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A0C68687A49C2E3C282B7C'X'26828889BAA18C8B8DE121BE2A293BAA'X'2D2FB68EB7B5C78F80A5DD2C255F3E3F'X'9B90D2D3D4D6D7D8DE603A2340273D22'X'9D616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A791F792CF'X'E6EE737475767778797AADA8D1EDE8A9'X'BD5B5CFA9FF5F4ACABF35E5D7EF9EFF2'X'7B414243444546474849F0939495A2E4'X'7D4A4B4C4D4E4F505152D5968197A398'X'2420535455565758595AFDE299E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.

/* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- */

Chapter 12. Customizing ASCII Printers That Use the Emulator on the Controller

293

:PMLGEBCTBLEBCDICCP= 282
ASCIICP= 3157
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A07B867EA45B2E3C282B21'X'26828889BAA18C8B8DE15D242A293B5E'X'2D2FB68EB7B5238F5CA5E42C255F3E3F'X'9B90D2D3D4D6D7D8DE603AC7E5273D22'X'9D616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A791F792CF'X'E687737475767778797AADA8D1EDE8A9'X'BD9CBEFA9FF5F4ACABF3AA7CEEF9EFF2'X'C6414243444546474849F0939495A2D0'X'EF4A4B4C4D4E4F505152D5968197A398'X'8020535455565758595AFDE299E3E040'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.
:PMLGEBCTBLEBCDICCP= 283
ASCIICP= 3157
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A0C68687D05B2E3C282B7C'X'26828889BAA18C8B8DE15D502A293BAA'X'2D2FB68EB7B5C78F8023A42C255F3E3F'X'9B90D2D3D4D6D7D8DE603AA540273D22'X'9D616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A791F792CF'X'E6F9737475767778797AADA8D1EDE8A9'X'BD9CBEFA9FF5F4ACABF35E21EE7EEFF2'X'7B414243444546474849F0939495A2E4'X'7D4A4B4C4D4E4F505152D5968197A398'X'5C20535455565758595AFDE299E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.

294

OS/400 Workstation Customization Programming V4R3/* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- */

:PMLGEBCTBLEBCDICCP= 284
ASCIICP= 3157
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A0C68687D05B2E3C282B7C'X'26828889BAA18C8B8DE15D242A293BAA'X'2D2FB68EB7B5C78F8023A42C255F3E3F'X'9B90D2D3D4D6D7D8DE603AA540273D22'X'9D616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A791F792CF'X'E6F9737475767778797AADA8D1EDE8A9'X'BD9CBEFA9FF5F4ACABF35E21EE7EEFF2'X'7B414243444546474849F0939495A2E4'X'7D4A4B4C4D4E4F505152D5968197A398'X'5C20535455565758595AFDE299E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.
:PMLGEBCTBLEBCDICCP= 285
ASCIICP= 3157
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A0C68687A4242E3C282B7C'X'26828889BAA18C8B8DE1219C2A293BAA'X'2D2FB68EB7B5C78F80A5DD2C255F3E3F'X'9B90D2D3D4D6D7D8DE603A2340273D22'X'9D616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A791F792CF'X'E6EE737475767778797AADA8D1EDE8A9'X'BD5BBEFA9FF5F4ACABF35E5D7EF9EFF2'X'7B414243444546474849F0939495A2E4'X'7D4A4B4C4D4E4F505152D5968197A398'X'5C20535455565758595AFDE299E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.

/* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- */:PMLGEBCTBL
Chapter 12. Customizing ASCII Printers That Use the Emulator on the Controller

295

EBCDICCP= 290
ASCIICP= 3157
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'20A1A2A3A4A5A6A7A8A9E12E3C282B7C'X'26AAABACADAEAF00B000215C2A293BE3'X'2D2F0000000000000000002C255F3E3F'X'000000000000000000003A2340273D22'X'00B1B2B3B4B5B6B7B8B9BA00BBBCBDBE'X'BFC0C1C2C3C4C5C6C7C8C90000CACBCC'X'007ECDCECFD0D1D2D3D4D500D6D7D8D9'X'00000000000000000000DADBDCDDDEDF'X'7B414243444546474849000000000000'X'004A4B4C4D4E4F505152000000000000'X'2420535455565758595A000000000000'X'30313233343536373839000000000000'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.
:PMLGEBCTBLEBCDICCP= 293
ASCIICP= 3157
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A0C68687A45B2E3C282B21'X'268288898AA18C8B8DE15D242A293B5E'X'2D2FB68EB7B5C78F80A5DD2C255F3E3F'X'9B90D2D3D4D6D7D8DE603A2340273D22'X'9D616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A791F792CF'X'E67E737475767778797AADA8D1EDE8A9'X'BD9CBEFA9FF5F4ACABF3AA7CEEF9EFF2'X'7B414243444546474849F0939495A2E4'X'7D4A4B4C4D4E4F505152D5968197A398'X'5C20535455565758595AFDE299E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.
:PMLGEBCTBLEBCDICCP= 297

296

OS/400 Workstation Customization Programming V4R3/* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- */ASCIICP= 3157
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838440A0C6865CA4F82E3C282B21'X'267B88897DA18C8B8DE1F5242A293B5E'X'2D2FB68EB7B5C78F80A5972C255F3E3F'X'9B90D2D3D4D6D7D8DEE63A9C85273D22'X'9D616263646566676869AEAFD0ECE7F1'X'5B6A6B6C6D6E6F707172A6A791F792CF'X'60F9737475767778797AADA8D1EDE8A9'X'BD23BEFA9F5DF4ACABF3AA7CEE7EEFF2'X'82414243444546474849F0939495A2E4'X'8A4A4B4C4D4E4F505152D59681D0A398'X'8720535455565758595AFDE299E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.
:PMLGEBCTBLEBCDICCP= 310
ASCIICP= 3157
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A0C68687A45B2E3C282B21'X'268288898AA18C8B8DE15D242A293B5E'X'2D2FB68EB7B5C78F80A5DD2C255F3E3F'X'9B90D2D3D4D6D7D8DE603A2340273D22'X'9D616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A791F792CF'X'E67E737475767778797AADA8D1EDE8A9'X'BD9CBEFA9FF5F4ACABF3AA7CEEF9EFF2'X'7B414243444546474849F0939495A2E4'X'7D4A4B4C4D4E4F505152D5968197A398'X'5C20535455565758595AFDE299E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.

/* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- */:PMLGEBCTBLEBCDICCP= 330
ASCIICP= 3157
Chapter 12. Customizing ASCII Printers That Use the Emulator on the Controller

297

DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838461A0C79F87865B2E3C282B21'X'2682A98985A18C9692E15D242A293B5E'X'2D2FB68E41B5C6AC808FD82C255F3E3F'X'F390A8D3DED6D79591603A2340273D22'X'F461626364656667686998E5D0ECFDAD'X'F86A6B6C6D6E6F70717288E4E7F7F2CF'X'A5F1737475767778797AB8D5D1EDFCB8'X'FA4CBEDDBDF5A7ABA68D9DE3E6F9EFEE'X'D4414243444546474849F09394EAA28B'X'D24A4B4C4D4E4F505152B7FB819CA379'X'A420535455565758595A32E299E8E08A'X'3031323334353637383933EB9A9BE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.
:PMLGEBCTBLEBCDICCP= 340
ASCIICP= 3157
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A0C68687A45B2E3C282B21'X'268288898AA18C8B8DE15D242A293B5E'X'2D2FB68EB7B5C78F80A5DD2C255F3E3F'X'9B90D2D3D4D6D7C4DE603A2340273D22'X'A7616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A791F792CF'X'E67E737475767778797AADA8D1EDE8A9'X'BD9C9DFAB8F5F4ACABF3AA7CEEF9EFDB'X'7B4142434445464748492D609495A2E4'X'7D4A4B4C4D4E4F505152FB7E8197A35E'X'5CF6535455565758595AFD5F99E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.
:PMLGEBCTBLEBCDICCP= 420
ASCIICP= 3157
DATA =

298

OS/400 Workstation Customization Programming V4R3/* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- */

/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020F1F0E09FC1C2A2C3C02E3C282B7C'X'26A5C40000C6C7A8A9C821242A293BDC'X'2D2FC9AACAABCBADCCAE7C2C255F3E3F'X'CDAFCECFD0D1D2BCD3AC3A2340273D22'X'BD616263646566676869D4BED5EBD6D7'X'D86A6B6C6D6E6F707172DFC5D9ECEEED'X'DADD737475767778797AF7BAE1F8E2FC'X'E3FBF9FA999A00009D9EE4EFE5F2E6F3'X'BB414243444546474849A1E700F400E8'X'BF4A4B4C4D4E4F505152E9F5FDF6EAB0'X'DEF6535455565758595AB1B200B3B4B5'X'3031323334353637383900B6B7B8B900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.
:PMLGEBCTBLEBCDICCP= 423
ASCIICP= 3157
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'20A4A5A6A7A8A9AAACAD5B2E3C282B21'X'26B5B6B7B8BDBEC6C7CF5D242A293B5E'X'2D2FD0D1D2D3D4D500007C2C255F3E3F'X'00868D8F0090929598603A9CF5273D22'X'8E616263646566676869D6D7D8DDDEE0'X'996A6B6C6D6E6F707172E1E2E3E4E5E6'X'9AF9737475767778797AE7E8E9EAEBEC'X'009B9D9EA09FA2A3FBFDEDEEF2F3F4F6'X'F7414243444546474849F0FA83858488'X'EF4A4B4C4D4E4F505152F1828A898C8B'X'F820535455565758595AAB9493969781'X'30313233343536373839798780000000'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.

/* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- */:PMLGEBCTBLEBCDICCP= 424
ASCIICP= 3157
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */Chapter 12. Customizing ASCII Printers That Use the Emulator on the Controller

299

'208081828384858687889B2E3C282B7C'X'26898A8B8C8D8E8F909121242A293BAA'X'2D2F92939495969798997C2C255F3E3F'X'009A0000200000005F603A2340273D22'X'00616263646566676869AEAF000000F1'X'F86A6B6C6D6E6F707172000000000000'X'E67E737475767778797A000000000052'X'5E9C9DF900F5F4ACAB005B5D2D000078'X'7B4142434445464748492D0000000000'X'7D4A4B4C4D4E4F505152000000000000'X'5CF6535455565758595AFD0000000000'X'30313233343536373839000000000000'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.
:PMLGEBCTBLEBCDICCP= 500
ASCIICP= 3157
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A0C68687A45B2E3C282B21'X'268288898AA18C8B8DE15D242A293B5E'X'2D2FB68EB7B5C78F80A5DD2C255F3E3F'X'9B90D2D3D4D6D7D8DE603A2340273D22'X'9D616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A791F792CF'X'E67E737475767778797AADA8D1EDE8A9'X'BD9CBEFA9FF5F4ACABF3AA7CEEF9EFF2'X'7B414243444546474849F0939495A2E4'X'7D4A4B4C4D4E4F505152D5968197A398'X'5C20535455565758595AFDE299E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.
:PMLGEBCTBLEBCDICCP= 870
ASCIICP= 3157
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'20208384EEA0C79F87865B2E3C282B21'X

300

OS/400 Workstation Customization Programming V4R3/* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- */

'2682A98985A18C9692E15D242A293B5E'X'2D2FB68EF1B5C6AC808F7C2C255F3E3F'X'F390A8D3DED6D79591603A2340273D22'X'F461626364656667686998E5D0ECFDAD'X'F86A6B6C6D6E6F70717288E4E7F7F2CF'X'A57E737475767778797AB8D5D1EDFCB8'X'FAA4BEDDBDF5A7ABA68D9DE3E6F9EF9E'X'7B414243444546474849F09394EAA28B'X'7D4A4B4C4D4E4F505152B7FB819CA3DB'X'5CF6535455565758595AD4E299E8E08A'X'30313233343536373839D2EB9A9BE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.
:PMLGEBCTBLEBCDICCP= 871
ASCIICP= 3157
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A0C68687A4E82E3C282B21'X'268288898AA18C8B8DE192242A293B99'X'2D2FB68EB7B5C78F80A5DD2C255F3E3F'X'9B90D2D3D4D6D7D8DED03A23D1273D22'X'9D616263646566676869AEAF60EC7BF1'X'F86A6B6C6D6E6F707172A6A77DF75DCF'X'E694737475767778797AADA840ED5BA9'X'BD9CBEFAB8F5F4ACABF3AA7CEEF95C9E'X'E7414243444546474849F0937E95A2E4'X'914A4B4C4D4E4F505152FB968197A398'X'EFF6535455565758595AFDE25EE3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.
:PMLGEBCTBLEBCDICCP= 880
ASCIICP= 3157
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'202080828486888A8C8E5B2E3C282B21'X'2690929496989A9EEF815D242A293B5E'X/* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- */

Chapter 12. Customizing ASCII Printers That Use the Emulator on the Controller301

'2D2F838587898B8D8F917C2C255F3E3F'X'9395972D999B9CA0A2603A2340273D22'X'9A616263646566676869A6A8AAACB5B7'X'BD6A6B6C6D6E6F707172C6D0D2D4D6D8'X'DE7E737475767778797AE1E3E5E7E9EB'X'EDF1F3F5F7F9FB9E9DA1A3A5A7A9ABAD'X'7B414243444546474849B6B8BEC7D1D3'X'7D4A4B4C4D4E4F505152D5D7DDE0E2E4'X'5CCF535455565758595AE6E8EAECEEF2'X'30313233343536373839F4F6F8FAFC00'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.
:PMLGEBCTBLEBCDICCP= 892
ASCIICP= 3157
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'202000000000000000005B2E3C282B21'X'260000000000000000005D242A293B00'X'2D2F008E0000008F00A5002C25003E3F'X'00000000000000C400003A2340273D22'X'A7616263646566676869000000000000'X'006A6B6C6D6E6F707172000000009200'X'0000737475767778797A000000000000'X'009C9D00000000000000007C000000DB'X'7B414243444546474849006000000000'X'7D4A4B4C4D4E4F505152007E0000005E'X'5C20535455565758595A005F99000000'X'3031323334353637383900009A000000'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.
:PMLGEBCTBLEBCDICCP= 893
ASCIICP= 3157
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'202000840000008600005B2E3C282B21'X'260000000000000000E15D242A293B5E'X'2D2F008E0000008F00A5002C255F3E3F'X

302

OS/400 Workstation Customization Programming V4R3/* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- */

'A60000000000A9C400603A2340273D22'X'A761626364656667686900000000B9BA'X'006A6B6C6D6E6F707172000091F792CF'X'007E737475767778797A000000000000'X'009C9D0000F500000000007C00F9EFDB'X'7B414243444546474849000094000000'X'7D4A4B4C4D4E4F50515200008100005E'X'5C20535455565758595A000099000000'X'3031323334353637383900009A000000'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.
:PMLGEBCTBLEBCDICCP= 905
ASCIICP= 3157
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A000917BA4802E3C282B21'X'268288898AA18C8B8DE1A6982A293B5E'X'2D2FB686B7B500925BA5AD2C255F3E3F'X'0090D2D3D4D6D7D8DED53A99B8273D9A'X'F4616263646566676869E886C7ED007C'X'F86A6B6C6D6E6F707172A99B9FF700CF'X'E694737475767778797AE78FC6EC0040'X'FA9CBE7DBDF55D00AB24A89DACF9EF9E'X'87414243444546474849F0937E95A2E5'X'A74A4B4C4D4E4F50515260965C81A300'X'81F6535455565758595AFDE223E3E0E4'X'30313233343536373839FCEA22EBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.
:PMLGEBCTBLEBCDICCP= 259
ASCIICP= 3157
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'20200000000000001A2F5B003C28B800'X'00EE3C3E0000000000005DFA0029F95E'X'2D000000BA003C3E0000EF0C0B5F3E00'X'00000000001C00000060F6F1F82722A9'X/* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- */

Chapter 12. Customizing ASCII Printers That Use the Emulator on the Controller

303

'0000E100000000000000DAC3C0B30000'X'00000000E60000000000C2C5C1000000'X'007E0000009E00000000BFB4D9C40000'X'000000000000000000000000079CCFBE'X'7B000000001B0000F418F00400007C00'X'7D00F50000001900000000FE00EE0000'X'5C20001A00000000000000AA101E0000'X'00FBFDFC0000000000009D0000000000'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'48486A6A6A6A6A6A6A787852F052D378'X'BB6A6A6A6A43434343785278785252D3'X'5252ADADADADADADA3B27852D378F06A'X'789595959552525252785278D352D36E'X'AD6A786A786A527878436060787878D3'X'78437843BB787878785678789E78D378'X'86785B437878AD78786A526AB2AD8B78'X'787878AD787878D3D3D3D37878787878'X'6AAD95A3B29590ADB252527878787878'X'6A5BA895D8B2AD8BAD9E567878787878'X'52488295B2ADE2ADAD9A56ADADADADAD'X'7878787878787878787856B2B2B2B278'X.

/* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- */:EPMLGMAPTBL.
:EWSCST.

Step 4: Creating the Workstation Customizing Object
After you change and save the source, create the workstation customizing object
using the Create Work Station Customizing Object (CRTWSCST) command.
Specify the following parameter value:
Workstation customizing
object name

WSCST(CSTHPDA)

Library

LIB(CSTLIB)

Source member

SRCMBR(CSTHPDA)

Source file

SRCFILE(CSTSRC)

Library

LIB(CSTLIB)Text

TEXT(’Workstation customizing object for HPDA ASCII
Printer’)Note: This step was performed several times.

Step 5: Varying On the Device
Change the device description for the ASCII printer and specify your customizing
object CSTHPDA for the workstation customizing object (WSCST) parameter.
To activate the workstation customizing function, vary off and then vary on theprinter so that the customizing object is downloaded to the workstation controller.
When you print the test document on the Hewlett-Packard printer, it shows thecharacteristics for which you customized. In addition, the strange characters thatappeared at the top of the page are gone.
Note: This step was performed several times. When you vary the device on and offmany times as you do when you test a new workstation customizing object,
the workstation controller storage can fill up. When this occurs, the device no304

OS/400 Workstation Customization Programming V4R3

longer varies on and an error message is sent to the QSYSOPR message
queue. To correct this situation, it is necessary to vary off the workstation
controller, and then vary it on again specifying RESET(*YES). This clears thestorage in the workstation controller and allows the mapping tables in the
new workstation customizing object to be loaded.

Chapter 12. Customizing ASCII Printers That Use the Emulator on the Controller

305

306

OS/400 Workstation Customization Programming V4R3

Appendix A. Twinaxial Keyboard Layouts
This appendix provides illustrations of the five basic keyboard types that are usedwith twinaxial displays. The core area of each keyboard is not labeled because theintention is to show the physical layout of the keyboard and not necessarily the
positions of individual keys.
The keyboard layouts shown are for a United States English (USB) layout. For
other national languages, slight differences may exist in terms of the number ofkeys in certain rows of the core areas of the keyboards. In most cases, it is thecore area for each keyboard layout that is functionally different from one national
language to the next. This area contains the alphanumeric characters and somefunction keys. The location of the non-alphanumeric keys is almost always thesame from one national language to the next.
Use the following keyboard illustrations to help you select the correct keyboard typewhen you use the Retrieve Work Station Customizing Object Source (RTVWSCST)
command to retrieve the source for your twinaxial display. The following list matches
the values for the keyboard attached parameter to the name of the actual keyboard.
v Specify *DATA5250 for the 5250 data entry keyboard
v Specify *TYPE5250 for the 5250 typewriter keyboard
v Specify *DATA122 for the 122-key data entry keyboard
v Specify *TYPE122 for the 122-key typewriter keyboard
v Specify *ENHANCED for the Enhanced style keyboard
Notes:
1. Not all the different keyboard styles are supported for all the different keyboard
languages the AS/400 system can support. For example, there are very few
national languages that have a data entry layout defined for the 122-key
keyboard.
2. The 5250 data entry keyboard has no numeric key pad area.
3. The number of keys on an Enhanced keyboard varies from one national
language to another. The Enhanced keyboard shown in this appendix has 102
keys. Other Enhanced keyboards may have 102 keys, 103 keys, 105 keys, or
107 keys. The layout of the keyboard is the same; however, some of the larger
keys, such as the Shift key above the Enter key, may be split into two keys
rather than one large key.

5250 Data Entry Keyboard Layout
FunctionControl Keys

Core Area
#
@

SysRq
Attn

Cmd

Del
Ins

ErInp
Home

Print

Help

Error Reset

Rl Up
Cr Up

Rl Dn
Cr Dn

Num Shift

CrLft

CrRgt

,
%

$
*

.
<

DUP

-

0
/

ErRst

RecAd

NewLn

FieldExit

Backspace

Fld-

Alpha ShiftEnter
RV2H475-0© Copyright IBM Corp. 1998307

5250 Typewriter Keyboard Layout
FunctionControl Keys

Core Area

Numeric Pad
BackApc
BackSpc
Test Req

SysReq
Attn

Cmd
Cmd

Hex

Del
Ins

ErInp
Home
ErEOF

FldAdv
FldAdv

Cancl
Print
CrSel

Help
Help

Shift Lock
Shift Lock

Rl Up
Cr Up

Rl Dn
Cr Dn

Shift
Shift

FstCr
CrLft

FstCr
CrRgt

FldExit
FldExit

Shift
Shift

Error Reset
Error Reset

Dup
Dup
FMark

FldBksp
FldBksp

New
New

7
7

8
8

9
9

4
4

5
5

6
6

1
1
PA1

2
2
PA3

3
3
PA3

Enter
Enter

0
0

FldFld-

Fld+
Fld+

.
.
RV2H474-0

122-Key Data Entry Keyboard Layout
Command Key Area
CMD13 CMD14 CMD15 CMD16 CMD17 CMD18 CMD19 CMD20 CMD21 CMD22 CMD23 CMD24

CMD1

CMD2

CMD3

CMD4

CMD5

#
@

,
%

$
*

.
<

CMD6

CMD7

CMD8

CMD9 CMD10 CMD11 CMD12-0/FunctionControl Keys

Cursor Control Keys

Core Area
SysRq
Attn

Dup

Clear
ErInp

Print

Reset

RecAd

FldAdv
FldAdvBackSpc
BackSpc

=

NewLn
NewLn

FBksp

FldExit
FldExitIns
Ins

Alpha Shift

NumShft

Fst Cr
CrLft

7
7

8
8

9
9

4
4

5
5

6
6

1
1

2
2

3
3

Del
Del

Rl Up
Cr Up

Help
Help
Hex

TstRq

Numeric Pad

Fst Cr
CrRgt

FldFld-Home

Err RstErr Rst

Alt
Alt

Space
Space

Alt
Alt

Rl En
Cr Dn

Enter
Enter

.
.

0
0

Fld+
Fld+

RV2H454-0

122-Key Typewriter Keyboard Layout
Command Key Area
CMD13 CMD14 CMD15 CMD16 CMD17 CMD18 CMD19 CMD20 CMD21 CMD22 CMD23 CMD24

CMD1

CMD2

FunctionControl Keys

CMD3

CMD4

CMD5

CMD6 CMD7

CMD8

CMD9 CMD10 CMD11 CMD12
Numeric Pad

Cursor Control Keys

Core Area

SysRq
Attn

BackSpc
BackSpc

FBksp

Dup

New
Line

Ins
Ins

Clear
ErInp

Print

FldAdv
FldAdvFldExit
FldExit

Del
Del

Rl Up
Cr Up

Help
Help
Hex
Fst CrCrLft

Fst Cr
CrRgt

7
7

8
8

9
9

4
4

5
5

6
6

1
1

2
2

3
3

FldFld-

Home

TstRq
Err RstErr Rst

Alt
Alt

Space
Space

Alt
Alt

Enter
Enter

Rl Dn
Cr Dn

0
0

.
.

Fld+
Fld+

RV2H470-1

308

OS/400 Workstation Customization Programming V4R3

Enhanced Keyboard Layout
Cursor Control Keys

Function Keys
Attn

F13
F1

F14
F2

F15
F3

F16
F4

F17
F5

F18
F6

F19
F7

F20
F8

F21
F9

F22
F10

F23
F11

F24
F12

Print
SysRq

Help
Test

Pause
Clear
Numeric Pad

Core Area
Back Space
Back Space
Fld Bksp
FldAdv
Caps
Caps
Shift Lock
Shift
Shift
Shift
Reset
Reset

DUP
Ins

FMark
Home

Pg Up

PA1
Del
CrSel

PA2
ErEOF
ErInp

PA3
Pg Dn

New Line
Field Exit
Shift
Shift
Shift

Cr Up
Cr Up
Enter
Enter

CrLft
CrLft
FstCr

Cr Dn
Cr Dn

CrRgt
CrRgt
FstCr

,
,

FldFld-

7
7

8
8

9
9

FldAdv
FldAdv

4
4

5
5

6
6

Fld+
Fld+

1
1

2
2

3
3

0
0

.
.

E
N
T
E
R
RV2H472-0

Appendix A. Twinaxial Keyboard Layouts

309

310

OS/400 Workstation Customization Programming V4R3

Appendix B. Source Code Examples
You can retrieve copies of source code to customize workstations. The following
examples show what the retrieved source code looks like for each of these types ofdevices:v Twinaxial display
v Twinaxial display with an attached ASCII printer that uses the emulator on thedisplayv ASCII displayv ASCII printer that uses the host print transform functionv ASCII printer that uses the emulator on the workstation controller
The first example is for both the twinaxial display and the twinaxial display with anattached printer that uses the emulator on the display.
Note: The retrieved source code for twinaxial displays (other than the 3477 Model
H, 3486, 3487, and 3488) does not contain the code for the printer definition
table. The remaining examples are for:v The ASCII display
v The ASCII printer that uses the host print transform functionv The ASCII printer attached to the ASCII workstation controller that uses
the emulator on the workstation controller
Use these examples to help you understand and work with the values for the tags
used in the coding for workstation customizing.

Source Code for 3477 Twinaxial Display
The source for this example is created when you use the Retrieve Work Station
Customizing Object Source (RTVWSCST) command specifying the following
parameters:
Device type

DEVTYPE(3477)

Keyboard language type

KBDTYPE(USI)

Keyboard attached

KBD(*TYPE122)

Note: Device type 3477 is one of three device types that you can specify tocustomize an ASCII printer attached to a twinaxial display. The other two
device types you can specify to include the printer definition table in yoursource are the 3486 and the 3487.
:WSCST DEVCLASS=TWINAXPRT.
:TKBDTBL
LANGTYPE = USIKBDTYPE = TYPE122.
:TKSTATE
MODE = NONESHIFT = UNSHIFTDATA ='2300'X/* 00 */ /*'0AA9'X/* 01 */ /*'0AA7'X/* 02 */ /*'0A83'X/* 03 */ /*'0AA5'X/* 04 */ /*'0A82'X/* 05 */ /*© Copyright IBM Corp. 1998

MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONESHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */311

Source Code for 3477 Twinaxial Display'0A95'X'0A94'X'106B'X'104B'X'0B61'X'2300'X'0101'X'2300'X'0B4C'X'1040'X'2300'X'0A81'X'0AA2'X'0A84'X'0A86'X'0A87'X'0A88'X'0A91'X'0A92'X'0A93'X'0B5E'X'0B7D'X'0BC0'X'010E'X'2200'X'2300'X'010B'X'0A98'X'0AA6'X'0A85'X'0A99'X'0AA3'X'0AA8'X'0AA4'X'0A89'X'0A96'X'0A97'X'0BB0'X'0BE0'X'0201'X'2300'X'2300'X'2300'X'0DF1'X'0DF2'X'0DF3'X'0DF4'X'0DF5'X'0DF6'X'0DF7'X'0DF8'X'0DF9'X'0DF0'X'1060'X'0B7E'X'0108'X'2602'X'2300'X'0EF0'X'0EF1'X'0EF2'X'0EF3'X'0EF4'X'0EF5'X'0EF6'X'0EF7'X'0EF8'X

312/* 06 *//* 07 *//* 08 *//* 09 *//* 0A *//* 0B *//* 0C *//* 0D *//* 0E *//* 0F *//* 10 *//* 11 *//* 12 *//* 13 *//* 14 *//* 15 *//* 16 *//* 17 *//* 18 *//* 19 *//* 1A *//* 1B *//* 1C *//* 1D *//* 1E *//* 1F *//* 20 *//* 21 *//* 22 *//* 23 *//* 24 *//* 25 *//* 26 *//* 27 *//* 28 *//* 29 *//* 2A *//* 2B *//* 2C *//* 2D *//* 2E *//* 2F *//* 30 *//* 31 *//* 32 *//* 33 *//* 34 *//* 35 *//* 36 *//* 37 *//* 38 *//* 39 *//* 3A *//* 3B *//* 3C *//* 3D *//* 3E *//* 3F *//* 40 *//* 41 *//* 42 *//* 43 *//* 44 *//* 45 *//* 46 *//* 47 *//* 48 */

OS/400 Workstation Customization Programming V4R3

/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*

MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONESHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */Source Code for 3477 Twinaxial Display'0EF9'X'104B'X'0109'X'0204'X'0203'X'0202'X'2200'X'2200'X'1703'X'2300'X'2300'X'2001'X'2200'X'2003'X'2002'X'2300'X'2300'X'2300'X'2300'X'2300'X'2300'X'2300'X'2300'X'2200'X'2300'X'030B'X'2300'X'2300'X'2300'X'030C'X'030A'X'0604'X'2300'X'2300'X'1703'X'0301'X'010D'X'0601'X'0310'X'0107'X'0106'X'0102'X'0103'X'2300'X'2200'X'2300'X'2300'X'2200'X'2300'X'2300'X'1703'X'0402'X'0607'X'0401'X'2300'X.
:TKSTATE
MODE = NONEDATA ='2300'X'09E9'X'09E7'X'09C3'X'09E5'X'09C2'X'09D5'X'09D4'X'106B'X/* 49 *//* 4A *//* 4B *//* 4C *//* 4D *//* 4E *//* 4F *//* 50 *//* 51 *//* 52 *//* 53 *//* 54 *//* 55 *//* 56 *//* 57 *//* 58 *//* 59 *//* 5A *//* 5B *//* 5C *//* 5D *//* 5E *//* 5F *//* 60 *//* 61 *//* 62 *//* 63 *//* 64 *//* 65 *//* 66 *//* 67 *//* 68 *//* 69 *//* 6A *//* 6B *//* 6C *//* 6D *//* 6E *//* 6F *//* 70 *//* 71 *//* 72 *//* 73 *//* 74 *//* 75 *//* 76 *//* 77 *//* 78 *//* 79 *//* 7A *//* 7B *//* 7C *//* 7D *//* 7E *//* 7F */

/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*

MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONESHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */SHIFT = UNSHIF */MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONESHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPER/* 00 *//* 01 *//* 02 *//* 03 *//* 04 *//* 05 *//* 06 *//* 07 *//* 08 */

/*
/*
/*
/*
/*
/*
/*
/*
/*

*/
*/
*/
*/
*/
*/
*/
*/
*/

Appendix B. Source Code Examples

313

Source Code for 3477 Twinaxial Display'104B'X'0B6F'X'2300'X'0101'X'2300'X'0B6E'X'1040'X'2300'X'09C1'X'09E2'X'09C4'X'09C6'X'09C7'X'09C8'X'09D1'X'09D2'X'09D3'X'0B7A'X'0B7F'X'0BD0'X'010E'X'2200'X'2300'X'010C'X'09D8'X'09E6'X'09C5'X'09D9'X'09E3'X'09E8'X'09E4'X'09C9'X'09D6'X'09D7'X'0B4F'X'0B6A'X'0201'X'2300'X'2300'X'2300'X'0BBB'X'0B7C'X'0B7B'X'0B5B'X'0B6C'X'0BBA'X'0B50'X'0B5C'X'0B4D'X'0B5D'X'0B6D'X'0F4E'X'0108'X'2603'X'2300'X'0EF0'X'0EF1'X'0EF2'X'0EF3'X'0EF4'X'0EF5'X'0EF6'X'0EF7'X'0EF8'X'0EF9'X'104B'X'0608'X

314/* 09 *//* 0A *//* 0B *//* 0C *//* 0D *//* 0E *//* 0F *//* 10 *//* 11 *//* 12 *//* 13 *//* 14 *//* 15 *//* 16 *//* 17 *//* 18 *//* 19 *//* 1A *//* 1B *//* 1C *//* 1D *//* 1E *//* 1F *//* 20 *//* 21 *//* 22 *//* 23 *//* 24 *//* 25 *//* 26 *//* 27 *//* 28 *//* 29 *//* 2A *//* 2B *//* 2C *//* 2D *//* 2E *//* 2F *//* 30 *//* 31 *//* 32 *//* 33 *//* 34 *//* 35 *//* 36 *//* 37 *//* 38 *//* 39 *//* 3A *//* 3B *//* 3C *//* 3D *//* 3E *//* 3F *//* 40 *//* 41 *//* 42 *//* 43 *//* 44 *//* 45 *//* 46 *//* 47 *//* 48 *//* 49 *//* 4A *//* 4B */

OS/400 Workstation Customization Programming V4R3

/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*

MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONESHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPER

*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/

Source Code for 3477 Twinaxial Display'0609'X'0203'X'0202'X'2200'X'2200'X'1703'X'2300'X'2300'X'2001'X'2200'X'2003'X'2002'X'2300'X'2300'X'2300'X'2300'X'2300'X'2300'X'2300'X'2300'X'2200'X'2300'X'060A'X'2300'X'2300'X'2300'X'2200'X'0303'X'0604'X'2300'X'2300'X'1703'X'0302'X'0303'X'0304'X'0310'X'0603'X'0602'X'0104'X'0105'X'2300'X'2200'X'2300'X'2300'X'2200'X'2300'X'2300'X'1703'X'0403'X'0607'X'0401'X'2300'X.

/* 4C *//* 4D *//* 4E *//* 4F *//* 50 *//* 51 *//* 52 *//* 53 *//* 54 *//* 55 *//* 56 *//* 57 *//* 58 *//* 59 *//* 5A *//* 5B *//* 5C *//* 5D *//* 5E *//* 5F *//* 60 *//* 61 *//* 62 *//* 63 *//* 64 *//* 65 *//* 66 *//* 67 *//* 68 *//* 69 *//* 6A *//* 6B *//* 6C *//* 6D *//* 6E *//* 6F *//* 70 *//* 71 *//* 72 *//* 73 *//* 74 *//* 75 *//* 76 *//* 77 *//* 78 *//* 79 *//* 7A *//* 7B *//* 7C *//* 7D *//* 7E *//* 7F */

/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*

MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONE
MODE = NONESHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPERSHIFT = UPPER

*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/

:PDFNTBL.
:SPACEDATA ='20'X.
:BELL
DATA ='07'X.
:BSP
DATA ='08'X.
:LINEFEEDDATA ='0A'X.
:FORMFEEDDATA ='0C'X.
:CARRTNDATA ='0D'X.
:STRUS
Appendix B. Source Code Examples

315

Source Code for 3477 Twinaxial Display
DATA ='1B2D31'X.
:ENDUSDATA ='1B2D30'X.
:PAGLENL
VAROFFSET=
2
VARLEN=
1
DATA ='1B4300'X
VARTYPE=HIGHLOW
VARMAX= 0
ADJUST= 0.
:PAGLENI
VAROFFSET=
3
VARLEN=
1
DATA ='1B430000'X
VARTYPE=HIGHLOW
CNVNUM=
1
CNVDEN=1
VARMAX= 0
ADJUST= 0.
:VARLSPCVAROFFSET=
2
VARLEN=
1
DATA ='1B4100'X
VARTYPE=HIGHLOW
CNVNUM=
1
CNVDEN=96
VARMAX= 0
ADJUST= 0.
:LPI
LPI=6
DATA ='1B32'X.
:LPI
LPI=8
DATA ='1B30'X.
:PRTQLTYQLTYTYPE=DRAFTDATA ='1B48'X.
:PRTQLTYQLTYTYPE=LETTERDATA ='1B47'X.
:PRTQLTYQLTYTYPE=TEXTDATA ='1B47'X.
:CPI
CPI=5
DATA ='0E12'X.
:CPI
CPI=6
DATA ='0E12'X.
:CPI
CPI=855DATA ='0E0F'X.
:CPI
CPI=10DATA ='1412'X.
:CPI
CPI=12DATA ='1412'X.
:CPI
CPI=15DATA ='0F14'X.
:CPI
CPI=171
DATA ='0F14'X.
:STRBOLDDATA ='1B45'X.
:ENDBOLD

316

OS/400 Workstation Customization Programming V4R3

Source Code for 3477 Twinaxial Display
DATA ='1B46'X.
:TRNEBCDIC.
:TRNEBCDICEEBCDIC='42'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='43'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='44'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='45'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='46'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='47'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='48'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='49'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='51'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='52'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='53'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='54'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='55'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='56'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='57'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='58'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='59'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='60'X
DATA ='2D'X.
:TRNEBCDICEEBCDIC='62'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='63'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='64'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='65'X
Appendix B. Source Code Examples

317

Source Code for 3477 Twinaxial Display
DATA ='20'X.
:TRNEBCDICEEBCDIC='66'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='67'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='68'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='69'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='6A'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='70'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='71'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='72'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='73'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='74'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='75'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='76'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='77'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='78'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='80'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='8A'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='8B'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='8C'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='8D'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='8E'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='8F'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='90'X
DATA ='20'X.

318

OS/400 Workstation Customization Programming V4R3

Source Code for 3477 Twinaxial Display:TRNEBCDICEEBCDIC='9A'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='9B'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='9C'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='9D'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='9E'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='9F'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='A0'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='AA'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='AB'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='AC'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='AD'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='AE'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='AF'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='B0'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='B1'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='B2'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='B3'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='B4'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='B5'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='B6'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='B7'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='B8'X
DATA ='20'X.
:TRNEBCDICE
Appendix B. Source Code Examples

319

Source Code for 3477 Twinaxial Display
EBCDIC='B9'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='BA'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='BB'X
DATA ='7C'X.
:TRNEBCDICEEBCDIC='BC'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='BD'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='BE'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='BF'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='CA'X
DATA ='2D'X.
:TRNEBCDICEEBCDIC='CB'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='CC'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='CD'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='CE'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='CF'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='DA'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='DB'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='DC'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='DD'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='DE'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='DF'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='E1'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='EA'XDATA ='20'X.
:TRNEBCDICEEBCDIC='EB'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='EC'X

320

OS/400 Workstation Customization Programming V4R3

Source Code for 3477 Twinaxial Display
DATA ='20'X.
:TRNEBCDICEEBCDIC='ED'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='EE'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='EF'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='FA'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='FB'XDATA ='20'X.
:TRNEBCDICEEBCDIC='FC'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='FD'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='FE'X
DATA ='20'X.
:TRNEBCDICEEBCDIC='FF'X
DATA ='20'X.
:ETRNEBCDIC.
:EWSCST.

Source Code for 3151 ASCII Display
The source for this example is created when you use the Retrieve Work Station
Customizing Object Source (RTVWSCST) command specifying the following
parameters:
Device type

DEVTYPE(3151)

Keyboard language type

KBDTYPE(USB):WSCST DEVCLASS=ASCIIDSP.
:DASCTBL
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'405A7F7B5B6C507D4D5D5C4E6B604B61'X'F0F1F2F3F4F5F6F7F8F97A5E4C7E6E6F'X'7CC1C2C3C4C5C6C7C8C9D1D2D3D4D5D6'X'D7D8D9E2E3E4E5E6E7E8E9BAE0BBB06D'X'79818283848586878889919293949596'X'979899A2A3A4A5A6A7A8A9C04FD0A100'X'00000000000000000000000000000000'X'00000000000000000000000000000000'X'00000000000000000000000000000000'X'00000000000000000000000000000000'X'00000000000000000000000000000000'X'00000000000000000000000000000000'X'00000000000000000000000000000000'X'00000000000000000000000000000000'X.

/* 2- *//* 3- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- */

:DEBCTBL
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'20202020202020202020202020202020'X'2020202020202020202020202A202020'X/* 0- *//* 1- */
Appendix B. Source Code Examples

321

Source Code for 3151 ASCII Display'20202020202020202020202020202020'X'20202020202020202020202020202020'X'2020616161616161636E202E3C282B7C'X'2665656565696969692021242A293B20'X'2D2F414141414141434E7C2C255F3E3F'X'204545454549494949603A2340273D22'X'20616263646566676869202020792020'X'206A6B6C6D6E6F707172202020202020'X'207E737475767778797A213F20202020'X'5E202020202020202B205B5D20202720'X'7B4142434445464748492D6F6F6F6F6F'X'7D4A4B4C4D4E4F505152207575757579'X'5C20535455565758595A204F4F4F4F4F'X'30313233343536373839205555555520'X.
:DSCNTBL
CHARATR = CHARADDRMOD = BINARYTEXTSYM = SUPPORTAUTOSCL = NO.
:CARRTNDATA = 'EA'X.
:HLFIDXDNDATA = 'F6'X.
:HLFIDXUPDATA = 'F7'X.
:PAGENDDATA = 'BE'X.
:RQDCARRTNDATA = 'BD'X.
:RQDSPCDATA = 'BF'X.
:RQDTABDATA = 'BC'X.
:STOPCODEDATA = 'FE'X.
:TABDATA = 'F5'X.
:WORDUSDATA = 'ED'X.
:ATRCMD
CTLCHAR = '20'X
DATA = '1B3440'X.
:ATRCMD
CTLCHAR = '21'X
DATA = '1B3441'X.
:ATRCMD
CTLCHAR = '22'X
DATA = '1B3448'X.
:ATRCMD
CTLCHAR = '23'X
DATA = '1B3449'X.
:ATRCMD
CTLCHAR = '24'X
DATA = '1B3442'X.
:ATRCMD
CTLCHAR = '25'X
DATA = '1B3443'X.
:ATRCMD
CTLCHAR = '26'X
DATA = '1B344A'X.
:ATRCMD
CTLCHAR = '27'X
DATA = '1B3440'X.
:ATRCMD
CTLCHAR = '28'X

322

OS/400 Workstation Customization Programming V4R3/* 2- *//* 3- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- */

Source Code for 3151 ASCII Display
DATA = '1B3444'X.
:ATRCMD
CTLCHAR = '29'X
DATA = '1B3445'X.
:ATRCMD
CTLCHAR = '2A'X
DATA = '1B344C'X.
:ATRCMD
CTLCHAR = '2B'X
DATA = '1B344D'X.
:ATRCMD
CTLCHAR = '2C'X
DATA = '1B3446'X.
:ATRCMD
CTLCHAR = '2D'X
DATA = '1B3447'X.
:ATRCMD
CTLCHAR = '2E'X
DATA = '1B344E'X.
:ATRCMD
CTLCHAR = '2F'X
DATA = '1B3440'X.
:ATRCMD
CTLCHAR = '30'X
DATA = '1B3440'X.
:ATRCMD
CTLCHAR = '31'X
DATA = '1B3441'X.
:ATRCMD
CTLCHAR = '32'X
DATA = '1B3448'X.
:ATRCMD
CTLCHAR = '33'X
DATA = '1B3449'X.
:ATRCMD
CTLCHAR = '34'X
DATA = '1B3442'X.
:ATRCMD
CTLCHAR = '35'X
DATA = '1B3443'X.
:ATRCMD
CTLCHAR = '36'X
DATA = '1B344A'X.
:ATRCMD
CTLCHAR = '37'X
DATA = '1B3440'X.
:ATRCMD
CTLCHAR = '38'X
DATA = '1B3444'X.
:ATRCMD
CTLCHAR = '39'X
DATA = '1B3445'X.
:ATRCMD
CTLCHAR = '3A'X
DATA = '1B344C'X.
:ATRCMD
CTLCHAR = '3B'X
DATA = '1B344D'X.
:ATRCMD
CTLCHAR = '3C'X
DATA = '1B3446'X.
:ATRCMD
CTLCHAR = '3D'X
DATA = '1B3447'X.
:ATRCMD
CTLCHAR = '3E'X
DATA = '1B344E'X.
Appendix B. Source Code Examples

323

Source Code for 3151 ASCII Display:ATRCMD
CTLCHAR = '3F'X
DATA = '1B3440'X.
:SETUP
DATA = '1B283A1B293A'X.
:GCSDATA = '1B3E41'X.
:ACS
DATA = '1B3C40'X.
:NLCS
DATA = '1B3E42'X.
:CLRSCN
DATA = '1B214C'X.
:CSRADRROWTENS = 3
ROWONES = 0
COLHUNDS = 4
COLTENS = 0
COLONES = 0
DATA = '1B582020'X.
:INSCSRDATA = '1B5A'X.
:ALARMDATA = '07'X.
:XCSRADRROW = 4COLHIGH = 5
COLLOW = 6
DATA = '1B7820202040'X.
:SCNSIZESIZE = 1920
DATA = '1B2072212120382250'X.
:SCNSIZESIZE = 2000
DATA = '1B20722121203C2250'X.
:SCNSIZESIZE = 3564
DATA = '1B20722121203C2444'X.
:STRBYPDATA = '1012'X.
:ENDBYPDATA = '1014'X.
:DKBDTBL.
:ATN
DATA = '01'X.
:BSP
DATA = '08'X.
:CSRUP
DATA = '1B41'X.
:CSRDOWNDATA = '1B42'X.
:CSRLEFTDATA = '1B44'X.
:CSRRIGHTDATA = '1B43'X.
:DLT
DATA = '1B51'X.
:DUP
DATA = '04'X.
:ENTERDATA = '1B3803'X.
:ERSINPDATA = '1B4B'X.
:ERRRESETDATA = '1B217A03'X.
:ERRRESET

324

OS/400 Workstation Customization Programming V4R3

Source Code for 3151 ASCII Display
DATA = '12'X.
:ERRRESETDATA = '1B72'X.
:ERRRESETDATA = '1B52'X.
:FLDPLUSDATA = '1B2B'X.
:FLDMINUSDATA = '1B4D'X.
:FLDMINUSDATA = '1B6D'X.
:FLDMINUSDATA = '1B2D'X.
:FLDEXITDATA = '0D'X.
:HELP
DATA = '1B3F'X.
:HOME
DATA = '1B48'X.
:INSERT
DATA = '1B502008'X.
:NEWLINE
DATA = '0A'X.
:PRINTDATA = '1B5703'X.
:PRINTDATA = '10'X.
:PAGUP
DATA = '1B04'X.
:PAGDOWNDATA = '1B15'X.
:SYSREQDATA = '1B53'X.
:SYSREQDATA = '1B73'X.
:FLDADVDATA = '09'X.
:FLDBSPDATA = '1B32'X.
:CLEARDATA = '1B4C03'X.
:TSTREQDATA = '14'X.
:TSTREQDATA = '1B54'X.
:TSTREQDATA = '1B74'X.
:HEX
DATA = '1B60'X.
:FKEY
KEY = F1DATA = '1B6103'X.
:FKEY
KEY = F2DATA = '1B6203'X.
:FKEY
KEY = F3DATA = '1B6303'X.
:FKEY
KEY = F4DATA = '1B6403'X.
:FKEY
KEY = F5DATA = '1B6503'X.
:FKEY
KEY = F6DATA = '1B6603'X.
Appendix B. Source Code Examples

325

Source Code for 3151 ASCII Display:FKEY
KEY = F7DATA = '1B6703'X.
:FKEY
KEY = F8DATA = '1B6803'X.
:FKEY
KEY = F9DATA = '1B6903'X.
:FKEY
KEY = F10DATA = '1B6A03'X.
:FKEY
KEY = F11DATA = '1B6B03'X.
:FKEY
KEY = F12DATA = '1B6C03'X.
:FKEY
KEY = F13DATA = '1B216103'X.
:FKEY
KEY = F14DATA = '1B216203'X.
:FKEY
KEY = F15DATA = '1B216303'X.
:FKEY
KEY = F16DATA = '1B216403'X.
:FKEY
KEY = F17DATA = '1B216503'X.
:FKEY
KEY = F18DATA = '1B216603'X.
:FKEY
KEY = F19DATA = '1B216703'X.
:FKEY
KEY = F20DATA = '1B216803'X.
:FKEY
KEY = F21DATA = '1B216903'X.
:FKEY
KEY = F22DATA = '1B216A03'X.
:FKEY
KEY = F23
DATA = '1B216B03'X.
:FKEY
KEY = F24DATA = '1B216C03'X.
:CSRSELDATA = '03'X.
:ERSEOFDATA = '05'X.
:ERSEOFDATA = '1B49'X.
:FLDMRKDATA = '06'X.
:PA1
DATA = '1B216D03'X.
:PA1
DATA = '1B5031'X.
:PA1

326

OS/400 Workstation Customization Programming V4R3

Source Code for 3151 ASCII Display
DATA = '1B7031'X.
:PA2
DATA = '1B216E03'X.
:PA2
DATA = '1B5032'X.
:PA2
DATA = '1B7032'X.
:PA3
DATA = '1B216F03'X.
:PA3DATA = '1B5033'X.
:PA3DATA = '1B7033'X.
:FCSRLEFTDATA = '1B3C'X.
:FCSRRIGHTDATA = '1B3E'X.
:RQDTABDATA = '1B1B09'X.
:WORDUSDATA = '1B1B57'X.
:WORDUSDATA = '1B1B77'X.
:HLFIDXUPDATA = '1B1B59'X.
:HLFIDXUPDATA = '1B1B79'X.
:STRUSDATA = '1B1B55'X.
:STRUSDATA = '1B1B75'X.
:PAGENDDATA = '1B1B50'X.
:PAGENDDATA = '1B1B70'X.
:STOPCODEDATA = '1B1B53'X.
:STOPCODEDATA = '1B1B73'X.
:HLFIDXDNDATA = '1B1B48'X.
:HLFIDXDNDATA = '1B1B68'X.
:END
DATA = '1B1B4A'X.
:END
DATA = '1B1B6A'X.
:CARRTNDATA = '1B1B0D'X.
:FWDTABDATA = '1B1B1B09'X.
:CENTERDATA = '1B1B43'X.
:CENTERDATA = '1B1B63'X.
:BOLD
DATA = '1B1B42'X.
:BOLD
DATA = '1B1B62'X.
:NEXTSTOPDATA = '1B1B4E'X.
file:NEXTSTOPDATA = '1B1B6E'X.
:DSPSYMDATA = '1B1B1B48'X.
:TOPPAGDATA = '1B1B1B41'X.
Appendix B. Source Code Examples

327

Source Code for 3151 ASCII Display:RQDSPCDATA = '1B1B20'X.
:BOTPAGDATA = '1B1B1B42'X.
:STRLINE
DATA = '1B1B1B44'X.
:ENDLINE
DATA = '1B1B1B43'X.
:SCNREFRESHDATA = '1B01'X.
:TOGINDDATA = '1B17'X.
:DISC
DATA = '1B12'X.
:READSTS
DATA = '1B36'X.
:EWSCST.

Source Code for 4029 ASCII Printer That Uses the Host Print
Transform Function
The source for this example is created when you use the Retrieve Work Station
Customizing Object Source (RTVWSCST) command specifying the following
parameters:
Device type

DEVTYPE(TRANSFORM)

Manufacturer, model, type*IBM4029:WSCST DEVCLASS=TRANSFORM.
:TRNSFRMTBL.
:PRTDTASTRMDATASTREAM=IBMPPDS4.
:NOPRTBDROPTION=TOP
ORIENT=PORTRAITDATA = 240.
:NOPRTBDROPTION=LEFT
ORIENT=PORTRAITDATA = 360.
:NOPRTBDROPTION=RIGHTORIENT=PORTRAITDATA = 360.
:NOPRTBDROPTION=BOTTOMORIENT=PORTRAITDATA = 240.
:NOPRTBDROPTION=TOP
ORIENT=LANDSCAPEDATA = 360.
:NOPRTBDROPTION=LEFT
ORIENT=LANDSCAPEDATA = 240.
:NOPRTBDROPTION=RIGHTORIENT=LANDSCAPEDATA = 240.
:NOPRTBDROPTION=BOTTOM

328

OS/400 Workstation Customization Programming V4R3

Source Code for 4029 ASCII PrinterORIENT=LANDSCAPEDATA = 360.
:INITPRTDATA ='1B5B4B050006310100A111141B461B481B541B57001B35001B2D001B5801FF1B5B5
C0400900090001B36'X.
:RESETPRTDATA ='1B4F1B541B57001B2D001B35001B5B5C020048001B5801FF1B5B460300030101'X.
:SPACEDATA ='20'X.
:BSP
DATA ='08'X.
:CARRTNDATA ='0D'X.
:FORMFEEDDATA ='0C'X.
:LINEFEEDDATA ='0A'X.
:RVSLINEFEEDDATA ='1B5D'X.
:VERRMOVDIRECTION=UPDOWNVAROFFSET=
9
VARLEN=2
VARTYPE=HIGHLOW
CNVNUM=
1
CNVDEN= 1440
DATA ='1B5B510600030100000000'X.
:HORRMOVDIRECTION=FWD
VAROFFSET=
2
VARLEN=2
VARTYPE=LOWHIGH
CNVNUM=
1
CNVDEN= 120
DATA ='1B640000'X.
:HORRMOVDIRECTION=BCKVAROFFSET=
2
VARLEN=2
VARTYPE=LOWHIGH
CNVNUM=
1
CNVDEN= 120
DATA ='1B650000'X.
:STRBOLDDATA ='1B451B47'X.
:ENDBOLDDATA ='1B461B48'X.
:STRSUBSDATA ='1B5301'X.
:ENDSUBSDATA ='1B54'X.
:STRSUPSDATA ='1B5300'X.
:ENDSUPSDATA ='1B54'X.
:STRUSDATA ='1B2D01'X.
:ENDUSDATA ='1B2D00'X.
:VARLSPCVAROFFSET=
11
VARLEN=1
VARTYPE=LOWHIGH
CNVNUM=
1
CNVDEN= 144
DATA ='1B5B5C0400900090001B41001B32'X.
Appendix B. Source Code Examples

329

Source Code for 4029 ASCII Printer:CPICOR
CPI=10ASCIIFNT= 254
FNTWTH= 84
FNTATR=
1
DATA ='X.
:CPICOR
CPI=12ASCIIFNT= 254
FNTWTH= 84
FNTATR=
1
DATA ='X.
:CPICOR
CPI=15ASCIIFNT= 254
FNTWTH= 84
FNTATR=
1
DATA ='X.
:PRTORIENTORIENT=PORTRAITDATA ='1B5B790300000001'X.
:PRTORIENTORIENT=LANDSCAPEDATA ='1B5B790300438001'X.
:PRTORIENTORIENT=RTT180
DATA ='1B5B7903002D0001'X.
:PRTORIENTORIENT=RTT270
DATA ='1B5B790300168001'X.
:DWRSLTDRAWER=PAPERDATA ='1B5B460300010100'X.
:DWRSLTDRAWER=ENVELOPEDATA ='1B5B460300030200'X.
:DWRSLTDRAWER=DRAWER1DATA ='1B5B460300030101'X.
:DWRSLTDRAWER=DRAWER2DATA ='1B5B460300030102'X.
:PAGLENI
VAROFFSET=
3
VARLEN=1
VARTYPE=LOWHIGH
CNVNUM=
1
CNVDEN=
1
DATA ='1B430000'X.
:PAGLENL
VAROFFSET=
2
VARLEN=1
VARTYPE=LOWHIGHDATA ='1B4300'X.
:PAGSIZXFM.
:PAGSIZEPAGWTH= 8352
PAGLEN=11952
DATA ='1B5B4605000000000600'X.
:PAGSIZEPAGWTH=10368
PAGLEN=14544
DATA ='1B5B4605000000000300'X.
:PAGSIZEPAGWTH=10440
PAGLEN=15120
DATA ='1B5B4605000000000500'X.

330

OS/400 Workstation Customization Programming V4R3

Source Code for 4029 ASCII Printer:PAGSIZEPAGWTH=12240
PAGLEN=15840
DATA ='1B5B4605000000000100'X.
:PAGSIZEPAGWTH=11952
PAGLEN=16848
DATA ='1B5B4605000000000400'X.
:PAGSIZEPAGWTH=12240
PAGLEN=20160
DATA ='1B5B4605000000000200'X.
:EPAGSIZXFM.
:ENVSIZXFM.
:ENVSIZEENVWTH=10800
ENVLEN= 5580
DATA ='1B5B4605000000000100'X.
:ENVSIZEENVWTH=12780
ENVLEN= 5580
DATA ='1B5B4605000000000200'X.
:ENVSIZEENVWTH=13680
ENVLEN= 5940
DATA ='1B5B4605000000000300'X.
:ENVSIZEENVWTH=12528
ENVLEN= 6192
DATA ='1B5B4605000000000400'X.
:ENVSIZEENVWTH=12960
ENVLEN= 9216
DATA ='1B5B4605000000000500'X.
:ENVSIZEENVWTH=14112
ENVLEN= 9936
DATA ='1B5B4605000000000600'X.
:EENVSIZXFM.
:ASCCPINFO.
:CODEPAGE
CODEPAGE= 437
DATA ='1B5B540400000001B5'X.
:ASCIICTLASCII='14'X
DATA ='1B5E14'X.
:ASCIICTLASCII='15'X
DATA ='1B5E15'X.
:ASCIICTLASCII='0F'X
DATA ='1B5E0F'X.
:CODEPAGE
CODEPAGE= 850
DATA ='1B5B54040000000352'X.
:ASCIICTLASCII='14'X
DATA ='1B5E14'X.
:ASCIICTLASCII='15'X
DATA ='1B5E15'X.
:ASCIICTLASCII='0F'X
DATA ='1B5E0F'X.
:CODEPAGE
CODEPAGE= 851
DATA ='1B5B54040000000353'X.
Appendix B. Source Code Examples

331

Source Code for 4029 ASCII Printer:ASCIICTLASCII='14'X
DATA ='1B5E14'X.
:ASCIICTLASCII='15'X
DATA ='1B5E15'X.
:ASCIICTLASCII='0F'X
DATA ='1B5E0F'X.
:CODEPAGE
CODEPAGE= 852
DATA ='1B5B54040000000354'X.
:ASCIICTLASCII='14'X
DATA ='1B5E14'X.
:ASCIICTLASCII='15'X
DATA ='1B5E15'X.
:ASCIICTLASCII='0F'X
DATA ='1B5E0F'X.
:CODEPAGE
CODEPAGE= 856
DATA ='1B5B54040000000358'X.
:ASCIICTLASCII='14'X
DATA ='1B5E14'X.
:ASCIICTLASCII='15'X
DATA ='1B5E15'X.
:ASCIICTLASCII='0F'X
DATA ='1B5E0F'X.
:CODEPAGE
CODEPAGE= 857
DATA ='1B5B54040000000359'X.
:ASCIICTLASCII='14'X
DATA ='1B5E14'X.
:ASCIICTLASCII='15'X
DATA ='1B5E15'X.
:ASCIICTLASCII='0F'X
DATA ='1B5E0F'X.
:CODEPAGE
CODEPAGE= 860
DATA ='1B5B5404000000035C'X.
:ASCIICTLASCII='14'X
DATA ='1B5E14'X.
:ASCIICTLASCII='15'X
DATA ='1B5E15'X.
:ASCIICTLASCII='0F'X
DATA ='1B5E0F'X.
:CODEPAGE
CODEPAGE= 861
DATA ='1B5B5404000000035D'X.
:ASCIICTLASCII='14'X
DATA ='1B5E14'X.
:ASCIICTLASCII='15'X
DATA ='1B5E15'X.
:ASCIICTL

332

OS/400 Workstation Customization Programming V4R3

Source Code for 4029 ASCII PrinterASCII='0F'X
DATA ='1B5E0F'X.
:CODEPAGE
CODEPAGE= 862
DATA ='1B5B5404000000035E'X.
:ASCIICTLASCII='14'X
DATA ='1B5E14'X.
:ASCIICTLASCII='15'X
DATA ='1B5E15'X.
:ASCIICTLASCII='0F'X
DATA ='1B5E0F'X.
:CODEPAGE
CODEPAGE= 863
DATA ='1B5B5404000000035F'X.
:ASCIICTLASCII='14'X
DATA ='1B5E14'X.
:ASCIICTLASCII='15'X
DATA ='1B5E15'X.
:ASCIICTLASCII='0F'X
DATA ='1B5E0F'X.
:CODEPAGE
CODEPAGE= 864
DATA ='1B5B54040000000360'X.
:ASCIICTLASCII='14'X
DATA ='1B5E14'X.
:ASCIICTLASCII='15'X
DATA ='1B5E15'X.
:ASCIICTLASCII='0F'X
DATA ='1B5E0F'X.
:CODEPAGE
CODEPAGE= 865
DATA ='1B5B54040000000361'X.
:ASCIICTLASCII='14'X
DATA ='1B5E14'X.
:ASCIICTLASCII='15'X
DATA ='1B5E15'X.
:ASCIICTLASCII='0F'X
DATA ='1B5E0F'X.
:CODEPAGE
CODEPAGE= 869
DATA ='1B5B54040000000365'X.
:ASCIICTLASCII='14'X
DATA ='1B5E14'X.
:ASCIICTLASCII='15'X
DATA ='1B5E15'X.
:ASCIICTLASCII='0F'X
DATA ='1B5E0F'X.
:CODEPAGE
CODEPAGE= 874
DATA ='1B5B5404000000036A'X.
:ASCIICTLASCII='14'X
Appendix B. Source Code Examples

333Source Code for 4029 ASCII Printer
DATA ='1B5E14'X.
:ASCIICTLASCII='15'X
DATA ='1B5E15'X.
:ASCIICTLASCII='0F'X
DATA ='1B5E0F'X.
:CODEPAGE
CODEPAGE= 899
DATA ='1B5B54040000000383'X.
:CODEPAGE
CODEPAGE= 1051
DATA ='1B5B5404000000041B'X.
:EASCCPINFO.
:HORAMOVVAROFFSET=
7
VARLEN=2
VARTYPE=HIGHLOW
CNVNUM=
1
CNVDEN= 1440
DATA ='1B5B5104000A010000'X.
:VERAMOVVAROFFSET=
7
VARLEN=2
VARTYPE=HIGHLOW
CNVNUM=
1
CNVDEN= 1440
DATA ='1B5B5104000B010000'X.
:PRTNXTCHRDATA ='1B5E'X.
:PRTANGLE
ANGLE=0
DATA ='1B5B790300000000'X.
:PRTANGLE
ANGLE=90
DATA ='1B5B790300438000'X.
:PRTANGLE
ANGLE=180
DATA ='1B5B7903002D0000'X.
:PRTANGLE
ANGLE=270
DATA ='1B5B790300168000'X.
:EWSCST.

Source Code for 4019 ASCII Printer That Uses the Emulator on theController
The source for this example is created when you use the Retrieve Work Station
Customizing Object Source (RTVWSCST) command specifying the following
parameters:
Device type

DEVTYPE(4019)

Keyboard language type

KBDTYPE(USI):WSCST DEVCLASS=ASCIIPRT.
:PDFTMAPTBL.
:PDFTEBCTBLDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A0C68687A45B2E3C282B21'X'268288898AA18C8B8DE15D242A293B5E'X'2D2FB68EB7B5C78F80A5DD2C255F3E3F'X

334

OS/400 Workstation Customization Programming V4R3/* 4- *//* 5- *//* 6- */

Source Code for 4019 ASCII Printer'9B90D2D3D4D6D7D8DE603A2340273D22'X'9D616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A791F792CF'X'E67E737475767778797AADA8D1EDE8A9'X'BD9CBE169FF5F4ACABF3AA7CEEF9EFF2'X'7B4142434445464748492D939495A2E4'X'7D4A4B4C4D4E4F505152FB968197A398'X'5C20535455565758595AFDE299E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0A0A0A0A0A0A0A0C0A0A0A0A0A0A'X'0C0A0A0A0A060606060C0A0A0A0A0A0A'X'0A0A0E0E0E0E0E0E0E0E0A0A0A0A0A0A'X'0A0C0C0C0C080808080A0A0A0A060A0A'X'0E0A0C0A0C0A080C0C060E0E0C0C0C0A'X'0A060C060E0C0A0C0C0A0A0A0E0A0E0A'X'0C0A0A080C0C0E0C0C0A0A0A0E0E0E0A'X'0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A'X'0A0E0E0E0E0C0C0E0E080A0A0A0A0A0A'X'0A0A0E0C0E0E0E0C0E0E060C0C0C0C0C'X'0A0A0C0E0E0E0E0E0E0C0A0E0E0E0E0E'X'0A0A0A0A0A0A0A0A0A0A0A0E0E0E0E0A'X.
:EPDFTMAPTBL.

/* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- */:PFCNTBL.
:DFTFNTID
CPI=10DEFAULT= 11.
:DFTFNTID
CPI=12DEFAULT= 85.
:DFTFNTID
CPI=171
DEFAULT= 254.
:DFTFNTID
CPI=PROPDEFAULT= 159.
:DFTFNTID
CPI=5
DEFAULT= 244.
:DFTFNTID
CPI=855
DEFAULT= 265.
:DFTFNTID
CPI=133
DEFAULT= 204.
:DFTFNTID
CPI=15DEFAULT= 223.
:DFTFNTID
CPI=20DEFAULT= 281.
:DFTFNTID
CPI=27DEFAULT= 290.
:VARLSPCVAROFFSET=
11
VARLEN=1
VARTYPE=LOWHIGH
VARMAX= 255
ADJUST= 0
CNVNUM= 10
CNVDEN=
1
DATA ='1B5B5C0400900090001B41101B32'X.
:PAGLENI
Appendix B. Source Code Examples

335

Source Code for 4019 ASCII PrinterVAROFFSET=
3
VARLEN=1
VARTYPE=LOWHIGH
VARMAX= 255
ADJUST= 0
CNVNUM= 1440
CNVDEN=
1
DATA ='1B43000B'X.
:PAGLENL
VAROFFSET=
2
VARLEN=1
VARTYPE=LOWHIGH
VARMAX= 255
ADJUST= 0
DATA ='1B4342'X.
:CODPAGVARVAROFFSET=
7
VARLEN=2
VARTYPE=HIGHLOWDATA ='1B5B5405000000035200'X.
:FNTGPFTDATA ='1B5B4905000000000000'X.
:FWDRMOVVAROFFSET=
2
VARLEN=2
VARTYPE=LOWHIGH
VARMAX=32767
ADJUST= 0
CNVNUM= 12
CNVDEN=
1
DATA ='1B640F00'X.
:BCKRMOVVAROFFSET=
2
VARLEN=2
VARTYPE=LOWHIGH
VARMAX=32767
ADJUST= 0
CNVNUM= 12
CNVDEN=
1
DATA ='1B650F00'X.
:CPI
CPI=5
DATA ='00121B5701'X.
:CPI
CPI=855DATA ='00120F1B5701'X.
:CPI
CPI=10DATA ='1B570012'X.
:STRPROPDATA ='1B57001B5001'X.
:CPI
CPI=12DATA ='1B5700121B3A'X.
:CPI
CPI=15DATA ='1B5700120F'X.
:CPI
CPI=171
DATA ='1B5700120F'X.
:FONTQLTYFONTCPI=10
QLTYTYPE=DRAFTDATA ='1B490112'X.
:FONTQLTYFONTCPI=12QLTYTYPE=DRAFT

336

OS/400 Workstation Customization Programming V4R3

Source Code for 4019 ASCII Printer
DATA ='1B49011B3A'X.
:FONTQLTYFONTCPI=171
QLTYTYPE=DRAFTDATA ='1B49010F'X.
:FONTQLTYFONTCPI=PROPQLTYTYPE=DRAFTDATA ='1B49011B3A'X.
:FONTQLTYFONTCPI=10
QLTYTYPE=LETTERDATA ='1B490312'X.
:FONTQLTYFONTCPI=12QLTYTYPE=LETTERDATA ='1B49031B3A'X.
:FONTQLTYFONTCPI=171
QLTYTYPE=LETTERDATA ='1B49030F'X.
:FONTQLTYFONTCPI=PROPQLTYTYPE=LETTERDATA ='1B49031B3A'X.
:FONTQLTYFONTCPI=10
QLTYTYPE=TEXTDATA ='1B490212'X.
:FONTQLTYFONTCPI=12QLTYTYPE=TEXTDATA ='1B49021B3A'X.
:FONTQLTYFONTCPI=171
QLTYTYPE=TEXTDATA ='1B49020F'X.
:FONTQLTYFONTCPI=PROPQLTYTYPE=TEXTDATA ='1B49021B3A'X.
:STRBOLDDATA ='1B45'X.
:ENDBOLDDATA ='1B46'X.
:PRTFEEDFEEDTYPE=MANUALDATA ='1B5B460300010100'X.
:DWRSLTDRAWER=DRAWER1DATA ='1B5B460300030101'X.
:DWRSLTDRAWER=DRAWER2DATA ='1B5B460300030102'X.
:DWRSLTDRAWER=ENVELOPEDATA ='1B5B460300030200'X.
:PRTORIENTORIENT=PORTRAITDATA ='1B6B'X.
:PRTORIENTORIENT=LANDSCAPEDATA ='1B6C'X.
:PRTORIENTORIENT=RTT180
DATA ='1B6B'X.
:PRTORIENTAppendix B. Source Code Examples

337

Source Code for 4019 ASCII PrinterORIENT=RTT270
DATA ='1B6C'X.
:STRUSDATA ='1B2D01'X.
:ENDUSDATA ='1B2D00'X.
:STRSUPSDATA ='1B5300'X.
:ENDSUPSDATA ='1B54'X.
:STRSUBSDATA ='1B5301'X.
:ENDSUBSDATA ='1B54'X.
:RVSIDXDATA ='1B5D'X.
:INITVONDATA ='00001B5B4B0700063101840024B8
1B5B5C0400900090001B5B540500
00000352001B6B'X.
:INITPRTDATA ='1B5B4B03000031011B5B5C020090
001B5B5405000000035200'X.
:SPACEDATA ='20'X.
:BELL
DATA ='07'X.
:CARRTNDATA ='0D'X.
:LINEFEEDDATA ='0A'X.
:FORMFEEDDATA ='0C'X.
:PRTCTLDATA ='00'X.
:BSP
DATA ='08'X.
:COLLATEDATA = 12.
:PAGSIZPFT
PAGWTH=12240
PAGLEN=20160
PAPER=MANUAL.
:PAGSIZPFT
PAGWTH=12240
PAGLEN=15840
PAPER=DRAWER1.
:PAGSIZPFT
PAGWTH=12240
PAGLEN=15840
PAPER=DRAWER2.
:PAGSIZPFT
PAGWTH=12240
PAGLEN= 5760
PAPER=ENVELOPE.
:MARGIN
OPTION=TOP
ORIENT=PORTRAITDATA = 240.
:MARGIN
OPTION=LEFT
ORIENT=PORTRAITDATA = 360.
:MARGIN
OPTION=RIGHTORIENT=PORTRAITDATA = 360.

338

OS/400 Workstation Customization Programming V4R3

Source Code for 4019 ASCII Printer:MARGIN
OPTION=BOTTOMORIENT=PORTRAITDATA = 240.
:MARGIN
OPTION=TOP
ORIENT=LANDSCAPEDATA = 360.
:MARGIN
OPTION=LEFT
ORIENT=LANDSCAPEDATA = 240.
:MARGIN
OPTION=RIGHTORIENT=LANDSCAPEDATA = 240.
:MARGIN
OPTION=BOTTOMORIENT=LANDSCAPEDATA = 360.
:ASCIICTLASCII='16'X
DATA ='1B5B540500000201B5009E1B5B54050
00000035200'X.
:ASCIICTLASCII='14'X
DATA ='1B5E14'X.
:ASCIICTLASCII='15'X
DATA ='1B5E15'X.
:ASCIICTLASCII='18'X
DATA ='1B5E18'X.
:PMLGMAPTBL.
:PMLGEBCTBLEBCDICCP= 29
ASCIICP= 850
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A0C68687A4E82E3C282B21'X'268288898AA18C8B8DE192242A293B99'X'2D2FB68EB7B5C78F80A5DD2C255F3E3F'X'9B90D2D3D4D6D7D8DED03A23D1273D22'X'9D616263646566676869AEAF60EC7BF1'X'F86A6B6C6D6E6F707172A6A77DF75DCF'X'E694737475767778797AADA840ED5BA9'X'BD9CBEFAB8F5F4ACABF3AA7CEEF95C9E'X'E7414243444546474849F0937E95A2E4'X'914A4B4C4D4E4F505152FB968197A398'X'EFF6535455565758595AFDE25EE3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0A0A0A0A0A0A0A0C0E0A0A0A0A0A'X'0C0A0A0A0A060606060C0E0A0A0A0A0E'X'0A0A0E0E0E0E0E0E0E0E0A0A0A0A0A0A'X'0A0C0C0C0C080808080C0A0A0E060A0A'X'0E0A0C0A0C0A080C0C060E0E0A0C0A0A'X'0A060C060E0C0A0C0C0A0A0A0A0A0A0A'X'0C0A0A080C0C0E0C0C0A0A0A0A0E0A0A'X'0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A'X'0C0E0E0E0E0C0C0E0E080A0A0A0A0A0A'X'0E0A0E0C0E0E0E0C0E0E060C0C0C0C0C'X'0A0A0C0E0E0E0E0E0E0C0A0E0A0E0E0E'X/* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- */
Appendix B. Source Code Examples

339

Source Code for 4019 ASCII Printer'0A0A0A0A0A0A0A0A0A0A0A0E0E0E0E0A'X.
:PMLGEBCTBLEBCDICCP= 30
ASCIICP= 853
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A000917BA4802E3C282B21'X'268288898AA18C8B8DE1A6982A293B5E'X'2D2FB686B7B500925BA5AD2C255F3E3F'X'0090D2D3D4D6D7D8DED53A99B8273D9A'X'F4616263646566676869E886C7ED007C'X'F86A6B6C6D6E6F707172A99B9FF700CF'X'E694737475767778797AE78FC6EC0040'X'FA9CBE7DBDF55D00AB24A89DACF9EF9E'X'87414243444546474849F0937E95A2E5'X'A74A4B4C4D4E4F50515260965C81A300'X'81F6535455565758595AFDE223E3E0E4'X'30313233343536373839FCEA22EBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0A0A0A0A0A0A0A0C0E0A0A0A0A0A'X'0C0A0A0A0A060606060C0E080A0A0A0A'X'0A0A0E0E0E0E0E0E0A0E0A0A0A0A0A0A'X'0A0C0C0C0C08080808060A0E0C060A0E'X'0A0A0C0A0C0A080C0C060C0A0A0C0C0A'X'0A060C060E0C0A0C0C0A0C0C060A0E0A'X'0C0A0A080C0C0E0C0C0A0E0E0C0E0E0A'X'0A0A0A0A0C0A0A0A0A0A0E0E0C0E0A0A'X'0A0E0E0E0E0C0C0E0E080A0A0A0A0A0C'X'0C0A0E0C0E0E0E0C0E0E0A0C0A0C0C0C'X'0C0A0C0E0E0E0E0E0E0C0A0E0A0E0E0E'X'0A0A0A0A0A0A0A0A0A0A0A0E0A0E0E0A'X.
:PMLGEBCTBLEBCDICCP= 37
ASCIICP= 850
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A0C68687A4BD2E3C282B7C'X'26828889BAA18C8B8DE121242A293BAA'X'2D2FB68EB7B5C78F80A5DD2C255F3E3F'X'9B90D2D3D4D6D7D8DE603A2340273D22'X'9D616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A791F792CF'X'E67E737475767778797AADA8D1EDE8A9'X'5E9CBEFA9FF5F4ACABF35B5DEEF9EFF2'X'7B414243444546474849F0939495A2E4'X'7D4A4B4C4D4E4F505152D5968197A398'X'5C20535455565758595AFDE299E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0A0A0A0A0A0A0A0C0A0A0A0A0A0A'X'0C0A0A0A0A060606060C0A0A0A0A0A0A'X'0A0A0E0E0E0E0E0E0E0E0A0A0A0A0A0A'X'0A0C0C0C0C080808080A0A0A0A060A0A'X'0E0A0C0A0C0A080C0C060E0E0C0C0C0A'X'0A060C060E0C0A0C0C0A0A0A0E0A0E0A'X'0C0A0A080C0C0E0C0C0A0A0A0E0E0E0A'X'0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A'X'0A0E0E0E0E0C0C0E0E080A0A0A0A0A0A'X'0A0A0E0C0E0E0E0C0E0E060C0C0C0C0C'X'0A0A0C0E0E0E0E0E0E0C0A0E0E0E0E0E'X'0A0A0A0A0A0A0A0A0A0A0A0E0E0E0E0A'X.

340

OS/400 Workstation Customization Programming V4R3/* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- */

Source Code for 4019 ASCII Printer:PMLGEBCTBLEBCDICCP= 38
ASCIICP= 850
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A0C68687A45B2E3C282B21'X'268288898AA18C8B8DE15D242A293B5E'X'2D2FB68EB7B5C78F80A5DD2C255F3E3F'X'9B90D2D3D4D6D7D8DE603A2340273D22'X'9D616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A791F792CF'X'E67E737475767778797AADA8D1EDE8A9'X'BD9CBEFA9FF5F4ACABF3AA7CEEF9EFF2'X'7B414243444546474849F0939495A2E4'X'7D4A4B4C4D4E4F505152D5968197A398'X'5C20535455565758595AFDE299E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0A0A0A0A0A0A0A0C0A0A0A0A0A0A'X'0C0A0A0A0A060606060C0A0A0A0A0A0A'X'0A0A0E0E0E0E0E0E0E0E0A0A0A0A0A0A'X'0A0C0C0C0C080808080A0A0A0A060A0A'X'0E0A0C0A0C0A080C0C060E0E0C0C0C0A'X'0A060C060E0C0A0C0C0A0A0A0E0A0E0A'X'0C0A0A080C0C0E0C0C0A0A0A0E0E0E0A'X'0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A'X'0A0E0E0E0E0C0C0E0E080A0A0A0A0A0A'X'0A0A0E0C0E0E0E0C0E0E060C0C0C0C0C'X'0A0A0C0E0E0E0E0E0E0C0A0E0E0E0E0E'X'0A0A0A0A0A0A0A0A0A0A0A0E0E0E0E0A'X.
:PMLGEBCTBLEBCDICCP= 45
ASCIICP= 880
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838461A0C79F87865B2E3C282B21'X'2682A98985A18C9692E15D242A293B5E'X'2D2FB68E41B5C6AC808FD82C255F3E3F'X'F390A8D3DED6D79591603A2340273D22'X'F461626364656667686998E5D0ECFDAD'X'F86A6B6C6D6E6F70717288E4E7F7F2CF'X'A5F1737475767778797AB8D5D1EDFCB8'X'FA4CBEDDBDF5A7ABA68D9DE3E6F9EFEE'X'D4414243444546474849F09394EAA28B'X'D24A4B4C4D4E4F505152B7FB819CA379'X'A420535455565758595A32E299E8E08A'X'3031323334353637383933EB9A9BE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A'X'0C0A0A0A0C060606060C0A0A0A0A0A0A'X'0A0A0E0E0E0E0E0E0E0E0A0A0A0A0A0A'X'0A0C0C0C0E080808080A0A0A0A060A0A'X'0A0A0C0A0C0A080C0C060A0C0C0C0A0A'X'0A060C060E0C0A0C0C0A060C0A0A0A0A'X'0A0A0A080C0C0E0C0C0A0C0E0E0E0E0C'X'0A0C0A0E0C0A0A0A0C0C0C0E0C0A0A08'X'0C0E0E0E0E0C0C0E0E080A0A0A0A0A0A'X'0E0A0E0C0E0E0E0C0E0E0C0C0C080C0C'X'0E0A0C0E0E0E0E0E0E0C0A0E0E0E0E0E'X'0A0A0A0A0A0A0A0A0A0A0A0E0E0E0E0A'X.

/* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- */

Appendix B. Source Code Examples

341

Source Code for 4019 ASCII Printer:PMLGEBCTBLEBCDICCP= 256
ASCIICP= 850
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A0C68687A45B2E3C282B21'X'268288898AA18C8B8DE15D242A293B5E'X'2D2FB68EB7B5C78F80A5DD2C255F3E3F'X'9B90D2D3D4D6D7D8DE603A2340273D22'X'9D616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A791F792CF'X'E67E737475767778797AADA8D1EDE8A9'X'BD9CBE169FF5F4ACABF3AA7CEEF9EFF2'X'7B414243444546474849F0939495A2E4'X'7D4A4B4C4D4E4F505152D5968197A398'X'5C20535455565758595AFDE299E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0A0A0A0A0A0A0A0C0A0A0A0A0A0A'X'0C0A0A0A0A060606060C0A0A0A0A0A0A'X'0A0A0E0E0E0E0E0E0E0E0A0A0A0A0A0A'X'0A0C0C0C0C080808080A0A0A0A060A0A'X'0E0A0C0A0C0A080C0C060E0E0C0C0C0A'X'0A060C060E0C0A0C0C0A0A0A0E0A0E0A'X'0C0A0A080C0C0E0C0C0A0A0A0E0E0E0A'X'0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A'X'0A0E0E0E0E0C0C0E0E080A0A0A0A0A0A'X'0A0A0E0C0E0E0E0C0E0E060C0C0C0C0C'X'0A0A0C0E0E0E0E0E0E0C0A0E0E0E0E0E'X'0A0A0A0A0A0A0A0A0A0A0A0E0E0E0E0A'X.
:PMLGEBCTBLEBCDICCP= 257
ASCIICP= 855
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'202080828486888A8C8E5B2E3C282B21'X'2690929496989A9EEF815D242A293B5E'X'2D2F838587898B8D8F917C2C255F3E3F'X'9395972D999B9CA0A2603A2340273D22'X'9A616263646566676869A6A8AAACB5B7'X'BD6A6B6C6D6E6F707172C6D0D2D4D6D8'X'DE7E737475767778797AE1E3E5E7E9EB'X'EDF1F3F5F7F9FB9E9DA1A3A5A7A9ABAD'X'7B414243444546474849B6B8BEC7D1D3'X'7D4A4B4C4D4E4F505152D5D7DDE0E2E4'X'5CCF535455565758595AE6E8EAECEEF2'X'30313233343536373839F4F6F8FAFC00'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0C0A0A0A0A0606060A0A0A0A0A0A'X'0C0E0E0C0C0C0C0E0E0E0A0A0A0A0A0A'X'0A0A0E0E0E0C08080A0E0A0A0A0A0A0A'X'0E0E0E0A0E0E0E0A0A0A0A0A0A060A0A'X'0C0A0C0A0C0A080C0C060C0A0C0A0A0C'X'0C060C060E0C0A0C0C0A0C0C0E0C0A0A'X'0C0A0A080C0C0E0C0C0A0C0A0A0C0E0C'X'0C0E0A0E0A0E0C0C0E0E0E0E0E0C0E0E'X'0A0E0E0E0E0C0C0E0E080E0E0E0E0E0E'X'0A0A0E0C0E0E0E0C0E0E0E0E0E0E0C0E'X'0A0A0C0E0E0E0E0E0E0C0E0E0E0E0E0E'X'0A0A0A0A0A0A0A0A0A0A0A0E0E0E0E0A'X.
:PMLGEBCTBL

342

OS/400 Workstation Customization Programming V4R3/* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- */

Source Code for 4019 ASCII PrinterEBCDICCP= 258
ASCIICP= 852
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'20208384EEA0C79F87865B2E3C282B21'X'2682A98985A18C9692E15D242A293B5E'X'2D2FB68EF1B5C6AC808F7C2C255F3E3F'X'F390A8D3DED6D79591603A2340273D22'X'F461626364656667686998E5D0ECFDAD'X'F86A6B6C6D6E6F70717288E4E7F7F2CF'X'A57E737475767778797AB8D5D1EDFCB8'X'FAA4BEDDBDF5A7ABA68D9DE3E6F9EF9E'X'7B414243444546474849F09394EAA28B'X'7D4A4B4C4D4E4F505152B7FB819CA3DB'X'5CF6535455565758595AD4E299E8E08A'X'30313233343536373839D2EB9A9BE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0A0A080A0A0A0A0A0A0A0A0A0A0A'X'0C0A0A0A0C060606060C0A0A0A0A0A0A'X'0A0A0E0E0A0E0E0E0E0E0A0A0A0A0A0A'X'0A0C0C0C0E080808080A0A0A0A060A0A'X'0A0A0C0A0C0A080C0C060A0C0C0C0A0A'X'0A060C060E0C0A0C0C0A060C0A0A0A0A'X'0A0A0A080C0C0E0C0C0A0C0E0E0E0E0C'X'0A0E0A0E0C0A0A0A0C0C0C0E0C0A0A0A'X'0A0E0E0E0E0C0C0E0E080A0A0A0A0A0A'X'0A0A0E0C0E0E0E0C0E0E0C0C0C080C0A'X'0A0A0C0E0E0E0E0E0E0C0C0E0E0E0E0E'X'0A0A0A0A0A0A0A0A0A0A0E0E0E0E0E0A'X.
:PMLGEBCTBLEBCDICCP= 259
ASCIICP= 899
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A0B08687A45B2E3C282B21'X'268288898AA18C8B8DB15D242A293B5E'X'2D2FB28EB3B4B58F80A57C2C255F3E3F'X'B690B7B8B9BA00BCBD603A2340273D22'X'BE616263646566676869AEAFBFC0C1C2'X'C36A6B6C6D6E6F707172A6A791C492C5'X'C67E737475767778797AADA8C7C8C9CA'X'9B9C9D9E9FE0CBACABCCAACDCECFD0D1'X'7B414243444546474849D2939495A2D3'X'7D4A4B4C4D4E4F505152D4968197A398'X'5C20535455565758595AD5D699D7D8D9'X'30313233343536373839DADB9ADCDD00'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0A0A0A0A0A0A0A0C0A0A0A0A0A0A'X'0C0A0A0A0A060606060C0A0A0A0A0A0A'X'0A0A0E0E0E0E0E0E0E0E0A0A0A0A0A0A'X'0A0C0C0C0C080808080A0A0A0A060A0A'X'0E0A0C0A0C0A080C0C060E0E0C0C0C0A'X'0A060C060E0C0A0C0C0A0A0A0E0A0E0A'X'0C0A0A080C0C0E0C0C0A0A0A0E0E0E0A'X'0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A'X'0A0E0E0E0E0C0C0E0E080A0A0A0A0A0A'X'0A0A0E0C0E0E0E0C0E0E060C0C0C0C0C'X'0A0A0C0E0E0E0E0E0E0C0A0E0E0E0E0E'X'0A0A0A0A0A0A0A0A0A0A0A0E0E0E0E0A'X.

/* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- */:PMLGEBCTBLEBCDICCP= 260
Appendix B. Source Code Examples

343

Source Code for 4019 ASCII PrinterASCIICP= 850
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A0C68687A45B2E3C282B21'X'268288898AA18C8B8DE15D242A293B5E'X'2D2FB68EB7B5C78F80A5DD2C255F3E3F'X'9B90D2D3D4D6D7D8DE603A2340273D22'X'9D616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A791F792CF'X'E67E737475767778797AADA8D1EDE8A9'X'BD9CBEFA9FF5F4ACABF3AA7CEEF9EFF2'X'7B414243444546474849F0939495A2E4'X'7D4A4B4C4D4E4F505152D5968197A398'X'5C20535455565758595AFDE299E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0A0A0A0A0A0A0A0C0A0A0A0A0A0A'X'0C0A0A0A0A060606060C0A0A0A0A0A0A'X'0A0A0E0E0E0E0E0E0E0E0A0A0A0A0A0A'X'0A0C0C0C0C080808080A0A0A0A060A0A'X'0E0A0C0A0C0A080C0C060E0E0C0C0C0A'X'0A060C060E0C0A0C0C0A0A0A0E0A0E0A'X'0C0A0A080C0C0E0C0C0A0A0A0E0E0E0A'X'0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A'X'0A0E0E0E0E0C0C0E0E080A0A0A0A0A0A'X'0A0A0E0C0E0E0E0C0E0E060C0C0C0C0C'X'0A0A0C0E0E0E0E0E0E0C0A0E0E0E0E0E'X'0A0A0A0A0A0A0A0A0A0A0A0E0E0E0E0A'X.
:PMLGEBCTBLEBCDICCP= 273
ASCIICP= 850
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020837B85A0C68687A48E2E3C282B21'X'26828889BAA18C8B8D7E9A242A293B5E'X'2D2FB65BB7B5C78F80A5942C255F3E3F'X'9B90D2D3D4D6D7D8DE603A23F5273D22'X'9D616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A791F792CF'X'E6E1737475767778797AADA8D1EDE8A9'X'BD9CBEFA9F40F4ACABF3AA7CEEF9EFF2'X'84414243444546474849F093D095A2E4'X'814A4B4C4D4E4F505152D5967D97A398'X'9920535455565758595AFDE25CE3E0E5'X'30313233343536373839FCEA5DEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0A0A0A0A0A0A0A0C0E0A0A0A0A0A'X'0C0A0A0A0A060606060C0E0A0A0A0A0A'X'0A0A0E0E0E0E0E0E0E0E0A0A0A0A0A0A'X'0A0C0C0C0C080808080A0A0A0A060A0A'X'0E0A0C0A0C0A080C0C060E0E0C0C0C0A'X'0A060C060E0C0A0C0C0A0A0A0E0A0E0A'X'0C0C0A080C0C0E0C0C0A0A0A0E0E0E0A'X'0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A'X'0A0E0E0E0E0C0C0E0E080A0A0A0A0A0A'X'0C0A0E0C0E0E0E0C0E0E060C0C0C0C0C'X'0E0A0C0E0E0E0E0E0E0C0A0E0E0E0E0E'X'0A0A0A0A0A0A0A0A0A0A0A0E0E0E0E0A'X.
:PMLGEBCTBLEBCDICCP= 274
ASCIICP= 850

344

OS/400 Workstation Customization Programming V4R3/* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- */

Source Code for 4019 ASCII Printer
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838440A0C6865CA45B2E3C282B21'X'267B88897DA18C8B8DE15D242A293B5E'X'2D2FB68EB7B5C78F80A5972C255F3E3F'X'9B90D2D3D4D6D7D8DE603A2385273D22'X'9D616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A791F792CF'X'E6F9737475767778797AADA8D1EDE8A9'X'BD9CBEFA9FF5F4ACABF3AA7CEE7EEFF2'X'82414243444546474849F0939495A2E4'X'8A4A4B4C4D4E4F505152D5968197A398'X'8720535455565758595AFDE299E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0A0A0A0A0A0A0A0C0A0A0A0A0A0A'X'0C0A0A0A0A060606060C0A0A0A0A0A0A'X'0A0A0E0E0E0E0E0E0E0E0C0A0A0A0A0A'X'0A0C0C0C0C080808080A0A0A0A060A0A'X'0E0A0C0A0C0A080C0C060E0E0C0C0C0A'X'0A060C060E0C0A0C0C0A0A0A0E0A0E0A'X'0C0A0A080C0C0E0C0C0A0A0A0E0E0E0A'X'0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A'X'0A0E0E0E0E0C0C0E0E080A0A0A0A0A0A'X'0A0A0E0C0E0E0E0C0E0E060C0C0C0C0C'X'0A0A0C0E0E0E0E0E0E0C0A0E0E0E0E0E'X'0A0A0A0A0A0A0A0A0A0A0A0E0E0E0E0A'X.
:PMLGEBCTBLEBCDICCP= 275
ASCIICP= 850
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A06086D0A4902E3C282B21'X'267B8889BAA18C8B8DE124802A293B5E'X'2D2FB68EB7B5408F5DA5872C255F3E3F'X'9B5BD2D3D4D6D7D8DEC63AE5C7273D22'X'9D616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A791F792CF'X'E67E737475767778797AADA8D1EDE8A9'X'BD9CBEFA9FF5F4ACABF3AA7CEEF9EFF2'X'E4414243444546474849F0939495A27B'X'824A4B4C4D4E4F505152D5968197A398'X'5C20535455565758595AFDE299E3E023'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0A0A0A0A0A0A0A0C0C0A0A0A0A0A'X'0C0A0A0A0A060606060C0A0E0A0A0A0A'X'0A0A0E0E0E0E0E0E0E0E0A0A0A0A0A0A'X'0A0C0C0C0C080808080A0A0E0E060A0A'X'0E0A0C0A0C0A080C0C060E0E0C0C0C0A'X'0A060C060E0C0A0C0C0A0A0A0E0A0E0A'X'0C0A0A080C0C0E0C0C0A0A0A0E0E0E0A'X'0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A'X'0A0E0E0E0E0C0C0E0E080A0A0A0A0A0A'X'0A0A0E0C0E0E0E0C0E0E060C0C0C0C0C'X'0A0A0C0E0E0E0E0E0E0C0A0E0E0E0E0E'X'0A0A0A0A0A0A0A0A0A0A0A0E0E0E0E0A'X.

/* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- */:PMLGEBCTBLEBCDICCP= 276
ASCIICP= 850
DATA =
Appendix B. Source Code Examples

345

Source Code for 4019 ASCII Printer/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'202083845BA0C68687A4852E3C282B21'X'267B88897DA18C8B8DE1EF242A293B5E'X'2D2FB68EB7B5C78F80A5972C255F3E3F'X'9B90D2D3D4D6D7D8DE603A2340273D22'X'9D616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A7915C92CF'X'E6F9737475767778797AADA8D1EDE8A9'X'BD9CBEFA9FF5F4ACABF3AA7CEE7E5DF2'X'82414243444546474849F0939495A2E4'X'8A4A4B4C4D4E4F505152D5968197A398'X'F720535455565758595AFDE299E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0A0A0A0A0A0A0A0C0A0A0A0A0A0A'X'0C0A0A0A0A060606060C0A0A0A0A0A0A'X'0A0A0E0E0E0E0E0E0E0E0C0A0A0A0A0A'X'0A0C0C0C0C080808080A0A0A0A060A0A'X'0E0A0C0A0C0A080C0C060E0E0C0C0C0A'X'0A060C060E0C0A0C0C0A0A0A0E0A0E0A'X'0C0A0A080C0C0E0C0C0A0A0A0E0E0E0A'X'0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A'X'0A0E0E0E0E0C0C0E0E080A0A0A0A0A0A'X'0A0A0E0C0E0E0E0C0E0E060C0C0C0C0C'X'0A0A0C0E0E0E0E0E0E0C0A0E0E0E0E0E'X'0A0A0A0A0A0A0A0A0A0A0A0E0E0E0E0A'X.
:PMLGEBCTBLEBCDICCP= 277
ASCIICP= 850
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A0C67B87A4232E3C282B21'X'26828889BAA18C8B8DE1CF8F2A293B5E'X'2D2FB68EB7B5C72480A59B2C255F3E3F'X'D090D2D3D4D6D7D8DE603A929D273D22'X'40616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A77BF75B5D'X'E681737475767778797AADA8D1EDE8A9'X'BD9CBEFA9FF5F4ACABF3AA7CEEF9EFF2'X'91414243444546474849F0939495A2E4'X'864A4B4C4D4E4F505152D5967E97A398'X'5C20535455565758595AFDE299E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0A0A0A0A0A0A0A0C0A0A0A0A0A0A'X'0C0A0A0A0A060606060C0A0E0A0A0A0A'X'0A0A0E0E0E0E0E0E0E0E0A0A0A0A0A0A'X'0A0C0C0C0C080808080A0A0E0E060A0A'X'0E0A0C0A0C0A080C0C060E0E0C0C0C0A'X'0A060C060E0C0A0C0C0A0A0A0E0A0E0A'X'0C0C0A080C0C0E0C0C0A0A0A0E0E0E0A'X'0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A'X'0E0E0E0E0E0C0C0E0E080A0A0A0A0A0A'X'0A0A0E0C0E0E0E0C0E0E060C0C0C0C0C'X'0A0A0C0E0E0E0E0E0E0C0A0E0E0E0E0E'X'0A0A0A0A0A0A0A0A0A0A0A0E0E0E0E0A'X.
:PMLGEBCTBLEBCDICCP= 278
ASCIICP= 850
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */346

OS/400 Workstation Customization Programming V4R3/* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- */

Source Code for 4019 ASCII Printer'2020837B85A0C67D87A4F52E3C282B21'X'26608889BAA18C8B8DE1CF8F2A293B5E'X'2D2FB623B7B5C72480A5942C255F3E3F'X'9B5CD2D3D4D6D7D8DE823A8E99273D22'X'9D616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A791F7925D'X'E681737475767778797AADA8D1EDE8A9'X'BD9CBEFA9F5BF4ACABF3AA7CEEF9EFF2'X'84414243444546474849F093D095A2E4'X'864A4B4C4D4E4F505152D5967E97A398'X'9020535455565758595AFDE240E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0A0A0A0A0A0A0A0C0A0A0A0A0A0A'X'0C0A0A0A0A060606060C0A0E0A0A0A0A'X'0A0A0E0E0E0E0E0E0E0E0A0A0A0A0A0A'X'0A0C0C0C0C080808080A0A0E0E060A0A'X'0E0A0C0A0C0A080C0C060E0E0C0C0C0A'X'0A060C060E0C0A0C0C0A0A0A0E0A0E0A'X'0C0C0A080C0C0E0C0C0A0A0A0E0E0E0A'X'0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A'X'0A0E0E0E0E0C0C0E0E080A0A0A0A0A0A'X'0A0A0E0C0E0E0E0C0E0E060C0C0C0C0C'X'0C0A0C0E0E0E0E0E0E0C0A0E0E0E0E0E'X'0A0A0A0A0A0A0A0A0A0A0A0E0E0E0E0A'X.
:PMLGEBCTBLEBCDICCP= 279
ASCIICP= 850
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838440A0C6865CA4F82E3C282B21'X'267B88897DA18C8B8DE1F5242A293B5E'X'2D2FB68EB7B5C78F80A5972C255F3E3F'X'9B90D2D3D4D6D7D8DEE63A9C85273D22'X'9D616263646566676869AEAFD0ECE7F1'X'5B6A6B6C6D6E6F707172A6A791F792CF'X'60F9737475767778797AADA8D1EDE8A9'X'BD23BEFA9F5DF4ACABF3AA7CEE7EEFF2'X'82414243444546474849F0939495A2E4'X'8A4A4B4C4D4E4F505152D59681D0A398'X'8720535455565758595AFDE299E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0A0A0A0A0A0A0A0C0A0A0A0A0A0A'X'0C0A0A0A0A060606060C0A0A0A0A0A0A'X'0A0A0E0E0E0E0E0E0E0E0C0A0A0A0A0A'X'0A0C0C0C0C080808080C0A0A0A060A0A'X'0E0A0C0A0C0A080C0C060E0E0C0C0C0A'X'0A060C060E0C0A0C0C0A0A0A0E0A0E0A'X'0C0A0A080C0C0E0C0C0A0A0A0E0E0E0A'X'0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A'X'0A0E0E0E0E0C0C0E0E080A0A0A0A0A0A'X'0A0A0E0C0E0E0E0C0E0E060C0C0C0C0C'X'0A0A0C0E0E0E0E0E0E0C0A0E0E0E0E0E'X'0A0A0A0A0A0A0A0A0A0A0A0E0E0E0E0A'X.
:PMLGEBCTBLEBCDICCP= 280
ASCIICP= 850
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'202083847BA0C6865CA4F82E3C282B21'X/* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- */
Appendix B. Source Code Examples

347

Source Code for 4019 ASCII Printer'265D88897DA18C8B7EE182242A293B5E'X'2D2FB68EB7B5C78F80A5952C255F3E3F'X'9B90D2D3D4D6D7D8DE973A9CF5273D22'X'9D616263646566676869AEAFD0ECE7F1'X'5B6A6B6C6D6E6F707172A6A791F792CF'X'E68D737475767778797AADA8D1EDE8A9'X'BD23BEFA9F40F4ACABF3AA7CEEF9EFF2'X'85414243444546474849F09394D0A2E4'X'8A4A4B4C4D4E4F505152D5968160A398'X'8720535455565758595AFDE299E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0A0A0A0A0A0A0A0C0A0A0A0A0A0A'X'0C0A0A0A0A060606060C0A0A0A0A0A0A'X'0A0A0E0E0E0E0E0E0E0E0A0A0A0A0A0A'X'0A0C0C0C0C080808080C0A0A0A060A0A'X'0E0A0C0A0C0A080C0C060E0E0C0C0C0A'X'0A060C060E0C0A0C0C0A0A0A0E0A0E0A'X'0C060A080C0C0E0C0C0A0A0A0E0E0E0A'X'0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A'X'0A0E0E0E0E0C0C0E0E080A0A0A0A0A0A'X'0A0A0E0C0E0E0E0C0E0E060C0C0C0C0C'X'0A0A0C0E0E0E0E0E0E0C0A0E0E0E0E0E'X'0A0A0A0A0A0A0A0A0A0A0A0E0E0E0E0A'X.
:PMLGEBCTBLEBCDICCP= 281
ASCIICP= 850
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A0C68687A49C2E3C282B7C'X'26828889BAA18C8B8DE121BE2A293BAA'X'2D2FB68EB7B5C78F80A5DD2C255F3E3F'X'9B90D2D3D4D6D7D8DE603A2340273D22'X'9D616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A791F792CF'X'E6EE737475767778797AADA8D1EDE8A9'X'BD5B5CFA9FF5F4ACABF35E5D7EF9EFF2'X'7B414243444546474849F0939495A2E4'X'7D4A4B4C4D4E4F505152D5968197A398'X'2420535455565758595AFDE299E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0A0A0A0A0A0A0A0C0A0A0A0A0A0A'X'0C0A0A0A0A060606060C0A0A0A0A0A0A'X'0A0A0E0E0E0E0E0E0E0E0A0A0A0A0A0A'X'0A0C0C0C0C080808080A0A0A0A060A0A'X'0E0A0C0A0C0A080C0C060E0E0C0C0C0A'X'0A060C060E0C0A0C0C0A0A0A0E0A0E0A'X'0C0A0A080C0C0E0C0C0A0A0A0E0E0E0A'X'0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A'X'0A0E0E0E0E0C0C0E0E080A0A0A0A0A0A'X'0A0A0E0C0E0E0E0C0E0E060C0C0C0C0C'X'0A0A0C0E0E0E0E0E0E0C0A0E0E0E0E0E'X'0A0A0A0A0A0A0A0A0A0A0A0E0E0E0E0A'X.
:PMLGEBCTBLEBCDICCP= 282
ASCIICP= 850
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A07B867EA45B2E3C282B21'X'26828889BAA18C8B8DE15D242A293B5E'X

348

OS/400 Workstation Customization Programming V4R3/* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- */

Source Code for 4019 ASCII Printer'2D2FB68EB7B5238F5CA5E42C255F3E3F'X'9B90D2D3D4D6D7D8DE603AC7E5273D22'X'9D616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A791F792CF'X'E687737475767778797AADA8D1EDE8A9'X'BD9CBEFA9FF5F4ACABF3AA7CEEF9EFF2'X'C6414243444546474849F0939495A2D0'X'EF4A4B4C4D4E4F505152D5968197A398'X'8020535455565758595AFDE299E3E040'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0A0A0A0A0A0A0A0C0A0A0A0A0A0A'X'0C0A0A0A0A060606060C0A0A0A0A0A0A'X'0A0A0E0E0E0E0E0E0E0E0A0A0A0A0A0A'X'0A0C0C0C0C080808080A0A0E0E060A0A'X'0E0A0C0A0C0A080C0C060E0E0C0C0C0A'X'0A060C060E0C0A0C0C0A0A0A0E0A0E0A'X'0C0A0A080C0C0E0C0C0A0A0A0E0E0E0A'X'0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A'X'0A0E0E0E0E0C0C0E0E080A0A0A0A0A0A'X'0A0A0E0C0E0E0E0C0E0E060C0C0C0C0C'X'0E0A0C0E0E0E0E0E0E0C0A0E0E0E0E0E'X'0A0A0A0A0A0A0A0A0A0A0A0E0E0E0E0A'X.
:PMLGEBCTBLEBCDICCP= 283
ASCIICP= 850
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A0C68687D05B2E3C282B7C'X'26828889BAA18C8B8DE15D502A293BAA'X'2D2FB68EB7B5C78F8023A42C255F3E3F'X'9B90D2D3D4D6D7D8DE603AA540273D22'X'9D616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A791F792CF'X'E6F9737475767778797AADA8D1EDE8A9'X'BD9CBEFA9FF5F4ACABF35E21EE7EEFF2'X'7B414243444546474849F0939495A2E4'X'7D4A4B4C4D4E4F505152D5968197A398'X'5C20535455565758595AFDE299E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0A0A0A0A0A0A0A0C0A0A0A0A0A0A'X'0C0A0A0A0A060606060C0A0E0A0A0A0A'X'0A0A0E0E0E0E0E0E0E0E0C0A0A0A0A0A'X'0A0C0C0C0C080808080A0A0E0A060A0A'X'0E0A0C0A0C0A080C0C060E0E0C0C0C0A'X'0A060C060E0C0A0C0C0A0A0A0E0A0E0A'X'0C0A0A080C0C0E0C0C0A0A0A0E0E0E0A'X'0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A'X'0A0E0E0E0E0C0C0E0E080A0A0A0A0A0A'X'0A0A0E0C0E0E0E0C0E0E060C0C0C0C0C'X'0A0A0C0E0E0E0E0E0E0C0A0E0E0E0E0E'X'0A0A0A0A0A0A0A0A0A0A0A0E0E0E0E0A'X.
:PMLGEBCTBLEBCDICCP= 284
ASCIICP= 850
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A0C68687D05B2E3C282B7C'X'26828889BAA18C8B8DE15D242A293BAA'X'2D2FB68EB7B5C78F8023A42C255F3E3F'X/* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- */
Appendix B. Source Code Examples

349

Source Code for 4019 ASCII Printer'9B90D2D3D4D6D7D8DE603AA540273D22'X'9D616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A791F792CF'X'E6F9737475767778797AADA8D1EDE8A9'X'BD9CBEFA9FF5F4ACABF35E21EE7EEFF2'X'7B414243444546474849F0939495A2E4'X'7D4A4B4C4D4E4F505152D5968197A398'X'5C20535455565758595AFDE299E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0A0A0A0A0A0A0A0C0A0A0A0A0A0A'X'0C0A0A0A0A060606060C0A0A0A0A0A0A'X'0A0A0E0E0E0E0E0E0E0E0C0A0A0A0A0A'X'0A0C0C0C0C080808080A0A0E0A060A0A'X'0E0A0C0A0C0A080C0C060E0E0C0C0C0A'X'0A060C060E0C0A0C0C0A0A0A0E0A0E0A'X'0C0A0A080C0C0E0C0C0A0A0A0E0E0E0A'X'0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A'X'0A0E0E0E0E0C0C0E0E080A0A0A0A0A0A'X'0A0A0E0C0E0E0E0C0E0E060C0C0C0C0C'X'0A0A0C0E0E0E0E0E0E0C0A0E0E0E0E0E'X'0A0A0A0A0A0A0A0A0A0A0A0E0E0E0E0A'X.
:PMLGEBCTBLEBCDICCP= 285
ASCIICP= 850
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A0C68687A4242E3C282B7C'X'26828889BAA18C8B8DE1219C2A293BAA'X'2D2FB68EB7B5C78F80A5DD2C255F3E3F'X'9B90D2D3D4D6D7D8DE603A2340273D22'X'9D616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A791F792CF'X'E6EE737475767778797AADA8D1EDE8A9'X'BD5BBEFA9FF5F4ACABF35E5D7EF9EFF2'X'7B414243444546474849F0939495A2E4'X'7D4A4B4C4D4E4F505152D5968197A398'X'5C20535455565758595AFDE299E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0A0A0A0A0A0A0A0C0A0A0A0A0A0A'X'0C0A0A0A0A060606060C0A0A0A0A0A0A'X'0A0A0E0E0E0E0E0E0E0E0A0A0A0A0A0A'X'0A0C0C0C0C080808080A0A0A0A060A0A'X'0E0A0C0A0C0A080C0C060E0E0C0C0C0A'X'0A060C060E0C0A0C0C0A0A0A0E0A0E0A'X'0C0A0A080C0C0E0C0C0A0A0A0E0E0E0A'X'0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A'X'0A0E0E0E0E0C0C0E0E080A0A0A0A0A0A'X'0A0A0E0C0E0E0E0C0E0E060C0C0C0C0C'X'0A0A0C0E0E0E0E0E0E0C0A0E0E0E0E0E'X'0A0A0A0A0A0A0A0A0A0A0A0E0E0E0E0A'X.
:PMLGEBCTBLEBCDICCP= 290
ASCIICP= 911
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'20A1A2A3A4A5A6A7A8A9E12E3C282B7C'X'26AAABACADAEAF00B000215C2A293BE3'X'2D2F0000000000000000002C255F3E3F'X'000000000000000000003A2340273D22'X

350

OS/400 Workstation Customization Programming V4R3/* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- */

Source Code for 4019 ASCII Printer'00B1B2B3B4B5B6B7B8B9BA00BBBCBDBE'X'BFC0C1C2C3C4C5C6C7C8C90000CACBCC'X'007ECDCECFD0D1D2D3D4D500D6D7D8D9'X'00000000000000000000DADBDCDDDEDF'X'7B414243444546474849000000000000'X'004A4B4C4D4E4F505152000000000000'X'2420535455565758595A000000000000'X'30313233343536373839000000000000'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0A0A0A0A0A0A0A0C0A0A0A0A0A0A'X'0C0A0A0A0A060606060C0A0A0A0A0A0A'X'0A0A0E0E0E0E0E0E0E0E0A0A0A0A0A0A'X'0A0C0C0C0C080808080A0A0A0A060A0A'X'0E0A0C0A0C0A080C0C060E0E0C0C0C0A'X'0A060C060E0C0A0C0C0A0A0A0E0A0E0A'X'0C0A0A080C0C0E0C0C0A0A0A0E0E0E0A'X'0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A'X'0A0E0E0E0E0C0C0E0E080A0A0A0A0A0A'X'0A0A0E0C0E0E0E0C0E0E060C0C0C0C0C'X'0A0A0C0E0E0E0E0E0E0C0A0E0E0E0E0E'X'0A0A0A0A0A0A0A0A0A0A0A0E0E0E0E0A'X.
:PMLGEBCTBLEBCDICCP= 293
ASCIICP= 850
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A0C68687A45B2E3C282B21'X'268288898AA18C8B8DE15D242A293B5E'X'2D2FB68EB7B5C78F80A5DD2C255F3E3F'X'9B90D2D3D4D6D7D8DE603A2340273D22'X'9D616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A791F792CF'X'E67E737475767778797AADA8D1EDE8A9'X'BD9CBEFA9FF5F4ACABF3AA7CEEF9EFF2'X'7B414243444546474849F0939495A2E4'X'7D4A4B4C4D4E4F505152D5968197A398'X'5C20535455565758595AFDE299E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0A0A0A0A0A0A0A0C0A0A0A0A0A0A'X'0C0A0A0A0A060606060C0A0A0A0A0A0A'X'0A0A0E0E0E0E0E0E0E0E0A0A0A0A0A0A'X'0A0C0C0C0C080808080A0A0A0A060A0A'X'0E0A0C0A0C0A080C0C060E0E0C0C0C0A'X'0A060C060E0C0A0C0C0A0A0A0E0A0E0A'X'0C0A0A080C0C0E0C0C0A0A0A0E0E0E0A'X'0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A'X'0A0E0E0E0E0C0C0E0E080A0A0A0A0A0A'X'0A0A0E0C0E0E0E0C0E0E060C0C0C0C0C'X'0A0A0C0E0E0E0E0E0E0C0A0E0E0E0E0E'X'0A0A0A0A0A0A0A0A0A0A0A0E0E0E0E0A'X.
:PMLGEBCTBLEBCDICCP= 297
ASCIICP= 850
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838440A0C6865CA4F82E3C282B21'X'267B88897DA18C8B8DE1F5242A293B5E'X'2D2FB68EB7B5C78F80A5972C255F3E3F'X'9B90D2D3D4D6D7D8DEE63A9C85273D22'X'9D616263646566676869AEAFD0ECE7F1'X/* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- */
Appendix B. Source Code Examples

351

Source Code for 4019 ASCII Printer'5B6A6B6C6D6E6F707172A6A791F792CF'X'60F9737475767778797AADA8D1EDE8A9'X'BD23BEFA9F5DF4ACABF3AA7CEE7EEFF2'X'82414243444546474849F0939495A2E4'X'8A4A4B4C4D4E4F505152D59681D0A398'X'8720535455565758595AFDE299E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0A0A0A0A0A0A0A0C0A0A0A0A0A0A'X'0C0A0A0A0A060606060C0A0A0A0A0A0A'X'0A0A0E0E0E0E0E0E0E0E0C0A0A0A0A0A'X'0A0C0C0C0C080808080C0A0A0A060A0A'X'0E0A0C0A0C0A080C0C060E0E0C0C0C0A'X'0A060C060E0C0A0C0C0A0A0A0E0A0E0A'X'0C0A0A080C0C0E0C0C0A0A0A0E0E0E0A'X'0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A'X'0A0E0E0E0E0C0C0E0E080A0A0A0A0A0A'X'0A0A0E0C0E0E0E0C0E0E060C0C0C0C0C'X'0A0A0C0E0E0E0E0E0E0C0A0E0E0E0E0E'X'0A0A0A0A0A0A0A0A0A0A0A0E0E0E0E0A'X.
:PMLGEBCTBLEBCDICCP= 310
ASCIICP= 850
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A0C68687A45B2E3C282B21'X'268288898AA18C8B8DE15D242A293B5E'X'2D2FB68EB7B5C78F80A5DD2C255F3E3F'X'9B90D2D3D4D6D7D8DE603A2340273D22'X'9D616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A791F792CF'X'E67E737475767778797AADA8D1EDE8A9'X'BD9CBEFA9FF5F4ACABF3AA7CEEF9EFF2'X'7B414243444546474849F0939495A2E4'X'7D4A4B4C4D4E4F505152D5968197A398'X'5C20535455565758595AFDE299E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0A0A0A0A0A0A0A0C0A0A0A0A0A0A'X'0C0A0A0A0A060606060C0A0A0A0A0A0A'X'0A0A0E0E0E0E0E0E0E0E0A0A0A0A0A0A'X'0A0C0C0C0C080808080A0A0A0A060A0A'X'0E0A0C0A0C0A080C0C060E0E0C0C0C0A'X'0A060C060E0C0A0C0C0A0A0A0E0A0E0A'X'0C0A0A080C0C0E0C0C0A0A0A0E0E0E0A'X'0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A'X'0A0E0E0E0E0C0C0E0E080A0A0A0A0A0A'X'0A0A0E0C0E0E0E0C0E0E060C0C0C0C0C'X'0A0A0C0E0E0E0E0E0E0C0A0E0E0E0E0E'X'0A0A0A0A0A0A0A0A0A0A0A0E0E0E0E0A'X.
:PMLGEBCTBLEBCDICCP= 330
ASCIICP= 880
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838461A0C79F87865B2E3C282B21'X'2682A98985A18C9692E15D242A293B5E'X'2D2FB68E41B5C6AC808FD82C255F3E3F'X'F390A8D3DED6D79591603A2340273D22'X'F461626364656667686998E5D0ECFDAD'X'F86A6B6C6D6E6F70717288E4E7F7F2CF'X

352

OS/400 Workstation Customization Programming V4R3/* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- */

Source Code for 4019 ASCII Printer'A5F1737475767778797AB8D5D1EDFCB8'X'FA4CBEDDBDF5A7ABA68D9DE3E6F9EFEE'X'D4414243444546474849F09394EAA28B'X'D24A4B4C4D4E4F505152B7FB819CA379'X'A420535455565758595A32E299E8E08A'X'3031323334353637383933EB9A9BE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A'X'0C0A0A0A0C060606060C0A0A0A0A0A0A'X'0A0A0E0E0E0E0E0E0E0E0A0A0A0A0A0A'X'0A0C0C0C0E080808080A0A0A0A060A0A'X'0A0A0C0A0C0A080C0C060A0C0C0C0A0A'X'0A060C060E0C0A0C0C0A060C0A0A0A0A'X'0A0A0A080C0C0E0C0C0A0C0E0E0E0E0C'X'0A0C0A0E0C0A0A0A0C0C0C0E0C0A0A08'X'0C0E0E0E0E0C0C0E0E080A0A0A0A0A0A'X'0E0A0E0C0E0E0E0C0E0E0C0C0C080C0C'X'0E0A0C0E0E0E0E0E0E0C0A0E0E0E0E0E'X'0A0A0A0A0A0A0A0A0A0A0A0E0E0E0E0A'X.
:PMLGEBCTBLEBCDICCP= 340
ASCIICP= 876
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A0C68687A45B2E3C282B21'X'268288898AA18C8B8DE15D242A293B5E'X'2D2FB68EB7B5C78F80A5DD2C255F3E3F'X'9B90D2D3D4D6D7C4DE603A2340273D22'X'A7616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A791F792CF'X'E67E737475767778797AADA8D1EDE8A9'X'BD9C9DFAB8F5F4ACABF3AA7CEEF9EFDB'X'7B4142434445464748492D609495A2E4'X'7D4A4B4C4D4E4F505152FB7E8197A35E'X'5CF6535455565758595AFD5F99E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0A0A0A0A0A0A0A0C0A0A0A0A0A0A'X'0C0A0A0A0A060606060C0A0A0A0A0A0A'X'0A0A0E0E0E0E0E0E0E0E0A0A0A0A0A0A'X'0A0C0C0C0C080808080A0A0A0A060A0A'X'0E0A0C0A0C0A080C0C060E0E0C0C0C0A'X'0A060C060E0C0A0C0C0A0A0A0E0A0E0A'X'0C0A0A080C0C0E0C0C0A0A0A0E0E0E0A'X'0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A'X'0A0E0E0E0E0C0C0E0E080A0A0A0A0A0A'X'0A0A0E0C0E0E0E0C0E0E060C0C0C0C0C'X'0A0A0C0E0E0E0E0E0E0C0A0E0E0E0E0E'X'0A0A0A0A0A0A0A0A0A0A0A0E0E0E0E0A'X.
:PMLGEBCTBLEBCDICCP= 420
ASCIICP= 864
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020F1F0E09FC1C2A2C3C02E3C282B7C'X'26A5C40000C6C7A8A9C821242A293BDC'X'2D2FC9AACAABCBADCCAE7C2C255F3E3F'X'CDAFCECFD0D1D2BCD3AC3A2340273D22'X'BD616263646566676869D4BED5EBD6D7'X'D86A6B6C6D6E6F707172DFC5D9ECEEED'X'DADD737475767778797AF7BAE1F8E2FC'X/* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- */
Appendix B. Source Code Examples

353

Source Code for 4019 ASCII Printer'E3FBF9FA999A00009D9EE4EFE5F2E6F3'X'BB414243444546474849A1E700F400E8'X'BF4A4B4C4D4E4F505152E9F5FDF6EAB0'X'DEF6535455565758595AB1B200B3B4B5'X'3031323334353637383900B6B7B8B900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A'X'0C0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A'X'0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A'X'0A0A0A0A0A0A0A0A0A0A0A0A0A060A0A'X'0A0A0C0A0C0A080C0C060E0E0C0C0C0A'X'0A060C060E0C0A0C0C0A0A0A0A0A0A0A'X'0A0A0A080C0C0E0C0C0A0A0A0A0A0A0A'X'0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A'X'0A0E0E0E0E0C0C0E0E080A0A0A0A0A0A'X'0A0A0E0C0E0E0E0C0E0E0A0A0A0A0A0A'X'0A0A0C0E0E0E0E0E0E0C0A0A0A0A0A0A'X'0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A'X.
:PMLGEBCTBLEBCDICCP= 423
ASCIICP= 851
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'20A4A5A6A7A8A9AAACAD5B2E3C282B21'X'26B5B6B7B8BDBEC6C7CF5D242A293B5E'X'2D2FD0D1D2D3D4D500007C2C255F3E3F'X'00868D8F0090929598603A9CF5273D22'X'8E616263646566676869D6D7D8DDDEE0'X'996A6B6C6D6E6F707172E1E2E3E4E5E6'X'9AF9737475767778797AE7E8E9EAEBEC'X'009B9D9EA09FA2A3FBFDEDEEF2F3F4F6'X'F7414243444546474849F0FA83858488'X'EF4A4B4C4D4E4F505152F1828A898C8B'X'F820535455565758595AAB9493969781'X'30313233343536373839798780000000'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0E0E0E0C0C0C0E0E080A0A0A0A0A0A'X'0C0E0E0E0E0E0E0E0C0E0A0A0A0A0A0A'X'0A0A0E0E0E0E0E0E0E0E0A0A0A0A0A0A'X'0A0E0E0E0C0A0E0E0E0A0A0A0A060A0A'X'0E0A0C0A0C0A080C0C060C0C0A0A0A0A'X'0E060C060E0C0A0C0C0A0A0A0A0C0A0A'X'0E0A0A080C0C0E0C0C0A0A0A0A0A0A0A'X'0A0A0A0A06060A0C0C0C0A0A0A0A0A0C'X'0A0E0E0E0E0C0C0E0E080A0C0A0A0A0A'X'0A0A0E0C0E0E0E0C0E0E0A0A0A0A0606'X'0A0A0C0E0E0E0E0E0E0C0A0A0A0C0C0C'X'0A0A0A0A0A0A0A0A0A0A0C0A0E0E0E0A'X.
:PMLGEBCTBLEBCDICCP= 424
ASCIICP= 862
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'208081828384858687889B2E3C282B7C'X'26898A8B8C8D8E8F909121242A293BAA'X'2D2F92939495969798997C2C255F3E3F'X'009A0000200000005F603A2340273D22'X'00616263646566676869AEAF000000F1'X'F86A6B6C6D6E6F707172000000000000'X'E67E737475767778797A000000000052'X'5E9C9DF900F5F4ACAB005B5D2D000078'X

354

OS/400 Workstation Customization Programming V4R3/* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- */

Source Code for 4019 ASCII Printer'7B4142434445464748492D0000000000'X'7D4A4B4C4D4E4F505152000000000000'X'5CF6535455565758595AFD0000000000'X'30313233343536373839000000000000'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0A0A0A0A0A0A0A0C0A0A0A0A0A0A'X'0C0A0A0A0A060606060C0A0A0A0A0A0A'X'0A0A0E0E0E0E0E0E0E0E0A0A0A0A0A0A'X'0A0C0C0C0A0808080A0A0A0A0A060A0A'X'0E0A0C0A0C0A080C0C060E0E0C0C0C0A'X'0A060C060E0C0A0C0C0A0A0A0E0A0E0A'X'0C0A0A080C0C0E0C0C0A0A0A0E0E0E0E'X'0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A'X'0A0E0E0E0E0C0C0E0E080A0A0A0A0A0A'X'0A0A0E0C0E0E0E0C0E0E060C0C0C0C0C'X'0A0A0C0E0E0E0E0E0E0C0A0E0E0E0E0E'X'0A0A0A0A0A0A0A0A0A0A0A0E0E0E0E0A'X.
:PMLGEBCTBLEBCDICCP= 500
ASCIICP= 850
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A0C68687A45B2E3C282B21'X'268288898AA18C8B8DE15D242A293B5E'X'2D2FB68EB7B5C78F80A5DD2C255F3E3F'X'9B90D2D3D4D6D7D8DE603A2340273D22'X'9D616263646566676869AEAFD0ECE7F1'X'F86A6B6C6D6E6F707172A6A791F792CF'X'E67E737475767778797AADA8D1EDE8A9'X'BD9CBEFA9FF5F4ACABF3AA7CEEF9EFF2'X'7B414243444546474849F0939495A2E4'X'7D4A4B4C4D4E4F505152D5968197A398'X'5C20535455565758595AFDE299E3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0A0A0A0A0A0A0A0C0A0A0A0A0A0A'X'0C0A0A0A0A060606060C0A0A0A0A0A0A'X'0A0A0E0E0E0E0E0E0E0E0A0A0A0A0A0A'X'0A0C0C0C0C080808080A0A0A0A060A0A'X'0E0A0C0A0C0A080C0C060E0E0C0C0C0A'X'0A060C060E0C0A0C0C0A0A0A0E0A0E0A'X'0C0A0A080C0C0E0C0C0A0A0A0E0E0E0A'X'0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A'X'0A0E0E0E0E0C0C0E0E080A0A0A0A0A0A'X'0A0A0E0C0E0E0E0C0E0E060C0C0C0C0C'X'0A0A0C0E0E0E0E0E0E0C0A0E0E0E0E0E'X'0A0A0A0A0A0A0A0A0A0A0A0E0E0E0E0A'X.
:PMLGEBCTBLEBCDICCP= 870
ASCIICP= 852
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'20208384EEA0C79F87865B2E3C282B21'X'2682A98985A18C9692E15D242A293B5E'X'2D2FB68EF1B5C6AC808F7C2C255F3E3F'X'F390A8D3DED6D79591603A2340273D22'X'F461626364656667686998E5D0ECFDAD'X'F86A6B6C6D6E6F70717288E4E7F7F2CF'X'A57E737475767778797AB8D5D1EDFCB8'X'FAA4BEDDBDF5A7ABA68D9DE3E6F9EF9E'X'7B414243444546474849F09394EAA28B'X/* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- */
Appendix B. Source Code Examples

355

Source Code for 4019 ASCII Printer'7D4A4B4C4D4E4F505152B7FB819CA3DB'X'5CF6535455565758595AD4E299E8E08A'X'30313233343536373839D2EB9A9BE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0A0A080A0A0A0A0A0A0A0A0A0A0A'X'0C0A0A0A0C060606060C0A0A0A0A0A0A'X'0A0A0E0E0A0E0E0E0E0E0A0A0A0A0A0A'X'0A0C0C0C0E080808080A0A0A0A060A0A'X'0A0A0C0A0C0A080C0C060A0C0C0C0A0A'X'0A060C060E0C0A0C0C0A060C0A0A0A0A'X'0A0A0A080C0C0E0C0C0A0C0E0E0E0E0C'X'0A0E0A0E0C0A0A0A0C0C0C0E0C0A0A0A'X'0A0E0E0E0E0C0C0E0E080A0A0A0A0A0A'X'0A0A0E0C0E0E0E0C0E0E0C0C0C080C0A'X'0A0A0C0E0E0E0E0E0E0C0C0E0E0E0E0E'X'0A0A0A0A0A0A0A0A0A0A0E0E0E0E0E0A'X.
:PMLGEBCTBLEBCDICCP= 871
ASCIICP= 850
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A0C68687A4E82E3C282B21'X'268288898AA18C8B8DE192242A293B99'X'2D2FB68EB7B5C78F80A5DD2C255F3E3F'X'9B90D2D3D4D6D7D8DED03A23D1273D22'X'9D616263646566676869AEAF60EC7BF1'X'F86A6B6C6D6E6F707172A6A77DF75DCF'X'E694737475767778797AADA840ED5BA9'X'BD9CBEFAB8F5F4ACABF3AA7CEEF95C9E'X'E7414243444546474849F0937E95A2E4'X'914A4B4C4D4E4F505152FB968197A398'X'EFF6535455565758595AFDE25EE3E0E5'X'30313233343536373839FCEA9AEBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0A0A0A0A0A0A0A0C0E0A0A0A0A0A'X'0C0A0A0A0A060606060C0E0A0A0A0A0E'X'0A0A0E0E0E0E0E0E0E0E0A0A0A0A0A0A'X'0A0C0C0C0C080808080C0A0A0E060A0A'X'0E0A0C0A0C0A080C0C060E0E0A0C0A0A'X'0A060C060E0C0A0C0C0A0A0A0A0A0A0A'X'0C0A0A080C0C0E0C0C0A0A0A0A0E0A0A'X'0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A'X'0C0E0E0E0E0C0C0E0E080A0A0A0A0A0A'X'0E0A0E0C0E0E0E0C0E0E060C0C0C0C0C'X'0A0A0C0E0E0E0E0E0E0C0A0E0A0E0E0E'X'0A0A0A0A0A0A0A0A0A0A0A0E0E0E0E0A'X.
:PMLGEBCTBLEBCDICCP= 880
ASCIICP= 855
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'202080828486888A8C8E5B2E3C282B21'X'2690929496989A9EEF815D242A293B5E'X'2D2F838587898B8D8F917C2C255F3E3F'X'9395972D999B9CA0A2603A2340273D22'X'9A616263646566676869A6A8AAACB5B7'X'BD6A6B6C6D6E6F707172C6D0D2D4D6D8'X'DE7E737475767778797AE1E3E5E7E9EB'X'EDF1F3F5F7F9FB9E9DA1A3A5A7A9ABAD'X'7B414243444546474849B6B8BEC7D1D3'X'7D4A4B4C4D4E4F505152D5D7DDE0E2E4'X

356

OS/400 Workstation Customization Programming V4R3/* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- */

Source Code for 4019 ASCII Printer'5CCF535455565758595AE6E8EAECEEF2'X'30313233343536373839F4F6F8FAFC00'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0C0A0A0A0A0606060A0A0A0A0A0A'X'0C0E0E0C0C0C0C0E0E0E0A0A0A0A0A0A'X'0A0A0E0E0E0C08080A0E0A0A0A0A0A0A'X'0E0E0E0A0E0E0E0A0A0A0A0A0A060A0A'X'0C0A0C0A0C0A080C0C060C0A0C0A0A0C'X'0C060C060E0C0A0C0C0A0C0C0E0C0A0A'X'0C0A0A080C0C0E0C0C0A0C0A0A0C0E0C'X'0C0E0A0E0A0E0C0C0E0E0E0E0E0C0E0E'X'0A0E0E0E0E0C0C0E0E080E0E0E0E0E0E'X'0A0A0E0C0E0E0E0C0E0E0E0E0E0E0C0E'X'0A0A0C0E0E0E0E0E0E0C0E0E0E0E0E0E'X'0A0A0A0A0A0A0A0A0A0A0A0E0E0E0E0A'X.
:PMLGEBCTBLEBCDICCP= 892
ASCIICP= 876
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'202000000000000000005B2E3C282B21'X'260000000000000000005D242A293B00'X'2D2F008E0000008F00A5002C25003E3F'X'00000000000000C400003A2340273D22'X'A7616263646566676869000000000000'X'006A6B6C6D6E6F707172000000009200'X'0000737475767778797A000000000000'X'009C9D00000000000000007C000000DB'X'7B414243444546474849006000000000'X'7D4A4B4C4D4E4F505152007E0000005E'X'5C20535455565758595A005F99000000'X'3031323334353637383900009A000000'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0A0A0A0A0A0A0A0C0A0A0A0A0A0A'X'0C0A0A0A0A060606060C0A0A0A0A0A0A'X'0A0A0E0E0E0E0E0E0E0E0A0A0A0A0A0A'X'0A0C0C0C0C080808080A0A0A0A060A0A'X'0E0A0C0A0C0A080C0C060E0E0C0C0C0A'X'0A060C060E0C0A0C0C0A0A0A0E0A0E0A'X'0C0A0A080C0C0E0C0C0A0A0A0E0E0E0A'X'0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A'X'0A0E0E0E0E0C0C0E0E080A0A0A0A0A0A'X'0A0A0E0C0E0E0E0C0E0E060C0C0C0C0C'X'0A0A0C0E0E0E0E0E0E0C0A0E0E0E0E0E'X'0A0A0A0A0A0A0A0A0A0A0A0E0E0E0E0A'X.
:PMLGEBCTBLEBCDICCP= 893
ASCIICP= 877
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'202000840000008600005B2E3C282B21'X'260000000000000000E15D242A293B5E'X'2D2F008E0000008F00A5002C255F3E3F'X'A60000000000A9C400603A2340273D22'X'A761626364656667686900000000B9BA'X'006A6B6C6D6E6F707172000091F792CF'X'007E737475767778797A000000000000'X'009C9D0000F500000000007C00F9EFDB'X'7B414243444546474849000094000000'X'7D4A4B4C4D4E4F50515200008100005E'X'5C20535455565758595A000099000000'X/* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- */
Appendix B. Source Code Examples

357

Source Code for 4019 ASCII Printer'3031323334353637383900009A000000'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0A0A0A0A0A0A0A0C0A0A0A0A0A0A'X'0C0A0A0A0A060606060C0A0A0A0A0A0A'X'0A0A0E0E0E0E0E0E0E0E0A0A0A0A0A0A'X'0A0C0C0C0C080808080A0A0A0A060A0A'X'0E0A0C0A0C0A080C0C060E0E0C0C0C0A'X'0A060C060E0C0A0C0C0A0A0A0E0A0E0A'X'0C0A0A080C0C0E0C0C0A0A0A0E0E0E0A'X'0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A'X'0A0E0E0E0E0C0C0E0E080A0A0A0A0A0A'X'0A0A0E0C0E0E0E0C0E0E060C0C0C0C0C'X'0A0A0C0E0E0E0E0E0E0C0A0E0E0E0E0E'X'0A0A0A0A0A0A0A0A0A0A0A0E0E0E0E0A'X.
:PMLGEBCTBLEBCDICCP= 905
ASCIICP= 853
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'2020838485A000917BA4802E3C282B21'X'268288898AA18C8B8DE1A6982A293B5E'X'2D2FB686B7B500925BA5AD2C255F3E3F'X'0090D2D3D4D6D7D8DED53A99B8273D9A'X'F4616263646566676869E886C7ED007C'X'F86A6B6C6D6E6F707172A99B9FF700CF'X'E694737475767778797AE78FC6EC0040'X'FA9CBE7DBDF55D00AB24A89DACF9EF9E'X'87414243444546474849F0937E95A2E5'X'A74A4B4C4D4E4F50515260965C81A300'X'81F6535455565758595AFDE223E3E0E4'X'30313233343536373839FCEA22EBE900'X.
:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0A0A0A0A0A0A0A0C0E0A0A0A0A0A'X'0C0A0A0A0A060606060C0E080A0A0A0A'X'0A0A0E0E0E0E0E0E0A0E0A0A0A0A0A0A'X'0A0C0C0C0C08080808060A0E0C060A0E'X'0A0A0C0A0C0A080C0C060C0A0A0C0C0A'X'0A060C060E0C0A0C0C0A0C0C060A0E0A'X'0C0A0A080C0C0E0C0C0A0E0E0C0E0E0A'X'0A0A0A0A0C0A0A0A0A0A0E0E0C0E0A0A'X'0A0E0E0E0E0C0C0E0E080A0A0A0A0A0C'X'0C0A0E0C0E0E0E0C0E0E0A0C0A0C0C0C'X'0C0A0C0E0E0E0E0E0E0C0A0E0A0E0E0E'X'0A0A0A0A0A0A0A0A0A0A0A0E0A0E0E0A'X.
:PMLGEBCTBLEBCDICCP= 259
ASCIICP= 850
DATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'20200000000000001A2F5B003C28B800'X'00EE3C3E0000000000005DFA0029F95E'X'2D000000BA003C3E0000EF0C0B5F3E00'X'00000000001C00000060F6F1F82722A9'X'0000E100000000000000DAC3C0B30000'X'00000000E60000000000C2C5C1000000'X'007E0000009E00000000BFB4D9C40000'X'000000000000000000000000079CCFBE'X'7B000000001B0000F418F00400007C00'X'7D00F50000001900000000FE00EE0000'X'5C20001A00000000000000AA101E0000'X'00FBFDFC0000000000009D0000000000'X.

358

OS/400 Workstation Customization Programming V4R3/* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- *//* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- */

Source Code for 4019 ASCII Printer:PFNTWTHDATA =/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'0A0A0A0A0A0A0A0A0A0C0A0A0A0A0A0A'X'0C0A0A0A0A060606060C0A0A0A0A0A0A'X'0A0A0E0E0E0E0E0E0E0E0A0A0A0A0A0A'X'0A0C0C0C0C080808080A0A0A0A060A0A'X'0E0A0C0A0C0A080C0C060E0E0C0C0C0A'X'0A060C060E0C0A0C0C0A0A0A0E0A0E0A'X'0C0A0A080C0C0E0C0C0A0A0A0E0E0E0A'X'0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A'X'0A0E0E0E0E0C0C0E0E080A0A0A0A0A0A'X'0A0A0E0C0E0E0E0C0E0E060C0C0C0C0C'X'0A0A0C0E0E0E0E0E0E0C0A0E0E0E0E0E'X'0A0A0A0A0A0A0A0A0A0A0A0E0E0E0E0A'X.
:EPMLGMAPTBL.
:EWSCST.

/* 4- *//* 5- *//* 6- *//* 7- *//* 8- *//* 9- *//* A- *//* B- *//* C- *//* D- *//* E- *//* F- */

Source Code for HP4 ASCII Printer That Uses the Host Print Transform
Function
The source for this example is created when you use the Retrieve Work Station
Customizing Object Source (RTVWSCST) command specifying the following
parameters:
Device type

DEVTYPE(TRANSFORM)

Manufacturer, model, type

*HP4

:WSCST DEVCLASS=TRANSFORM.
:TRNSFRMTBL.
:PRTDTASTRMDATASTREAM=HPPCL5.
:NOPRTBDROPTION=TOP
ORIENT=PORTRAITDATA = 240.
:NOPRTBDROPTION=LEFT
ORIENT=PORTRAITDATA = 360.
:NOPRTBDROPTION=RIGHTORIENT=PORTRAITDATA = 360.
:NOPRTBDROPTION=BOTTOMORIENT=PORTRAITDATA = 240.
:NOPRTBDROPTION=TOP
ORIENT=LANDSCAPEDATA = 360.
:NOPRTBDROPTION=LEFT
ORIENT=LANDSCAPEDATA = 240.
:NOPRTBDROPTION=RIGHTORIENT=LANDSCAPEDATA = 240.
:NOPRTBDROPTION=BOTTOM
Appendix B. Source Code Examples

359

Source Code for HP4 ASCII PrinterORIENT=LANDSCAPEDATA = 360.
:INITPRTDATA ='1B45'X.
:RESETPRTDATA ='1B45'X.
:BELL
DATA ='07'X.
:SPACEDATA ='20'X.
:CARRTNDATA ='0D'X.
:FORMFEEDDATA ='0C'X.
:LINEFEEDDATA ='0A'X.
:VERRMOVDIRECTION=UP
VAROFFSET=
4
VARLEN=
4
VARTYPE=CHRDEC
CNVNUM=
1
CNVDEN= 720
DATA ='1B26612D0000000056'X.
:VERRMOVDIRECTION=DOWN
VAROFFSET=
4
VARLEN=
4
VARTYPE=CHRDEC
CNVNUM=
1
CNVDEN= 720
DATA ='1B26612B0000000056'X.
:HORRMOVDIRECTION=FWD
VAROFFSET=
4
VARLEN=
4
VARTYPE=CHRDEC
CNVNUM=
1
CNVDEN= 720
DATA ='1B26612B0000000048'X.
:HORRMOVDIRECTION=BCKVAROFFSET=
4
VARLEN=
4
VARTYPE=CHRDEC
CNVNUM=
1
CNVDEN= 720
DATA ='1B26612D0000000048'X.
:STRBOLDDATA ='1B28733342'X.
:ENDBOLDDATA ='1B28733042'X.
:STRSUBSDATA ='1B26612B2E3352'X.
:ENDSUBSDATA ='1B26612D2E3352'X.
:STRSUPSDATA ='1B26612D2E3352'X.
:ENDSUPSDATA ='1B26612B2E3352'X.
:STRUSDATA ='1B26643044'X.
:ENDUSDATA ='1B266440'X.
:VARLSPCVAROFFSET=
3
VARLEN=
3360

OS/400 Workstation Customization Programming V4R3

Source Code for HP4 ASCII Printer
VARTYPE=CHRDEC
CNVNUM=
1
CNVDEN= 48
DATA ='1B266C00000043'X.
:CPICOR
CPI=10ASCIIFNT= 255
FNTWTH= 84
FNTATR=
1
DATA ='X.
:CPICOR
CPI=12ASCIIFNT= 255
FNTWTH= 84
FNTATR=
1
DATA ='X.
:CPICOR
CPI=15ASCIIFNT= 255
FNTWTH= 84
FNTATR=
1
DATA ='X.
:PRTORIENTORIENT=PORTRAITDATA ='1B266C304F'X.
:PRTORIENTORIENT=LANDSCAPEDATA ='1B266C334F'X.
:PRTORIENTORIENT=RTT180
DATA ='1B266C324F'X.
:PRTORIENTORIENT=RTT270
DATA ='1B266C314F'X.
:SMPXPRTDATA ='1B266C3053'X.
:DUPXPRTDATA ='1B266C3153'X.
:TUMDUPXPRTDATA ='1B266C3253'X.
:DWRSLTDRAWER=PAPERDATA ='1B266C3248'X.
:DWRSLTDRAWER=ENVELOPEDATA ='1B266C3368314F'X.
:DWRSLTDRAWER=DRAWER1DATA ='1B266C3148'X.
:DWRSLTDRAWER=DRAWER2DATA ='1B266C3448'X.
:PAGLENL
VAROFFSET=
3
VARLEN=3
VARTYPE=CHRDECDATA ='1B266C00000050'X.
:PAGSIZXFM.
:PAGSIZEPAGWTH= 8352
PAGLEN=11952
DATA ='1B266C303141'X.
:PAGSIZEPAGWTH=10368
PAGLEN=14544
DATA ='1B266C303141'X.
:PAGSIZEAppendix B. Source Code Examples

361

Source Code for HP4 ASCII PrinterPAGWTH=10440
PAGLEN=15120
DATA ='1B266C303141'X.
:PAGSIZEPAGWTH=12240
PAGLEN=15840
DATA ='1B266C303241'X.
:PAGSIZEPAGWTH=11952
PAGLEN=16848
DATA ='1B266C323641'X.
:PAGSIZEPAGWTH=12240
PAGLEN=20160
DATA ='1B266C303341'X.
:EPAGSIZXFM.
:ENVSIZXFM.
:ENVSIZEENVWTH=10800
ENVLEN= 5580
DATA ='1B266C383041'X.
:ENVSIZEENVWTH=12780
ENVLEN= 5580
DATA ='1B266C383141'X.
:ENVSIZEENVWTH=13680
ENVLEN= 5940
DATA ='1B266C383141'X.
:ENVSIZEENVWTH=12528
ENVLEN= 6192
DATA ='1B266C393041'X.
:ENVSIZEENVWTH=12960
ENVLEN= 9216
DATA ='1B266C393141'X.
:ENVSIZEENVWTH=14112
ENVLEN= 9936
DATA ='1B266C393141'X.
:EENVSIZXFM.
:FNTGRP.
:FNTGRPEMINFID= 154
MAXFID= 200
FNTSTR='1B28733170313276307330623431303154'X
FNTEND='X
FNTWTH=/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'22ADAEA78FBEA777EFABEF7F696869AA'X/* 00- */'62624A48635892514E4EADAD93AD6B6B'X/* 01- */'48526E7878D3BB52525278D352525252'X/* 02- */'787878787878787878785252F0D3F06A'X/* 03- */'D3AD95A3B29590ADB2525BA895D8B2AD'X/* 04- */'8BAD9E8295B2ADE2ADAD9A5252527878'X/* 05- */'786A786A786A52787843437843BB7878'X/* 06- */'7878565B437878AD78786A6A786A78F0'X/* 07- */'A3786A6A6A6A6A6A6A6A6A434343ADAD'X/* 08- */'959ED3787878787878ADB2787878D378'X/* 09- */'6A43787878B278786AD3D3D3D3526060'X/* 0A- */'78AD7878A36AB178526A787878787878'X/* 0B- */'6A6A78786A6A78786A6A78786A6A7878'X/* 0C- */'AD43ADD36A43789EAD43ADB1954378AD'X/* 0D- */'907890909078876A9EAD906AF0905BF0'X/* 0E- */'F0D3F0F0ADADD3F0785252AD78567848'X.
/* 0F- */:EFNTGRP.

362

OS/400 Workstation Customization Programming V4R3

Source Code for HP4 ASCII Printer:INDFNT.
:INDFNTE
FID= 186
POINTSIZE= 0
FNTSTR='1B28733170313276307330623431303154'X
FNTEND='X
FNTWTH=/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'22ADAEA78FBEA777EFABEF7F696869AA'X/* 00- */'62624A48635892514E4EADAD93AD6B6B'X/* 01- */'48526E7878D3BB52525278D352525252'X/* 02- */'787878787878787878785252F0D3F06A'X/* 03- */'D3AD95A3B29590ADB2525BA895D8B2AD'X/* 04- */'8BAD9E8295B2ADE2ADAD9A5252527878'X/* 05- */'786A786A786A52787843437843BB7878'X/* 06- */'7878565B437878AD78786A6A786A78F0'X/* 07- */'A3786A6A6A6A6A6A6A6A6A434343ADAD'X/* 08- */'959ED3787878787878ADB2787878D378'X/* 09- */'6A43787878B278786AD3D3D3D3526060'X/* 0A- */'78AD7878A36AB178526A787878787878'X/* 0B- */'6A6A78786A6A78786A6A78786A6A7878'X/* 0C- */'AD43ADD36A43789EAD43ADB1954378AD'X/* 0D- */'907890909078876A9EAD906AF0905BF0'X/* 0E- */'F0D3F0F0ADADD3F0785252AD78567848'X.
/* 0F- */:INDFNTE
FID= 187
POINTSIZE= 0
FNTSTR='1B28733170313276307333623431303154'X
FNTEND='X
FNTWTH=/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'22ADAEA78FBEA777EFABEF7F696869AA'X/* 00- */'62625162635A92515656ADAD93AD6B6B'X/* 01- */'48526E7878D3C452525278D352525252'X/* 02- */'787878787878787878785252F0D3F078'X/* 03- */'D3AD9EADAD9E90BBBB5B74BB9EE2ADBB'X/* 04- */'90BBAD879EADADF0ADAD9E5252527878'X/* 05- */'7878876A876A56788743528743C48778'X/* 06- */'87876A5B528778AD78786A78787878F0'X/* 07- */'AD876A787878786A6A6A6A434343ADAD'X/* 08- */'9EADFC787878878778BBAD787878EA78'X/* 09- */'7843788787AD787878D3D3D3D3526666'X/* 0A- */'C7EFEF107F7F96967F963C9696967F7F'X/* 0B- */'7FEFEF7FEFEF7F969696EFEF96EFEFEF'X/* 0C- */'EFEFEF967F7F96EFEF7F7FEFEF7878EF'X/* 0D- */'908790909078876A9EAD906AF0905BF0'X/* 0E- */'F0D3F0F0ADADD3F0785252AD78567848'X.
/* 0F- */:INDFNTE
FID= 188
POINTSIZE= 0
FNTSTR='1B28733170313276317330623431303154'X
FNTEND='X
FNTWTH=/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'22ADAEA78FBEA777EFABEF7F696869AA'X/* 00- */'62624A64635892514E4EADAD93AD6B6B'X/* 01- */'48526E7878D3BB52525278D352525252'X/* 02- */'787878787878787878785252F0D3F078'X/* 03- */'D390909EAD908BADAD526A9E87C69EAD'X/* 04- */'90AD907887AD90C69087875252527878'X/* 05- */'7878786A786A43787843436A43AD7878'X/* 06- */'78785B5B43786A9E6A6A5B6A786A78F0'X/* 07- */'9E786A787878786A6A6A6A4343439090'X/* 08- */'909ED378787878786AADAD787878CF78'X/* 09- */'78437878789E787878D3D3D3D3526F6F'X/* 0A- */'C7EFEF107F7F96967F963C9696967F7F'X/* 0B- */'7FEFEF7FEFEF7F969696EFEF96EFEFEF'X/* 0C- */Appendix B. Source Code Examples

363

Source Code for HP4 ASCII Printer'EFEFEF967F7F96EFEF7F7FEFEF7878EF'X/* 0D- */'907890909078876A9EAD906AF0905BF0'X/* 0E- */'F0D3F0F0ADADD3F0785252AD78567848'X.
/* 0F- */:INDFNTE
FID= 189
POINTSIZE= 0
FNTSTR='1B28733170313276317333623431303154'X
FNTEND='X
FNTWTH=/* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */'22ADAEA78FBEA777EFABEF7F696869AA'X/* 00- */'62625184635A92515656ADAD93AD6B6B'X/* 01- */'485B7E7878D3BB52525278D352525252'X/* 02- */'787878787878787878785252F0D3F078'X/* 03- */'D39E9E9EAD9E90ADBB5B789E90D3ADAD'X/* 04- */'90A89E8790AD9ED39E90905252527878'X/* 05- */'7878786A786A56788743437843BB8778'X/* 06- */'78785B5B43876A9E786A5B78787878F0'X/* 07- */'9E876A787878786A6A6A6A4343439E9E'X/* 08- */'9EA8DD78787887876AADAD787878D378'X/* 09- */'7843788787AC787878D3D3D3D35B6A6A'X/* 0A- */'C7EFEF107F7F96967F963C9696967F7F'X/* 0B- */'7FEFEF7FEFEF7F969696EFEF96EFEFEF'X/* 0C- */'EFEFEF967F7F96EFEF7F7FEFEF7878EF'X/* 0D- */'907890909078876A9EAD906AF0905BF0'X/* 0E- */'F0D3F0F0ADADD3F0785252AD78527848'X.
/* 0F- */:EINDFNT.
:ASCCPINFO.
:CODEPAGE
CODEPAGE= 437
DATA ='1B28313055'X.
:CODEPAGE
CODEPAGE= 850
DATA ='1B28313255'X.
:EASCCPINFO.
:HORAMOVVAROFFSET=
3
VARLEN=
4
VARTYPE=CHRDEC
CNVNUM=
1
CNVDEN= 720
DATA ='1B26610000000048'X.
:VERAMOVVAROFFSET=
3
VARLEN=
4
VARTYPE=CHRDEC
CNVNUM=
1
CNVDEN= 720
DATA ='1B26610000000056'X.
:TOPMARGINIVAROFFSET=
8
VARLEN=
4
VARTYPE=CHRDEC
CNVNUM=
1
CNVDEN= 48
DATA ='1B266C31431B266C0000000045'X.
:TEXTLENLVAROFFSET=
3
VARLEN=
4
VARTYPE=CHRDECDATA ='1B266C00000000461B26613052'X.
:PRTNXTCHRDATA ='1B26703158'X.
:RASENDDATA ='1B2A7242'X.
:PRTANGLE
ANGLE=0364

OS/400 Workstation Customization Programming V4R3

Source Code for HP4 ASCII Printer
DATA ='1B26613050'X.
:PRTANGLE
ANGLE=90
DATA ='1B266132373050'X.
:PRTANGLE
ANGLE=180
DATA ='1B266131383050'X.
:PRTANGLE
ANGLE=270
DATA ='1B2661393050'X.
:EWSCST.

Appendix B. Source Code Examples

365

Source Code for HP4 ASCII Printer366

OS/400 Workstation Customization Programming V4R3

Appendix C. Character to Hexadecimal Value Tables
The following tables are provided for your convenience; however, because
workstation customizing is dependent on the type of device you are customizing,
the values in these tables may not correspond to those that your device supports.
Use these tables as a basis to help you find the correct hexadecimal values foryour device. To use these tables, use the numbers running along the top of thetable as the first hexadecimal digit. For example, the DLE key in Table 41 is '10'X.

ASCII Character Code to Hexadecimal Value Chart
Table 41. ASCII Character Code to Hexadecimal Value Conversion Table
First Hex Digit

Second Hex
Digit

0

1

2

3

4

5

6

7

0

NUL

DLE

SP

0

@

P

v

p

1

SOH

DC1

!

1

A

Q

a

q

2

STX

DC2

”

2

B

R

b

r

3

ETX

DC3

#

3

C

S

c

s

4

EOT

DC4

$

4

D

T

d

t

5

ENG

NAK

%

5

E

U

e

u

6

ACK

SYN

&

6

F

V

f

v

7

BEL

ETB

’

7

G

W

g

w

8

BS

CAN

(

8

H

X

h

x

9

HT

EM

)

9

I

Y

i

y

A

LF

SUB

*

:

J

Z

j

z

B

VT

ESC

+

;

K

[

k

{

C

FF

FS

,

<

L

\

l

|

D

CR

GS

–

=

M

]

m

}

E

SO

RS

.

>

N

|

n

˜

F

SI

US

/

?

O

—

o

DEL

EBCDIC Character Code to Hexadecimal Value Chart
The characters and the hexadecimal values for this table vary depending on thecode page and character set you select when you retrieve the workstation
customizing source. For the EBCDIC character code information for all of the
supported code pages, see the International Application Development book.
Table 42. EBCDIC Character Code to Hexadecimal Value Conversion Table
Second
Hex
Digit
0
1

First Hex Digit
0
NUL
SOH

1
DLE
DC1

2
DS
SOS

© Copyright IBM Corp. 1998

3

4
Sp

5
&

6

7

8

9

/

a

j

A

B

minus

0

°

1

C

D

E
\

A

J

F
0
1

367

Table 42. EBCDIC Character Code to Hexadecimal Value Conversion Table (continued)
Second
Hex
Digit

0

1

2

3

2

STX

DC2

FS

SYN

3
4

First Hex Digit

ETX
PF

4

5

6

7
b

TM
RES

8

c
BYP

PN

d

9
k
l
m

A

B

C

D

E

F

s

2

B

K

S

2

t

3

C

L

T

3

u

4

D

M

U

4

E

N

V

5

5

HT

NL

LF

RS

e

n

v

5

6

LC

BS

ETB

UC

f

o

w

6

F

O

W

6

x

7

G

P

X

7

y

8

H

Q

Y

8

I

R

Z

9

7

DEL

8

IL

ESC

g

CAN

h

9

EM

A

SMM CC

SM

B

VT

CU1

CU2

C

FF

IFS

D

CR

IGS

ENQ

E

SO

IRS

ACK

F

SI

IUS

BEL

368

EOT

p
q

i

r

z

9

¢

!

¦

:

CU3

.

$

,

#

{

}

└

┘

DC4

<

*

%

@

≤

î

┌

┐

NAK

(

)

—

'

⁽

⁾

[

]

+

;

>

XXX

⁺

±

≥

≠

|

¬

?

"

+

u

v

–

SUB

OS/400 Workstation Customization Programming V4R3

Appendix D. Setting Up to Customize a Display
The following procedures are provided to assist you in setting up a display for theworkstation customizing procedures. The first procedure helps you get a Sign On
screen to be displayed correctly on an ASCII display before you customize it. The
second procedure helps you set up a 3477 display and verify it is a Model H when
you want to attach an ASCII printer.

Setting Up to Customize an ASCII Display
When the Sign On screen is not displayed correctly, you need to do somecustomizing before planning for the actual customization. This is because you
cannot experiment with the device unless you can at least sign on to the AS/400
system.
The following procedure is provided to help you display a Sign On screen correctly,
so that you can determine the remaining the device characteristics you want tocustomize.
Note: If your ASCII workstation is totally incompatible with the device type you
specified in your device description, this procedure may not help you. If you
still do not have a Sign On screen displayed on your workstation after
following this procedure, try changing the device type and model you
specified in the device description for the workstation and for the Retrieve
Work Station Customizing Object Source (RTVWSCST) command.
1. Use the RTVWSCST command to retrieve the default source for the device type
you selected for your device description. You need the following information forthe command parameters:
Device typeThis should be the same as the device type you specified when you createdthe device description.
Keyboard language typeThis should match either the language type supported for your AS/400
system or the language that you want to use for this display.
Source member name
This name should be unique so that you can recognize and keep track ofyour workstation customizing source.
Source file name / libraryThis is QTXTSRC unless you have created a source file specifically for yourworkstation customizing source members. The library you specify here cancontain both the source file and member and the compiled customizing
object.
Text description
This is any text that you may want to use to help you identify this source
member.
2. Use the Start SEU (STRSEU) command to edit the source file member you justcreated. You will need your device reference manual to map at least thefollowing functions correctly. For more complete information about the tags
described here, see Chapter 8. Customizing ASCII Displays.
CLRSCN (Clear Screen) Tag
Check the device reference manual to find the hexadecimal value that your© Copyright IBM Corp. 1998369

display supports to clear the screen. If the value in your workstation
customizing source is not the same as the value listed in your device
reference manual, change the hexadecimal value in the source accordingly.
(See “Update Screen Tags” on page 104 for more information about thistag.)Note: If your display does not support the Clear Screen command, try
mapping it to one or more other commands supported by yourdisplay that will do the equivalent of clearing the screen. For
example, on a VT-52** display, sequences for two separate VT-52
commands, Set Home and Clear to End of Screen, can be specified
in the DATA keyword for the CLRSCN tag to perform the clear
screen function.
CSRADR (Set Cursor Address) Tag
This affects the positions of the characters shown on the ASCII display. Use
the device reference manual to determine the values for the keywords
associated with this tag. Change the values on the CSRADR tag keywords
to match those given in your device reference manual. If these values do
not apply to your device type, set these keywords to 0. (See “Set Cursor
Address (CSRADR) Tag” on page 106 for more information about this tag.)
DSCNTBL (Update Screen Table) Tag
You do not need to change all of the keyword values for this tag, only the
ADDRMOD (address mode) and CHARATR (character) keywords to begin
testing the device. Find the values your device uses for these keywords inthe device reference manual and specify the correct addressing mode
supported by your display. This is CHAR for numeric addressing, and
BINARY if your display uses graphic characters. The CHARATR keyword isnormally set to FIELD depending on the display type you selected when you
retrieved the workstation customizing source.
3. Change the following keyboard function tags so that you can complete thetesting for planning workstation customizing. (For more information about theseand other keyboard function tags, see “Keyboard Function Tags” on page 120.)
ENTER (Enter)
This value is usually '0D'X (carrier return)
TSTREQ (Test request)
This value is usually '1B74'X (ESC + t )4. Use the Create Work Station Customizing Object (CRTWSCST) command tocompile the workstation customizing object. You need the following information
for the command parameters:
WSCST name/Library
The name you want to call the customizing object. This is the name you will
specify in your device description for the ASCII display. The library may be
the same as the one you specified for the source file or you may create alibrary specifically for the compiled customization objects.
Source member
This is the same source member name you used to retrieve the source instep 1.
Text description
This is a text description you can use to help you further identify thecustomizing object.

370

OS/400 Workstation Customization Programming V4R3

5. Use the Change Device Description (Display) (CHGDEVDSP) command andpress F10 (Additional parameters) to show the Workstation customizing object(WSCST) field. Type the name of the workstation customizing object you
created in the previous step and specify the library where the object is stored.
6. Vary on the device and see if the AS/400 Sign On display is shown. (If thedevice is already varied on, you must vary it off and then vary it on again for thecustomizing object to be used with the device.)Your ASCII display should have at least minimal function and a Sign On screen
displayed. If you cannot get the display to this point, you should try changing thedevice type and model in the device description for the display, and vary the device
off and then on again. To determine the correct device type to select, you need tocompare the characteristics of your unsupported ASCII display with thecharacteristics of the supported IBM displays. To help you with this comparison, see
the ASCII Work Station Reference book. When you find a supported display thathas at least some matching characteristics to your ASCII display, you can then use
the device type the AS/400 system selected to retrieve the workstation customizing
source and try this procedure again to get to an AS/400 Sign On display.

Setting Up a 3477 Twinaxial Display
The following procedure helps you set up the 3477 display. It also provides theextra steps to verify that the display is a Model H and can support an attached
ASCII printer. If you only want to set up the display, then you can leave out thesettings for the printer. These are in step 6 of the procedure. To set up the display(and verify that the 3477 is a Model H), do the following:
1. Turn on the power for the display while pressing and holding the spacebar. The
Offline Setup menu appears.
2. Move the cursor to the Customize workstation option and press the Enter key.
The first Customization display appears.
3. Move the cursor to specify the Display-printer for the terminal mode option andpress the spacebar.
4. Move the cursor to the appropriate address for the display and press thespacebar to select the address.
5. Move the cursor to the appropriate address for the printer and press thespacebar to select the address.
6. Use the cursor and the spacebar to make appropriate selections for thefollowing fields. (You will need to page down to get to all these fields.)
v Character set
v Printer character set (usually one of the multilingual sets)v Printer emulation (if laser printer select 5219; otherwise select 4214)
v Keyboard type (standard)v ASCII Printer type (user-defined)v ASCII Printer ID (select any ID number except 00)
7. Press F3 (Save and exit) to save these settings and return to the Offline Setup
display.
8. Press F3 (Save and exit) to return to communication mode.
If you are working with a 3477 display and the final Customization Setup menu did
not show the ASCII printer type or ASCII printer ID fields, then your 3477 display is
not a Model H and you cannot customize an attached ASCII printer using the
OS/400 workstation customizing functions.
Appendix D. Setting Up to Customize a Display

371

372

OS/400 Workstation Customization Programming V4R3

Appendix E. Workstation Customizing Planning Work Sheets
You may copy the following maps and tables and use them for work sheets to help
you plan for and work through the customizing process for displays and printers.

Matching Command Parameters
Use the following commands to set up and use the OS/400 workstation customizing
functions:v Retrieve Work Station Customizing Object Source (RTVWSCST) commandv Create Work Station Customizing Object (CRTWSCST) commandv Create Device Description (Display) (CRTDEVDSP) commandv Create Device Description (Printer) (CRTDEVPRT) command
Devices that do not use the host print transform function have matching keywords
and parameters for these commands, as shown in Table 43. Printers that use thehost print transform function have matching keywords and parameters for thesecommands, as shown in Table 44 on page 374.
An X in these tables indicates that the parameter should have the same value forthe device description commands as it does in the workstation customizing
commands. For example, if you are going to customize an ASCII display, the device
type (DEVTYPE) parameter for the RTVWSCST command should be the samevalue as the device type (TYPE) parameter you specified in the CRTDEVDSP
command.
Note: You should create the device descriptions for the workstations you want tocustomize before you retrieve a source file member or create thecustomizing object.
Table 43. Matching Command Parameters--Devices That Do Not Use Host Print Transform Function
Parameter (KEYWORD)

CRTDEVDSPCRTDEVPRTRTVWSCST

Device type (TYPE,
DEVTYPE)

X

X

X

Keyboard language type
(KBDTYPE, LNGTYPE)

X

X

X

Workstation customizing object(WSCST)

X

X

Library (LIB)X

X

CRTWSCST

X
X

X

Source file (SRCFILE)

X

X

Source member (SRCMBR)

X

X

Figure 53 provides a graphic representation of the table for devices that do not use
the host print transform function.. Each parameter in the figure is mapped to acorresponding parameter in the device description commands. These corresponding
parameters must match when you set up the customization of a device.

© Copyright IBM Corp. 1998

373

Workstation Customizing
Device Description
Commands
CommandsÍ────────────────────────────────────────────────────────Ê
RTVWSCSTCRTDEVDSPDEVTYPE Í──────────────┬──────────── TYPEKBDTYPE Í─────────┬────┼──────────── KBDTYPE││ ┌───────── WSCSTSRCFILE ───────┐ ││ │ ┌───────
LIB(2)
LIB(1)─────┐ │ ││ │ │SRCMBR ────┐ │ │ ││ │ │CRTDEVPRT│ │ │ │
└──┼─┼─────── TYPECRTWSCST│ │ │ └───────┼─┼─────── LNGTYPEWSCST Í────┼─┼─┼──────────┴─┼─────── WSCST
LIB(2) Í─┼─┼─┼────────────┴───────
LIB(2)SRCFILE Í──┼─┼─┘
LIB(1) Í─┼─┘
SRCMBR Í───┘Figure 53. Matching Command Parameters
Table 44. Matching Command Parameters--Printers That Use Host Print Transform Function
Parameter (KEYWORD)

CRTDEVPRTRTVWSCSTCRTWSCST

Manufacturer, type, andmodel (MFRTYPMDL)

X (except when value is*WSCST)

X

Workstation customizing
object (WSCST)

X

X

Library (of workstation
customizing object)

X

X

Source member (SRCMBR)

X

X

Source file (SRCFILE)

X

X

Library (of source file)

X

X

Work Sheets for Planning to Customize a Display Workstation
Following are work sheets you can copy and use in planning to customize a display
workstation.
Command Parameters for ASCII and Twinaxial Displays
CommandParameter

CRTDEVDSPTYPEKBDTYPE
WSCST
LIB

374

OS/400 Workstation Customization Programming V4R3

Value

Command Parameters for ASCII and Twinaxial Displays
CommandParameter

RTVWSCSTDEVTYPEValue

KBDTYPESRCMBRSRCFILELIBTEXTCRTWSCSTWSCST
LIB
SRCMBRSRCFILELIB

Twinaxial Displays
Twinaxial Keyboard Translation Table Entries (Mode=
Scan
Code

Key or Function
Old

New

Hexadecimal Data
Old

New

Scan
Code

Shift State=
Key or Function
Old

New

)
Hexadecimal Data
Old

New

Appendix E. Workstation Customizing Planning Work Sheets

375

Twinaxial Keyboard Translation Table Entries (Mode=
Scan
Code

Key or Function
Old

New

Hexadecimal Data
Old

New

Scan
Code

Shift State=
Key or Function
Old

New

)
Hexadecimal Data
Old

ASCII Displays
ASCII to Keyboard Function Mapping Table
Tag

Key Sequence

ATN
BASE
BOTPAG
BSP
CLEAR
CLOSE
CSRUP
CSRDOWN
CSRLEFTCSRRIGHTCSRSEL
DISC
DLT
DUP

376

OS/400 Workstation Customization Programming V4R3

Hexadecimal DataNewASCII to Keyboard Function Mapping Table
Tag

Key Sequence

Hexadecimal DataENTER
ERSINPERSEOF
ERRRESETFCSRLEFTFCSRIGHT
FLDADVFLDBSPFLDEXITFLDPLUSFLDMINUS
FLDMRK
HELP
HEX
HOME
INSERTLATINONNEWLINENTLONPRINT
PAGDOWN
PAGUP
PA1
PA2
PA3
READSTSRVSSHIFTINSHIFTOUTSCNREFRESHSYSREQTOGINDTOPPAGTSTREQ
Note: You may have more than one entry for each tag.

Appendix E. Workstation Customizing Planning Work Sheets

377

ASCII to Keyboard Function Mapping Table (Text Functions)
Tag

Key Sequence

Hexadecimal Data

PAGENDRQDTABFWDTABWORDUSSTRUS
HLFIDXUP
HLFIDXDNSTOPCODEEND
CARRTNCENTERBOLD
NEXTSTOPRQDSPCDSPSYMSTRLINE
ENDLINEASCII to Keyboard Function Mapping Table (Function Keys)
Tag

Key Sequence

F1
F2
F3
F4
F5
F6
F7
F8
F9
F10
F11
F12
F13
F14
F15
F16
F17
F18

378

OS/400 Workstation Customization Programming V4R3

Hexadecimal Data

ASCII to Keyboard Function Mapping Table (Function Keys)
Tag

Key Sequence

Hexadecimal Data

F19
F20
F21
F22
F23
F24
You may have more than one entry for each function key.

Work Sheets for Customizing ASCII Printers That Use the Host Print
Transform Function
The following tables are for you to copy and use as work sheets for customizing an
ASCII printer that uses host print transform function.
Table 45. Command Parameters for ASCII Printers That Use the Host Print Transform Function
CommandParameter

Value

CRTDEVPRTTRANSFORM*YES

MFRTYPMDLWSCSTLIB
RTVWSCSTDEVTYPE*TRANSFORM

MFRTYPMDLSRCMBRSRCFILELIBTEXTCRTWSCSTWSCST
LIB
SRCMBRSRCFILE
LIB

Work Sheets for ASCII Printer Functions
Table 46. Customizing Printer Controls
Tag

Description

Data

BELL

Bell

DATA=

CARRTN

Carrier returnDATA=

DUPXPRTSet duplex printing

DATA=

Appendix E. Workstation Customizing Planning Work Sheets

379

Table 46. Customizing Printer Controls (continued)
Tag

Description

Data

INITPRT

Initialize printerDATA=JOGOUTTRAY

Jog output trayDATA=

NXTDUPXPRT

Select next side printing in duplex

DATA=

PRTANGLE

Sets print direction on page

ANGLE=DATA=

PRTNXTCHR

Causes next byte of data to betreated as a character rather than aprinter control

DATA=

RASENDEnd raster graphicsDATA=

RESETPRT

Reset printerDATA=

SMPXPRT

Set simplex printing

DATA=

TUMDUPXPRT

Set tumble duplex printing

DATA=

Table 47. Customizing Printer Data Streams
Tag

Description

Data

PRTDTASTRM

Printer data stream

DATASTREAM=

Tag

Description

Data

ENVSIZXFM

Set envelope size for transform

None.

ENVSIZE

Envelope size entry

ENVWTH=
ENVLEN=DATA=ENVSIZE

Envelope size entry

ENVWTH=
ENVLEN=DATA=EENVSIZXFM

End set envelope size for transform

None.

PAGSIZXFM

Set page size for transform

None.

PAGSIZE

Page size entry

PAGWTH=
PAGLEN=DATA=PAGSIZE

Page size entry

PAGWTH=
PAGLEN=DATA=PAGSIZE

Page size entry

PAGWTH=
PAGLEN=DATA=EPAGSIZXFM

End set page size for transform

None.

Tag

Description

Data

STRBOLD

Start bold printing

DATA=

ENDBOLDEnd bold printing

DATA=

STRUS

Start underscore

DATA=

ENDUS

End underscore

DATA=

Table 48. Customizing Print Media Size

Table 49. Customizing Highlighting

380

OS/400 Workstation Customization Programming V4R3

Table 50. Customizing Horizontal Spacing and Movement
Tag

Description

Data

BSP

Backspace

DATA=

CPI

Set characters per inch

CPI=
DATA=

CPI

Set characters per inch

CPI=
DATA=

CPI

Set characters per inch

CPI=
DATA=

CPICORSet characters per inch in COR mode CPI =ASCIIFNT=
FNTWTH=FNTATR=DATA=CPICORSet characters per inch in COR mode CPI =ASCIIFNT=
FNTWTH=FNTATR=DATA=CPICORSet characters per inch in COR mode CPI =ASCIIFNT=
FNTWTH=FNTATR=DATA=

HORAMOV

Print position in current line

VAROFFSET=VARLEN=VARTYPE=CNVNUM=
CNVDEN=DATA=

HORRMOV

Horizontal relative movement

DIRECTION=
VAROFFSET=VARLEN=VARTYPE=CNVNUM=
CNVDEN=DATA=

HORRMOV

Horizontal relative movement

DIRECTION=
VAROFFSET=VARLEN=VARTYPE=CNVNUM=
CNVDEN=DATA=STRPROP

Start proportional spacing

DATA=

ENDPROP

End proportional spacing

DATA=

SPACE

Space

DATA=

Table 51. Customizing Vertical Spacing and Movement
Tag

Description

Data

FORMFEEDForm feedDATA=

HLFLINEFEED

Half line feed

DATA=

Appendix E. Workstation Customizing Planning Work Sheets

381

Table 51. Customizing Vertical Spacing and Movement (continued)
Tag

Description

Data

LINEFEEDLine feed

DATA=

VERAMOV

Print position in current column

VAROFFSET=VARLEN=VARTYPE=CNVNUM=
CNVDEN=DATA=VERRMOV

Vertical relative movement

DIRECTION=
VAROFFSET =VARLEN=VARTYPE=CNVNUM=
CNVDEN=DATA=RVSHLFLINEFEED

Reverse half line feedDATA=

RVSLINEFEED

Reverse line feed

DATA=

LPI

Set lines per inch

LPI=
DATA=

LPI

Set lines per inch

LPI=
DATA=

LPI

Set lines per inch

LPI=
DATA=

LPI

Set lines per inch

LPI=
DATA=

VARLSPC

Variable line spacing

VAROFFSET=VARLEN=VARTYPE=CNVNUM=
CNVDEN=DATA=

Tag

Description

Data

STRSUBS

Start subscript

DATA=

ENDSUBSEnd subscript

DATA=

STRSUPS

Start superscript

DATA=

ENDSUPSEnd superscript

DATA=

Tag

Description

Data

FOREGRND

Foreground color

COLOR=DATA=

FOREGRND

Foreground color

COLOR=DATA=

FOREGRND

Foreground color

COLOR=DATA=

FOREGRND

Foreground color

COLOR=DATA=

Table 52. Customizing Indexing

Table 53. Customizing Color382

OS/400 Workstation Customization Programming V4R3

Table 53. Customizing Color (continued)
Tag

Description

Data

FOREGRND

Foreground color

COLOR=DATA=

Table 54. Customizing the No Print Border
Tag

Description

Data

NOPRTBDR

Set no print border

OPTION=ORIENT=DATA=NOPRTBDR

Set no print border

OPTION=ORIENT=DATA=NOPRTBDR

Set no print border

OPTION=ORIENT=DATA=NOPRTBDR

Set no print border

OPTION=ORIENT=
DATA=

Tag

Description

Data

PAGLENISet page length in inches

VAROFFSET=VARLEN=VARTYPE=CNVNUM=
CNVDEN=DATA=

PAGLENL

Set page length in lines

VAROFFSET=VARLEN=VARTYPE=DATA=

Table 55. Customizing Page Length

Table 56. Customizing Paper Drawer Selection
Tag

Description

Data

DWRSLT

Paper drawer selection

DRAWER=DATA=DWRSLT

Paper drawer selection

DRAWER=DATA=DWRSLT

Paper drawer selection

DRAWER=DATA=DWRSLT

Paper drawer selection

DRAWER=DATA=TEXTLENL

Text length in lines

VAROFFSET=VARLEN=VARTYPE=DATA=TOPMARGINI

Top margin in inches

VAROFFSET=VARLEN=VARTYPE=CNVNUM=
CNVDEN=DATA=

Appendix E. Workstation Customizing Planning Work Sheets

383

Table 57. Customizing Paper Orientation
Tag

Description

Data

PRTORIENT

Paper orientation

ORIENT=DATA=PRTORIENT

Paper orientation

ORIENT=DATA=PRTORIENT

Paper orientation

ORIENT=DATA=PRTORIENT

Paper orientation

ORIENT=
DATA=

Tag

Description

Data

PRTQLTY

Print quality

QLTYTYPE=DATA=PRTQLTY

Print quality

QLTYTYPE=DATA=PRTQLTY

Print quality

QLTYTYPE=
DATA=

Tag

Description

Data

FNTGRP

Font group

None.

FNTGRPE

Font group entry

MINFID=MAXFID=FNTSTR=FNTEND=FNTWTH=FNTGRPE

Font group entry

MINFID=MAXFID=FNTSTR=FNTEND=FNTWTH=EFNTGRPEnd font group

None.

INDFNT

Individual font

None.

INDFNTE

Individual font entry

FID=
POINTSIZE=FNTSTR=FNTEND=FNTWTH=INDFNTE

Individual font entry

FID=
POINTSIZE=FNTSTR=FNTEND=FNTWTH=

EINDFNTEnd Individual font

None.

Table 58. Customizing Print Quality

Table 59. Customizing Fonts

Table 60. Customizing Code Page Support
Tag

Description

Data

ASCCPINFOASCII code page information

None.

384

OS/400 Workstation Customization Programming V4R3

Table 60. Customizing Code Page Support (continued)
Tag

Description

Data

CODEPAGE

Set code page

CODEPAGE=DATA=ASCIICTL

ASCII control code mapping

ASCII=DATA=ASCIICTL

ASCII control code mapping

ASCII=DATA=ASCIICTL

ASCII control code mapping

ASCII=DATA=

CODEPAGE

Set code page

CODEPAGE=DATA=ASCIICTL

ASCII control code mapping

ASCII=DATA=ASCIICTL

ASCII control code mapping

ASCII=DATA=ASCIICTL

ASCII control code mapping

ASCII= DATA=EASCCPINFOEnd ASCII code page information

None.

DFTASCCP

Default ASCII code page

ASCIICP=EBCASCTBL

EBCDIC-to-ASCII mapping table

None.

EBCASCTBLE

EBCDIC-to-ASCII mapping table entry EBCDICCP=ASCIICP=DATA=EBCASCTBLE

EBCDIC-to-ASCII mapping table entry EBCDICCP=ASCIICP=DATA=EBCASCTBLE

EBCDIC-to-ASCII mapping table entry EBCDICCP=ASCIICP=DATA=EEBCASCTBL

End EBCDIC-to-ASCII mapping table

None.

Work Sheet for Customizing ASCII Printers That Use the Emulator on
the Display
The following tables are for you to copy and use as work sheets for customizing an
ASCII printer that uses the emulator on the display.
Command Parameters for ASCII Printers
CommandParameter

CRTDEVPRT

TYPE

Value

LNGTYPEWSCST
LIBAppendix E. Workstation Customizing Planning Work Sheets

385

Command Parameters for ASCII Printers
CommandParameter

RTVWSCSTDEVTYPEValue

KBDTYPESRCMBRSRCFILELIBTEXTCRTWSCSTWSCST
LIB
SRCMBRSRCFILE
LIB

Work Sheets ASCII Printers Attached to 3477 Model H, 3486, 3487, and
3488 Displays
Table 61. Printer Function Tags for Printers Attached to 3477 Model H Displays
Tag

Description

Data

FWDRMOV

Forward relative movement

VAROFFSET =VARLEN=VARTYPE=
VARMAX=ADJUST=CNVNUM=
CNVDEN=DATA=BCKRMOV

Backward relative movement

VAROFFSET =VARLEN=VARTYPE=
VARMAX=ADJUST=CNVNUM=
CNVDEN=DATA=

PAGLENISet page length in inches

VAROFFSET=VARLEN=VARTYPE=
VARMAX=ADJUST=CNVNUM=
CNVDEN=
DATA=

386

OS/400 Workstation Customization Programming V4R3

Table 61. Printer Function Tags for Printers Attached to 3477 Model H Displays (continued)
Tag

Description

Data

VARLSPC

Variable line spacing

VAROFFSET=VARLEN=VARTYPE=
VARMAX=ADJUST=CNVNUM=
CNVDEN=DATA=

BSP

Backspace

DATA=

BELL

Bell

DATA=

STRBOLD

Start bold printing

DATA=

ENDBOLDEnd bold printing

DATA=

CARRTN

Carriage return

DATA=

CPI

Set characters per inch

CPI=
DATA=

CPI

Set characters per inch

CPI=
DATA=

CPI

Set characters per inch

CPI=
DATA=

CODEPAGE

Set code page

CODEPAGE=DATA=

DBLCHRH

Set double character heightDATA=

STRWIDE

Start double-wide continuous

DATA=

ENDWIDEEnd double-wide continuousDATA=

DWRSLT

Drawer selection

DRAWER=DATA=FNTGPDT

Global fonts for printer definition table

EFNTGPDT

End global fonts for PDT

FNTGRNG

Global font range

MINFID=MAXFID=DATA=FOREGRND

Foreground color

COLOR=DATA=

FORMFEEDForm feedDATA=

INITPRT

Initialize printerDATA=

LINEFEEDLine feed

DATA=

LPI

Set lines per inch

LPI=
DATA=

LPI

Set lines per inch

LPI=
DATA=

PAGLENL

Set page length in lines

VAROFFSET=VARLEN=VARTYPE=
VARMAX=ADJUST=
DATA=

Appendix E. Workstation Customizing Planning Work Sheets

387

Table 61. Printer Function Tags for Printers Attached to 3477 Model H Displays (continued)
Tag

Description

Data

PRTFEED

Paper feed

FEEDTYPE=DATA=PRTORIENT

Paper orientation

ORIENT=DATA=

PRTQLTY

Print quality

QLTYTYPE=DATA=STRPROP

Start proportional space mode

DATA=

ENDPROP

End proportional spacing

DATA=

SETQLTY

Quality font download

QLTYTYPE=
DATA=

SPACE

Space

DATA=

STDCHRH

Set standard character height

DATA=

STRSUBS

Start subscript

DATA=

ENDSUBSEnd subscript

DATA=

STRSUPS

Start superscript

DATA=

ENDSUPSEnd superscript

DATA=

TBLNAME

Table nameDATA=

TRNEBCDIC

Translation table

TRNEBCDICE

Translation entry

ETRNEBCDIC

End translation printer definition table

STRUS

Start underscore

DATA=

ENDUS

End underscore

DATA=

VERUNTSet vertical units

DATA=

EBCDIC code=
DATA=

Note: Printer definition table (PDT) for a 3477 Model H, 3486, 3487, or 3488 Display DEVCLASS = TWINAXPRT

Additional Work Sheets ASCII Printers Attached to 3486, 3487, and
3488 Displays
Table 62. Additional Printer Function Tags for Printers Attached to 3486, 3487, and 3488 Displays
Tag

Description

Data

ADJHRZORG

Adjust horizontal origin

ADJUST=ADJVERORG

Adjust vertical origin

ADJUST=

CPI

Set characters per inch

CPI=
DATA=

CPI

Set characters per inch

CPI=
DATA=

CPI

Set characters per inch

CPI=
DATA=

388

OS/400 Workstation Customization Programming V4R3

Table 62. Additional Printer Function Tags for Printers Attached to 3486, 3487, and 3488 Displays (continued)
Tag

Description

Data

CPICORSet characters per inch in COR mode CPI =ASCIIFNT=
FNTWTH=FNTATR=DATA=DUPXPRTSet duplex printing

DATA=

HLFLINEFEED

Half line feedDATA=

JOGOUTTRAY

Jog output tray

NXTDUPXPRT

Select next side printing in duplex

DATA=

PRTORIENT

Paper orientation

ORIENT=DATA=RVSHLFLINEFEED

Reverse half line feedDATA=

RVSLINEFEED

Reverse line feedDATA=

SMPXPRT

Set simplex printing

DATA=

TUMDUPXPRT

Set tumble duplex printing

DATA=

VERUNTHLF

Set vertical units in half

DATA=

Note: Printer definition table (PDT) for 3486, 3487, or 3488 Displays with DEVCLASS = TWINAXPRTWork Sheets for ASCII Printers That Use the Emulator on theWorkstation Controller
The following tables are for you to copy and use as work sheets to customize ASCII
printers that use the emulator on the workstation controller.
Command Parameters for ASCII Printers
CommandParameter

CRTDEVPRT

TYPE

Value

LNGTYPE
WSCST
LIB
RTVWSCSTDEVTYPEKBDTYPESRCMBRSRCFILELIB
TEXTAppendix E. Workstation Customizing Planning Work Sheets

389

Command Parameters for ASCII Printers
CommandParameter

CRTWSCST

WSCST

Value

LIB
SRCMBRSRCFILE
LIB
Work Sheet for the Default EBCDIC-to-ASCII Mapping Table
First
Hex
Digit

Second Hex Digit
0

1

2

3

4

5

6

7

8

9

A

B

C

D

E

F

A

B

C

D

E

F

4
5
6
7
8
9
A
B
C
D
E
F
Work Sheet for the Font Width Table
First
Hex
Digit

Second Hex Digit
0

1

2

3

4

5

6

4
5
6
7
8
9
A
B
C
D
E
F

390

OS/400 Workstation Customization Programming V4R3

7

8

9

Work Sheet for the Font Width Table
First
Hex
Digit

Second Hex Digit
0

1

2

3

4

5

6

7

8

9

A

B

C

D

E

F

Note: There must be one of these tables for each default EBCDIC-to-ASCII mapping table you provide in yoursource.
Work Sheet for Printer Function Tags with Only a Data Parameter
Tag

Description

Hexadecimal Data

BELL

Bell

DATA=

BSP

BackspaceDATA=

CARRTN

Carrier return

DATA=

ENDBOLDEnd bold printing

DATA=

ENDSUBSEnd subscript

DATA=

ENDSUPSEnd superscript

DATA=

ENDUS

End underscoreDATA=

FNTGPFT

Set font global for PFTDATA=FORMFEEDForm feedDATA=

INITPRT

Initialize printerDATA=

INITVON

Initialization at vary on

DATA=

LINEFEEDLine feed

DATA=

PRTCTL

Printer control flags
Valid values are:'00'X No flags set'01'X Printer response allowed'02'X Page length change in middle of page not allowed'30'X Inhibit computer output reduction (COR) mode
'80'X Font widths in 1/1440-inch unitsDATA=

RVSIDX

Reverse index

DATA=

SPACE

Space

DATA=

STRBOLD

Start bold printing

DATA=

STRPROP

Start proportional space mode

DATA=

STRSUBS

Start subscript

DATA=

STRSUPS

Start superscript

DATA=

STRUS

Start underscore

DATA=

Note: Printer function table (PFT) DEVCLASS = ASCIIPRTWork Sheet for Printer Function Tags with a Variable
Tag
CODPAGVAR

Description
Set code page

Data
VAROFFSET=VARLEN=VARTYPE=DATA=

Appendix E. Workstation Customizing Planning Work Sheets

391

Work Sheet for Printer Function Tags with a Variable
Tag

Description

Data

FNTTYPE

Font type

VAROFFSET=VARLEN=VARTYPE=DATA=

PRISPCMSet primary spacing mode

VAROFFSET=VARLEN=VARTYPE=DATA=

PRISTYLE

Set primary style

VAROFFSET=VARLEN=VARTYPE=
DATA=

Note: Printer function table (PFT) DEVCLASS = ASCIIPRTWork Sheet for Printer Function Tags with a Variable and Relative Movement
Tag

Description

Data

BCKRMOV

Backward relative movement

VAROFFSET=VARLEN=VARTYPE=
VARMAX=ADJUST=CNVNUM=
CNVDEN=DATA=FWDRMOV

Forward relative movement

VAROFFSET=VARLEN=VARTYPE=
VARMAX=ADJUST=CNVNUM=
CNVDEN=DATA=

PAGLENISet page length in inches

VAROFFSET=VARLEN=VARTYPE=
VARMAX=ADJUST=CNVNUM=
CNVDEN=DATA=

PRICHRH

Set primary character height

VAROFFSET=VARLEN=VARTYPE=
VARMAX=ADJUST=CNVNUM=
CNVDEN=
DATA=

392

OS/400 Workstation Customization Programming V4R3

Work Sheet for Printer Function Tags with a Variable and Relative Movement
Tag

Description

Data

VARCPI

Variable characters per inch

VAROFFSET=VARLEN=VARTYPE=
VARMAX=ADJUST=CNVNUM=
CNVDEN=DATA=VARLSPC

Variable line spacing

VAROFFSET=VARLEN=VARTYPE=
VARMAX=ADJUST=CNVNUM=
CNVDEN=DATA=Work Sheet for Other Printer Function Tags
Tag

Description

Data

ASCIICTL

ASCII control code mapping

ASCII=DATA=COLLATE

Collate width

DATA=

CPI

Set characters per inch

CPI=
DATA=

CPI

Set characters per inch

CPI=
DATA=

CPI

Set characters per inch

CPI=
DATA=

CPI

Set characters per inch

CPI=
DATA=

DFTFNTID

Default font ID

CPI=
DEFAULT=DWRSLT

Drawer selection

DRAWER=DATA=

EFNTMAPEnd font ID mapping

FNTMAP

Font ID mapping

CPI=
DEFAULT=FNTMAP

Font ID mapping

CPI=
DEFAULT=FNTMAP

Font ID mapping

CPI=
DEFAULT=FNTMAPE

Font mapping table entry

IBMFNT=ASCIIFNT=FNTMAPE

Font mapping table entry

IBMFNT=ASCIIFNT=FNTMAPE

Font mapping table entry

IBMFNT=ASCIIFNT=FNTMAPE

Font mapping table entry

IBMFNT=ASCIIFNT=

Appendix E. Workstation Customizing Planning Work Sheets

393

Work Sheet for Other Printer Function Tags
Tag

Description

Data

FNTMAPE

Font mapping table entry

IBMFNT=ASCIIFNT=FONTQLTY

Font quality

FONTCPI=QLTYTYPE=DATA=FONTQLTY

Font quality

FONTCPI=QLTYTYPE=DATA=FONTQLTY

Font quality

FONTCPI=QLTYTYPE=DATA=MARGINSet margin

OPTION=ORIENT=DATA=MARGINSet margin

OPTION=ORIENT=DATA=MARGINSet margin

OPTION=ORIENT=DATA=MARGINSet margin

OPTION=ORIENT=DATA=

PAGLENL

Set page length in lines

VAROFFSET=VARLEN=VARTYPE=
VARMAX=ADJUST=DATA=PAGSIZPFT

Set page size for printer functiontable

PAGWTH=
PAGLEN=
PAPER=

PRTFEED

Paper feed

FEEDTYPE=DATA=PRTORIENT

Paper orientation

ORIENT=DATA=

PRTQLTY

Print quality

QLTYTYPE=
DATA=

394

OS/400 Workstation Customization Programming V4R3

||

Notices

|
|
|
|
|
|
|
|
|

This information was developed for products and services offered in the U.S.A. IBM
may not offer the products, services, or features discussed in this document in othercountries. Consult your local IBM representative for information on the products andservices currently available in your area. Any reference to an IBM product, program,or service is not intended to state or imply that only that IBM product, program, orservice may be used. Any functionally equivalent product, program, or service that
does not infringe any IBM intellectual property right may be used instead. However,
it is the user’s responsibility to evaluate and verify the operation of any non-IBM
product, program, or service.

|||

IBM may have patents or pending patent applications covering subject matterdescribed in this document. The furnishing of this document does not give you any
license to these patents. You can send license inquiries, in writing, to:

|
|
|
|
|

IBM Director of Licensing
IBM Corporation
500 Columbus Avenue
Thornwood, NY 10594
U.S.A.

||For license inquiries regarding double-byte (DBCS) information, contact the IBMIntellectual Property Department in your country or send inquiries, in writing, to:

|
|
|
|

IBM World Trade Asia Corporation
Licensing
2-31 Roppongi 3-chome, Minato-ku
Tokyo 106, Japan

|
|
|
|
|
|
|
|
|

The following paragraph does not apply to the United Kingdom or any othercountry where such provisions are inconsistent with local law:
INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS
PUBLICATION “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSOR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIESOF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE. Some states do not allow disclaimer of express or
implied warranties in certain transactions, therefore, this statement may not apply to
you.

|
|
|
|
|

This information could include technical inaccuracies or typographical errors.
Changes are periodically made to the information herein; these changes will beincorporated in new editions of the publication. IBM may make improvements and/orchanges in the product(s) and/or the program(s) described in this publication at any
time without notice.

|
|
|
|

Any references in this information to non-IBM Web sites are provided forconvenience only and do not in any manner serve as an endorsement of thoseWeb sites. The materials at those Web sites are not part of the materials for thisIBM product and use of those Web sites is at your own risk.

|
|
|
|

Licensees of this program who wish to have information about it for the purpose of
enabling: (i) the exchange of information between independently created programs
and other programs (including this one) and (ii) the mutual use of the information
which has been exchanged, should contact:|

IBM Corporation© Copyright IBM Corp. 1998

395

|
|
|
|

Software Interoperability Coordinator
3605 Highway 52 N
Rochester, MN 55901-7829
U.S.A.

||Such information may be available, subject to appropriate terms and conditions,
including in some cases, payment of a fee.

|
|
|
|

The licensed program described in this information and all licensed material
available for it are provided by IBM under terms of the IBM Customer Agreement,
IBM International Program License Agreement, or any equivalent agreement
between us.

|
|
|
|
|
|
|

Any performance data contained herein was determined in a controlledenvironment. Therefore, the results obtained in other operating environments mayvary significantly. Some measurements may have been made on development-levelsystems and there is no guarantee that these measurements will be the same on
generally available systems. Furthermore, some measurement may have been
estimated through extrapolation. Actual results may vary. Users of this document
should verify the applicable data for their specific environment.

|
|
|
|
|
|

Information concerning non-IBM products was obtained from the suppliers of those
products, their published announcements or other publicly available sources. IBM
has not tested those products and cannot confirm the accuracy of performance,compatibility or any other claims related to non-IBM products. Questions on thecapabilities of non-IBM products should be addressed to the suppliers of those
products.

||

All statements regarding IBM’s future direction or intent are subject to change orwithdrawal without notice, and represent goals and objectives only.

||This information is for planning purposes only. The information herein is subject tochange before the products described become available.

|
|
|
|
|

This information contains examples of data and reports used in daily business
operations. To illustrate them as completely as possible, the examples include thenames of individuals, companies, brands, and products. All of these names are
fictitious and any similarity to the names and addresses used by an actual businessenterprise is entirely coincidental.

|

COPYRIGHT LICENSE:

|
|
|
|
|
|
|
|
|
|
|

This information contains sample application programs in source language, which
illustrates programming techniques on various operating platforms. You may copy,
modify, and distribute these sample programs in any form without payment to IBM,for the purposes of developing, using, marketing or distributing application programs
conforming to the application programming interface for the operating platform forwhich the sample programs are written. These examples have not been thoroughly
tested under all conditions. IBM, therefore, cannot guarantee or imply reliability,
serviceability, or function of these programs. You may copy, modify, and distributethese sample programs in any form without payment to IBM for the purposes ofdeveloping, using, marketing, or distributing application programs conforming toIBM’s application programming interfaces.

||

If you are viewing this information softcopy, the photographs and color illustrations
may not appear.

396

OS/400 Workstation Customization Programming V4R3

||Programming Interface Information|||

This publication is intended to help you to use the Workstation Customization
facilities of the IBM OS/400 licensed program. This publication documents
General-Use Programming Interface and Associated Guidance Information.

||

General-Use programming interfaces allow the customer to write programs thatobtain the services of OS/400 licensed program.

||Trademarks||

The following terms are trademarks of International Business Machines Corporationin the United States, or other countries, or both:

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|

AFP
Advanced Function Printing
Advanced 36
Application Development
Application System/400
APPN
AS/400AS/400e series
BookManager
Client Access
IBM
InfoWindow
Personal System/2
PS/2
OfficeVision
OfficeVision for AS/400
Operating System/400
OS/400
SAA
400|

C-bus is a trademark of Corollary, Inc.

||

Microsoft, Windows, Windows NT, and the Windows 95 logo are registeredtrademarks of Microsoft Corporation.

|

Java and HotJava are trademarks of Sun Microsystems, Inc.

||

UNIX is a registered trademark in the United States and other countries licensed
exclusively through X/Open Company Limited.

||

PC Direct is a registered trademark of Ziff Communications Company and is usedby IBM Corporation under license.

||

Other company, product, and service names may be trademarks or service marksof others.

Notices397

398

OS/400 Workstation Customization Programming V4R3

Bibliography
This list of tasks related to workstation
customizing followed by the AS/400 books that
describe them is provided to help you find more
information about setting up your displays andASCII printers.

|
|
|
|
|
|
|
|
|

For more information about general AS/400
system management tasks, see:
Backup and Recovery, SC41-5304, provides
information about planning a backup andrecovery strategy, the different types of media
available to save and restore procedures, anddisk recovery procedures. It also describes
how to install the system again from backup.
Central Site Distribution, SC41-5308, provides
information about how to create and distributemedia containing licensed programs, program
temporary fixes (PTFs), and application
programs to other systems. This manual is forusers who have the Distributed System
License Option (DSLO).
Security - Reference, SC41-5302, provides
information on how system security support
can be used. This includes information on how
to protect your system and data from being
used by other people who do not have theproper authorization, protect the data from
intentional or unintentional damage ordestruction, keep security information
up-to-date, and set up security on your system.

|
|
|
|
|
|
|

System Operation, SC41-4203, provides thesystem operator or system administrator withinformation about controlling jobs, sending andreceiving messages, responding to error
messages, starting and stopping the system,
using control devices, and managing yourAS/400 operations.

|
|
|
|
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|

For more information about AS/400 systemcommunications and configuration in general, see:
APPN Support, SC41-5407, provides
information about AS/400 Advanced
Peer-to-Peer Networking (APPN) support. Thismanual describes the APPN concepts,
functions, and features and contains
information for configuring an APPN network.

|
|
|
|

ISDN Support, SC41-5403, provides
information about configuring and using
integrated services digital network (ISDN). Thismanual gives a conceptual description of|© Copyright IBM Corp. 1998

ISDN, as well as a description of the AS/400
implementation of ISDN and X.31 packet modeand circuit mode.

LAN, Frame-Relay and ATM Support,
SC41-5404, describes the AS/400 support for
IBM Token-Ring, Ethernet, distributed datainterface (DDI), and wireless local area
networks and frame relay wide area networks.
This manual includes information aboutbridged local area networks and the use offrame relay networks for connection to remotelocal area networks.
Communications Management, SC41-5406,
contains information on working with
communications status, error handling andrecovery, performance, specific line speed, andsubsystem storage requirements.
Communications Configuration, SC41-5401,
provides the application programmer withinformation on configuring line, controller, anddevice descriptions to communicate within a
network. Additional configurationconsiderations are discussed.
X.25 Network Support, SC41-5405, contains
information about using an AS/400 system inan X.25 packet-switched network. This manual
includes descriptions of various connection
methods, diagnostic information, andconfiguration examples.
For more information about AS/400 national
language support, code pages, coded character
set identifiers, and character identifiers in general,
see:
Application Display Programming, SC41-5715,
provides information about using DDS tocreate and maintain displays for applications.
This manual also describes creating andworking with display files on the system andcreating online help information.

National Language Support, SC41-5101,
provides planning information. Included isinformation about adding additional licensed
programs, adding secondary languages, andchanging the primary language of the system.
Work Management, SC41-5306, provides the
programmer with information about how toeffectively manage their system work load bychanging work management objects to meettheir needs. This manual provides guidelines

399

|
|

for performance tuning, description of system
values, and information on collecting
performance data.
Character Data Representation Architecture
Reference, SC09-1390
National Language Support (NLS) Enabling of
IBM AS/400 Applications , GG24-3807|

For more information about setting up and using
twinaxial or ASCII workstations with the AS/400
system, see:

|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
|
|

ASCII Work Station Reference, SA41-3130
Remote Work Station Support, SC41-5402,
provides information about setting up andusing remote work station support, such as
display station pass-through, distributed hostcommand facility, SNA pass-through, network
routing facility, SNA primary LU2 support, and3270 remote attachment.
IBM InfoWindow 3477 User’s Guide,
GA18-2923
Port Tester Use, SA41-3136, provides
information about using the IBM workstation

400

OS/400 Workstation Customization Programming V4R3

controller port tester to help isolate cabling andport problems on the AS/400 system.
For more information about setting up and using
ASCII printers with an AS/400 system, see:

Additional Information for IBM InfoWindow
3477, GA18-7084
Printer Device Programming, SC41-5713,
provides information to help you understandand control printing. This includes information
on printing elements and concepts of the
AS/400 system, printer file, and printerconnectivity.
PrintManager API Reference, S544-3699,
provides information the user needs to create
and maintain print descriptions that are usedby the PrintManager interface.
SAA CPI PrintManager Reference, S544-3698,
provides information the user needs to develop
AS/400-based print applications that will use
spooling support for print options and data.

IndexSpecial Characters(DWRNBR) tag, paper drawer number 181*HEX value 12, 13(PRTANGLE), print angle 155(TEXTLENL), set text length in lines 179(TEXTLENL), text length in lines 159

Numerics
122-key data entry keyboard
layout 308
scan codes 45
132-column support for ASCII displays 116
3151 ASCII display example 321
3477 twinaxial display with attached ASCII printerexample 311
4019 ASCII printer example 334
4029 ASCII printer example 328
5250 data entry keyboard
layout 307, 308
scan codes 43

A
ACS (set ASCII character set) command 108
activities index to publications 399
additional ASCII code pages, supporting 187
address mode (ADDRMOD) parameter 100
ADDRMOD (address mode) parameter 100
ADJHRZORG (adjust horizontal origin) tag
printers that use emulator on display 222
adjust horizontal origin (ADJHRZORG) tag
printers that use emulator on display 222
adjust vertical origin (ADJVERORG) tag
printers that use emulator on display 222
ADJVERORG (adjust vertical origin) tag
printers that use emulator on display 222
ALARM (sound alarm) command 107
Analyze Problem (ANZPRB) command 30
analyzingproblem 30
angle (PRTANGLE), print 155
ANZPRB (Analyze Problem) command 30
APAR (authorized program analysis report)
creating 31
ASCCPINFO (ASCII code page information) tag
printers that use host print transform function 188
ASCIIcharacter code to hexadecimal value chart 367
command sequence 17, 79
control codes 79
ASCII code page information(ASCCPINFO) tag, for printers that use host print
transform function 188
ASCII code pages, supporting additional 187
ASCII control code mapping (ASCIICTL) tag
printers that use emulator on workstation controller
254© Copyright IBM Corp. 1998

ASCII control code mapping (ASCIICTL) tag(continued)
printers that use host print transform function 188
ASCII display
character sets 78
code page 78
command sequence 80
commands for screen support, unsupported displays
90
control code 80
customizing
example 125
overview 73
planning 7
restrictions 90
setting up 369
unsupported 74
determining mapping tables to customize 92
inbound processing 84, 93
keyboard operation 80
language structure 93
list of mapping tables 37
list of supported 36
mapping graphic character data 86
mapping local display functions 87
mapping table
ASCII-to-EBCDIC entry format 123
ASCII-to-EBCDIC mapping table 37, 86
ASCII to keyboard function 87, 119
control character 87
control sequence 87
display processing 84
EBCDIC-to-ASCII mapping table 89, 117
entry format 117
keyboard function 85
keyboard function entry format 119
list of 77, 92
overview 84, 89
update screen table 37
mapping twinaxial display function key requests 87
outbound processing 93, 95
planning work sheet 376
port sharing 92
restrictions 90
retrieving source 13
screen refresh function 87
setting state for inbound processing 88
source structure 93
tagkeyboard 119
update screen table 104
terminal disconnect function 87
toggle display indicators 88
update screen table132-column support 116
binary value addressing format 101
decimal numeric character addressing format
100

401

ASCII display (continued)
update screen table (continued)
description 89
entry format 95
insert cursor command 110
set cursor address command 106
set graphic character set command 109
set national language character set 109
start and end printer data bypass 110
tags 104
ASCII printerattached to twinaxial display
customizing 205
customizing example 227
customizing limitations 141
preparation to customize, using the host print
transform function 145
source structure 207
tag language, for printers that use emulator on
display 208
tag language, using the host print transformfunction 147
unsupported 206
command sequence 80
control code 80
customizing
determining which tables to customize 207
determining which transform table to customize
147
planning 7
customizing example
printers that use host print transform function
201
default EBCDIC-to-ASCII mapping table 241
definition table 207
directly attachedcustomizing example 266
customizing overview 237
customizing unsupported 237
source structure 244
supported 237
tag language 244, 262
function table 241
host print transform function
customizing 145
mapping table
default printer EBCDIC-to-ASCII 239
determining which to customize 243
overview 142
overview, printers that use emulator on display
206
overview, printers that use emulator on
workstation controller 239
overview, printers that use host print transformfunction 146
multilanguage EBCDIC-to-ASCII mapping table(PMLGMAPTBL) 241
planning work sheet
host print transform function 379
uses display’s emulator 386
uses workstation controller’s emulator 389

402

OS/400 Workstation Customization Programming V4R3

ASCII printer (continued)
retrieving source 13
supported
attached to twinaxial display 205
directly attached 237
taglanguage description, printers that use emulator
on display 207
language description, printers that use emulator
on workstation controller 246
ASCII printer definition table (PDFNTBL) tag
printers that use emulator on display 208
ASCII printer function table (PFCNTBL) tag
printers that use emulator on workstation controller
247
ASCII-to-EBCDIC mapping table (DASCTBL) tag 123
ASCII to keyboard function mapping table (DKBDTBL)
tag 119
ASCII workstation controller
functional overview 75
local display functions 87
preparing for workstation customizing 6
screen refresh function 87
terminal disconnect function 87
toggle display indicators 88
twinaxial device emulation 77
ASCIICTL (ASCII control code mapping) tag
printers that use emulator on workstation controller
254
printers that use host print transform function 188
ATRCMD (attribute command) tag 111
attribute command (ATRCMD) tag 111
authorized program analysis report (APAR)
creating 31
automatic scrolling (AUTOSCL) parameter 104
AUTOSCL (automatic scrolling) parameter 104

Bbackspace (BSP) tag
printers that use emulator on display 211
printers that use emulator on workstation controller
250
printers that use host print transform function 162
backward relative movement (BCKRMOV) tag
printers that use emulator on display 209
printers that use emulator on workstation controller
253
BCKRMOV (backward relative movement) tag
printers that use emulator on display 209
printers that use emulator on workstation controller
253
BELL (bell) tag
printers that use emulator on display 211
printers that use emulator on workstation controller
250
bell (BELL) tag
printers that use emulator on workstation controller
250
BELL (bell) tag
printers that use host print transform function 153
bibliography 399

books, related 399
communications planning 399
general 399
network planning 399
printer 400
workstation 400
BSP (backspace) tag
printers that use emulator on display 211
printers that use emulator on workstation controller
250
printers that use host print transform function 162
byte format
scan code 42

Ccarrier return (CARRTN) tag
printers that use emulator on display 212
printers that use emulator on workstation controller
250
printers that use host print transform function 153
CARRTN (carrier return) tag
printers that use emulator on display 212
printers that use emulator on workstation controller
250
printers that use host print transform function 153
CCSID (coded character set identifier) 5
Change Device Description (Display) (CHGDEVDSP)
command 27
Change Device Description (Printer) (CHGDEVPRT)
command 27
changing
ASCII character value 37
device description
display 27
printer 27
device type (DEVTYPE) parameter 35
EBCDIC character value 37
hexadecimal values 37
sourcerecovery from errors 21
source entries for incorrect scan codes 61
source to customize workstations 17translation table entries 54
character-based highlighting 98
character code to hexadecimal value chart
ASCII 367
EBCDIC 367
character constantdefinition 20
characters per inch (CPI) tag
printers that use emulator on display 212, 223
printers that use emulator on workstation controller
255
printers that use host print transform function 163
characters per inch in COR mode (CPICOR) tag
printers that use emulator on display 223
printers that use host print transform function 163
CHARATR (highlighting support) parameter 96
chart
ASCII character code to hexadecimal value 367

chart (continued)
EBCDIC character code to hexadecimal value 367
CHGDEVDSP (Change Device Description (Display))command 27
CHGDEVPRT (Change Device Description (Printer))command 27
clear screen (CLRSCN) command 106
CLRSCN (clear screen) command 106
code page
ASCII workstation 78
EBCDIC standards 47
code page (CODEPAGE) tag
printers that use host print transform function 188
code page information
ASCII printer
ASCCPINFO, for printers that use host print
transform function 188
ASCII printers that use host print transform function
DFTASCCP 189
EASCCPINFO 189
overriding EBCDIC 189
code page support, customizing 184
code pages, supporting additional ASCII 187
coded character set identifier (CCSID) 5
CODEPAGE (code page) tag
printers that use host print transform function 188
CODEPAGE (set code page) tag
printers that use emulator on display 212
codes
twinaxial keyboard scan 42
CODPAGVAR (set code page) tag
printers that use emulator on workstation controller
252
COLLATE (collate width) tag
printers that use emulator on workstation controller
255
collate width (COLLATE) tag
printers that use emulator on workstation controller
255
color
customizing 174
command(ALARM) sound alarm 107
ACS (set ASCII character set) 108
ATRCMD (attribute) 111
attribute (ATRCMD) 111
clear screen (CLRSCN) 106
CLRSCN (clear screen) 106
CSRADR (set cursor address) 106
CSROFF (set cursor display off) 110
CSRON (set cursor display on) 110
display setup 108
end printer data bypass (ENDBYP) 110
ENDBYP (end printer data bypass) 110
extended set cursor address (XCSRADR) 114
for unsupported ASCII displays 90
GCS (set graphic character set) 109
INSCSR (insert cursor) 110
insert cursor (INSCSR) 110
NLCS (set national language character set) 109
parameters matching 373
Index

403

command (continued)
set ASCII character set (ACS) 108
set cursor address (CSRADR) 106
set cursor display off (CSROFF) 110
set cursor display ON (CSRON) 110
set graphic character set (GCS) 109
set national language character set (NLCS) 109
sound alarm (ALARM) 107
STRBYP (start printer data bypass) 110
command, CL
Analyze Problem (ANZPRB) 30
ANZPRB (Analyze Problem) 30
Change Device Description (Display) (CHGDEVDSP)
27
Change Device Description (Printer) (CHGDEVPRT)
27
CHGDEVDSP (Change Device Description (Display))
27
CHGDEVPRT (Change Device Description (Printer))
27
Create Authorized Program Analysis Report(CRTAPAR) 31
Create Work Station Customizing Object(CRTWSCST) 5, 23
CRTAPAR (Create Authorized Program Analysis
Report) 31
CRTWSCST (Create Work Station Customizing
Object) 5, 23
Delete Work Station Customizing Object(DLTWSCST) 5
Display File Description (DSPFD) 22
Display Job Log (DSPJOBLOG) 21
Display Library (DSPLIB) 21
DLTWSCST (Delete Work Station Customizing
Object) 5
DSPFD (Display File Description) 22
DSPJOBLOG (Display Job Log) 21
DSPLIB (Display Library) 21
Grant Object Authority (GRTOBJAUT) 25
GRTOBJAUT (Grant Object Authority) 25
Restore Object (RSTOBJ) 30
Retrieve Work Station Customizing Object Source(RTVWSCST) 5
RSTOBJ (Restore Object) 30
RTVWSCST (Retrieve Work Station Customizing
Object Source) 5Start Printer Writer (STRPRTWTR) 28
STRPRTWTR (Start Printer Writer) 28
Vary Configuration (VRYCFG) 27
VRYCFG (Vary Configuration) 27
Work with Configuration Status (WRKCFGSTS) 28
WRKCFGSTS (Work with Configuration Status) 28
command sequence 80
comments in tag language source 20
completing
source changes 22
configuration
varying on 27
working with status 28

404

OS/400 Workstation Customization Programming V4R3

control code
ASCII device
hexadecimal value 80
definition 17
control sequence
definition 17
example 81
controller
ASCII
functional overview 75
local display functions 87
screen refresh function 87
terminal disconnect function 87
toggle display indicators 88
twinaxial device emulation 77
twinaxial
keyboard translation table specifications 51
working with the keyboard translation table 41
workstation
preparing for customizing 6
country requirements
ASCII display 78
twinaxial display 47
CPI (set characters per inch) tag
printers that use emulator on display 212, 223
printers that use emulator on workstation controller
255
printers that use host print transform function 163
CPICOR (set characters per inch in COR mode) tag
printers that use emulator on display 223
printers that use host print transform function 163
Create Authorized Program Analysis Report (CRTAPAR)
command 31
Create Work Station Customizing Object (CRTWSCST)
command 5, 23
creating
APAR (authorized program analysis report) 31
authorized program analysis report (APAR) 31
customizing object 23, 24
errors and recovery 24
workstation customizing object 5, 23
creating the workstation customizing object 200
CRTAPAR (Create Authorized Program Analysis Report)command 31
CRTWSCST (Create Work Station Customizing Object)command 5, 23
CSRADR (set cursor address) tag 106
CSROFF (set cursor display off) command 110
CSRON (set cursor display on) command 110
cursor address (CSRADR) tag 106
cursor address tag, extended (XCSRADR) 114
customization schedule, planning the 148
customizing
ASCII display 73
determining mapping tables 92
outbound processing 95
restrictions 90
setting up 369
ASCII printer, attached to twinaxial display
limitations 141

customizing (continued)
ASCII printer, directly attachedprogramming considerations 237
tag language 262
unsupported 237
ASCII printer attached to twinaxial display
determining which tables 207
programming considerations 205
unsupported 206
ASCII printer preparation
printers that use host print transform function
145
ASCII printers that use host print transform function
determining which tables 147
programming considerations 145
unsupported 146
color 174
determining whether customizable 135
determining which ASCII printer table 243
display 7
determining whether customizable 35
overview 35
work sheet for planning 374
example3477 Model H twinaxial display for diacritic
characters 68
DEC VT-320 display in VT-300 mode 125
directly attached Hewlett-Packard LaserJet Series
III 266
Hewlett-Packard LaserJet 4 201
Hewlett-Packard LaserJet Series IIP attached to3477 twinaxial display 227
limitations 3
object 18, 23
overview 3planning 7
planning work sheets 373
preparing for 5, 7
printer 135
work sheet for planning 385
work sheet for planning, for a printer that uses
host print transform function 379
printer function
choosing a method 138
printers that use host print transform function
EBCDIC-to-ASCII mapping table 185
restrictions
twinaxial display 48
structure 18
tag language 20
twinaxial display
keyboard layouts 307
programming considerations 39
setting up 3477 371
using the tags 62
unsupported ASCII display 74
customizing code page support 184
customizing fax support 189
customizing fonts
printers that use host print transform function 180

customizing horizontal character spacing
printers that use host print transform function 162
customizing object
creating 23
deleting 5, 25
testing 27
verifying object is created 25
customizing object, creating the workstation 200
customizing object, deleting the workstation 200
customizing object, specifying the workstation 200
customizing page length
printers that use host print transform function 157
customizing paper input 174
customizing paper output 176
customizing paper size 156, 164
customizing print media size 155
customizing printer information 149
customizing source, retrieving the workstation 146
customizing vertical line spacing
printers that use host print transform function 171

D
DASCTBL (ASCII-to-EBCDIC mapping table) tag 123
data entry keyboard
122-key layout 308
5250 layout 307
data stream, printerEPSON 150
HPPCL4 150
HPPCL4I 150
HPPCL5I 150
DBCS
considerations
tag language, using the host print transformfunction 191
DBCS tag
RASTERMODE (Raster mode) 150
DEBCTBL (EBCDIC-to-ASCII mapping table) tag 117
decimal numeric character addressing format 100
default ASCII code page (DFTASCCP) tag
printers that use host print transform function 189
default EBCDIC-to-ASCII mapping table
ASCII printer 239
printers that use emulator on workstation controller
PDFTEBCTBL tag 246
PDFTMAPTBL tag 246
default font ID (DFTFNTID) tag
printers that use emulator on workstation controller
256
Delete Work Station Customizing Object (DLTWSCST)
command 5
deleting
customizing object 5, 25
deleting the workstation customizing object 200
delimiter for tag identifier 20
determining
ASCII printer transform table to customize 147
hexadecimal value for tag 21
which ASCII printer tables to customize 207, 243
Index

405

devicesupported
retrieving source 11
unsupported
retrieving source 13
varying on 27
device description
character identifier 4
displaychanging 27
keyboard language type 4
printerchanging 27
DFTASCCP (default ASCII code page) tag
printers that use host print transform function
DFTFNTID (default font ID) tag

189

printers that use emulator on workstation controller
256
diacritic charactersdefinition 56
entry format 56
twinaxial scan codes 56
display
ASCII 89
ASCII-to-EBCDIC mapping table 37, 86
ASCII-to-EBCDIC mapping table format 123
ASCII to keyboard function mapping table 37, 87
binary value addressing format 101
character sets 78
code pages 78
command sequence 79
commands for unsupported displays 90
control character 87
control codes 79
control sequence 87
customizing overview 73
customizing restrictions 90
customizing unsupported 74
decimal numeric character addressing format
100
determining mapping tables to customize 92
EBCDIC-to-ASCII mapping table 37, 89
entry format 119
inbound and outbound processing 84
keyboard function mapping table 119
keyboard mapping table 85
keyboard operation 80
keyboard tags 119
list of mapping tables 37
list of supported 36
mapping graphic character data 86
mapping local display functions 87
mapping table, inbound and outbound processing
84
mapping tables, list of 92
mapping twinaxial function key requests 87
planning work sheet 376
port sharing 92
screen refresh function 87
setting state for inbound data processing 88
setting up to customize 369

406

OS/400 Workstation Customization Programming V4R3

display (continued)
ASCII (continued)
source structure 93
tag language 20
terminal disconnect function 87
toggle display indicators 88
update screen table 37, 89
update screen tags 104
customizing overview 35
determining whether customizable 35
mapping table132-column support 116
ASCII to EBCDIC entry format 95
EBCDIC-to-ASCII entry format 117
set cursor address command 106
set graphic character set command 109
start and end printer data bypass 110
update screen table, insert cursor command 110
update screen table, set national language
character set 109
update screen table entry format 95
mapping tables, overview
ASCII display screen 89
preparing for customizing 7
twinaxial
code page standards 47
customizing a 3477 Model H twinaxial display fordiacritic characters 68
customizing overview 39
customizing restrictions 48
diacritic character entry format 56
keyboard layouts 307
language requirements 47
list of supported 36
planning work sheet 375
restrictions 62
setting up to customize 3477 371
source structure 62
tag language 20
using the tags to customize 62
work sheet for planning customization 374
Display File Description (DSPFD) command 22
Display Job Log (DSPJOBLOG) command 21
Display Library (DSPLIB) command 21
display setup commands 108
displaying
file description 22
job log 21
library 21
DKBDTBL (ASCII to keyboard function mapping table)
tag 119DLTWSCST (Delete Work Station Customizing Object)command 5
double character heightprinters that use emulator on display 213
drawer selection (DWRSLT) tag
printers that use emulator on display 213
printers that use emulator on workstation controller
256
printers that use host print transform function 174
DSCNTBL (update screen table) tag 95

DSPFD (Display File Description) command 22
DSPJOBLOG (Display Job Log) command 21
DSPLIB (Display Library) command 21
duplex printing
printers that use emulator on display 224
printers that use host print transform function 178
DWRNBR (paper drawer number selection) tag
printers that use host print transform function 175
DWRSLT (drawer selection) tag
printers that use emulator on display 213
printers that use emulator on workstation controller
256
printers that use host print transform function 174

E
EASCCPINFO (end ASCII code age information) tag
printers that use host print transform function 189
EBCASCTBL (EBCDIC-to-ASCII mapping table) tag
printers that use host print transform function 186
EBCASCTBLE (EBCDIC-to-ASCII mapping table entry)
tagprinters that use host print transform function 186
EBCDIC character code to hexadecimal value chart
367
EBCDIC code page standards
twinaxial display 47
EBCDIC-to-ASCII mapping table
ASCII printer 239
EBCASCTBL tag, for printers that use host print
transform function 186
printer multilanguage 241
EBCDIC-to-ASCII mapping table (DEBCTBL) tag 117
EBCDIC-to-ASCII mapping table (EPMLGMAPTBL) tag,end multilanguage
printers that use emulator on workstation controller
248
EBCDIC-to-ASCII mapping table (PDFTEBCTBL) tag,default
printers that use emulator on workstation controller
246
EBCDIC-to-ASCII mapping table (PDFTMAPTBL) tag,default
printers that use emulator on workstation controller
246
EBCDIC-to-ASCII mapping table (PMLGEBCTBL) tag
printers that use emulator on workstation controller
248
EBCDIC-to-ASCII mapping table (PMLGMAPTBL) tag,
multilanguage
printers that use emulator on workstation controller
247
EBCDIC-to-ASCII mapping table end (EEBCASCTBL)
tag
printers that use host print transform function 187
EBCDIC-to-ASCII mapping table entry (EBCASCTBLE)
tag
printers that use host print transform function 186
EBCDIC-to-ASCII mapping tables
printers that use host print transform function 185

EEBCASCTBL (end EBCDIC-to-ASCII mapping table)
tagprinters that use host print transform function 187
EENVSIZXFM (end envelope size) tag
printers that use host print transform function 156
EFAXSIZXFM (end fax size) tag
printers that use host print transform function 190
EFNTGPDT (end global fonts for printer definition table)
tagprinters that use emulator on display 214
EFNTGRP (end font group) tag
printers that use host print transform function 182
EFNTMAP (end font ID mapping) tag
printers that use emulator on workstation controller
258
EINDFNT (end individual font) tag
printers that use host print transform function 183
end ASCII code page information (EASCCPINFO) tag
printers that use host print transform function 189
end bold highlighting (ENDBOLD) tag
printers that use emulator on workstation controller
250
end bold printing
printers that use emulator on display 211
printers that use host print transform function 161
end default EBCDIC-to-ASCII mapping table(EPDFTMAPTBL) tag
printers that use emulator on workstation controller
246
end double-wide continuous
printers that use emulator on display 213
end EBCDIC-to-ASCII mapping table (EEBCASCTBL)
tag
printers that use host print transform function 187
end envelope size (EENVSIZXFM) tag
printers that use host print transform function 156
end fax size (EFAXSIZXFM) tag
printers that use host print transform function 190
end font group (EFNTGRP) tag
printers that use host print transform function 182
end font ID mapping (EFNTMAP) tag
printers that use emulator on workstation controller
258
end global fonts for printer definition table (EFNTGPDT)
tag
printers that use emulator on display 214
end individual font (EINDFNT) tag
printers that use host print transform function 183
end multilanguage EBCDIC-to-ASCII mapping table(EPMLGMAPTBL) tag
printers that use emulator on workstation controller
248
end page size (EPAGSIZXFM) tag
printers that use host print transform function 157
end printer data bypass (ENDBYP) command 110
end subscript (ENDSUBS) tag
printers that use emulator on workstation controller
250
end superscript (ENDSUPS) tag
printers that use emulator on workstation controller
250
Index

407

end translation printer definition table (ETRNEBCDIC)
tag
printers that use emulator on display 221
end underscoreprinters that use emulator on display 221
printers that use host print transform function 162
end underscore (ENDUS) tag
printers that use emulator on workstation controller
250
end workstation object (EWSCST) tag 18
ENDBOLD (end bold highlighting) tag
printers that use emulator on workstation controller
250
ENDBYP (end printer data bypass) command 110
ending delimiterfor tag identifier 20
ENDSUBS (end subscript) tag
printers that use emulator on workstation controller
250
ENDSUPS (end superscript) tag
printers that use emulator on workstation controller
250
ENDUS (end underscore) tag
printers that use emulator on workstation controller
250
enhanced keyboard
layout 309
scan codes 44
enhanced keyboard scan codes 43
entry format
translation tableblank keys and unassigned scan codes 57
diacritic characters 56
EBCDIC character translations 54
function keys 58
proof space character 58
envelope size (ENVSIZXFM) tag
printers that use host print transform function 156
envelope size entry (ENVSIZE) tag
printers that use host print transform function 156
ENVSIZE (envelope size entry) tag
printers that use host print transform function 156
ENVSIZXFM (set envelope size) tag
printers that use host print transform function 156
EPAGSIZXFM (end page size for host print transformfunction) tag
EPAGSIZXFM (end page size for host print transformfunction) 157
EPDFTMAPTBL (end default EBCDIC-to-ASCII mappingtable) tag
printers that use emulator on workstation controller
246
EPMLGMAPTBL (end multilanguage EBCDIC-to-ASCII
mapping table) tag
printers that use emulator on workstation controller
248
EPSON 150
errors and recovery
changing the customizing source 21
creating the customizing object 24planning 9408

OS/400 Workstation Customization Programming V4R3

errors and recovery (continued)
retrieving the source 14
varying on device 30
varying on the customized device 28
escape sequence
definition 17
example 81
ETRNEBCDIC (end translation printer definition table)
tagprinters that use emulator on display 221
EWSCST (end workstation object) tag 18
example3151 ASCII display character codes and code
sequences 80
customizing 3477 Model H twinaxial display fordiacritic characters 68
customizing DEC VT-320 display in VT-300 mode
125
customizing directly attached Hewlett-Packard
LaserJet Series III printer 266
customizing Hewlett-Packard LaserJet Series IIP
printer attached to 3477 twinaxial display 227
printers that use host print transform function
customizing Hewlett-Packard LaserJet 4 printer201
workstation customizing source code
3151 ASCII display 321
3477 twinaxial display with attached ASCII printer311
4019 ASCII printer 334
4029 ASCII printer 328
HP4 ASCII printer 359
extended set cursor address (XCSRADR) tag 114
extended set cursor address command 114

F
fax size entry (FAXSIZE) tag
printers that use host print transform function 190
fax size transform (FAXSIZXFM) tag
printers that use host print transform function 190
fax size transform(FAXSIZXFM) tag
printers that use host print transform function 190
fax support, customizing 189
FAXSIZE (fax size entry) tag
printers that use host print transform function 190
FAXSIZXFM (fax size transform) tag
printers that use host print transform function 190
field-based highlighting 96
file description
displaying 22
FKEY (function key) tag 122
FNTGPDT (global fonts for printer definition table) tag
printers that use emulator on display 214
FNTGPFT (set global font for PFT) tag
printers that use emulator on workstation controller
250
FNTGRNG (global font range) tag
printers that use emulator on display 214
FNTGRP (font group) tag
printers that use host print transform function 181
FNTGRPE (font group entry) tag
printers that use host print transform function 181

FNTMAP (font ID mapping) tag
printers that use emulator on workstation controller
257
FNTMAPE (font mapping table entry tag
printers that use emulator on workstation controller
258
FNTTYPE (font type) tag
printers that use emulator on workstation controller
252
font group (FNTGRP) tag
printers that use host print transform function 181
font group entry (FNTGRPE) tag
printers that use host print transform function 181
font groups 182
font ID, default (DFTFNTID) tag
printers that use emulator on workstation controller
256
font ID mapping (FNTMAP) tag
printers that use emulator on workstation controller
257
font mapping table entry (FNTMAPE) tag
printers that use emulator on workstation controller
258
font quality (FONTQLTY) tag
printers that use emulator on workstation controller
258
font selection tags
printers that use emulator on workstation controller
264
font type (FNTTYPE) tag
printers that use emulator on workstation controller
252
font width mapping table (PFNTWTH) tag
printers that use emulator on workstation controller
247
FONTQLTY (font quality) tag
printers that use emulator on workstation controller
258
fonts, customizing
printers that use host print transform function 180
FOREGRND (foreground color) tag
printers that use emulator on display 215
printers that use host print transform function 174
foreground color (FOREGRND) tag
printers that use emulator on display 215
printers that use host print transform function 174
form feed
printers that use emulator on display 215
printers that use host print transform function 168
form feed (FORMFEED) tag
printers that use emulator on workstation controller
250
format 117
mapping table
ASCII-to-EBCDIC entry format 123
EBCDIC-to-ASCII entry format 117
scan code byte 42translation table entry
blank keys and unassigned scan codes 57
diacritic characters 56
EBCDIC character translations 54

format (continued)
translation table entry (continued)
function key 58
proof space character 58
update screen tablebinary value addressing format 101
decimal numeric character addressing 100
entry format 95
insert cursor command 110
set cursor address command 106
set graphic character set command 109
set national language character set 109
start and end printer data bypass 110
FORMFEED (form feed) tag
printers that use emulator on workstation controller
250
forward relative movement (FWDRMOV) tag
printers that use emulator on display 209
printers that use emulator on workstation controller
253function key (FKEY) tag 122
FWDRMOV (forward relative movement) tag
printers that use emulator on display 209
printers that use emulator on workstation controller
253

G
gathering source materials 145
GCS (set graphic character set) command 109
global font range (FNTGRNG) tag
printers that use emulator on display 214
global fonts for printer definition table (FNTGPDT) tag
printers that use emulator on display 214
Grant Object Authority (GRTOBJAUT) command 25
granting
object authority 25
graphic character data mapping for ASCII display 86
graphics end (RASEND) tag, raster 154
groups, font 182
GRTOBJAUT (Grant Object Authority) command 25

Hhalf line feed
printers that use emulator on display 224
printers that use host print transform function 168
hexadecimal value
allowable length for tag identifier 20changing 37
chart
ASCII character to hexadecimal value 367
EBCDIC character to hexadecimal value 367
definition 21
finding 21
highlighting support parameter (CHARATR) 96
highlighting text functions
printers that use host print transform function 161
horizontal character spacing
printers that use host print transform function 162
horizontal origin (ADJHRZORG) tag
printers that use emulator on display 222
Index

409

horizontal relative movement (HORRMOV) tag
printers that use host print transform function 165
horizontal spacing
printers that use host print transform function 162
HORRMOV (horizontal relative movement) tag
printers that use host print transform function 165
host print transform function
backspacing function 162
bell function 153
carrier return function 153
customizing an ASCII printer 145
customizing highlighting 161
duplex printing function 178
EFNTGRP (end font group) tag 182
EINDFNT (end individual font) tag 183
end bold printing function 161
end font group (EFNTGRP) tag 182
end individual font (EINDFNT) tag 183
end page size (EPAGSIZXFM) tag 157
end subscript functions 173
end superscript functions 173
end underscore function 162
EPAGSIZXFM (end page size) tag 157
FNTGRP (font group) tag 181
FNTGRPE (font group entry) tag 181
font group (FNTGRP) tag 181
font group entry (FNTGRPE) tag 181
FOREGRND (foreground color) tag 174
foreground color (FOREGRND) tag 174
form feed function 168
half line feed function 168
highlighting 161
horizontal spacing functions 162
indexing functions 173
INDFNT (individual font) tag 182
INDFNTE (individual font entry) tag 182
individual font (INDFNT) tag 182
individual font entry (INDFNTE) tag 182
initializing printer function 153
jog output tray function 177
line feed function 168
lines per inch (LPI) tag 171
LPI (set lines per inch) tag 171
page length in lines (PAGLENL) tag 158
page size (PAGSIZXFM) tag 157
page size entry (PAGSIZE) tag 157
PAGLENL (page length in lines) tag 158
PAGSIZE (page size entry) tag 157
PAGSIZXFM (page size) tag 157
paper orientation (PRTORIENT) tag 179
print quality (PRTQLTY) tag 180
printer control functions 153
printer data stream (PRTDTASTRM) tag 149
printers that use host print transform function
reset printer (RESETPRT) tag, using host print
transform function 154
RESETPRT (reset printer) tag, using host print
transform function 154
proportional space function 167
PRTDTASTRM (printer data stream) tag 149
PRTORIENT (paper orientation) tag 179

410

OS/400 Workstation Customization Programming V4R3

host print transform function (continued)
PRTQLTY (print quality) tag 180
reverse half line feed function 171
reverse line feed function 171
select next side printing in duplex 178
set lines per inch (LPI) tag 171
set tumble duplex printing 178
setting simplex printing 178
simplex printing, setting 178
space function 167
start bold printing functions 161
start subscript functions 173
start superscript functions 173
start underscore functions 162
vertical movement functions 167
HP4 ASCII printer example 359
HPPCL4 150
HPPCL4I 150
HPPCL5I 150

IIBMPPDS3 150
IBMPPDS3I 150
IBMPPDS4 150
IBMPPDS4I 150
inbound processing
description 84
setting the state 88
indexing functions
printers that use host print transform function 173
INDFNT (individual font) tag
printers that use host print transform function 182
INDFNTE (individual font entry) tag
printers that use host print transform function 182
individual font (INDFNT) tag
printers that use host print transform function 182
individual font entry (INDFNTE) tag
printers that use host print transform function 182
initialize at vary on (INITVON) tag
printers that use emulator on workstation controller
250
initialize printer (INITPRT) tag
printers that use emulator on workstation controller
250
initializing printerprinters that use emulator on display 215
printers that use host print transform function 153
INITPRT (initialize printer) tag
printers that use emulator on workstation controller
250
INITVON (initialize at vary on) tag
printers that use emulator on workstation controller
250
INSCSR (insert cursor) command 110
insert cursor (INSCSR) command 110
integer value
definition 21
invalid scan codes, changing source entries 61

J
job log
displaying

21

jog output tray
printers that use emulator on display 225
printers that use host print transform function
justification, unexpected results 180

177

K
keyboard 48
122-key data entry 308
122-key typewriter 308
5250 data entry 307
5250 typewriter 308
ASCII display
function tag 120
operation 80
enhanced 309
mapping table, ASCII 85
twinaxial 307
determining which translation table to customize
51translation table 41
using the tags to customize 62
keyboard translation state table (TKSTATE) tag 65
keyboard translation table (TKBDTBL) tag 63
keys
function key tag for ASCII display 122
function keys for twinaxial display 58
make/break 42

Llanguagerequirements
twinaxial display 47
supportprimary language 4
secondary language 4
tag for workstation customizing 20
language requirements
ASCII display 78
length of page, setting
printers that use host print transform function 157
library
displaying 21
limitations
ASCII printer attached to twinaxial display 141
customizing 3
line feed (LINEFEED) tag
printers that use emulator on display 215
printers that use emulator on workstation controller
250
printers that use host print transform function 168
LINEFEED (line feed) tag
printers that use emulator on display 215
printers that use emulator on workstation controller
250
printers that use host print transform function 168
lines per inch (LPI) tag
printers that use emulator on display 216
printers that use host print transform function 171
list of device types that can be customized 5

LPI (set lines per inch) tag
printers that use emulator on display 216
printers that use host print transform function

171

M
make/break keys 42
mapping 187
tag
EBCASCTBLE (EBCDIC-to-ASCII entry), using
the host print transform function 186
mapping books to tasks 399
mapping table
ASCII display
ASCII-to-EBCDIC 37, 86
ASCII-to-EBCDIC entry format 123
ASCII to keyboard function 37, 87
binary value addressing format 101
control character 87
control sequence 87
decimal numeric character addressing format
100
determining which to customize 92
EBCDIC-to-ASCII 37, 89
entry format for update screen table 95
insert cursor command 110
keyboard 85
list of 77
mapping graphic character data 86
overview 84
set cursor address command 106
set graphic character set command 109
update screen table 37, 89
ASCII printer 241
ASCII control code (ASCIICTL), for printers thatuse host print transform function 188
ASCIICTL (ASCII control code) tag, for printersthat use host print transform function 188
overview 142
overview, printers that use emulator on display
206
overview, printers that use emulator on
workstation controller 239
overview, printers that use host print transformfunction 146
ASCII printer attached to twinaxial display
printer function tag, printers that use emulator on
display 209
ASCII to keyboard function
entry format 119
customizing
EBCDIC-to-ASCII, for printers that use host print
transform function 185
default printer EBCDIC-to-ASCII 239
determining which ASCII printer table to customize
243display station
set national language character set 109
update screen table, set national language
character set 109
EBCDIC-to-ASCII entry format 117
Index

411

mapping table (continued)
keyboard translation table 41
printer multilanguage EBCDIC-to-ASCII 241
printers that use emulator on workstation controller
ASCII control code (ASCIICTL) 254
ASCIICTL (ASCII control code) tag 254
tag
ASCII-to-EBCDIC (DASCTBL) 123
DASCTBL (ASCII-to-EBCDIC) 123
DEBCTBL (EBCDIC-to-ASCII) 117
default EBCDIC-to-ASCII (PDFTEBCTBL), printersthat use emulator on workstation controller 246
default EBCDIC-to-ASCII (PDFTMAPTBL),
printers that use emulator on workstation
controller 246
EBCASCTBL (EBCDIC-to-ASCII), for printers thatuse host print transform function 186
EBCDIC-to-ASCII (DEBCTBL) 117
EBCDIC-to-ASCII (EBCASCTBL), for printers thatuse host print transform function 186
EBCDIC-to-ASCII (PMLGEBCTBL), printers thatuse emulator on workstation controller 248
EBCDIC-to-ASCII table entry (EBCASCTBLE),
using the host print transform function 186
EFNTMAP (end font ID mapping), printers thatuse emulator on workstation controller 258
end default EBCDIC-to-ASCII (EPDFTMAPTBL),
printers that use emulator on workstation
controller 246
end font ID mapping (EFNTMAP), printers thatuse emulator on workstation controller 258
end multilanguage EBCDIC-to-ASCII(EPMLGMAPTBL), printers that use emulator on
workstation controller 248
EPDFTMAPTBL (end default EBCDIC-to-ASCII),
printers that use emulator on workstation
controller 246
EPMLGMAPTBL (end multilanguage
EBCDIC-to-ASCII), printers that use emulator on
workstation controller 248
FNTMAP (font ID mapping), printers that use
emulator on workstation controller 257
FNTMAPE (font mapping table entry), printers thatuse emulator on workstation controller 258
font ID mapping (FNTMAP), printers that use
emulator on workstation controller 257
font mapping table entry (FNTMAPE), printers thatuse emulator on workstation controller 258
font width (PFNTWTH), printers that use emulator
on workstation controller 247
keyboard translation table (TKBDTBL) 63
multilanguage EBCDIC-to-ASCII (PMLGMAPTBL),
printers that use emulator on workstation
controller 247
PDFTEBCTBL (default EBCDIC-to-ASCII), printersthat use emulator on workstation controller 246
PDFTMAPTBL (default EBCDIC-to-ASCII),
printers that use emulator on workstation
controller 246
PFNTWTH (font width), printers that use emulator
on workstation controller 247

412

OS/400 Workstation Customization Programming V4R3

mapping table (continued)tag (continued)
PMLGEBCTBL (EBCDIC-to-ASCII), printers thatuse emulator on workstation controller 248
PMLGMAPTBL (multilanguage EBCDIC-to-ASCII),
printers that use emulator on workstation
controller 247
TKBDTBL (keyboard translation table) 63
update screen table 104
update screen table132-column support 116
decimal numeric character addressing format
100
entry format 95
set national language character set 109
start and end printer data bypass 110
mapping text symbols 104
margin (MARGIN) tag
printers that use emulator on workstation controller
259
MARGIN (set margin) tag
printers that use emulator on workstation controller
259
matching command parameters 373
multilanguage EBCDIC-to-ASCII mapping table
printers that use emulator on workstation controller
241
multilanguage EBCDIC-to-ASCII mapping table(EPMLGMAPTBL) tag, end
printers that use emulator on workstation controller
248
multilanguage EBCDIC-to-ASCII mapping table(PMLGMAPTBL) tag
printers that use emulator on workstation controller
247

N
next side printing in duplex
printers that use emulator on display 225
printers that use host print transform function 178
NLCS (set national language character set) command109
no-print border (NOPRTBDR) tag
printers that use host print transform function 151
nonhexadecimal value
allowable length for tag identifier 20
NOPRTBDR (no-print border) tag
printers that use host print transform function 151
Notices 395

O
objectcustomizing, creating 23
restoring 30
structure of customizing 18
verifying workstation customizing object is created25
object authority
granting 25

outbound processing
customizing an ASCII display
description 84

95

P
page length
printers that use host print transform function 157
page length in inches (PAGLENI) tag
printers that use emulator on display 209
printers that use emulator on workstation controller
253
printers that use host print transform function 157
page length in lines (PAGLENL) tag
printers that use emulator on display 216
printers that use emulator on workstation controller
259
printers that use host print transform function 158
page printer data stream (PPDS)
definition 7
page size (PAGSIZXFM) tag
printers that use host print transform function 157
page size entry (PAGSIZE) tag
printers that use host print transform function 157
page size for printer function table (PAGSIZPFT) tag
printers that use emulator on workstation controller
260
PAGLENI (page length in inches) tag
printers that use host print transform function 157
PAGLENI (set page length in inches) tag
printers that use emulator on display 209
printers that use emulator on workstation controller
253
PAGLENL (page length in lines) tag
printers that use host print transform function 158
PAGLENL (set page length in lines) tag
printers that use emulator on display 216
printers that use emulator on workstation controller
259
PAGSIZE (page size entry) tag
printers that use host print transform function 157
PAGSIZPFT (set page size for printer function table) tag
printers that use emulator on workstation controller
260
PAGSIZXFM (page size) tag
printers that use host print transform function 157
paper drawer number (DWRNBR) tag 181
paper drawer number selection
printers that use host print transform function 175
paper drawer number selection (DWRNBR) tag
printers that use host print transform function 175
paper drawer selection
printers that use host print transform function 174
paper feed (PRTFEED) tag
printers that use emulator on display 217
printers that use emulator on workstation controller
261
paper handlingprinters that use host print transform function 174,
175

paper input
customizing 174
paper orientation (PRTORIENT) tag
printers that use emulator on display 217, 225
printers that use emulator on workstation controller
261
printers that use host print transform function 179
paper output
customizing 176
paper positioning for printable area
printers that use host print transform function 151
paper size, customizing 156, 164parameters
address mode parameter (ADDRMOD) 100
ADDRMOD (address mode) 100
automatic scrolling (AUTOSCL) 104
AUTOSCL (automatic scrolling) 104
CHARATR (highlighting support) 96
commandmatching 373
DEVCLASS (device class) 18
device class (DEVCLASS) 18
device type (DEVTYPE) 35
DEVTYPE (device type) 35
highlighting support (CHARATR) 96
taggeneral description 20
text symbol (TEXTSYM) 103
TEXTSYM (text symbol) 103
PDFNTBL (ASCII printer definition table) tag
printers that use emulator on display 208
PDFTEBCTBL (default EBCDIC-to-ASCII mappingtable) tag
printers that use emulator on workstation controller
246
PDFTMAPTBL (default EBCDIC-to-ASCII mappingtable) tag
printers that use emulator on workstation controller
246
PFCNTBL (ASCII printer function table) tag
printers that use emulator on workstation controller
247
PFNTWTH (font width mapping table) tag
printers that use emulator on workstation controller
247
planning
customizing
ASCII printers 7
displays 7
customizing a display
work sheet 374
customizing a printerwork sheet 385
work sheet, for a printer that uses host print
transform function 379
errors and recovery 9
verifying planning complete 10
work sheet
customizing ASCII display 376
customizing ASCII printer, directly attached 389
Index

413

planning (continued)
work sheet (continued)
customizing ASCII printer attached to twinaxial
display 386
customizing ASCII printers that use host print
transform function 379
customizing twinaxial display 375
workstation customizing
introduction 3
setting up customizing 7
things you need to have and do 6
workstation customizing work sheets 373
planning the customization schedule 148
PMLGEBCTBL (EBCDIC-to-ASCII mapping table) tag
printers that use emulator on workstation controller
248
PMLGMAPTBL (multilanguage EBCDIC-to-ASCII
mapping table) tag
printers that use emulator on workstation controller
247
port sharing, ASCII 92
PPDS (page printer data stream)
definition 7
preparing for customizing
ASCII printer 7
displays 7, 35
workstation 5
PRICHRH (set primary character height) tag
printers that use emulator on workstation controller
253
print angle (PRTANGLE) 155
print media size, customizing 155
print next character (PRTNXTCHR) 155
print out tray position
printers that use emulator on display 225
print output tray position
printers that use host print transform function 177
print quality (PRTQLTY) tag
printers that use emulator on display 218
printers that use emulator on workstation controller
262
printers that use host print transform function 180
printerASCII
planning to customize 7
preparation to customize, using host print
transform function 145
preparing for customizing 7
supported, attached to twinaxial display 205
tag language 20
unsupported 146
ASCII, attached to twinaxial display
planning work sheet 386
source structure 207
tag language, for printers that use emulator on
display 208
tag language, using the host print transformfunction 147
unsupported 206
ASCII, directly attachedcustomizing unsupported 237

414

OS/400 Workstation Customization Programming V4R3

printer (continued)
ASCII, directly attached (continued)
function table 241
planning work sheet 389
source structure 244
tag language 244, 262
using the tags to customize, printers that use
emulator on workstation controller 246
ASCII, printers that use host print transform function
planning work sheet 379
determining whether customizable 135
examplecustomizing Hewlett-Packard LaserJet 4 201
customizing Hewlett-Packard LaserJet Series III
266
customizing Hewlett-Packard LaserJet Series IIP
attached to 3477 twinaxial display 227
Printer
mapping table
ASCII printer definition, printers that use emulator
on display 206
printer
mapping table
ASCII printer definition, printers that use emulator
on display 207
ASCII printer definition, printers that use emulator
on workstation controller 142, 239
ASCII printer function 241
Printer
mapping table
ASCII transform table, printers that use host print
transform function 146
printer
mapping table
default printer EBCDIC-to-ASCII 239
multilanguage EBCDIC-to-ASCII 241
supported ASCII
list of, printers that use host print transformfunction 139
work sheet for planning to customize
printers that use host print transform function
379
printers that use the emulator on the display 385
printer, resetting (RESETPRT) tag
printers that use host print transform function 154
printer control flags (PRTCTL) tag
printers that use emulator on workstation controller
250
printer controls
printers that use host print transform function 153
printer data stream
EPSON 150
HPPCL4 150
HPPCL4I 150
HPPCL5I 150
printer data stream (PRTDTASTRM) tag
printers that use host print transform function 149
printer definition table
printers that use emulator on display
EFNTGPDT (end global fonts) tag 214
end global fonts (EFNTGPDT) tag 214

printer definition table (continued)
printers that use emulator on display (continued)
end translation printer definition table(ETRNEBCDIC) 221
ETRNEBCDIC (end translation printer definition
table) 221
FNTGPDT (global fonts for printer definition table)
tag 214FNTGRNG (global font range) tag 214
FOREGRND (foreground color) tag 215
foreground color (FOREGRND) tag 215
global font range (FNTGRNG) tag 214
global fonts for printer definition table (FNTGPDT)tag 214lines per inch (LPI) tag 216
LPI (set lines per inch) tag 216
page length in lines (PAGLENL) tag 216
PAGLENL (set page length in lines) tag 216
paper feed (PRTFEED) tag 217
paper orientation (PRTORIENT) tag 217, 225
print quality (PRTQLTY) tag 218
PRTFEED (paper feed) tag 217
PRTORIENT (paper orientation) tag 217, 225
PRTQLTY (print quality) tag 218
quality font download (SETQLTY) tag 219
set lines per inch (LPI) tag 216
set page length in lines (PAGLENL) tag 216
SETQLTY (quality font download) tag 219
table name (TBLNAME) tag 220
TBLNAME (table name) tag 220translation entry (TRNEBCDICE) 221
translation printer definition table (TRNEBCDIC)221
TRNEBCDIC (translation printer definition table)
221
TRNEBCDICE (translation entry) 221
printer definition table (PDFNTBL) tag
printers that use emulator on display 208
printer function table tag
printers that use emulator on workstation controller
ASCII (PFCNTBL) 247
printer function tag
general description 147
general description, printers that use emulator on
display 209
general syntax 209, 250
printers that use emulator on workstation controller
general description 250
printer function tag with variable
printers that use emulator on workstation controller
general description 251
general syntax 251
printer function tag with variable and relative movement
253
printers that use emulator on display
general description 209
general syntax 209
printers that use emulator on workstation controller
general description 253
general syntax 253

printer information
customizing 149
printer setup, completing 145, 146
printer table
determining which to customize 207
printer writer
starting 27
printers that use emulator on display
backspace (BSP) tag 211
bell function 211
BSP (backspace) tag 211
carrier return function 212
double character height 213
double-wide continuous, ending 213
double-wide continuous, starting 213
duplex printing function 224
end bold printing function 211
end subscript functions 220
end superscript functions 220
end underscore function 221
form feed function 215
half line feed function 224
initializing printer function 215
jog output tray function 225
line feed function 215
proportional space mode function 218
proportional spacing mode function 218
reverse half line feed function 226
reverse line feed function 226
select next side printing in duplex 225
set standard character height 219
set tumble duplex printing 226
set vertical units in half tag 227
set vertical units tag 222
setting simplex printing 226
simplex printing, setting 226
space function 219
start subscript functions 219
start superscript functions 220
starting bold printing functions 211
starting underscore functions 221
PRISPCM (set primary spacing mode) tag
printers that use emulator on workstation controller
252
PRISTYLE (set primary style) tag
printers that use emulator on workstation controller
252
problemanalyzing 30
problem determination, text justification 180
processing, inbound and outbound 84
programming considerations
customizing
ASCII printer attached to twinaxial display 205
ASCII printers that use host print transformfunction 145
directly attached ASCII printer 237
twinaxial keyboard 39
customizing an ASCII display 95
proportional space
printers that use host print transform function 167
Index

415

proportional spacing mode
printers that use emulator on display 218
PRTCTL (printer control flags) tag
printers that use emulator on workstation controller
250
PRTDTASTRM (printer data stream) tag
printers that use host print transform function 149
PRTFEED (paper feed) tag
printers that use emulator on display 217
printers that use emulator on workstation controller
261
PRTNXTCHR (print next character) 155
PRTORIENT (paper orientation) tag
printers that use emulator on display 217, 225
printers that use emulator on workstation controller
261
printers that use host print transform function 179
PRTQLTY (print quality) tag
printers that use emulator on display 218
printers that use emulator on workstation controller
262
printers that use host print transform function 180
publications, task index 399

retrieving
sourcedevice type 11
errors and recovery 14
for devices not supported by IBM 13
keyboard language type 11
library name 11
physical file name 11
workstation customizing object source 5, 11, 13
retrieving the workstation customizing source 146
reverse half line feed
printers that use emulator on display 226
printers that use host print transform function 171
reverse index (RVSIDX) tag
printers that use emulator on workstation controller
251
reverse line feed
printers that use emulator on display 226
printers that use host print transform function 171
road map for workstation customizing 4
RSTOBJ (Restore Object) command 30
RTVWSCST (Retrieve Work Station Customizing Object
Source) command 5
RVSIDX (reverse index) tag

Q
QTXTSRC source file name 22
quality font download (SETQLTY) tag
printers that use emulator on display

printers that use emulator on workstation controller
251
219

R
RASEND, raster graphics end 154
raster graphics end (RASEND) tag 154
RASTERMODE (Raster mode) tag
printers that use host print transform function 150
recoveryfrom errors while changing source 21
from failure to create customizing object 24
from planning errors 9from retrieving source errors 14
from vary on errors 28
reset printer (RESETPRT) tag
printers that use host print transform function 154
RESETPRT (reset printer) tag
printers that use host print transform function 154
Restore Object (RSTOBJ) command 30
restoringobject 30
restrictions
customizing ASCII display 90
customizing twinaxial display 48
device constraints 3
remapping
122-key data entry keyboard scan codes 50
122-key typewriter keyboard scan codes 50
5250 data entry keyboard scan codes 51
5250 typewriter keyboard scan codes 50
enhanced keyboard scan codes 51
Retrieve Work Station Customizing Object Source(RTVWSCST) command 5

416

OS/400 Workstation Customization Programming V4R3

S
scan code byte format 42
scan codes
122-key style keyboard 45
5250-style keyboard 43
diacritic characters 56
enhanced keyboard 43
twinaxial keyboard 42
unassigned and not validchanging translation table entries 61
scan codes, incorrect 61
SCNSIZE (set screen size) tag 113
screen size (SCNSIZE) tag 113
screen table (DSCNTBL) tag 95
set ASCII character set (ACS) command 108
set characters per inch (CPI) tag
printers that use emulator on display 212, 223
printers that use emulator on workstation controller
255
printers that use host print transform function 163
set characters per inch in COR mode (CPICOR) tag
printers that use emulator on display 223
printers that use host print transform function 163
set code page (CODEPAGE) tag
printers that use emulator on display 212
set code page (CODPAGVAR) tag
printers that use emulator on workstation controller
252
set cursor address (CSRADR) tag 106
set cursor display off (CSROFF) command 110
set cursor display on (CSRON) command 110

set global font for PFT (FNTGPFT) tag
printers that use emulator on workstation controller
250
set graphic character set (GCS) command 109
set lines per inch (LPI) tag
printers that use emulator on display 216
printers that use host print transform function 171
set margin (MARGIN) tag
printers that use emulator on workstation controller
259
set national language character set (NLCS) command109
set no-print border (NOPRTBDR) tag
printers that use host print transform function 151
set page length in inches (PAGLENI) tag
printers that use emulator on display 209
printers that use emulator on workstation controller
253
set page length in lines (PAGLENL) tag
printers that use emulator on display 216
printers that use emulator on workstation controller
259
set page length tag, using
printers that use emulator on workstation controller
263
set primary character height (PRICHRH) tag
printers that use emulator on workstation controller
253
set primary spacing mode (PRISPCM) tag
printers that use emulator on workstation controller
252
set primary style (PRISTYLE) tag
printers that use emulator on workstation controller
252
set screen size (SCNSIZE) tag 113
set screen size commands 113
set standard character height (STDCHRH) tag
printers that use emulator on display 219
set text length in lines (TEXTLENL) 179
set vertical units
printers that use emulator on display 222
set vertical units in half
printers that use emulator on display 227
SETQLTY (quality font download) tag
printers that use emulator on display 219
setting fonts
printers that use host print transform function 180
setting horizontal character spacing
printers that use host print transform function 162
setting page length
printers that use host print transform function 157
setting simplex printing
printers that use emulator on display 226
printers that use host print transform function 178
setting the state for inbound data processing 88
setting tumble duplex printing
printers that use emulator on display 226
printers that use host print transform function 178
setting up
customizing a 3477 twinaxial display 371
customizing an ASCII display 369

setting up (continued)
workstation customizing
introduction 3
setting vertical line spacing
printers that use host print transform function 171
SEU (source entry utility)changing tags and keywords 19
simplex printing
printers that use emulator on display 226
printers that use host print transform function 178
sound alarm (ALARM) command 107
source, retrieving the workstation customizing 146
source code
retrieved successfully 15
retrieving 11
verifying 15
verifying changes are complete 22
workstation customizing examples 311
source entry utility (SEU)changing tags and keywords 19
source materials, gathering 145
source structure
ASCII display 93
ASCII printer, directly attached 244
twinaxial display 62
twinaxial display with attached ASCII printer 207
SPACE (space) tag
printers that use emulator on workstation controller
251
space (SPACE) tag
printers that use emulator on workstation controller
251
spacing
printers that use emulator on display 219
printers that use host print transform function 167
spacing, horizontal character
printers that use host print transform function 162
spacing, vertical line
printers that use host print transform function 171
special keys
make/break 42
specifying the workstation customizing object 200
standards
EBCDIC code page 47
keyboard layout 48
keyboard standards 48
start bold printing
printers that use host print transform function 161
start bold printing (STRBOLD) tag
printers that use emulator on workstation controller
251
start double-wide continuous (STRWIDE) tag
printers that use emulator on display 213
start printer data bypass (STRBYP) command 110
start printer data bypass (STRBYP) tag 110
Start Printer Writer (STRPRTWTR) command 28
start proportional space mode (STRPROP) tag
printers that use emulator on workstation controller
251

Index

417

start subscript (STRSUBS) tag
printers that use emulator on workstation controller
251
start superscript (STRSUPS) tag
printers that use emulator on workstation controller
251
start underscoreprinters that use host print transform function 162
start underscore (STRUS) tag
printers that use emulator on workstation controller
251
starting
printer writer 27
underscore 17
starting bold printing
printers that use emulator on display 211
starting underscoreprinters that use emulator on display 221
STRBOLD (start bold printing) tag
printers that use emulator on workstation controller
251
STRBYP (start printer data bypass) command 110
STRBYP (start printer data bypass) tag 110
STRPROP (start proportional space mode) tag
printers that use emulator on workstation controller
251
STRPRTWTR (Start Printer Writer) command 28
STRSUBS (start subscript) tag
printers that use emulator on workstation controller
251
STRSUPS (start superscript) tag
printers that use emulator on workstation controller
251
structure
customizing object 18
sourceASCII display 93
ASCII printer attached to twinaxial display 207
twinaxial displays 62
STRUS (start underscore) tag
printers that use emulator on workstation controller
251
STRWIDE (start double-wide continuous) tag
printers that use emulator on display 213
subscript functions
printers that use emulator on display 219, 220
printers that use host print transform function 173
subscripting
printers that use host print transform function 173
superscript functions
printers that use emulator on display 220
printers that use host print transform function 173
superscript tags
printers that use emulator on workstation controller
262
superscripting
printers that use host print transform function 173
supported
ASCII printer 237

418

OS/400 Workstation Customization Programming V4R3

syntaxtag language
ASCII printer, directly attached 244
ASCII printer attached to twinaxial display
twinaxial display 62
tag language for
ASCII display 93

207

syntax for printer function tags with variable and relative
movement
printers that use emulator on display 209
printers that use emulator on workstation controller
251, 253T
table
122-key data entry keyboard scan codes restrictedfrom remapping 50
122-key typewriter keyboard scan codes restrictedfrom remapping 50
5250 data entry keyboard scan codes restricted fromremapping 51
5250 typewriter keyboard scan codes restricted fromremapping 50
ASCII character code to hexadecimal value 367
ASCII display mapping 77
ASCII-to-EBCDIC mapping 37
ASCII to keyboard function mapping table 37
EBCDIC character code to hexadecimal value 367
EBCDIC-to-ASCII mapping table 37
enhanced keyboard scan codes restricted fromremapping 51
example twinaxial keyboard translation table entries
70
IBM twinaxial displays and supported keyboards 39
language type and keyboard type considerations 66
supported diacritic characters by language group56
translation table entry format
aid generating functions 60
blank keys 58
cursor movement functions 58
diacritic characters 56
field exit functions 59
function (Cmd) key functions 60
immediate functions 59
incorrect scan codes 58
mapping EBCDIC characters 54
nonaid functions 59
proof space character 58
shift key functions 60
update screen table for ASCII display 37, 89
values for the language type (LANGTYPE) parameter
63
table name (TBLNAME) tag
printers that use emulator on display 220
tag 17, 244
ASCII control code mapping (ASCIICTL), for printersthat use host print transform function 188
ASCII display keyboard function 120

tag (continued)
ASCII printerlanguage description, printers that use emulator
on display 208
language description, using the host print
transform function 147
ASCII printer attached to twinaxial display
printer function tag 209
ASCII printers that use host print transform function
EASCCPINFO (end ASCII code page information)
189
end ASCII code page information (EASCCPINFO)189
ASCII-to-EBCDIC mapping table (DASCTBL) 123
ASCII to keyboard function mapping table(DKBDTBL) 119
ASCIICTL (ASCII control code mapping), for printersthat use host print transform function 188
ATRCMD (attribute) command 111
ATRCMD (attribute command) 111
attribute command (ATRCMD) 111
comments in source 20
CPI (set characters per inch) 163
CSRADR (set cursor address) 106
customizing twinaxial display keyboards 62
DASCTBL (ASCII-to-EBCDIC mapping table) 123
DBCS considerations, using the host print transformfunction 191
DEBCTBL (EBCDIC-to-ASCII mapping table) 117
DKBDTBL (ASCII to keyboard function mappingtable) 119
DSCNTBL (update screen table) 95
EBCASCTBLE (EBCDIC-to-ASCII mapping entry),using the host print transform function 186
EBCDIC-to-ASCII mapping entry (EBCASCTBLE),
using the host print transform function 186
EBCDIC-to-ASCII mapping table (DEBCTBL) 117
EEBCASCTBL (end EBCDIC-to-ASCII mappingtable) 187
EENVSIZXFM (end envelope size for host print
transform function) 156
EFAXSIZXFM (end fax size for host print transformfunction) 190
EFNTGRP (end font group for host print transformfunction) 182
EINDFNT (end individual font for host print transformfunction) 183
end EBCDIC-to-ASCII mapping (EEBCASCTBL),
using host print transform function 187
end envelope size for host print transform function(EENVSIZXFM) 156
end fax size for host print transform function(EFAXSIZXFM) 190
end font group for host print transform function(EFNTGRP) 182
end individual font for host print transform function(EINDFNT) 183
end page size for host print transform function(EPAGSIZXFM) 157
end workstation object (EWSCST) 18
ending delimiter 20

tag (continued)
envelope size for host print transform function(ENVSIZXFM) 156
ENVSIZXFM (envelope size for host print transformfunction) 156
EWSCST (end workstation object) 18
extended set cursor address (XCSRADR) 114
fax size transform function (ENVSIZXFM) 190
FAXSIZXFM (fax size transform) 190
finding the hexadecimal value 21
FKEY (function key) 122
FNTGRP (font group for host print transformfunction) 181
font group for host print transform function(FNTGRP) 181
font selection 264
function key (FKEY) 122
generaldescription 20
rules 20
syntax 20
INDFNT (individual font for host print transformfunction) 182
INDFNTE (individual font entry for host print
transform function) 182
individual font entry for host print transform function(INDFNTE) 182
individual font for host print transform function(INDFNT) 182
keyboard translation state table (TKSTATE) 65
keyboard translation table (TKBDTBL) 63
language, customizing directly attached ASCII printer262
page size entry (PAGSIZE) 157
page size for host print transform function(PAGSIZXFM) 157
PAGSIZE (page size entry) 157
PAGSIZXFM (page size for host print transformfunction) 157
paper orientation (PRTORIENT) 179
print angle (PRTANGLE) 155
print next character (PRTNXTCHR) 155
printer data stream (PRTDTASTRM), for host print
transform function 149
printer function 147
printers that use emulator on display
ADJHRZORG (adjust horizontal origin 222
adjust horizontal origin (ADJHRZORG) 222
adjust vertical origin (ADJVERORG) 222
ADJVERORG (adjust vertical origin) 222
ASCII printer definition table (PDFNTBL) 208
backspace (BSP) 211
backward relative movement (BCKRMOV) 209
BCKRMOV (backward relative movement) 209
bell (BELL) 211
BELL (bell) 211
BSP (backspace) 211
carrier return (CARRTN) 212
CARRTN (carrier return) 212
CODEPAGE (set code page) 212
CPI (set characters per inch) 212, 223
Index

419

tag (continued)
printers that use emulator on display (continued)
CPICOR (set characters per inch in COR mode)223
DBLCHRH (set double character height) 213
drawer selection (DWRSLT) 213
duplex printing (DUPXPRT) 224
DUPXPRT (duplex printing) 224
DWRSLT (drawer selection) 213
EFNTGPDT (end global fonts for printer definition
table) 214
end bold printing (ENDBOLD) 211
end double-wide continuous (ENDWIDE) 213
end global fonts for printer definition table(EFNTGPDT) 214
end translation printer definition table(ETRNEBCDIC) 221
end underscore (ENDUS) 221
ENDBOLD (end bold printing) 211
ENDPROP (proportional space mode) 218
ENDSUBS (subscript function) 220
ENDSUPS (superscript function) 220
ENDUS (end underscore) 221
ENDWIDE (end double-wide continuous) 213
ETRNEBCDIC (end translation printer definition
table) 221
FNTGPDT (global fonts for printer definition table)214
FNTGRNG (global font range) 214
FOREGRND (foreground color) 215
foreground color (FOREGRND) 215
form feed (FORMFEED) 215
FORMFEED (form feed) 215
forward relative movement (FWDRMOV) 209
FWDRMOV (forward relative movement) 209
global font range (FNTGRNG) 214
global fonts for printer definition table (FNTGPDT)214
half line feed (HLFLINEFEED) 224
HLFLINEFEED (half line feed) 224
initialize printer (INITPRT), printers that use
emulator on display 215
INITPRT (initialize printer), printers that use
emulator on display 215
jog output tray (JOGOUTTRAY) 225
JOGOUTTRAY (jog output tray) 225
line feed (LINEFEED) 215
LINEFEED (line feed) 215
LPI (set lines per inch) 216
NXTDUPXPRT (select next side printing induplex) 225
PAGLENI (set page length in inches) 209
PAGLENL (set page length in lines) 216
paper feed (PRTFEED) 217
paper orientation (PRTORIENT) 217, 225
PDFNTBL (ASCII printer definition table) 208
print quality (PRTQLTY) 218
printer function 209
printer function with variable and relative
movement 209
proportional space mode (ENDPROP) 218

420

OS/400 Workstation Customization Programming V4R3

tag (continued)
printers that use emulator on display (continued)
proportional spacing mode (STRPROP) 218
PRTFEED (paper feed) 217
PRTORIENT (paper orientation) 217, 225
PRTQLTY (print quality) tag 218
quality font download (SETQLTY) 219
reverse half line feed (RVSHLFLINEFEED) 226
reverse line feed (RVSLINEFEED) 226
RVSHLFLINEFEED (reverse half line feed) 226
RVSLINEFEED (reverse line feed) 226
select next side printing in duplex(NXTDUPXPRT) 225
set characters per inch (CPI) 212, 223
set characters per inch in COR mode (CPICOR)
223
set code page (CODEPAGE) 212
set double character height (DBLCHRH) 213
set lines per inch (LPI) 216
set page length in inches (PAGLENI) 209
set page length in lines (PAGLENL) 216
set simplex printing (SMPXPRT) 226
set standard character height (STDCHRH) 219
set tumble duplex printing (TUMDUPXPRT) 226
set vertical units (VERUNT) 222
set vertical units in half (VERUNTHLF) 227
SETQLTY (quality font download) 219
SMPXPRT (set simplex printing) 226
SPACE (space function) 219
space function (SPACE) 219
start bold printing (STRBOLD) 211
start double-wide continuous (STRWIDE) 213
start underscore (STRUS) 221
STDCHRH (set standard character height) 219
STRBOLD (start bold printing) 211
STRPROP (proportional spacing mode) 218
STRSUBS (subscript function) 219
STRSUPS (superscript function) 220
STRUS (start underscore) 221
STRWIDE (start double-wide continuous) 213
subscript function (ENDSUBS) 220
subscript function (STRSUBS) 219
superscript function (ENDSUPS) 220
superscript function (STRSUPS) 220
table name (TBLNAME) 220
TBLNAME (table name) 220
translation entry (ETRNEBCDIC) 221
translation printer definition table (TRNEBCDIC)221
TRNEBCDIC (translation printer definition table)
221
TRNEBCDICE (translation entry) 221
TUMDUPXPRT (set tumble duplex printing) 226
variable line spacing (VARLSPC) 209
VARLSPC (variable line spacing) 209
VERUNT (set vertical units) 222
VERUNTHLF (set vertical units in half) 227
printers that use emulator on workstation controller
ASCII control code mapping (ASCIICTL) 254
ASCII printer function table (PFCNTBL) 247
ASCIICTL (ASCII control code mapping) 254

tag (continued)
printers that use emulator on workstation controller(continued)
backspace (BSP) 250
backward relative movement (BCKRMOV) 253
BCKRMOV (backward relative movement) 253
BELL (bell) 250
bell (BELL) 250
BSP (backspace) 250
carrier return (CARRTN) 250
CARRTN (carrier return) 250
CODPAGVAR (set code page) 252
COLLATE (collate width) 255
collate width (COLLATE) 255
CPI (set characters per inch) 255
default EBCDIC-to-ASCII mapping table(PDFTEBCTBL) 246
default EBCDIC-to-ASCII mapping table(PDFTMAPTBL) 246
default font ID (DFTFNTID) 256
DFTFNTID (default font ID) 256
drawer selection (DWRSLT) 256
DWRSLT (drawer selection) 256
EBCDIC-to-ASCII mapping table (PMLGEBCTBL)
248
EFNTMAP (end font ID mapping) 258
end bold highlighting (ENDBOLD) 250
end default EBCDIC-to-ASCII mapping table(EPDFTMAPTBL) 246
end font ID mapping (EFNTMAP) 258
end multilanguage EBCDIC-to-ASCII mappingtable (EPMLGMAPTBL) 248
end subscript (ENDSUBS) 250
end superscript (ENDSUPS) 250
end underscore (ENDUS) 250
ENDBOLD (end bold highlighting) 250
ENDSUBS (end subscript) 250
ENDSUPS (end superscript) 250
ENDUS (end underscore) 250
EPDFTMAPTBL (end default EBCDIC-to-ASCII
mapping table 246
EPMLGMAPTBL (end multilanguage
EBCDIC-to-ASCII mapping table) 248
FNTGPFT (set global font for PFT) 250
FNTMAP (font ID mapping) 257
FNTMAPE (font mapping table entry) 258
FNTTYPE (font type) 252
font ID mapping (FNTMAP) 257
font mapping table entry (FNTMAPE) 258
font quality (FONTQLTY) 258
font type (FNTTYPE) 252
font width mapping table (PFNTWTH) 247
FONTQLTY (font quality) 258
form feed (FORMFEED) 250
FORMFEED (form feed) 250
forward relative movement (FWDRMOV) 253
FWDRMOV (forward relative movement) 253
initialize at vary on (INITVON) 250
initialize printer (INITPRT) 250
INITPRT (initialize printer) 250
INITVON (initialize at vary on) 250

tag (continued)
printers that use emulator on workstation controller(continued)
language for customizing directly attached ASCII
printers 246
line feed (LINEFEED) 250
LINEFEED (line feed) 250
MARGIN (set margin) 259
multilanguage EBCDIC-to-ASCII mapping table(PMLGMAPTBL) 247
page size for printer function table (PAGSIZPFT)
260
PAGLENI (set page length in inches) 253
PAGLENL (set page length in lines) 259
PAGSIZPFT (set page size for printer function
table) 260
paper feed (PRTFEED) 261
paper orientation (PRTORIENT) 261
PDFTEBCTBL (default EBCDIC-to-ASCII mappingtable) 246
PDFTMAPTBL (default EBCDIC-to-ASCII mappingtable) 246
PFCNTBL (ASCII printer function table) 247
PFNTWTH (font width mapping table) 247
PMLGEBCTBL (EBCDIC-to-ASCII mapping table)
248
PMLGMAPTBL (multilanguage EBCDIC-to-ASCII)
247
PRICHRH (set primary character height) 253
print quality (PRTQLTY) 262
printer control flags (PRTCTL) 250
printer function 250
printer function with a variable 251
printer function with variable and relative
movement 253
PRISPCM (set primary spacing mode) 252
PRISTYLE (set primary style) 252
PRTCTL (printer control flags) 250
PRTFEED (paper feed) 261
PRTORIENT (paper orientation) 261
PRTQLTY (print quality) 262
reverse index (RVSIDX) 251
RVSIDX (reverse index) 251
set characters per inch (CPI) 255
set code page (CODPAGVAR) 252
set global font for PFT (FNTGPFT) 250
set margin (MARGIN) 259
set page length in inches (PAGLENI) 253
set page length in lines (PAGLENL) 259
set primary character height (PRICHRH) 253
set primary spacing mode (PRISPCM) 252
set primary style (PRISTYLE) 252
space (SPACE) 251
SPACE (space) 251
start bold printing (STRBOLD) 251
start proportional space mode (STRPROP) 251
start subscript (STRSUBS) 251
start superscript (STRSUPS) 251
start underscore (STRUS) 251
STRBOLD (start bold printing) 251
STRPROP (start proportional space mode) 251
Index

421

tag (continued)
printers that use emulator on workstation controller(continued)
STRSUBS (start subscript) 251
STRSUPS (start superscript) 251
STRUS (start underscore) 251
VARCPI (variable characters per inch) 253
variable characters per inch (VARCPI) 253
variable line spacing (VARLSPC) 253
VARLSPC (variable line spacing) 253
printers that use host print transform function 157,
163 , 179, 187
ASCCPINFO (ASCII code page information) 188
ASCII code page information (ASCCPINFO) 188
backspace (BSP) 162
bell (BELL) 153
BELL (bell) 153
BSP (backspace) 162
carrier return (CARRTN) 153
CARRTN (carrier return) 153
code page (CODEPAGE) 188
CODEPAGE (code page) on 188
CPICOR (set characters per inch in COR mode)
163
default ASCII code page (DFTASCCP) 189
DFTASCCP (default ASCII code page) 189
drawer selection (DWRSLT) 174
duplex printing (DUPXPRT) 178
DUPXPRT (duplex printing) 178
DWRNBR (select paper drawer number) 175
DWRSLT (drawer selection) 174
EBCASCTBL (EBCDIC-to-ASCII mapping table)
186
EBCDIC-to-ASCII mapping table (EBCASCTBL)186
EEBCASCTBL (end EBCDIC-to-ASCII) 187
end bold printing (ENDBOLD) 161
end EBCDIC-to-ASCII mapping table(EEBCASCTBL) 187
end proportional space (ENDPROP) 167
end underscore (ENDUS) 162
ENDBOLD (end bold printing) 161
ENDPROP (end proportional space) 167
ENDSUBS (subscript function) 173
ENDSUPS (superscript function) 173
ENDUS (end underscore) 162
envelope size entry (ENVSIZE) 156
ENVSIZE (envelope size entry) 156
fax size entry (ENVSIZE) 190
FAXSIZE (fax size entry) 190
FNTGRPE (font group entry) 181
font group entry (FNTGRPE) 181
FOREGRND (foreground color) 174
foreground color (FOREGRND) 174
form feed (FORMFEED) 168
FORMFEED (form feed) 168
half line feed (HLFLINEFEED) 168
HLFLINEFEED (half line feed) 168
horizontal relative movement (HORRMOV) 165
HORRMOV (horizontal relative movement) 165
initialize printer (INITPRT) 153

422

OS/400 Workstation Customization Programming V4R3

tag (continued)
printers that use host print transform function(continued)
INITPRT (initialize printer) 153
jog output tray (JOGOUTTRAY) 177
JOGOUTTRAY (jog output tray) 177
line feed (LINEFEED) 168
LINEFEED (line feed) 168
LPI (set lines per inch) 171
NOPRTBDR (set no-print border) 151
NXTDUPXPRT (select next side printing induplex) 178
page length in inches (PAGLENI) 157
page length in lines (PAGLENL) 158
PAGLENI (page length in inches) 157
PAGLENL (page length in lines) 158
print quality (PRTQLTY) 180
proportional space (STRPROP) 167
PRTQLTY (print quality) 180
reverse half line feed (RVSHLFLINEFEED) 171
reverse line feed (RVSLINEFEED) 171
RVSHLFLINEFEED (reverse half line feed) 171
RVSLINEFEED (reverse line feed) 171
select next side printing in duplex(NXTDUPXPRT) 178
select paper drawer number (DWRNBR) 175
set characters per inch in COR mode (CPICOR)
163
set lines per inch (LPI) 171
set no-print border (NOPRTBDR) 151
set simplex printing (SMPXPRT) 178
set tumble duplex printing (TUMDUPXPRT) 178
SMPXPRT (set simplex printing) 178
SPACE (space function) 167
space function (SPACE) 167
start bold printing (STRBOLD) 161
start underscore (STRUS) 162
STRBOLD (start bold printing) 161
STRPROP (proportional space) 167
STRSUBS (subscript function) 173
STRSUPS (subscript function) 173
STRUS (start underscore) 162
subscript function (ENDSUBS) 173
subscript function (STRSUBS) 173
subscript function (STRSUPS) 173
superscript function (ENDSUPS) 173
transform table (TRNSFRMTBL) 147
TRNSFRMTBL (transform table) 147
TUMDUPXPRT (set tumble duplex printing) 178
variable line spacing (VARLSPC) 171
VARLSPC (variable line spacing) 171
VERRMOV (backward relative movement) 169
vertical relative movement (VERRMOV) 169
PRTDTASTRM (printer data stream), for host print
transform function 149
PRTORIENT (paper orientation) 179
raster graphics end (RASEND) tag 154
Raster mode (RASTERMODE) 150
RASTERMODE (Raster mode) 150
reset printer (RESETPRT) 154
RESETPRT (reset printer) 154

tag (continued)
SCNSIZE (set screen size) 113
set characters per inch (CPI) 163
set cursor address (CSRADR) 106
set page length 263
set screen size (SCNSIZE) 113
set text length in lines (TEXTLENL) 179
start printer data bypass (STRBYP) 110
STRBYP (start printer data bypass) 110
syntax 20
text length in lines (TEXTLENL) 159
TKBDTBL (keyboard translation table) 63
TKSTATE (keyboard translation state table) 65
top margin in inches (TOPMARGINI) 160
update screen table 95, 104
using the superscript and subscript 262
VERAMOV tag, vertical absolute move 168
vertical absolute move (VERAMOV) 168, 175
workstation object (WSCST) 18
WSCST (workstation object) 18
XCSRADR (set cursor address) 114
tag language
ASCII displays 93
tag language for workstation customizing 20
tag syntax 20
task index publications 399
TBLNAME (table name) tag
printers that use emulator on display 220
testing
customizing object 27
text justification, unexpected results 180
text length in lines (TEXTLENL) 159
text length in lines (TEXTLENL), set 179
text symbol (TEXTSYM) parameter 103
TEXTSYM (text symbol) parameter 103
TKBDTBL (keyboard translation table) tag 63
TKSTATE (keyboard translation state table) tag 65
top margin, setting 160
top margin in inches (TOPMARGINI) 160
TOPMARGINI (top margin in inches) 160
transform tablefor printers that use host print transform function
147
transform table (TRNSFRMTBL) tag
ASCII printer
TRNSFRMTBL, for printers that use host print
transform function 147
printers that use host print transform function 147
translation entry (TRNEBCDICE) tag
printers that use emulator on display 221
translation printer definition table (TRNEBCDIC) tag
printers that use emulator on display 221
translation tablebasic layout 53
changing entries 54changing entries for incorrect scan codes 61
entry format
blank keys and unassigned scan codes 57
diacritic characters 56
EBCDIC character translations 54
function keys 58

translation table (continued)
entry format (continued)
proof space character 58
keyboard 41
twinaxial keyboard
functions not specified 61
twinaxial source format 52
translation table (TKBDTBL) tag 63
TRNEBCDIC (translation printer definition table) tag
printers that use emulator on display 221
TRNEBCDICE (translation entry) tag
printers that use emulator on display 221
tumble duplex printing
printers that use emulator on display 226
printers that use host print transform function 178
twinaxial device emulation
ASCII workstation controller 77
twinaxial display
attached ASCII printers
preparation to customize, using the host print
transform function 145
supported 205
unsupported 206
attached ASCII printers preparation to customize,
printers that use emulator on the display
source structure 207
customizing
example 68
planning 7
preparing 48
restrictions 48
diacritic charactersentry format 56
EBCDIC code page standards 47
keyboard 307
programming considerations 39
keyboard translation tablefunctions not specified 61
specifications 51
language requirements 47
list of supported 36
planning work sheet 375
restrictions 62
retrieving source 13
scan codes
diacritic characters 56
setting up to customize 3477 371
source structure 62translation table 53
entry format for diacritic characters 56
source format 52
using the tags to customize 62
twinaxial workstation controller
keyboard layout standards 48
keyboard scan codes 42
keyboard translation table 41
specifications 51
preparing for workstation customizing 6translation table 53
source format 52

Index

423

typewriter keyboard
122-key layout 308
5250 layout 308

Uunprintable area
printers that use host print transform function 151
unsupported ASCII display, customizing 74
unsupported ASCII printer, customizing
printers that use emulator on workstation controller
237
update screen table132-column support 116
ASCII display
insert cursor command 110
binary value addressing format 101
decimal numeric character addressing format 100
description 89
entry format 95
general syntax 105
overview 37
set cursor address command 106
set graphic character set command 109
start and end printer data bypass 110
tag description 104
update screen table (DSCNTBL) tag 95
using font selection tags
printers that use emulator on workstation controller
264
using set page length tag
printers that use emulator on workstation controller
263
using superscript and subscript tags
printers that use emulator on workstation controller
262

V
value
finding the hexadecimal code for tag 21
VARCPI (variable characters per inch) tag
printers that use emulator on workstation controller
253
variable characters per inch (VARCPI) tag
printers that use emulator on workstation controller
253
variable line spacing (VARLSPC) tag
printers that use emulator on display 209
printers that use emulator on workstation controller
253
printers that use host print transform function 171
VARLSPC (variable line spacing) tag
printers that use emulator on display 209
printers that use emulator on workstation controller
253
printers that use host print transform function 171
Vary Configuration (VRYCFG) command 27
vary onverifying success 32

424

OS/400 Workstation Customization Programming V4R3

varying on
device 27
errors and recovery 28
VERAMOV tag, vertical absolute move 168, 175
verifyingcustomizing source retrieved successfully 15
source changes complete 22vary on is successful 32
workstation customizing object created 25
workstation customizing planning complete 10
VERRMOV (vertical relative movement) tag
printers that use host print transform function 169
vertical absolute move (VERAMOV) tag 168, 175vertical line spacing
printers that use host print transform function 171
vertical movement
printers that use host print transform function 167
vertical origin (ADJVERORG) tag
printers that use emulator on display 222
vertical relative movement (VERRMOV) tag
printers that use host print transform function 169
VRYCFG (Vary Configuration) command 27

W
work sheetsplanning to customize displays 374
planning to customize printers that use host print
transform function 379
planning to customize printers that use the emulator
on display 385
workstation customizing planning 373
Work with Configuration Status (WRKCFGSTS)
command 28
working withconfiguration status 28
keyboard translation table 41
tag language for
ASCII display 93
ASCII printer attached to twinaxial display 207
directly attached ASCII printer 244
twinaxial display 62
workstation
ASCII
list of mapping tables 37
mapping local display functions 87
mapping twinaxial function key requests 87
screen refresh function 87
terminal disconnect function 87
toggle display indicators 88
ASCII display 92
ASCII-to-EBCDIC mapping table 37, 86
ASCII to keyboard function mapping table 37, 87
binary value addressing format 101
character sets 78
code page 78
command sequence 79
commands for unsupported displays 90
control character 87
control codes 79
control sequence 87
customizing overview 73

workstation (continued)
ASCII display (continued)
customizing restrictions 90
customizing unsupported 74
decimal numeric character addressing format
100
determining mapping tables to customize 92
EBCDIC-to-ASCII mapping table 37, 89
keyboard mapping table 85
keyboard operation 80
keyboard tags 119
list of supported 36
mapping graphic character data 86
mapping table 89
mapping tables, list of 77, 92
planning work sheet 376
processing 84
setting state for inbound data processing 88
setting up to customize 369
update screen table 37, 89
update screen table entry format 95
update screen tags 104
ASCII printerpreparing for customizing 7
ASCII printer, attached to twinaxial display
limitations 141
planning work sheet 386
ASCII printer, directly attachedcustomizing example 266
customizing overview 237
customizing unsupported 237
default printer EBCDIC-to-ASCII 239
determining which tables to customize 243
list of supported 237
mapping table overview 142, 239
multilanguage EBCDIC-to-ASCII mapping table
241
planning work sheet 389
printer function table 241
source structure 244
tag language 244
ASCII printers that use host print transform function
planning work sheet 379
customizing
overview 3planning 7
preparing for 5
displaycustomizing overview 35
determining whether customizable 35
overview of customizing 35
preparing for customizing 7
mapping table
ASCII to EBCDIC entry format 95
printer
determining whether customizable 135
tag language for customizing 20
twinaxial
list of supported 36
twinaxial display
diacritic character entry format 56

workstation (continued)
twinaxial display (continued)
EBCDIC code page standards 47
language requirements 47
planning work sheet 375
setting up to customize 3477 371
workstation controller
ASCII
functional overview 75
language restrictions 93
local display functions 87
screen refresh function 87
terminal disconnect function 87
toggle display indicators 88
twinaxial device emulation 77
preparing for customizing 6
twinaxial
keyboard layout standards 48
keyboard translation table 41
keyboard translation table specifications 51
workstation customizing
example3477 Model H twinaxial display for diacritic
characters 68
4019 ASCII printer 334
4029 ASCII printer 328
DEC VT-320 display in VT-300 mode 125
Hewlett-Packard LaserJet 4 201
Hewlett-Packard LaserJet Series IIP attached to3477 twinaxial display 227
HP4 ASCII printer 359
source code 311
source for 3151 ASCII display 321
source for 3477 twinaxial display with attached
ASCII printer 311
introduction 3
limitations
ASCII printer attached to twinaxial display 141
general 3
objectcreating 5
retrieving source 5planning 6
planning work sheets 373
preparing for 6
procedure road map 4
restrictions
ASCII display 90
device constraints 3
twinaxial display 48
setting up
introduction 3
tag language 20things you need to have and do 6
twinaxial display
restrictions 48
verifying planning complete 10
work sheet for planning to customize display 374
work sheet for planning to customize printerprinters that use emulator on display 385

Index

425

workstation customizing (continued)
work sheet for planning to customize printer(continued)
printers that use host print transform function
379
workstation customizing object
creating 23
retrieving source 11, 13
verifying object is created 25
workstation customizing object, creating the 200
workstation customizing object, deleting the 200
workstation customizing object, specifying the 200
workstation customizing object is created, verifying 25
workstation object (WSCST) tag 18
WRKCFGSTS (Work with Configuration Status)
command 28
WSCST (workstation object) tag 18

X
XCSRADR (extended set cursor address) tag

426

114

OS/400 Workstation Customization Programming V4R3

Readers’ Comments — We’d Like to Hear from You

AS/400e series
Workstation Customization Programming
Version 4
Publication No. SC41-5605-00
Overall, how satisfied are you with the information in this book?

Overall satisfaction

Very SatisfiedhSatisfiedh

NeutralhDissatisfiedhVery DissatisfiedhNeutral
h
h
h
h
h
h

Dissatisfied
h
h
h
h
h
h

Very Dissatisfied
h
h
h
h
h
h

How satisfied are you that the information in this book is:

Accurate
Complete
Easy to findEasy to understandWell organized
Applicable to your tasks

Very Satisfied
h
h
h
h
h
h

Satisfied
h
h
h
h
h
h

Please tell us how we can improve this book:Thank you for your responses. May we contact you?

h Yes

h No

When you send comments to IBM, you grant IBM a nonexclusive right to use or distribute your comments in any way
it believes appropriate without incurring any obligation to you.

Name
Company or Organization
Phone No.

Address

SC41-5605-00

IBMR___________________________________________________________________________________________________

Readers’ Comments — We’d Like to Hear from You

Cut or Fold
Along Line_ _ _ _ _ _ _Fold_ _ _ and_ _ _Tape_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _Please_ _ _ _ do
_ _ not_ _ _staple_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _Fold_ _ _and_ _ Tape______NO POSTAGE
NECESSARY
IF MAILED IN THE
UNITED STATESBUSINESS REPLY MAIL
FIRST-CLASS MAIL

PERMIT NO. 40

ARMONK, NEW YORKPOSTAGE WILL BE PAID BY ADDRESSEEIBM CORPORATION
ATTN DEPT 542 IDCLERK
3605 Highway 52 N
ROCHESTER MN 55901-7829________________________________________________________________________________________
Fold and Tape
Please do not staple
Fold and Tape

SC41-5605-00

Cut or Fold
Along Line

IBMR

Printed in the United States of America
on recycled paper containing 10%
recovered post-consumer fiber.

SC41-5605-00

Spine information:IBM

AS/400e series

OS/400 Workstation Customization
Programming V4R3

Version 4

SC41-5605-00