IBM 4690 Programming Guide
IBM 4690 Programming Guide
Programming Guide
SC30-3602-02
Note
Before using this information and the product it supports, be sure to read the general information under “Notices”
on page vii.
This edition applies to Version 1 Release 2 of the licensed program IBM 4690 Operating System, program number 5696-538, and to
all subsequent releases and modifications until otherwise indicated in new editions. Changes are made periodically to the
information herein.
Order publications through your IBM representative or the IBM branch office serving your locality. Publications are not stocked at the
address given below.
A form for readers’ comments is provided at the back of this publication. If the form has been removed, address your comments to:
IBM Corporation
Information Development, Department CJMA
PO Box 12195
RESEARCH TRIANGLE PARK, NC 27709
USA
When you send information to IBM, you grant IBM a nonexclusive right to use or distribute whatever information you supply in any
way it believes appropriate without incurring any obligation to you.
Copyright International Business Machines Corporation 1994, 1996. 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
Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii
Who Should Read This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii
How to Use This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii
Terminal Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
Where to Find More Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
Store System Related Publications — Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
Store System Related Publications — Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x
General Publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii
| Summary of Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
Part 2: Utilities
Contents v
Communicating between Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-11
Using Application Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-17
Chaining Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-30
RAM Disk Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-31
Appendixes
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X-1
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X-23
IBM may have patents or pending patent applications covering subject matter 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 the IBM Director of Licensing, IBM Corporation, 500 Columbus Avenue
THORNWOOD, NY 10594 USA.
Trademarks
The following terms are trademarks of the IBM Corporation in the United States or other countries or both:
Other company, product, and service names, which may be denoted by a double asterisk (**), may be
trademarks or service marks of others.
Terminal Models
| The 4683/4693-xx1/4694 terminals are called Mod1 terminals. Although all are called Mod1 terminals,
| each terminal model supports some features that other models do not support.
The 4683/4693-xx2 terminals are called Mod2 terminals. These terminals attach to a Mod1 terminal and
| depend upon that Mod1 terminal for control and communication with the store controller. Table 0-1
| shows the different Mod1 and Mod2 terminals.
Note: A 4683-xx2 terminal cannot attach to a 4693 Mod1 terminal. A 4693-xx2 terminal cannot attach to
a 4683 Mod1 terminal.
The controller/terminal (for example, a 4684 or 4693-5x1 controller/terminal) combines the function of the
store controller and point-of-sale terminal in a single product. The terminal portion of a controller/terminal
is considered to be a Mod1 terminal.
Notices ix
IBM 4680 and 4680-90 General Sales Application
IBM 4680-90 General Sales Application: Planning and Installation Guide, GC30-3630
IBM 4680-90 General Sales Application: Guide to Operations, SC30-3632
IBM 4680-90 General Sales Application: Programming Guide, SC30-3631
IBM 4680 General Sales Application – Price Management Feature: User’s Guide, SC30-3461
IBM 4680 General Sales Application – Terminal Offline Feature: User’s Guide, SC30-3499
IBM 4680-90 General Sales Application: Full Screen – Guide to Operations, SC30-3664
IBM 4680-90 General Sales Application: Master Index, GX27-3958
In-Store Processing
In-Store Processing: Application Development Guide, SC30-3534
In-Store Processing: IBM AIX – Application Development Guide, SC30-3537
In-Store Processing: IBM OS/2 Extended Edition – Application Development Guide, SC30-3538
In-Store Processing: IBM OS/400 – Application Development Guide, SC30-3535
In-Store Processing: IBM 4680 OS – Application Development Guide, SC30-3536
Scanners
IBM 1520 Hand-Held Scanner User’s Guide, GA27-3685
IBM 4686 Retail Point-of-Sale Scanner: Physical Planning, Installation, and Operation Guide, SA27-3854
IBM 4686 Retail Point-of-Sale Scanner: Maintenance Manual, SY27-0319
IBM 4687 Point-of-Sale Scanner Model 1: Physical Planning, Installation, and Operation Guide,
SA27-3855
IBM 4687 Point-of-Sale Scanner Model 1: Maintenance Manual, SY27-0317
IBM 4687 Point-of-Sale Scanner Model 2: Physical Planning Guide, SA27-3882
IBM 4687 Point-of-Sale Scanner Model 2: Operator’s Guide, SA27-3884
IBM 4687 Point-of-Sale Scanner Model 2: Maintenance Manual, SY27-0324
IBM 4696 Point-of-Sale Scanner Scale: Physical Planning, Installation, and Operation Guide, GA27-3965
IBM 4696 Point-of-Sale Scanner Scale: Maintenance Manual, SY27-0333
IBM 4696 Point-of-Sale Scanner Scale: Specification Sheet, G221-3361
IBM 4697 Point-of-Sale Scanner Model 001: Maintenance Manual, SY27-0338
IBM 4697 Point-of-Sale Scanner Model 001: Physical Planning, Installation, and Operations Guide,
SY27-3990
Notices xi
Cabling
A Building Planning Guide for Communication Wiring, G320-8059
IBM Cabling System Planning and Installation Guide, GA27-3361
IBM Cabling System Catalog, G570-2040
Using the IBM Cabling System with Communication Products, GA27-3620
Networks
IBM Local Area Network Support Program, IBM P/N 83X7873
IBM Token-Ring Network Introduction and Planning Guide, GA27-3677
IBM Personal System/2 Store Loop Adapter/A: Installation and Setup Instructions, SK2T-0318
General Publications
Advanced Data Communications for Stores – General Information, GH20-2188
Distributed Systems Executive – General Information, GH19-6394
Communications Manager X.25 Programming Guide, SC31-6167
IBM Disk Operating System 4.0 Command Reference, S628-0253
IBM Proprinters, SC31-3793
IBM 4680 Support for COBOL Version 2 (Softcopy provided with the product)
IBM 4680 Store System Regression Tester (Softcopy provided with the product)
IBM 4680 X.25 Application Programming Interface, GG24-3952
NetView Distribution Manager: General Information, GH19-6587
Systems Network Architecture: General Overview, GC30-3073
IBM Local Area Network Administrator’s Guide, GA27-6367
DSX Preparing and Tracking Transmission Plans, SH19-6399
IBM Dictionary of Computing (New York; McGraw-Hill, Inc., 1993)
IBM Local Area Network Support Program, IBM P/N 83X7873
The Ethernet Management Guide – Keeping the Link, Second Edition (McGraw-Hill, Inc.,
ISBN 0-07-046320-4)
Notices xiii
xiv 4690 Store System: Programming Guide
Part 1: The IBM 4690 Operating System Environment
This chapter is an overview of the IBM 4690 Operating System environment. It provides the capabilities of
the system and refers you to other chapters for more detailed information.
System Capabilities
The IBM 4690 Operating System is a multitasking and multiuser environment that runs in the store
controller, the point-of-sale terminals, and the controller/terminals. The operating system can handle store
controller communications with point-of-sale terminals, other controllers, the controller/terminal, and the
host processor. The following sections briefly describe the system’s capabilities.
Concurrent Operations
The following functions of the 4690 Operating System allow concurrent operations:
¹ The operating system allows you to run your batch and interactive programs at the same time. One
program does not have to finish before another program can start.
¹ The operating system allows several operators to use the system at the same time. Your operators
can be authorized to run one program at a time or several at a time. Operators are authorized
through the system authorization file. See Chapter 15 for information on how to authorize users on
the system.
¹ Multiple users on the system can run multiple interactive applications through the use of windows. An
operator can switch from window to window, start or stop an application running on a window, or
check the status of an application running on a window. Windows are possible through a window
control facility. Refer to the IBM 4690 Store System: User’s Guide for an explanation on how windows
are used on the system.
¹ You can communicate with a host site at the same time your in-store communications are taking
place.
¹ You can attach multiple serial devices to your store controller. The Multiple Console facility handles
the management of these devices as additional system consoles.
ADXLOGOD.DAT should reside in the ADX_IPGM subdirectory. This file can be applied using Apply
Software Maintenance (ASM). See the IBM 4690 Store System: User’s Guide for information on the ASM
utility program. When using ASM, the Advanced Data Communications Systems (ADCS) Host Command
Processor (HCP) six-character name should be ?LOGOD. You maintain the contents and distribution
attributes of this file.
The alternate logo can be a maximum of 10 rows with 79 columns in each row. Each row should be
terminated with a carriage return and a line feed. The 4690 system editor DR EDIX automatically
terminates lines with these characters.
Communications
The following list contains communications-related information:
¹ The communication interfaces that support Systems Network Architecture (SNA) protocols are logical
unit (LU) 0 and LU 6.2 as node types 2.0 and 2.1. The line connections supported on the non-SNA
interface are asynchronous (ASYNC) and Binary Synchronous Communication (BSC). The line
connections supported on the SNA interface are BSC, Synchronous Data Link Control (SDLC), token
ring, Ethernet, local link, and X.25. The IBM 4690 Store System: Communications Programming
Reference explains how to use host and peer communications.
¹ LU 6.2 allows user-written transaction programs (TPs) on the 4690 store controller to communicate
with Advanced program-to-program communications (APPC) applications on a host node (type 4 or 5)
or on a peer node (type 2.1). The TP accesses the LU 6.2 communications functions by calling APPC
functions. These functions are known as calls (verbs) from a set of library routines that are linked to
the TP. CPI Communication is the LU 6.2 communications interface used by the 4690 Operating
System. The IBM 4690 Store System: Communications Programming Reference explains LU 6.2
communications.
¹ Application-to-application communications are processed through in-memory files called pipes. For
information on how pipes work with your applications, see Chapter 15 and Chapter 16.
¹ You can optionally link your store controllers together by the token ring or Ethernet and they can
communicate with each other using the Multiple Controller Feature (MCF). A store controller
configured as the master store controller serves as the central point of control on this type of system.
¹ On a system using the MCF, files are updated and distributed as you specify to other store controllers
on the network. For more information, refer to the IBM 4690 Store System: User’s Guide.
Utilities
The 4690 Operating System provides the following utilities:
¹ A utility is available to help you develop the input sequence table. The input sequence table lets you
edit operator input from various input devices. Chapter 7 describes the input sequence table utility.
¹ The Apply Software Maintenance (ASM) Utility allows you to update system or user programs through
a menu-driven interface. Refer to the IBM 4690 Store System: User’s Guide for information about this
utility. The Staged IPL Utility lets you apply maintenance using ASM when one controller is up and
able to run TCC Networks. See Chapter 13 for information on the Staged IPL Utility.
¹ Special write operations protect your data in the event of a power line disturbance. For information on
recovering from power line disturbances, see Chapter 4.
¹ You can use the Distributed File utility to distribute files to other nodes on a multiple-controller system.
Refer to the IBM 4690 Store System: User’s Guide for a complete description of this utility.
¹ A text editing facility lets you create and edit files. Refer to the IBM 4690 Store System: User’s Guide
for information on the text editing facility.
The IBM 4690 Operating System also provides data backup. A multiple-controller system provides Data
Backup, the capability for file redundancy. This capability allows store controllers to communicate with
each other across the local area network (LAN). With this feature you can specify when your files are to
be automatically updated and distributed. For more information on data backup with a LAN, refer to the
IBM 4690 Store System: User’s Guide.
This chapter shows you how to handle files. It gives you information about file types and describes how to
manage your files and subdirectories.
Random
Random files have fixed record lengths. The system uses the last two bytes in each record for the
carriage return and line feed characters (CR/LF). The system pads the data space between the last field
of the record and the CR/LF.
Random files offer random access, which allows direct access to any record in a file. This ability makes
random and direct files an ideal type for files that can be referenced by a relative record number. If you
need a name or a specific number (such as a telephone number) to reference a record, use Keyed File
Services. You ensure that the number of bytes occupied by the field delimiters and CR/LF do not exceed
the specified record length. Figure 2-1 shows a random file composed of three records. The data is in
ASCII characters.
IBM 4680 BASIC locates each record of a randomly accessed file by taking the record number,
subtracting 1, and then multiplying that result by the record length. The result is a byte displacement
value for the record measured from the beginning of the file. Records can span sectors. You must
specify the record to be accessed in each READ#, PRINT#, or WRITE# statement executed. The
following BASIC program creates the random file diagrammed in Figure 2-1.
CREATE "FILE.1" RECL 40 AS 2
A$ = "FIELD ONE"
B$ = "FIELD TWO"
C$ = "FIELD THREE"
D$ = "Field 1"
E$ = "Field 2"
F$ = ""
G% = 111
H% = 222
I = 3.3
J% = 444
K = 5.5
WRITE #2,1; A$, B$, C$
WRITE #2,2; D$, E$, F$
WRITE #2,3; G%, H%, I, J%, K
CLOSE 2
END
For applications written for the terminal, you must use the WRITE statement to send data to a random file.
Direct
Direct files are like random files except that direct files contain no delimiting characters (quotes, commas,
and CR/LF). Direct files contain no data formatting information. Because of this, you must specify a
special format string when you want to access the data in a direct file. See “Performing File Functions” on
page 2-18 to learn more about accessing a direct file.
The following program creates a direct file named DIRECT.DAT that consists of one 15-byte record. The
variable D represents the format string used in the WRITE FORM# statement.
STRING A, D
INTEGER*2 B
REAL C
CLOSE 3
END
Figure 2-2 shows the direct file created by the preceding program. The data in the figure is in
hexadecimal.
RECORD 1 414243FF7F42000000000000003527
A keyed file consists of blocks that contain keyed records. A block is a 512-byte sector. Each block uses
the first four bytes for chain pointers and the next 508 bytes for records. A block can contain multiple
records, but records are not split across blocks. Each record contains its key and data, with the key
always being first. A record can be a maximum of 508 bytes. The key can be as many bytes of the
record as you need.
You should use keyed files for files accessed by a name or a number. Examples of such numbers are a
Universal Product Code (UPC), a label, a telephone number, or a check authorization number. These
types of names and numbers do not have any contiguous nature and are random in their occurrence. You
can use numbers that have a contiguous nature to access a random or direct file.
You access keyed files by hashing the key to obtain a relative position within the file to locate the record.
Keyed files do not have indexes. The more unique each key is with respect to all of the other keys used
in a keyed file, the better the hashing technique works.
To access a keyed file sequentially, use the keyed file as a direct file. You can obtain information about
the keyed file from the first block, which is used only for control information. The format of this first block
is:
You can create keyed files directly with an IBM 4680 BASIC program, or you can use the Keyed File
Utility program provided with the IBM 4690 Operating System. The utility provides an efficient two-pass
method of converting a direct file into a keyed file. See “Keyed Files” on page 2-28 for an explanation of
this utility.
Like direct files, keyed files use no delimiting characters. You use a format string to map the data to and
from the record. Figure 2-3 shows a keyed file record with a 19-byte length. The data in the figure is in
hexadecimal.
RECORD 1 4B455931414243FF7F42000000000000003527
CLOSE 4
END
In this program:
¹ The numeral 4 after the reserved word KEYED specifies a key length of 4 bytes.
¹ The three commas after the numeral 4 indicate that no randomizing divisor or chaining threshold value
is specified; therefore, the defaults are used.
¹ The numeral 200 after the three commas specifies a total of 200 records in the keyed file.
¹ The variable D represents the format string used in the WRITE FORM# statement.
Sequential
Sequential files are composed of variable-length records accessed in a first-record-to-last-record
sequence. A record in a sequential file consists of one or more fields delimited by commas between the
fields. A CR/LF follows the last field. A string data field is also delimited by quotation marks. A numeric
data field is converted to an ASCII representation.
A record in a sequential file can contain up to 64 KB long. Individual record lengths vary according to the
size of the fields in the record. Each field occupies only the number of bytes required by the data in the
field and the delimiters. Data records are written one after another and can span disk sectors.
You can open sequential files for reading or writing but not for both. You can, however, use two OPEN
statements to access a sequential file, one for reading and one for writing. Each open processes the file
sequentially. When you open a sequential file for reading, you start at the beginning of the file. When you
open a sequential file for writing, you must specify the APPEND option in the OPEN statement. The data
that you write is appended to the end of the existing file.
Although sequential files are normally accessed from beginning to end, IBM 4680 BASIC provides a way
to re-establish a reference within a sequential file for reprocessing a sequential file from a saved
reference. You might find this useful as a checkpoint when processing large sequential files. After
re-establishing a sequential file reference, the file access is again a next-record sequence. Note that you
cannot re-establish a reference when writing to a sequential file.
A special form of the WRITE command, WRITE MATRIX, enables you to write a record to a sequential file
from a terminal application. The WRITE MATRIX command supports writing records longer than 512
bytes. It also supports the simultaneous writing of records from more than one terminal. WRITE MATRIX
uses several file writes to place all the data in the record in the sequential file. The first write specifies
some of the fields and filler data for the remainder of the record. After the first write, the record contains
the fields that fit into 512 bytes, and the remainder of the fields are empty (the record is filled with commas
You should use sequential files for data that is collected in a serial manner. Examples are the sales data
collected in the terminal that is associated with each sales transaction, a listing of events as they occur,
and data to be saved in a file to be printed later.
Figure 2-4 shows a sequential file composed of three records. The data in the figure is in hexadecimal.
RECORD 3 111,222,3.3,444,5.5CR/LF
The third field in RECORD 2 is a null string. Commas and quotation marks serve as delimiters but may
also appear in a field as long as they are imbedded within quotation marks. The only exception is that a
quotation mark followed by a comma must serve as a string delimiter. The following program creates the
sequential file diagrammed in Figure 2-4.
CREATE "FILE.2" AS 2
A$ = "FIELD ZERO, ONE"
B$ = "FIELD TWO"
C$ = "FIELD THREE"
D$ = "Field 1"
E$ = "Field 2"
F$ = ""
G% = 111
H% = 222
I = 3.3
J% = 444
K = 5.5
WRITE #2; A$, B$, C$
WRITE #2; D$, E$, F$
WRITE #2; G%, H%, I, J%, K
CLOSE 2
END
The three WRITE# statements correspond to the three records, and each variable corresponds to a field.
When you access sequential files, each field is read one at a time from the first to the last. The READ#
statement considers a field complete when it encounters a comma or CR/LF for numeric fields, and a
quotation mark followed by a comma or carriage return for string fields.
The data type should match the variable type on a field-by-field basis.
111
222
3.3
444
5.5
Note: Applications written for the terminal can send data to a sequential file using the WRITE MATRIX
statement only.
nodename::\drivename:\subdirectory\filename.extension
where:
nodename The name used to identify a store controller on the network. You can use this name to
access files on a different store controller on the LAN. The nodename must be followed
by two colons (::). See “Using Node Names to Access Files” on page 2-18 for more
information.
drivename The name for the disk or diskette drive. A is for the first diskette drive. B is for the
second diskette drive. C is for the first fixed disk drive. D is for the second fixed disk
drive. The drivename must be followed by one colon (:).
subdirectory The names of the subdirectories in the path for this file. See Appendix A for determining
the use of these names. Subdirectory names can contain one to eight characters and are
delimited by backslashes. You can specify multiple subdirectory names. If you do not
specify a subdirectory name, the system uses the root directory. The IBM 4690 Operating
System generally uses the first level of the subdirectory and not the root.
In an application program, you should use a logical name to represent the complete file name. The logical
name is easier to use and allows the file to be placed on the desired drive without changing the
application program. See “Using Logical Names” on page 2-11 for information on logical names.
Part of determining how to name a file is knowing the intended use of the file and the subdirectory
containing the file. Generally, files are either programs or data. Some data files are really a logical
extension of programs such as files that contain messages, screen definitions, or personalization values.
Other data files contain data that is referred to or modified as a result of the sales activity.
Table 2-1 describes the naming rules for the various types of files and subdirectories.
Table 2-1 (Page 1 of 2). Naming Files on the IBM 4690 Operating System
Subdirectory File Name Extension
ADX_IPGM ¹ Must be 8 characters. Must be 3 characters and must be determined
ADX_IMNT ¹ First 3 characters must be the same as according to the file use table based on the last
ADX_IBUL defined in configuration and cannot be character of the file name (see Table 2-2 on
ADX. page 2-10).
¹ Last character must be D, F, L, O, S, V,
or W. See Table 2-2 on page 2-10.
¹ Any of the valid name characters, but
do not use special characters in the 5th
character position.
ADX_IDT1 ¹ Must be 8 characters. ¹ Should be DAT.
¹ First 3 characters must be the same as ¹ Exception might be files that are only
the files in ADX_IPGM. referred to by the application and HCP using
¹ Other 5 characters can be any of the logical file name (LFN).
valid name characters.
ADX_IDT4 ¹ Must be 8 characters. ¹ Should be DAT.
¹ First 3 characters must be the same as ¹ Exception might be files that are only
the files in ADX_IPGM. referred to by the application and HCP using
¹ Other 5 characters can be any of the LFN.
valid name characters.
Note: To be exchanged with the host processor through HCP, names in the ADX_UPGM, ADX_UMNT,
ADX_UBUL, and ADX_UDT1 subdirectories must follow these guidelines. If the files in these
subdirectories are used only for local use, such as for program development, follow the general file
naming rules. When local files need to be exchanged with the host, you can rename them according to
the renaming rules for these subdirectories.
For example, the LOAD ALL TERMINALS function uses these files:
ADXCS20L.286 The executable module or program
ADXCS3AS.DAT The Display Manager screens for running the utility interactively
ADXCS3MF.DAT The message file used by the utility
The operating system provides LDSN forms of logical names for all of the supported subdirectories.
Table 2-4 lists the LDSNs.
System Logical File Names: System logical file names are reserved names used for operating
system files and subdirectories. The ADXDAxyF.DAT file (where xy is the store controller ID) in the
ADX_SPGM subdirectory contains the system logical file names.
Using the configuration screens, you can change the disk drive name defined in the LFN forms of these
system files. You cannot change the LDSN forms of the system logical names and you cannot add new
system logical names.
Application Logical File Names: An IBM licensed program or another program defines
application logical file names. The ADXDCxyF.DAT file (where xy is the store controller ID) in the
ADX_SPGM subdirectory contains the application logical file name.
Use the configuration screens to change the disk drive name specified in the LFN form of the application
logical names. You cannot change the LDSN forms of the application logical names and you cannot add
new application logical names.
Defining User Logical File Names: You can completely define user logical file names through
configuration. You can define these file names as any allowed logical names that are not reserved by the
operating system or an IBM licensed program. You can define either LFN or LDSN types of user logical
names. The ADXDExyF.DAT file (where xy is the store controller ID) in the ADX_SPGM subdirectory
contains the user logical file names.
You can define logical names whenever you choose, but the changes do not become effective until you
activate them. To activate logical names, use the Supplemental Diskettes.
| To have more displayable characters available on your store controller applications, define the logical
| name disp4680 to any value. Setting a value causes 4690 OS to use the 4680 Controller Video Display
| Character set. Refer to the IBM 4680 Basic Language Reference for a description of the 4680 and 4690
| Controller Video Display Character Sets.
For example, MYITEMS is a logical name used by your sales application for an item record file. The
system expands this name to its full file name, ADXLXAAN::C:\ADX_IDT1\MYITEMS.DAT, when another
node references MYITEMS. (Refer to the IBM 4690 Store System: User’s Guide for a discussion of nodes
and node IDs.) In this example, the expanded name gets the version of the MYITEMS.DAT file that is on
the master store controller (ADXLXAAN::), on the C drive (C:), in the ADX_IDT1 subdirectory
(\ADX_IDT1\).
You can use a logical name to refer to a unique node, a unique subdirectory, or to a file. For example,
ADX_IPGM: is a logical name for the subdirectory C:\ADX_IPGM\. Likewise, the logical name
ADX_IPGM:MYMOD.286 refers to a module whose full file name is C:\ADX_IPGM\MYMOD.286.
More than one logical name can refer to the same file. For example, if you define both ABC and DEF as
logical names for C:\ADX_UPGM\YOURMOD.286, any reference to ABC or DEF translates to the same
file name.
You could then define ABCD to be the logical name for the file
ADXLXCCN::C:\ADX_UPGM\YOURMOD.286, and ABCDE to be the logical name for the file
ADXLXAAN::C:\ADX_UPGM\YOURMOD.286. A reference to ABC or DEF would look for YOURMOD.286
only on the local controller. A reference to ABCD would look for the file only on the store controller node
with the ID of CC. A reference to ABCDE would look for the file on the acting master store controller
(ADXLXAAN::) wherever it is and whatever its ID is. If there was no acting master at that time, the system
returns a file error message.
Every distributed file must have a logical name defined in the application logical names file or the user
logical names file. The format of the logical name in the Logical Names File is:
You can access prime versions of compound or mirrored files to read, write, delete, or rename files.
However, you can only read an image version. You cannot access image versions of distributed files that
are distribute at close. If you try to write, delete, rename or lock an image version of a distributed file, you
will receive an error message.
Building a Logical Names Table: The operating system builds a logical names table at IPL time
by combining the operating system, application, and user logical file names.
Because the user logical names file is the last to be scanned, it has precedence over both the application
and operating system logical names files.
Displaying the Logical Names Table: To display the logical names table, from the SYSTEM
MAIN MENU, select the Command Mode option by typing 7 and press Enter. In the root directory, type
DEFINE -S -N (S for system, N for logical names table) and the system displays the logical names tables.
To display the logical names table one screen at a time, you can use the MORE parameter. For example:
C:>define -s -n |more
Changing the Logical Names Table: You can change application logical names using the
DEFINE command. However, it is recommended that these names not be changed. Refer to the IBM
4690 Store System: User’s Guide for a description of the DEFINE command.
You cannot change application logical names through the configuration process. You can change the disk
drive identification for some of these names to provide disk space and better performance.
You can define user logical names during store controller configuration. Use these names to override
application logical names if desired.
The example shows how a terminal user program can access a user-defined distributed file called
MYFILE.DAT. The file is a compound file that is Distribute Per Update. The system distributes a
compound file to all store controllers. The example shows how to put the prime version of the file on drive
D of the master store controller in the ADX_IDT4: directory.
In the example, the user program reads the local image version of the file, which reduces response time
and improves performance. To update the file, the user program opens the prime version of the file on
the master store controller.
Step 1. Define the File: Define the file MYFILE.DAT in the user logical names tables. You must
define the file in the logical names file on each eligible store controller. (Refer to the IBM 4690 Store
System: Planning, Installation, and Configuration Guide for information on worksheets and designating
eligible LAN store controllers.)
When the file is defined in the user logical names tables, the table will have two entries placed in it for the
MYFILE.DAT user file as follows:
1 $YFILE = D:\ADX_IDT4\MYFILE.DAT ! Local version
2 MYFILE = ADXLXxxN::$YFILE ! Prime version
where the actual node ID of the current acting master store controller replaces xx.
The first entry gives the path to the local image version of the file for each store controller (for example, on
drive D in the ADX_IDT4 subdirectory, with the file name of MYFILE.DAT). Open this file when you want
to access the local version of the distributed file. Your application can only read this version.
The second entry gives the path to the prime version of MYFILE on the master store controller
(ADXLXxxN::). Open this file when you want to update the prime version of the distributed file.
| When the prime version of MYFILE.DAT is updated or deleted, DDA updates the local image versions on
| the other nodes using the LFN $YFILE. Since each eligible store controller on the LAN has its own
| definition of $YFILE, the drive and subdirectory of the local image versions may be different from the path
| of the local version on the master store controller.
| Note: When updating any distributed file named MYFILE.DAT using the LDSN or complete file name
| formats, DDA will continue to use the LFN $YFILE on the other nodes if LFN MYFILE is defined on
| the master store controller. If the LFN $YFILE is not defined on the other nodes, DDA will assume
| $YFILE is the expanded full file name and place the updates in the file C:\$YFILE on the other
| store controllers.
| Attention: Undesirable operations may be performed on the image versions if two or more files named
| MYFILE.DAT exist in separate directories on the master store controller.
To define the file in the logical names file, perform the following steps at the master store controller. You
must repeat these steps for each eligible store controller on the LAN.
1. On the SYSTEM MAIN MENU screen, type 4 and press Enter.
2. When the INSTALLATION AND UPDATE AIDS screen appears, type 1 and press Enter.
3. On the CONFIGURATION screen, type 2 and press Enter. When prompted “Are you configuring for a
LAN system?”, type Y.
4. When the CONTROLLER CONFIGURATION screen appears, press Enter.
5. At the next configuration screen, select a store controller by moving the highlighted cursor to the
appropriate node ID and press Enter. You must return to this screen to select an ID for each eligible
store controller.
6. When the next CONTROLLER CONFIGURATION screen appears, use the Tab key to move the
cursor next to User Logical File Names. Type X and press Enter.
7. When the USER LOGICAL FILE NAMES screen appears, type 1 and press Enter.
8. On the same screen in the file name window, enter the user logical name to be used to access this
file. (The sample problem uses MYFILE as the logical name.) Press Enter.
Step 2. Create the File: Create the file MYFILE.DAT in one of the following ways:
¹ Create a user-written program that creates a POS file statement. For example, if you are using an
IBM 4680 BASIC program, include a CREATE POSFILE statement. Be sure the statement includes
the parameters COMPOUND and PERUPDATE to give the file the correct attributes.
¹ At the master store controller from the host specifying either CREATE or CLOD (Create and Load)
using ADCS. Be sure you specify the correct attributes on the CREATE or CLOD statements (that is,
SHARE=NO, VOL=3) to get the correct distribution attributes.
¹ Use another supported means instead of ADCS to send HCP commands to create the file.
¹ Use the 4690 Operating System COPY command to copy the file from a diskette to the fixed disk.
You can create the version on the diskette as a distributed file and then the proper attributes are
transferred during the copy process. If you copy a nondistributed version, use the Distributed File
Utility (DFU) to define the file as distributed after you copy it. Refer to the IBM 4690 Store System:
User’s Guide for more information about the DFU.
The file is distributed to the proper store controllers by the DDA. Refer to the IBM 4690 Store System:
User’s Guide for more information.
Step 3. Access the File from the User Program: The user program uses the MYFILE user
logical name to open the prime version of MYFILE.DAT on the master store controller for a READ or
READ-WRITE.
The program uses the $YFILE file to open the local version of the file on the store controller that is
supporting the TCC Network that the terminal is on.
The LFN allows you to place the referenced file on any drive without modifying the application. You
should define the LFN to be a complete file name with the subdirectory being ADX_IDT1. (There should
be an ADX_IDT1 subdirectory on each drive.) If you use the LDSN format, you should define the LDSN
as a drive and subdirectory path. You can use the complete file name format for cases that are not
supported by the LFN or LDSN format, such as a special testing environment.
When you are using the CHAIN statement, use a file name and extension with a drive and subdirectory, or
use the LDSN for the drive and subdirectory. Whichever format you use, you must specify the drive and
subdirectory. The possible formats are:
LDSN:filename.extension
drivename:\subdirectory\...\filename.extension
When using the OPEN, CREATE, RENAME, or LOAD statements, use the LFN format for the file name.
This allows you to place the referenced file on any disk drive without modifying the application. You
should define the logical file name to be a complete file name with the subdirectory being ADX_IDT1.
(There should be an ADX_IDT1 subdirectory on each disk drive.) An example of a file name using this
format is:
R::EALABCDE
Note: The LFN represents all of the file name except the R:: node name. The terminal application can
access any drive except the diskette drives for OPEN, CREATE, or RENAME. CHAIN and LOAD can
access any drive.
The IBM 4690 Operating System converts logical file names to their fully qualified names that you defined
in configuration.
When using the CHAIN statement, use a file name and extension without a drive or subdirectory because
the IBM 4690 Operating System automatically uses the ADX_IPGM subdirectory. An example of a file
name using this format is:
R::EALPQRSL.286
Every node name has the form ADXLXxyN:: where xy is the store controller ID. Note that you end node
names with a double colon. Use a single colon to indicate physical devices on the same controller, such
as C:, D:, LPT1:, COM1:, and so on. Use the double colon to indicate different nodes on the network.
R:: is required in a terminal application when addressing an external (any controller) file. For example,
when opening the XYZ file on the file server, the terminal application refers to this file as R::XYZ, where
the XYZ logical name might be defined in the logical names table as
ADXLXACN::C:\ADX_IDT1\EAL__XYZ.DAT. ADXLXACN is the system name for the file server.
In addition to the unique node name, some store controllers also have a logical node name. These store
controllers are the master, alternate master, file server, and alternate file server. The logical node name
provides a quick means of identifying the most important store controllers on your system. The logical
node name is updated whenever the acting master or file server changes.
The following list shows how the operating system names the logical nodes on your system:
Store Controller Logical Node Name
Acting master ADXLXAAN::
Acting alternate master ADXLXABN::
Acting file server ADXLXACN::
Acting alternate file server ADXLXADN::
You can access files using either the unique node name or the logical node name.
You can also perform file functions using commands in Command Mode. Refer to the IBM 4690 Store
System: User’s Guide for an explanation of these commands.
Note: The term disk is used throughout the remainder of this section to indicate both a fixed disk and a
diskette.
Warning: Creating a file using a 4680 BASIC statement establishes a new file on a disk. If you create a
file with a name that already exists, the system erases the existing file before the new file is created.
Use the CREATE statement to create sequential, random, and direct files. You can execute this
statement in both terminal and store controller applications. If the disk does not have the space required
for the file, the CREATE statement fails.
Use the CREATE POSFILE KEYED statement to create keyed files. You can execute this statement only
in the store controller. Once you create a keyed file, you cannot increase its size. To increase the keyed
file, you must rebuild it. See “Keyed Files” on page 2-28 for an explanation of rebuilding files.
On a LAN (MCF Network) system, use the CREATE POSFILE statement to create files. You must specify
a distribution mode and a file type for files created with this statement. For information on distribution
modes and file types, refer to the IBM 4690 Store System: User’s Guide.
Space Allocation: When you create a file, the operating system keeps track of the available disk
space in the File Allocation Table (FAT). As your application creates, deletes, or expands files, the
system updates the available space in the table. When you create a random or direct file, the system
allocates only one cluster on the disk. This space is not initialized. If the space must be initialized to use
the file, your application should write all of the initial records. You can increase the size of a random or
direct file by writing records past the end of the created file.
When you create a keyed file, the system allocates disk space for the requested number of records; it also
initializes the space to binary zeros.
When you create a sequential file, the system allocates only one cluster on the disk. The space allocated
is not initialized. The size of a sequential file is increased as your application writes data to the file.
File Access Rights: When you create a file, the operating system assigns the user ID, group ID,
and access rights of the executing application to the file. The operating system places this information in
the directory entry of the file. See “Protecting Files” on page 2-23 for information on user ID, group ID,
and access rights. You cannot change this information with a 4680 BASIC application after the file is
created. To change the access rights, use the FSET command in Command Mode.
You set up the user ID and group ID for applications executed in Command Mode in the system
authorization file. Applications started as primary or secondary from the SYSTEM MAIN MENU are
always assigned user ID=1 and group ID=2. See “System Authorization” on page 15-8 for more
information.
The system starts an IBM 4680 BASIC application with access rights that allow READ, WRITE, and
DELETE access for owners and requesters for group or world rights. Use the ACCESS statement to
modify the access rights.
Creating a file also performs the same function as opening a file. See “Accessing Files” on page 2-20 for
a description of these functions.
Accessing Files
Your application gains access to a file on a disk by using the OPEN statement. Both the terminal and the
store controller can use this statement.
The values on the OPEN statement determine how the application opens the file. You normally open a
file according to the way it was created. For example, you open a direct file by specifying direct with the
OPEN statement. You can, however, open files differently. To sequentially read all the records in a
keyed file, you can open the file in direct mode by specifying direct with the OPEN statement and
specifying a record length of 512. When an OPEN statement specifies keyed, the IBM 4680 BASIC
runtime library checks that you created the file as a keyed file.
The OPEN statement requests access for the file functions that the application will perform. This
statement can request access to perform read, write, or delete functions. These access rights define the
allowed operations for owners, group users, and world users. The IBM 4690 Operating System checks
the file’s access rights against the requested functions when the application uses the OPEN statement. If
the kind of functions requested are not allowed for your application, the OPEN statement fails. You should
specify only the needed functions to avoid OPEN statement failures. For terminal applications, OPEN
statements that request only the read function are more efficient than OPEN statements requesting the
write function. See “Protecting Files” on page 2-23 for more information on file access rights.
The OPEN statement also specifies the type of file sharing that the executing application is requesting.
The type specified remains in effect for as long as the file is open. See “Sharing Files” on page 2-21 for
information on file sharing types. If the OPEN statement requests a file sharing value that conflicts with
current file opens, the OPEN statement fails.
If your application is opening a sequential file to write, use the APPEND reserved word. APPEND causes
data written to the file to be added at the end of the file. The WRITE statement can only add data to a
sequential file. If you want to remove the data in a sequential file, you must delete the entire file or create
the file again.
For keyed, random, and direct files, do not specify the BUFF and BUFFSIZE reserved words. For these
file types, the 4680 BASIC runtime buffer size is equal to the value of the RECL reserved word. The IBM
4690 Operating System provides file record level data integrity for file writes of 512 or fewer bytes only.
For sequential files, the RECL reserved word is not valid, and the BUFF and BUFFSIZE reserved words
determine the 4680 BASIC runtime buffer size. If you specify BUFFSIZE, the system ignores BUFF, and
the buffer size is equal to the value specified with BUFFSIZE. If you do not specify BUFFSIZE, the buffer
size is equal to the value specified for BUFF multiplied by 128 bytes.
You should select the sequential file buffer size according to your intended use of the file. When you are
reading a sequential file, the 4680 BASIC runtime library requests file reads in increments of the buffer
size. When you are writing to a sequential file with a WRITE# statement, the 4680 BASIC runtime library
uses the buffer to request a file write. If you open the sequential file as LOCKED, the IBM 4680 BASIC
runtime library places as much data as fits into the buffer, independent of record size, before requesting a
The IBM 4690 Operating System provides file record level integrity only for file writes of 512 or fewer
bytes. To prevent record fragmenting when using a LOCKED sequential file, force a file write in
increments of complete records by using the TCLOSE statement.
The 4680 BASIC runtime buffer used for file I/O is allocated from your application heap. Each file has its
own buffer allocated.
Terminal applications can use a PRIORITY reserved word on the OPEN and CREATE statements. The
PRIORITY reserved word causes the READ or WRITE requests for this file to have a higher priority for
disk service at the store controller than a file not opened with the PRIORITY reserved word. Use this
function only for files that are accessed in the critical response time paths in your terminal application.
Because the store controller and terminal can lose communications with each other, the IBM 4690
Operating System provides a periodic check of the terminals. A terminal can stop communicating with the
store controller when a TCC Network is broken or disconnected, when the terminal is powered-OFF, or
when you have defective terminal hardware or software. Periodically, the operating system in the store
controller exchanges a message with the operating system in the terminal to determine that each terminal
with open files is still communicating. If a terminal does not respond, the IBM 4690 Operating System in
the store controller executes a close function for the files that are opened by that terminal. The close
function also releases any outstanding record locks for that terminal. If the terminal returns to operation
without having to IPL, the operating system in the terminal reopens the files for that terminal.
Sharing Files
The IBM 4690 Operating System and IBM 4680 BASIC provide facilities for specifying and managing the
way several applications share a disk file. Your application can request READ and WRITE access to a
file. In addition, when your application accesses a file it can request that the system restrict the READ
and WRITE access for other applications.
File security attributes control whether an application can access a specified file. This access is based on
the access rights of the specified file and the type of access requested by the application. See “Protecting
Files” on page 2-23 for information on file security. File sharing controls how many applications access
one file.
A terminal application cannot access a keyed file in direct mode if another terminal is currently accessing
the file as a keyed file. The terminal application trying to access the file in direct mode receives errors
from the store controller file system as a result. The terminal application accessing the file in keyed mode
must close the file before access to the file in direct mode functions correctly.
On the OPEN and CREATE statements, you can specify how you want your application to share a file.
You can use three different values on these statements to specify the three types of sharing. The sharing
type is in effect as long as your application has the file open.
When your application opens a file as LOCKED or READONLY, it does not need to provide for sharing
write access with other applications.
When your application opens a file as UNLOCKED, it should lock records that it intends to modify. This
serializes all the changes to a record of a random, direct, or keyed file. You can use sequential files
UNLOCKED without the application use of record locking because the system appends each record write
to the end of the file.
In a store controller application, you can lock and unlock records for random and direct files by using the
LOCK and UNLOCK functions or the AUTOLOCK and AUTOUNLOCK reserved words on the READ and
WRITE statements. The preferred way is the AUTOLOCK and AUTOUNLOCK. In a terminal application
you can use only the AUTOLOCK and AUTOUNLOCK.
If your application opens the same file many times, you should include only one LOCK or READ
AUTOLOCK at a time for the file.
For keyed files, you can use only the AUTOLOCK and AUTOUNLOCK in both the store controller and the
terminal applications.
If you have many applications that lock a record in more than one file, use the same sequence of locking
in each application. This prevents applications from deadlocking by having some records locked that
another application is trying to lock.
The system might reject a request to lock a record because another application has already locked the
record. When this occurs, the application should wait and try the record lock again; if the application has
an operator interface, it should notify the operator that the record is temporarily not available.
Locking a record in a keyed file actually locks all of the records in the file sector containing that record.
Therefore, you should avoid application designs that would require high-performance use of keyed file
record locks by two or more applications.
Copying Files
You can use the COPY command in Command Mode to copy a file. The COPY command creates a new
file with the name you specify. Because the COPY command is creating a new file, the new file has the
user ID and group ID assigned to the COPY command when it began. The access rights for the new file
are the same as the access rights of the original file. The user requesting the COPY command must have
READ access rights to the original file. If a file with the new name already exists, the user needs DELETE
access to that file so that COPY can delete that file.
Renaming Files
You can rename a file with the IBM 4680 BASIC RENAME function or you can use the RENAME
command in Command Mode. Both methods change the name of the file and leave the user ID, group ID,
and access rights unchanged. The requester of the RENAME must have either WRITE or DELETE
access rights.
Protecting Files
The IBM 4690 Operating System and IBM 4680 BASIC provide facilities to limit file access to only
authorized users. The facilities provide for controlling READ, WRITE, DELETE, and EXECUTE access to
a file for three categories of users. The categories of user are owner, group, and world. The system
bases file security functions on how the user ID and group ID of the requesting application match the user
ID and group ID of the requested file.
The system assigns an application a user ID and group ID when the application starts. The system
assigns the IDs for an operator interactive application in the store controller according to the system
authorization file. This includes Command Mode commands. For your background application, the user
ID is one and the group ID is two. For operating system background applications, the user ID and group
ID are either one, one and zero, or zero. The terminal 4680 BASIC application IDs are always treated as
a user ID of one and a group ID of two.
You assign a file a user ID, group ID, and access rights when you create the file. This section explains
the access rights. The section “File Access Rights” on page 2-19 contains information on how you assign
access rights to the file.
The system performs file security checking when a file is opened. The first part of security checking
compares the user ID and group ID of the requesting application and the user ID and group ID of the
requested file. Based on this comparison, the requesting application falls into one of three categories:
owner, group, or world.
¹ For the requesting application to become an owner, the user ID of that application must be equal to
the user ID of the file, and the group ID of the requesting application must be equal to the group ID of
the file.
When a requesting application has a user ID of zero and a group ID of zero, the system bypasses the file
security checking.
The second part of security checking compares the type of access requested by the application with the
type of access allowed for this file. A 4680 BASIC application can request READ, WRITE, and DELETE
access on the OPEN statement. A 4680 BASIC application requests EXECUTE access to a file by
attempting to chain to that file. The access rights for each file define whether this file can be accessed to
read, write, delete, or execute for each category of user. Owner, group, and world user access rights are
independent and do not have to provide diminishing levels of access. For example, the access rights of
the operating system data files allow an owner to read, write, delete, and execute; a group user to read
and execute; and a world user to read and execute. For a 4680 BASIC application to be allowed access
to a file, all of the access types requested on the OPEN statement must be allowed for the application’s
requester category. If any of the access types for the file are not allowed, the OPEN request fails.
To rename a file, a requesting application must have either WRITE or DELETE access rights.
Protecting Subdirectories
Subdirectories can contain multiple files and can be protected in similar ways to individual files. You
assign a user ID, group ID, and access rights to each subdirectory when you create it. You assign the
subdirectory the user ID and the group ID of the creating application. The creating application can be the
MKDIR command or a 4680 BASIC application.
The MKDIR command sets the access rights as READ, WRITE, DELETE, and EXECUTE for the owner,
nothing for the group user, and nothing for the world user. You can change the access rights with the
FSET command.
When a 4680 BASIC application uses the MKDIR command to create a subdirectory, the access rights are
set according to the ACCESS statement. The EXECUTE access is always set for the owner and is set for
the group user and the world user if any other access right is set for that user.
The access rights and restrictions described for subdirectories do not apply to the root directory.
You use the DISKSET command to create a disk label. Refer to the IBM 4690 Store System: User’s
Guide for information on how to use DISKSET. You can also use DISKSET to enable and disable file
security for a disk if you have WRITE or DELETE access rights to the disk label.
The installation process for the IBM 4690 Operating System creates the disk label for the fixed disks with
a user ID of zero, a group ID of zero, and security enabled. File security on the fixed disks provides
protection of the system files from applications and protection of the application files from other
applications.
You read sequential file records with the READ#, READ# LINE, and READ MATRIX statements. The
READ# LINE statement assigns all of the data in the current record to a single variable, and the READ#
statement assigns the individual fields of the record to the individual variables specified on the READ#
statement. You can also use the READ FORM# statement for sequential files, but it is less practical
because the records in sequential files usually vary in length.
The READ MATRIX statement, which is used only for sequential files, allows one-dimensional string
arrays to be read from disk efficiently. READ MATRIX reads a sequential file record and parses the
record into an array.
You can read random file records with the same statements as sequential files. The READ FORM#
statement is less practical for random file records because the fields of a random file can vary in length.
Keyed and direct file records can be read only with the READ FORM# statement. The format string items
are necessary because there are no field or record delimiters within the data record.
The reads of a keyed, direct, and random file are for records at any position in the file. For direct and
random files, the record number determines the relative position in the file when it is multiplied by the
record length. For keyed files, the key is transformed into a relative sector within the keyed file and that
sector and any sectors chained to that sector are scanned for the record. See “Keyed Files” on
page 2-28 for more information about sectors.
The IBM 4690 Operating System provides record integrity support to ensure that a record is written to the
file correctly. The record integrity support is dependent on a record being no more than 512 bytes. The
only exception to this is the WRITE MATRIX statement, which can write records larger than 512 bytes.
Both terminal and store controller applications can use the WRITE MATRIX statement.
A store controller application writes sequential file records with the WRITE# statement. The WRITE#
statement assigns the individual variables of the statement to the fields in the record. String expressions
are placed into the record with a starting quotation mark and ending quotation mark followed by a comma.
Numeric expressions are placed into the record after being converted to their ASCII representation and
are followed by a comma. The last expression in the record is followed by a CR/LF instead of a comma.
The WRITE FORM# statement can also be used in a store controller application to write a sequential
record, but it is not very convenient because the application must provide all of the sequential file record
delimiters.
When using a WRITE# statement to write a shared sequential file, the BUFFSIZE value in the 4680
BASIC OPEN statement should be as large as the largest record that you are going to write to that file.
This value should take into consideration the quotes enclosing the fields and the two bytes for the CR/LF.
Failure to do this could cause the record being written to be split if another application writes to that file at
the same time.
A terminal application writes sequential file records with the WRITE MATRIX statement. The WRITE
MATRIX statement assigns the string array elements to the fields in the record in the same way that a
WRITE# statement assigns strings to a field.
The records written to a sequential file by a WRITE MATRIX statement might not be in the same
chronological sequence in which they were requested. Any application reading a sequential file should
provide for this sequence.
You can write random file records with the WRITE# statement. The variables are mapped to the fields
within a data record the same as sequential files, except that a comma is placed after the last field and
the records are padded to fill the record size. You can use the WRITE FORM# statement to write a
random record, but it is not very convenient because the application must provide all of the random file
record delimiters.
The writes to a sequential file proceed from the first record of the file to the last record of the file. By
using the PTRRTN function, you can save the relative position of a record within a sequential file to use at
a later time to read from that position in the file. You cannot use PTRRTN to write for files that are
opened, UNLOCKED. Use the POINT statement to re-establish the saved relative position. You can also
use a POINT statement to truncate a sequential file to zero size if the file is opened LOCKED or
READONLY. See the description of the POINT statement.
The writes of a keyed, direct, and random file are for records at any position in the file. For direct and
random files, the record number determines the relative position in the file when it is multiplied by the
record length. For keyed files, the key is transformed into a relative sector within the keyed file and that
sector and any sectors chained to that sector are scanned for the record. If the record cannot be found in
those sectors, it is added to the file. See “Keyed Files” on page 2-28 for more information about sectors.
PLD Protection for Writing One Record: All file type writes of 512 bytes or less and the
WRITE MATRIX are protected by this feature. There are no reserved words on the 4680 BASIC
statements to invoke or disable PLD support. The PLD recovery routine writes the entire record
independent of whether the record spans disk sectors.
Any disk write that is queued in the store controller and has not been started prior to the PLD is lost when
a PLD occurs. Because the terminal memory is battery-powered, a terminal program can make the
WRITE request again after the power is restored.
PLD Protection for Writing Two Records: You can use the HOLD reserved word on a WRITE
statement in the store controller to PLD protect a pair of record writes issued by the same application.
The HOLD function ensures that either both of the records are written or that both of the records are not
written with respect to the occurrence of a PLD. You can use the HOLD function only for records of 512
bytes or less for random, direct, and keyed files.
You should use this function when an application needs to ensure that modifications are made to two files.
For example, getting a current total from one file and updating a running total in another file requires that
the current total be written to zero and that the running total be written to the sum of the two totals. You
can also use the HOLD function to control the modification of more than two files by using a status file for
one of the files.
When an application requests a write with a HOLD, the IBM 4690 Operating System actually queues the
request in the store controller memory and informs the requesting application that the write is complete.
When the same application requests a second write with a HOLD, the system saves both of the write
requests and then performs both writes. If a PLD prevents the writes from completing, it completes the
writes when the power is restored.
Because the writes with HOLD are queued in the store controller memory, you can use the HOLD function
in concurrently executing applications that are sharing files. Before updating a record, your application
must do a read with autolock for the record. The write with HOLD must AUTOUNLOCK the record. When
the first write with HOLD is issued, it is queued and that means that the AUTOUNLOCK is not executed
until the write is executed. Your application should follow the locking guidelines in “Sharing Files” on
WRITE HOLD provides PLD protection only if both files being written reside on the same store controller.
The WRITE HOLD function ensures that either both or neither of the disk requests occurs if a PLD occurs.
However, if other types of failures prevent the disk requests from occurring, the second WRITE HOLD
indicates the failure. Because the return code cannot distinguish, the failure indicated on the second
WRITE HOLD might be for the first or second disk operation. You should look at the error results as
appropriate for either disk request.
In your terminal applications, any file function that issues a WRITE statement forces the data to be written
to the media.
In store controller applications, all file functions force the data to be written to the media. The one
exception is a sequential file opened in LOCKED mode.
In your store controller applications, use as few file functions as possible that cause store controller files to
be locked. This is recommended because as the number of terminals for each store controller increases,
the number of locks on files increases. Each terminal program might have to wait for the LOCK request to
be granted.
In general, your applications should minimize the number of file requests they make. For example, if you
need two data fields from the same record, read the file once and save the second field until you need it.
Keyed Files
Two alternate hashing algorithms are provided to improve performance in large files having more than 40K
records and a randomizing divisor greater than 6000, and where ASCII keys are required. See “Hashing
Algorithms” on page 6-10 for more information about these algorithms.
You can improve the performance of keyed files in your system by following some basic guidelines:
¹ Ensure that all of your keyed files contain an adequate amount of free space.
In keyed files of more than 1000 records, at least 25% of the space should be free. If the record
length is greater than 169, then only one or two records will fit into one sector or 508 bytes. Allow up
to 50% of free space for these files to reduce chaining of these files. When you create a keyed file,
the Keyed File Utility allows you to check the amount of free space by giving you the packing factor.
The packing factor gives you the percentage of records occupied.
¹ Eliminate long chains in a keyed file.
The system checks chain lengths against the chaining threshold. When chains greater than the
threshold are reached, the system logs a message in the system error log. Use the Keyed File Utility
to determine and to reduce the chain lengths. Reduce chain lengths by allocating more space,
changing the hashing algorithm, or changing the randomizing divisor. See “Hashing Algorithms” on
page 6-10 for more information.
| 4690 controls each device through a device driver. Various input and output statements are used to
| communicate with each device driver. This chapter uses IBM 4680 BASIC to explain the methods for
| communicating with each device driver. For syntax and further information on these statements, refer to
| the IBM 4680 BASIC Language Reference.
| Terminal I/O devices can also be programmed using the C language. For syntax and more information
| refer to the CAPITPGP.DOC file included with AISPO product number, 5764-081, Version 1.1 or later, the
| IBM C Programming Interface for 4690 Terminals.
| Two different 4690 drivers provide 2x20 display support for a terminal. The alphanumeric display is
| handled by the alphanumeric display driver and all of the other 2x20 displays are handled by the operator
| display driver.
| Characteristics
| ¹ Up to three of these displays can be attached to a terminal.
| To support three 2x20 displays, you must configure one as ANDISPLAY, the second as ANDISPLAY2,
| and the third as ANDISPLAY3 in the Terminal Device Group for your terminal.
| There are some restrictions when configuring these displays. Refer to the 4690 Store System:
| Planning, Installation, and Configuration Guide for the valid combinations of 2x20 displays that can be
| configured.
| ¹ 2x20 display format (2 rows by 20 columns)
| ¹ Display character sets representing different code pages
| There are some differences in the character sets for each of the 2x20 displays.
| Refer to the IBM 4680 BASIC Language Reference . for a description of the available
| display character sets.
| The alphanumeric display is unique because you can customize its display character set. See
| “Customizing the Alphanumeric Display Character Set” on page 3-7 for more information.
| The other displays have a fixed set of characters contained within the electronics of the display. The
| characters that can be displayed are determined by the country selected during installation.
| If the 2x20 display is configured as the system display in the terminal device group for your terminal:
| ¹ Your application shares the display with the I/O Processor.
| The I/O processor uses the display to display keyboard data that is specified as display-as-keyed and
| to display operator prompts. Your input sequence table specifies the starting character location and
| Use the CLOSE statement to end your application’s use of the display. The CLOSE statement does not
| clear the display.
| Before writing data to the display, you can set the current character location.
| After the WRITE statement completes, the current character location is set to the next character location
| after the last character location that was written to.
| Current Character Location: A character location is defined as a row and column coordinate
| (row,column).
| The current character location is the (row,column) of the next character to be written or read.
| You use the LOCATE statement to change the current character location.
| Valid row values are 1 and 2 (top to bottom). Valid column values are from 1 to 20 (Left to right).
| Character Wrapping: If the number of characters you write is greater than the number of character
| locations remaining on the current row, the characters are written on the next row. If the current row is
| the last row of the display, then the characters are written to row 1. The characters will continue to wrap
| until all of the characters are written.
| 2x20 Display Character Sets: The display character set determines what is displayed on the
| display for each character written by your application. There are some differences in the character sets
| for each of the 2x20 displays.
| Refer to the IBM 4680 BASIC Language Reference for a description of the available display character
| sets.
| Customizing the Alphanumeric Display Character Set: You can customize your alphanumeric display
| character set using the Alphanumeric Display Character Set option in the configuration for your terminal.
| Each character location in the character set contains a 5 x 12 dot matrix, which is used to form the
| Refer to the 4690 Store System: Planning, Installation and Configuration Guide for more information on
| customizing the alphanumeric display character set.
| Before reading from the display, you can set the current character location. This is the row and column
| where you want to start reading from the display. See “Current Character Location” on page 3-7 for more
| information. The length of the data variable specified on the READ FORM # statement determines the
| number of character locations read from the display. If the length requested exceeds the remaining
| character locations on a row, wrapping is done as described in “Character Wrapping” on page 3-7.
| After the READ FORM # is complete, the current character location is set to the next character location
| after the last character that was read.
| ! Write a greeting.
| WRITE #DISPLAY; " 2x20 DISPLAY SAMPLE"
| ! Pause.
| WAIT;2000
| ! Pause.
| WAIT;2000
| ! Pause.
| WAIT;2000
| ERR.HNDLR:
| ! Prevent recursion.
| ON ERROR GOTO END.PROG
| ! Determine error type
| ! and perform appropriate
| ! recovery and resume steps.
| Shopper Display
| This section describes characteristics of the shopper display and provides guidelines for using this display.
| Characteristics
| The shopper display has the following characteristics:
| ¹ You can attach one of these displays (SDISPLAY:) to a terminal
| ¹ 1x8 display format with six guidance lights
| ¹ Fixed display character set
| Because the shopper display cannot be configured as the system display in the terminal device group for
| your terminal, your application has exclusive use of the shopper display. The only system use of the
| shopper display is to display IPL progress indicators during IPL.
| Use the CLOSE statement to end your application’s use of the shopper display driver. The CLOSE
| statement does not clear the characters from the shopper display.
| Each character location contains seven bar-segments used to form the character. Some locations also
| contain a comma or decimal point segments. The bar-segment pattern for each character is defined
| within the shopper display electronics. You cannot modify this character set.
| Refer to the IBM 4680 BASIC Language Reference for the definition of the shopper display character set.
| Example
| This example contains code operating the shopper display.
| %ENVIRON T
| INTEGER*4 LIGHTS
| DISPLAY1=1
| DISPLAY2=2
| ON ERROR GOTO ENDPROG
| ! Open video display.
| OPEN "VDISPLAY:" AS DISPLAY2
| CLEARS DISPLAY2
| WRITE FORM "C20"; #DISPLAY2; "video is open"
| WAIT;500
| ! Open shopper display.
| OPEN "SDISPLAY:" AS DISPLAY1
| WRITE FORM "C20"; #DISPLAY2; "shopper is open"
| WAIT;500
| ! Clear shopper display.
| CLEARS DISPLAY1
| WAIT;500
| ! Set pointer data.
| LIGHTS = 00000001h
| PUTLONG DISPLAY1,LIGHTS
| ! Write data.
| WRITE FORM "C6"; #DISPLAY1;"111.11"
| WAIT;500
| ! Set pointer data.
| LIGHTS = 00000002h
| PUTLONG DISPLAY1,LIGHTS
| Video Display
| This section describes the video display and provides guidelines for using this display.
| Two different 4690 drivers provide video display support for the terminals.
| When the video display is connected using a Feature A expansion card (4683 terminal only), the Feature
| A video driver is used. When the video display is connected to the video port or to a VGA (Video
| Graphics Array) adapter, the VGA video driver is used.
| Although the application programming interface (API) to these drivers is the same, there are some
| restrictions when using the Feature A attribute with the VGA video driver. There are extensions to the API
| for the VGA video driver that overcome these restrictions as well as providing additional function. See
| “VGA Video Driver” on page 3-14 for more information.
| Note: These extensions are available with 4690 OS maintenance level 9620 or higher.
| Characteristics
| The video display has the following characteristics for each of the video display drivers:
| Feature A Attribute: The Feature A attribute is the same as described in “Feature A video driver” on
| page 3-13 with the following restrictions:
| ¹ No underline support
| The underline bit is ignored.
| ¹ No background intensified colors supported
| The intensify bit is ignored when the reverse video bit is set to 1
| VGA attribute: If using the VGA attribute, the following attribute specifications are provided:
| ¹ Red, green, blue and intensify for foreground color
| ¹ Red, green, and blue for background color
| ¹ Underline for monochrome displays
| ¹ Choice of blinking or intensify for background color
| Refer to the IBM 4680 BASIC Language Reference for a list of the colors and underlining available using
| the combinations of color bits and the intensify bit.
| If the video display is configured as the system display in the terminal device group for your terminal:
| ¹ Your application shares its video display buffer with the I/O Processor
| The I/O processor uses your applications video display buffer to display keyboard data that is specified
| as display-as-keyed and to display operator prompts. Your input sequence table specifies the starting
| character location and length of these display fields. Your application should be designed to
| coordinate its video display data with your input sequence table.
| You use the GETLONG function to determine the default video display format and whether the attached
| video display is color or monochrome.
| Use the CLOSE statement to end your application’s use of the video display driver. The CLOSE
| statement does not clear the video display.
| Use byte MM in the PUTLONG statement to change the video display format. The Feature A video driver
| uses three bits and the VGA video driver uses four bits to specify a change in the video display format.
| If none of the video display format bits are set in the PUTLONG statement, then the video display format
| does not change. If you set one of the bits to 1, the video display changes to the video display format
| specified by that bit.
| If more than one of the video display format bits is set to 1, an error is returned to your application and the
| video display format does not change. If you select the current video display format, success is returned
| to your application, but the video display format does not change.
| The video display is cleared and the current character location is set to (1,1) when the video display
| format is changed.
| Special Considerations for a Feature A Video Driver: If you select a video display format
| that is not valid for the video display type that is configured, an error is returned to your application and
| the video display format is not changed.
| If you select a video display format that is larger than the default video display format, the driver must
| allocate additional memory. If memory is not available to satisfy this request, an error is returned to your
| application and the video display format is not changed. For this reason, it is recommended that you
| configure the default video display format for the largest video display format that your application uses.
| This prevents the need to allocate additional memory when your application changes the video display
| format.
| Use byte CC in the PUTLONG statement to change the way characters are written to the video display.
| To write characters without having the attribute updated see “Writing Characters Without Changing
| Attributes” on page 3-18. To write attributes without having the character updated see “Writing Attributes
| Without Changing Characters” on page 3-18.
| Before writing data to the video display, you can set the current character location and the current
| character attribute. After the WRITE statement is complete, the current character location is set to the first
| character location after the last character location written.
| Current Character Attribute: The default current character attribute is the Feature A attribute
| 0xE0.
| You can change the current character attribute by using byte AA of the PUTLONG statement. If using
| video extensions, you can also use byte VV to select that byte AA contains a VGA attribute, whether
| blinking or background intensified colors are enabled and whether underlining is enabled for monochrome
| video displays.
| This attribute is used by the video display driver for all default mode writes performed by your application
| until your application changes it with another PUTLONG statement.
| If the current character attribute is a Feature A attribute, then it does not effect the attribute of characters
| written by the I/O processor.
| The I/O Processor full screen function supports only the Feature A attribute. If the current character
| attribute is a VGA attribute, then the following must be considered:
| ¹ If a blinking Feature A attribute is chosen in your input sequence table and your application has
| enabled intensified background colors, then the input sequence table attribute will display with its
| background color intensified rather than blinking.
| ¹ If a blue Feature A attribute is chosen in your input sequence table and your application has enabled
| underlining, then the input sequence table attribute will display underlined if the video display is
| monochrome.
| Current Character Location: A character location is defined as a row and column coordinate
| (row,column). Each character location contains a character and an attribute. The default current
| character location is (1,1).
| Use the LOCATE statement to change the current character location. This is the row and column where
| you want to start writing characters on the video display.
| The current video display format determines the valid row and column values for each character location.
| Valid values range from one to the maximum row and column for the current video display format.
| The location of the cursor is the same as the current character location. You also use the LOCATE
| statement to control whether or not the cursor is visible. The current character location does not affect the
| location of characters written by the I/O processor.
| Video Display Character Set: The video display character set determines what is displayed on
| the video display for each character written by your application. Each video display driver has its own set
| of video character sets for the different code pages supported. Differences exist between the video
| display character sets used by the Feature A and VGA video drivers.
| Refer to the IBM 4680 BASIC Language Reference for a description of each of the video character sets.
| Writing Characters Without Changing Attributes: Use byte CC in the PUTLONG statement
| to change the write mode to write characters without changing the attribute.
| If you select to have characters written without changing the attribute, then the current character attribute
| is not used on all subsequent WRITE statements until your application changes the write mode with
| another PUTLONG statement. The attribute remains the same as it was before the character was written.
| See the “Example” on page 3-20 where this mode of writing characters is used to restore a screen.
| Writing Attributes Without Changing Characters: Use byte CC in the PUTLONG statement
| to change the write mode to write attributes without changing the character. Also use byte VV in the
| PUTLONG statement to change the current character attribute type.
| If you select to have attributes written without changing the character, then the data variable is interpreted
| as attribute data on all subsequent WRITE statements until your application changes the write mode with
| another PUTLONG statement.
| Although the current character attribute is not used, the type of the current character attribute is used to
| determine whether the data variable contains Feature A or VGA attributes.
| See the “Example” on page 3-20 where this mode of writing attributes is used to restore a screen.
| Use byte CC in the PUTLONG statement to change the read mode. To read attributes instead of
| characters see “Reading Attributes from the Video Display” on page 3-19.
| Before reading from the video display, you can set the current character location. This is the row and
| column where you want to start reading from the video display. See “Current Character Location” on
| page 3-17 for details.
| The length of the data variable specified on the READ FORM # statement determines the number of
| character locations read from the video display. If the length requested exceeds the remaining character
| locations on a row, wrapping is done as described in “Character Location Wrapping” on page 3-18
| After the READ FORM # statement is complete, the current character location is set to the first character
| location after the last character location that was read.
| See the “Example” on page 3-20 where this mode of reading characters is used to save a screen.
| Reading Attributes from the Video Display: Use byte CC in the PUTLONG statement to
| change the read mode to read attributes from the video display. Also use byte VV in the PUTLONG
| statement to change the current character attribute type.
| If you select to read attributes, then all subsequent READ FORM # statements will return attributes until
| your application changes the read mode with another PUTLONG statement. The type of the current
| character attribute is used to determine whether the attributes being returned are Feature A or VGA
| attributes.
| See the “Example” on page 3-20 where this mode of reading attributes is used to save a screen.
| Special Considerations When Using VGA Video Driver and Feature A Attributes: Feature A
| attributes read from the video display are not guaranteed to match the attributes originally written. This is
| because the VGA video driver must map the Feature A attribute internally to a VGA attribute, and there
| are some characteristics of the Feature A attribute that are not supported. See “Feature A Attribute” on
| page 3-15 for more information
| However, rewriting these previously read attributes produces the same original result.
| Example
| The following example contains a BASIC application for the video display. This example writes to the
| video display using Feature A attributes, writes to the video display using VGA attributes, saves the
| screen, clears the video display, then restores the saved screen.
| %ENVIRON T
| INTEGER*4 PUTLDATA
| INTEGER*2 VDISP, VGADRIVER
| STRING TSTATUS, CHARS, FAATTRS, VGAATTRS
| ! ADXSERVE subroutine
| SUB ADXSERVE (RET,FUNC,PARM1,PARM2) EXTERNAL
| INTEGER*4 RET
| INTEGER*2 FUNC,PARM1
| STRING PARM2
| END SUB
| ! If have a VGA video display then display test lines for some VGA attributes
| VGADRIVER = 0
| CALL ADXSERVE(RET,4,0,TSTATUS)
| IF (RET = 0) AND (MID$(TSTATUS,48,1) = "1") THEN \
| BEGIN
| ! Wait 5 seconds
| WAIT; 5000
| ! Set character location to (20,1), set light blue foreground, grey background
| ! VGA attribute, enable intensify background colors and underlining
| ! and display test lines
| ! Note: Will be light blue characters without underlining on color display
| LOCATE #VDISP; 20,1,OFF
| PUTLDATA = 07000079H
| PUTLONG VDISP, PUTLDATA
| WRITE FORM "C80"; #VDISP; "Underlining enabled for entire screen -"
| WRITE FORM "C80"; #VDISP; " white underlined characters on grey background"
| ! Wait 5 seconds
| WAIT; 5000
| ENDIF
| !*********************************************************************
| ! Save the screen for restoring later
| !*********************************************************************
| !*********************************************************************
| ! Restore the screen
| !*********************************************************************
| ! Wait 3 seconds
| WAIT; 3000
| ! Wait 2 seconds
| WAIT; 2000
| ! Wait 2 seconds
| WAIT; 2000
| CLOSE VDISP
| STOP
| ERROR1:
| ! Prevent recursion.
| ON ERROR GOTO END.PROG
| ! Determine error type and perform appropriate recovery
| ! and resume steps.
| END.PROG:
| STOP
| END
| The VGA video driver does not support command stacking. Command stacking selection on the
| PUTLONG statement is ignored by the VGA video driver. However, this method requires minor changes
| to your application programs.
| Command stacking reduces the system overhead that is associated with sending the application program’s
| WRITE, LOCATE, and PUTLONG statements. Command stacking combines or packages a number of
| In some cases, the video driver automatically combines the statements sent from an application program
| before sending the statements to the video adapter. However, you can gain better video performance by
| using the application program to signal the video driver when it is safe to combine application statements.
| The application program can use bit 0 of byte CC of the PUTLONG statement to convey this information
| to the driver.
| An application program must set bit 0 of byte CC to 1 to allow the driver to begin stacking application
| statements. The driver continues to stack application statements for maximum performance until bit 0 of
| byte CC is reset to zero.
| The video driver determines the amount of information that can be combined into one video adapter
| command. When bit 0 is set to 1, the video driver continues to combine application statements until the
| maximum adapter command size is reached. When this maximum size is reached, the video driver sends
| the command to the adapter and combines subsequent application statements in a second adapter
| command. This process continues independently of the application program. If you reset bit 0 from 1 to
| 0, the video driver sends all application statements in the video command buffer to the adapter. If bit 0 is
| not reset, the driver continues to wait for additional application program statements until the maximum
| adapter command size is reached.
| When bit 0 is set to 1, it signals the driver to begin combining application statements. Bit 0 must be
| maintained as 1 on subsequent statements until the application issues a PUTLONG that resets bit 0 to
| zero. See the “Example Program Using Command Stacking” for additional information.
| Restrictions Using Command Stacking: You can use command stacking only with other
| application WRITE statements of a similar type. For example, commands to write characters while
| updating attributes can be stacked only with other commands that write characters while updating
| attributes, write character only commands with other write character only commands, and write attribute
| only commands with other write attribute only commands. Switching from writing only attributes to writing
| only characters causes the system to flush the stack buffer. Therefore, when writing both characters and
| attributes, it is more efficient to set the attributes using a PUTLONG command (leaving bits 2 and 3 of
| byte CC 0) and then issue a WRITE command to send the character data, rather than sending separate
| write attribute and write character commands.
| Any data the I/O processor sends to the video driver results in the command stacking buffer being cleared
| and the data sent to the screen. Examples of data written by the I/O processor include displaying
| keyboard input using the display-as-keyed feature of the input sequence table, and displaying operator
| prompt messages defined in the input sequence table. Since information displayed this way is considered
| to be immediately required by the user, the video driver forces it to the screen automatically instead of
| waiting for the application to flush the command stacking buffer.
| Example Program Using Command Stacking: The following example shows an application
| program that uses command stacking. The program displays a box on the screen with a calendar
| included inside the box. This program shows how to turn on command stacking and how to leave the
| stacking bit turned on until a group of statements have been issued. Command stacking is optional, but
| might result in faster screen response when using the video display.
| The source code following shows how to use the PUTLONG command to stack or combine all of the
| program statements required to display the calendar. Bit 1 of byte CC in the PUTLONG statement is set
| to 1 before any of the WRITE statements are issued. This same bit is maintained as 1 during all of the
| %ENVIRON T
| !******** Write the Month and Year using the intensify and underscore attribute
| PUTLONG 2, 000001F8H ! Change to intensify and underscore, leaving stack bit on
| LOCATE #2; 4, 13, OFF
| WRITE #2; "DECEMBER 1995"
| !******** Write days of the week in highlighted attribute
| PUTLONG 2, 000001E8H ! Change to highlighted, leaving stack bit on
| LOCATE #2; 6, 6, OFF
| WRITE #2; "SUN MON TUE WED THU FRI SAT"
| !******** Make the day of the month blink for emphasis and also intensify
| PUTLONG 2, 000001EAH ! Change to blinking and intensified, leaving stack bit on
| LOCATE #2; 9, 11, OFF
| WRITE #2; "4"
| CLOSE 2
| STOP
| ERROR1:
| ! Prevent recursion.
| ON ERROR GOTO END.PROG
| ! Determine error type and perform appropriate recovery
| ! and resume steps.
| END.PROG:
| STOP
| END
Characteristics
The cash drawer has the following characteristics:
¹ Each terminal supports a maximum of two cash drawers or one cash drawer and one alarm.
¹ You can attach an external alarm using a set of relay contacts. Your application program controls
whether the contacts are open or closed. The cash drawers are numbered 1 and 2. You must
connect the alarm in place of cash drawer number 2.
¹ To open a cash drawer, your application must send a pulse of a minimum duration to the cash drawer
to cause it to open. If you use an IBM cash drawer, the pulse time is 80 ms. If you use a non-IBM
cash drawer, you might need other pulse times. You request these pulse times during configuration.
The cash drawer driver supports pulse times from 1 ms to 1048 ms; the default is 80 ms.
Use the CLOSE statement to end your application’s use of the cash drawer driver.
When you issue a WRITE FORM statement to open a cash drawer, the cash drawer sensor (part of the
cash drawer assembly) detects the status change. Following a WRITE FORM to open a cash drawer,
give the drawer time to open before requesting a cash drawer status.
Example
This example contains code for operating a cash drawer. This program writes a message to the display,
opens the cash drawer, writes another message, and then waits for the operator to close the drawer.
%ENVIRON T
! Declare work integers.
INTEGER*4 I4,S4
INTEGER*1 DRAWER.ONE
! Constant to open drawer 1.
DRAWER.ONE = 1
ON ERROR GOTO ERR.HNDLR
! Open the display as #2.
OPEN "ANDISPLAY:" AS 2
CLEARS 2
! Open cash drawer driver as #1.
OPEN "CDRAWER:" AS 1
WRITE #2;"CASHDRAWER DRIVER OPEN"
WAIT;2000
START.DRAWER.CONTROL:
CLEARS 2
WRITE #2; "OPEN DRAWER 1"
WAIT;2000
! Open cash drawer number 1.
WRITE FORM "I1";#1;DRAWER.ONE
DRAWER.OPEN:
! Loop while the drawer is open.
CLEARS 2
WRITE #2; "CLOSE DRAWER"
Characteristics
The coin dispenser has the following characteristics:
¹ Each 4683 terminal supports a maximum of two feature expansion cards. You can attach a non-IBM
coin dispenser to one of these feature expansion cards.
¹ Your application should specify the amount of money to be dispensed as a four-digit integer. This
number represents the number of monetary units to be dispensed (cents, for example). The definition
of the term monetary unit depends on the country in which the coin dispenser is designed to operate.
¹ The 4690 Operating System supports the coin dispenser and feature expansion cards only on 4683
terminals.
Use the CLOSE statement to end communication with the coin dispenser driver.
Example
This example program runs through one time, dispenses 47 cents, and then stops.
%ENVIRON T
! Declare variables.
INTEGER*4 hx%,sx%
INTEGER*2 COIN%,ANDSP%
SUB ASYNC.ERR(RFLAG,OVER)
INTEGER*2 RFLAG
STRING OVER
RFLAG = 0
OVER = ""
hx% = ERRN
ERRFX$ = ""
FOR s% = 28 TO 0 STEP -4
sx% = SHIFT(hx%,s%)
THE.SUM% = sx% AND 000fh
IF THE.SUM% > 9 THEN \
THE.SUM%=THE.SUM%+55 \
ELSE \
THE.SUM%=THE.SUM%+48
A$=CHR$(THE.SUM%)
ERRFX$ = ERRFX$ + A$
NEXT s%
CLEARS ANDSP%
WRITE #ANDSP%;"ERR=",ERR," ERRL=",ERRL
LOCATE #ANDSP%;2,1
WRITE #ANDSP%;"ERRF=",ERRF%," ERRN=",ERRFX$
WAIT ;15000
RESUME
END SUB
ON ERROR GOTO ERRORA
! Set ON ERROR routine.
ON ASYNC ERROR CALL ASYNC.ERR
! Set ON ASYNC ERROR routine.
COIN% = 3
! Initialize session numbers.
ANDSP% = 1
OPEN "ANDISPLAY:" as ANDSP%
! Open alphanumeric display.
CLEARS ANDSP%
! Clear alphanumeric display.
WRITE #ANDSP% ; "SAMPLE COIN PROG"
! Indicate start of application.
WAIT;5000
! Wait 5 seconds.
OPEN "COIN:" AS COIN%
! Open coin dispenser.
LOCATE #ANDSP% ; 2,1
I/O Processor
This section describes the I/O processor and provides guidelines for using it.
Characteristics
The I/O processor and the input sequence tables work together to allow the accumulation and validation of
operator input from the keyboard, optical character reader (OCR) or bar code reader, magnetic wand, or
scanner. This accumulation and validation can occur simultaneously with your application. When the
operator enters specified amounts of input, you can have the input forwarded to your application for further
processing. The input from the various devices can be formatted so that your application receives only
one format regardless of the source device.
The accumulation and validation of operator input at the I/O processor level allows rapid response to
operator input. For example, during point-of-sale checkout, the operator can enter item information that
the I/O processor processes while your application finishes a previous item by performing a price lookup.
| These devices are all optional attachments for the IBM Point of Sale Terminals. For information on
| attaching and configuring them refer to the section on Terminal Configuration Keywords in the 4690 Store
| System: Planning, Installation, and Configuration Guide.
| If the terminal has a primary display configured that is larger than 2x20, a set of Enhanced I/O Processor
| functions can be used. These are known as the Enhanced Full-Screen I/O Processor functions as shown
| in the following list:
| ¹ Customization of Message Display.
| ¹ Three Display Attributes Per Field.
| ¹ Large Input Sequences.
| ¹ Header Field Extensions.
| ¹ Upper Case Display-As-Keyed.
| ¹ Additional Tab Keys Definition.
| ¹ WRITE Statement.
| ¹ PUTLONG Statement.
| ¹ Double-Quote Substitution.
| The input sequence tables are used by the I/O processor to determine what operator input is allowed and
| how to process it.
| Definitions and Concepts: The following terms are used to describe the I/O processor and input
| sequence tables:
| A state is a condition of the terminal for which there is a set of allowed inputs. A state is identified by an
| ID (1 through 300). The state is set by an application program, and the terminal can move from one state
| to another state based on operator input occurring in a state.
| A function code is a value from 61 to 255 that delimits an input data field. For keyed input, a function
| code corresponds to a non-data key ( such as “enter” or “total”). The function code values for keys are
| defined in the keyboard layout in Terminal Configuration. For example, the Enter key is assigned a
| function code of 95 (function codes can be reassigned during configuration). You can associate numeric
| or alphanumeric data with a function code. Data is concatenated to function codes in the messages
| passed from the I/O Processor to the application. It is possible to have a function code without any
| accompanying data.
| A function code can result from other than a physical key being pressed. For example, an option is
| available to pass numeric values entered without a function key to an application. This is called the
| automatic end-of-field option. You can specify a function code to be associated with this data.
| Function codes can represent fields on labels. The data from labels is formatted into fields consisting of
| function codes and data. This allows the application to handle input from scanners and readers with the
| same processing as used for keyed input.
| A motor function code is a function code that causes all of the accumulated data and function codes
| entered since the beginning of the input sequence to be queued to the application. A motor function code
| is also called a motor key.
| An input sequence is a series of one or more operator inputs that initially starts in a state that allows an
| operator to begin input. The input sequence ends in a motor function code or error specified to be given
| to the application. The input sequence can contain up to 10 function codes with their associated data if
| the Enhanced Full-Screen support is not being used, or up to 127 function codes with their data if the
| Enhanced Full-Screen support is being used.
| Input State Table: The input state table is required to allow and process operator input from the
| keyboard, OCR reader, magnetic wand, or scanner. The input state table consists of information common
| to all states and information defined specifically for each state.
| Note: Where you can define an action in the following descriptions, you can specify a message to be
| displayed and whether to remain in the current state, go to another state, or lock (disallow) input.
| Information for Each State: For each state, you can specify the following:
| ¹ State ID and name. The state ID must be a value from 1 to 300. State names are used only in the
| utility used to build the input sequence table. State IDs are used by the I/O processor and passed to
| an application.
| ¹ Valid function codes.
| ¹ Whether this state begins an input sequence. This is related to the double Clear key usage definition
| in the common information.
| Note: When the double Clear key usage is selected in the common information, and the terminal
| operator presses Clear twice consecutively, the application is notified.
| Notification means that the input fields entered up to this point are queued to the application.
| ¹ Allowed input devices in the state.
| Information for Each Function Code: For each function code allowed in a state and for each function
| code common to all states, you can define the following:
| ¹ Function code value (61 through 255).
| ¹ Whether this function code is a motor function code. A motor function code causes the application to
| be notified.
| ¹ Whether this function code is a Clear key.
| ¹ Whether to notify the application if an error is detected in the data associated with this function code.
| ¹ The action to take if no error is detected in the data entered.
| ¹ Whether data is allowed, required, or optional, and the action to take if this data requirement is not
| met.
| ¹ Whether data associated with this function code precedes or follows entry of the function code.
| ¹ Whether to assign saved data to this function code. This option is used in conjunction with the state
| option to allow saving of such data. Saved data is data that was entered but could not be assigned to
| the function code immediately preceding or following the data (if the state option is in effect). This
| option is useful if a desired input sequence contains several function codes, and a particular function
| code is entered separately from its associated data.
| ¹ Whether data should display-as-keyed and whether to edit the data (editing information is in the
| common part of the table).
| ¹ Minimum and maximum number of data digits (0 through 64) allowed and action to take if minimum
| and maximum requirements are not met.
| ¹ Whether to check the value of the data entered using a defined range (0 through 99999999) and the
| action to take if the range check is not met.
| ¹ Whether to modulo-check the data entered using the name of a modulo-check definition in the modulo
| check table (see “Modulo Check Table” on page 3-37), and the action to take if the modulo check
| fails.
| Modulo Check Table: The modulo check table allows you to define the characteristics of a modulo
| check to be performed on key-entered or scanner-entered data fields. You can define as many different
| modulo-check definitions as required. When you build a modulo-check definition, you assign an
| eight-character name to each definition. You request modulo checking of a field by referencing the name
| of the modulo-check definition in the input state table. The modulo check table is defined by the following
| information:
| ¹ Name of the definition. The name referenced by the input state table.
| ¹ Algorithm type. IBM, USER, or UPC/EAN price field.
| ¹ Formula. Product Add or Product Digit Add.
| ¹ Modulus. The divisor value to use in calculating the modulo.
| ¹ Weights. Default or User-defined.
| ¹ User-defined weights. The weight assigned to each digit in the field to be checked.
| All fields are not required for each algorithm. You can define as many different modulo check tables as
| required.
| If you choose a user-defined modulo-check algorithm, you must choose either the Product Add or Product
| Digit Add formula. The Product Add formula assumes that the sum of the product of each field digit and
| its assigned weight, divided by the modulus factor, results in a zero remainder.
| where the last digit (4) is the check digit and the weights are:
| 4,3,6,6,2,2
| = 4+6+18+24+10+8
| = 70
| Then 70 divided by 5 equals 14, which has a zero remainder, and the field passes the modulo check.
| The Product Digit Add is the same as the Product Add format, except that after all digit weight products
| have been formed, the sum of all of the digits in the products, rather than the sum of the products is
| calculated. As in the preceding example, the sum divided by the modulus value must result in a zero
| remainder to pass the modulo check.
| where the last digit (2) is the check digit and the weights are:
| 4,3,6,6,2,2
| =30
| Then 30 divided by 5 equals 6, which has a zero remainder, and the field passes the modulo check.
| The IBM modulo-check algorithm uses a modulus value of 10, the Product Digit Add format, and a series
| of weights, beginning with 1 for the least significant digit and alternating in a 1,2,1,2,1,2,... series.
| The maximum length of a field to be modulo checked is 64 digits including the check digit. The check
| digit must be the last digit.
| The UPC/EAN modulo-check algorithm is used for checking price fields on the bar code labels. The
| UPC/EAN modulo-check algorithm multiplies each digit of the field to be checked by its assigned weight.
| The 10’s position value of each product is then added to that product if the transform sign is plus; or
| subtracted from that product if the transform sign is minus. If no transform sign is specified, the product is
| left unchanged. The unit’s position value of each transformed product is added to the check value
| accumulation. After the check value accumulation is complete, it is divided by the modulus. If there is no
| remainder from the division, the check is complete with no error.
| where the first digit (4) is the check digit, and the defined weights are:
| +7,-2,2,+3,-6,+4
| Then 22 divided by 11 equals 2, which has a zero remainder, and the field passes the modulo check.
| Loading the Input Sequence Tables: Before you obtain access to the I/O processor, you must
| load the input sequence tables into memory using a LOAD statement. The input state table is required,
| and the label format table and modulo-check table are optional.
| Use the CLOSE statement to end communication with the I/O processor. The CLOSE function locks the
| I/O processor and discards any data available.
| Preparing to Receive Data from the I/O Processor: The I/O processor can be locked or
| unlocked. In the locked state, data cannot be read. In the unlocked state, data can be read. Following
| an OPEN statement, the I/O processor is unlocked and in state ID number 1. You should always build
| your input state table so that state 1 is a valid state and is the initial state you expect the terminal to be in,
| following an OPEN statement issued to the I/O processor.
| Overview of Operator Input Flow: Following an OPEN statement, the I/O processor is unlocked
| and state 1 is set. The operator can then enter data. The following steps describe the flow of operator
| input through the I/O processor and to the application:
| 1. Operator input consists of data (optional) and function codes. Input from the keyboard consists of
| data keys and function keys. Label input from readers and scanners generates data and function
| codes separated into fields according to the label format table.
| 2. The I/O processor gets one of the buffers allocated for operator input sequences.
| 3. The I/O processor receives the data and function codes and processes them according to the
| definition of the state and function code in the input state table. The input sequence tables tell the I/O
| processor where to place the input fields in the driver buffer.
| 4. As you enter function codes, different state IDs can be set according to the action defined in the input
| state table. Each different state can alter the allowed input sequence. Each function code can also
| alter the allowed input sequence by defining mutually exclusive function codes.
| 5. When you enter a function code that is a motor function code, the system queues the buffer that holds
| the current input sequence information to the application.
| 6. The motor function code indicates if input can continue. If the action of the motor function code is to
| remain in the current state or set a new state, operator input remains unlocked, and input can
| continue. If the action is to lock the I/O processor, input cannot occur until the application unlocks the
| I/O processor.
| 7. The application can wait for operator input, read the input sequence buffer, and unlock the I/O
| processor as described in the following sections.
| Waiting for Received Data: You can use a WAIT statement to wait for data to be available from
| the I/O processor. In many cases you need to wait for data from multiple sources such as the I/O
| processor and the magnetic stripe reader (MSR). The WAIT statement allows you to wait for input from
| multiple devices. The system uses a timer to monitor the length of time that it has not received data.
| When valid data is available from the I/O processor, the system runs the statement following the WAIT.
| When you are waiting on feedback from multiple devices, use the EVENT% statement to determine if the
| I/O processor is the device responding to the WAIT.
| If an error occurs during a WAIT (such as keyboard offline), the system gives control to your ON ERROR
| routine. Errors that occur in the input sequence, which you defined to be passed to your application, do
| not cause entry to the ON ERROR routine. The system passes these errors to you in the input sequence
| buffer queued to your application.
| Each function code/data field consists of the function code followed by any data associated with that
| function code. Refer to the IBM 4680 BASIC: Language Reference for the details of the header field.
| You can issue either a READ or a READ LINE statement to receive an input sequence queued to the
| application.
| The READ statement reads each field into the string variables named on your READ statement. You
| must specify 11 string variables if you are not using the Enhanced Full-Screen functions. The READ
| statement reads the header field into the first variable, and reads the function code/data fields into the
| variable corresponding to the relative position you specified for the function code in the input state table.
| Relative positions 1 through 10 correspond to variables 2 through 11 because the header occupies the
| first variable. The READ statement removes the double quotes around each field and the comma
| between each field before placing the fields into your string variables.
| If you issue a READ LINE statement, the statement places all fields in the input sequence in your string
| variable. The header field is first followed by 10 function code/data fields. Enclose each field in double
| quotes and separate them with a comma. Your application must parse the input sequence into separate
| fields as required.
| Allowing and Disallowing Operator Input: The UNLOCKDEV statement unlocks the I/O
| processor. When the I/O processor is unlocked, it can receive the keyboard, reader, and scanner input as
| specified for the current state of the terminal. You can also specify a state ID to be set and a PRIORITY
| parameter. The I/O processor has two queues for operator input: a normal queue and a priority queue.
| You control which queue the operator input is placed in by setting the active queue to either the normal or
| priority queue. An UNLOCKDEV statement without the PRIORITY parameter sets the normal queue, and
| UNLOCKDEV with PRIORITY sets the priority queue. One use for the priority queue is when operator
| input is queued and an error is detected. You might want to receive new input from the operator before
| reading the queued input. In this case, you could set the priority queue and communicate with the
| operator. You could then return to the normal queue with an UNLOCKDEV statement to read the queued
| input and continue normal processing.
| The PUTLONG statement can be used in place of UNLOCKDEV when additional function not provided by
| UNLOCKDEV is needed. This allows a particular field within a state to be made the current field.
| PUTLONG is typically used in conjunction with the WRITE statement.
| Determining Status of the I/O Processor: Use the GETLONG statement to determine the
| following I/O processor status:
| ¹ I/O processor locked or unlocked
| ¹ Normal or priority queue
| ¹ If PURGE was specified on the last LOCKDEV statement executed
| Preloading Input Sequence Data: An application can use the WRITE Statement ( Enhanced
| Full-Screen mode only ) to preload input sequence data. This is useful when an application reads an
| input sequence, detects an error, and needs the operator to correct the error. The I/O Processor places
| the input sequence into its internal input sequence buffer, which is where complete, validated fields are
| assembled into an input sequence. The I/O Processor assumes that data in the buffer is valid.
| Data written to the I/O Processor must be of the same form as data read from the I/O Processor. In
| particular, the you must be sure to precede default data with the field's function code.
| The WRITE statement also helps the application perform error recovery. For example, if the application
| detects something wrong with the data in one of the fields of a received input sequence, the following
| produces a look and feel similar to the I/O Processor’s recovery of data validation errors.
| ¹ 1. Clear the field in error from the received input sequence.
| ¹ 2. Beep.
| ¹ 3. Display an operator guidance message.
| ¹ 4. Write the problem field’s data to the video display using current field attributes.
| ¹ 5. LOCATE the cursor appropriately.
| ¹ 6. WRITE the input sequence back to the I/O Processor.
| ¹ 7. PUTLONG to the I/O Processor (described below). The argument to PUTLONG should specify:
| ¹ - The state to unlock to.
| ¹ - That input fields are not to be initialized.
| ¹ - That the field in error is to be current.
| (If I/O Processor style error correction is not desired, steps 1, 4, and 5 are not required, and step 7 should
| allow initialization of input fields.)
| From the operators point of view, this is what occurs (if all steps are implemented):
| ¹ 1. Data is keyed into several fields on the video display, then a motor key is pressed.
| ¹ 2. The terminal beeps.
| ¹ 3. A message is displayed indicating a problem with one of the fields.
| ¹ 4. The field in error is current, and is displaying residual keyed data.
| ¹ 5. The operator enters the correct data. The first key pressed causes the residual data to be cleared
| from the display and the newly keyed data to appear in its place. This is the same way that the
| operator corrects errors detected via the I/O Processor’s data validation.
| Note that all of the fields that were not in error are still displayed and they do not need to be re-keyed.
| The operator may tab to them and edit them as usual.
| ¹ 6. The operator presses a motor key, and the corrected input sequence is queued to the application.
| The I/O Processors input sequence buffer has fixed size slots for each relative position possible with the
| loaded input state table. Each slot is of the size required to hold the function code and data of the longest
| input field defined for that relative position anywhere in the input state table. An application may write any
| length data up to the slot length.
| If an application attempts to write field data that is too long for a slot, the data is truncated to the slot
| length. It is possible to write field data of a length greater than the input field length of the current state.
| An application may write fewer fields to the I/O Processor than an input sequence for the loaded input
| sequence table would dictate. In this case, the I/O Processor fills its input sequence buffer with as many
| fields as were provided. Any remaining slots are left empty.
| An application may write more fields to the I/O Processor than an input sequence for the loaded input
| sequence table would dictate. In this case, the I/O Processor fills its input sequence buffer as usual and
| ignores the extra data.
| The application is required to provide a status field (the first field) in a write to the I/O Processor. Although
| required, the data in this status field is not actually used by the I/O Processor. Any string, even a null
| string, can be specified.
| Coding the WRITE Statement: The following 4680 BASIC code fragments illustrate how to write input
| sequences to the I/O Processor:
| Example 1:
| !
| ! This is how to WRITE an input sequence that
| ! was read via READ LINE.
| ! The format string "PIC(&)" is required to prevent
| ! BASIC from surrounding the input sequence with an
| ! additional pair of double-quotes.
| !
| STRING INPUT.SEQUENCE$
| INTEGER*2 IOP%
| IOP% = 20
| READ#IOP;LINE INPUT.SEQUENCE$
| .
| .
| WRITE FORM "PIC(&)";#IOP%;INPUT.SEQUENCE$
| Example 2:
| !
| ! This is how to WRITE an input sequence that
| ! was read via READ.
| !
| STRING STATUS$,A$,B$,C$,D$,E$,F$,G$,H$,I$,J$
| INTEGER*2 IOP%
| IOP% = 20
| READ#IOP%;STATUS$,A$,B$,C$,D$,E$,F$,G$,H$,I$,J$
| .
| .
| WRITE#IOP%;STATUS$,A$,B$,C$,D$,E$,F$,G$,H$,I$,J$
| Data Editing Data input fields are considered to be one-dimensional arrays up to 80 characters long.
| They can start on one row and continue on the following rows, but in terms of data entry and cursor
| movement, only left and right movement is allowed. When the last position of a row is reached, the next
| position is the first position of the next row. The position that precedes the first position of a row is the
| last position of the previous row. For cursor movement keys, the cursor wraps from the last position of a
| field to the first position. For data entry keys, wraparound does not occur—the cursor remains at the last
| position of a field when the field is full and automatic tab is not in effect. Entry of more data results in an
| error tone.
| ¹ Data keys
| The data keys insert characters and move the cursor to the right within the current field. The space
| bar is considered a data key that inserts a blank.
| If the field is displayed in reverse order of entry, the cursor stays in the same position, data is inserted
| in that position, and previously entered data moves to the left.
| ¹ Backspace key
| The Backspace key moves the cursor to the left and sets the moved-from position to null if no data
| follows it, or to blank if data follows it. The cursor stops at the first position of the field.
| If the field is displayed in reverse order of entry, the cursor stays in the same position and the data to
| the left of that position, if any, is shifted to the right to remove the data previously at the cursor
| position. If there is no data located to the left of the cursor position, the data at the cursor position
| becomes null.
| ¹ Cursor right key
| The cursor right key moves the cursor to the right if there is previously entered data to the right. If
| there is no previously entered data to the right, or if the end of the field is reached, wraparound to the
| first position of the field occurs.
| If the field is displayed in reverse order of entry, wraparound occurs to the position preceding the
| leftmost character previously entered. You can enter data regardless of the cursor position. If the
| cursor has been moved from the rightmost position, data is inserted at the cursor position. Data to the
| right of that cursor position is not shifted. Any data at or to the left of that cursor position is shifted
| left.
| ¹ Cursor left key
| The cursor left key moves the cursor to the left if it is not at the beginning of the field. If it reaches the
| beginning of the field, wraparound occurs to the rightmost position in the field that contains previously
| entered data. If there is no previously entered data, the cursor remains at the first position of the field.
| If the field is displayed in reverse order of entry, wraparound occurs from the leftmost position
| containing previously entered data to the rightmost position of the field.
| An Example: Implementing a Shared Message Line: Assume that you are using a 16x60 display, and
| that you want to use the bottom line of the video for both application and I/O Processor messages. Using
| the IST Build Utility, define the error messages location and attributes as follows:
| ¹ Display at row 16, column 1.
| ¹ Format for single line display.
| ¹ The display area is 60 characters wide.
| ¹ The text is to be centered within the display area.
| When the I/O Processor detects an error, it displays the message text on the defined message line. There
| is a problem here, however. The error message is not cleared from the message line after the error
| condition has been corrected. The solution is to define a blank message to be displayed when a function
| code is received without error. Use the IST Build utility to define this message for each function code
| definition (it is necessary to type spaces over the underscores to create a blank message). The function
| code for an input field is received when a tab or motor key is pressed. This is a reasonable time to clear
| the message.
| Large Input Sequences (Enhanced Full-Screen mode only): When the enhanced
| full-screen support is not selected, the maximum number of input fields per state is limited to 10 (not
| including the status field). The maximum has been raised to 127 when enhanced full-screen support is
| selected. Relative positions 1 through 127 may be defined. The actual number of relative positions that
| are received by an application on a read of the I/O Processor depends on the highest relative position
| defined for any state in the input sequence table. If the highest number defined is 10 or less, then there
| will be 10 relative positions in the input sequence (not including the status field). Otherwise, the number
| of relative positions in the input sequence will be equal to the highest relative position defined for any
| state. This is the number of relative positions that an application will receive for EACH read of the I/O
| Processor, regardless of which state is current. Specifying too few or too many variables on a READ
| FORM statement is an error. For this reason, READ LINE is now the recommended method of reading
| from the I/O Processor. The 3-character ASCII representation of the number of relative positions contained
| in the input sequence is available in the status field. See Status Field Extensions below for details. The
| buffer size specified in the BASIC OPEN statement previously limited the input sequence buffer size to
| 200 bytes. This limit has been removed. There is no artificial limit imposed on the buffer size.
| EXAMPLE 1: An input sequence table defines 3 states. State 1 defines function codes with relative
| positions 1,2,3,4, and 5. State 2 defines function codes with relative positions 1,6, and 9. State 3 defines
| function codes with relative positions 3 and 4.
| On each read of the I/O Processor, regardless of which state is current, the I/O Processor will provide an
| input sequence containing 10 relative positions (not including the status field).
| EXAMPLE 2: An input sequence table defines 3 states. State 1 defines function codes with relative
| positions 1,2,3,4, and 5. State 2 defines function codes with relative positions 1,6, and 9. State 3 defines
| function codes with relative positions 9,10,11,12 and 13.
| On each read of the I/O Processor, regardless of which state is current, the I/O Processor will provide an
| input sequence containing 13 relative positions (not including the status field).
X'FF' in either length field is the same as return code 80A5000B for the track with the error. The
80A5000B code is returned if both tracks contain read errors. If an error is encountered on track 2, and
track 1 or 3 is valid, the track 2 data starts with 1 byte of X'00' followed by the separator X'0D' then
padded with X'00' to 37 bytes.
T2 Data
37 bytes maximum
T1 Len T1 Data
1 byte 98 bytes
T3 Len T3 Data
Tn = track number
Figure 3-1. Multi-Track Reader Data Formats
The CLOSE statement ends communication with the MSR. CLOSE locks the MSR and discards any data
available.
Receiving Data
Issue a READ LINE statement to receive data from the MSR. READ LINE is a synchronous operation. If
valid data is available from the MSR, the READ LINE is completed, and the variable specified on the
READ LINE statement contains the data. If an error occurs, control is given to the ON ERROR routine.
The driver validates the buffer size passed to it. If the buffer size is insufficient to handle all potential data
for the active configuration, the driver returns 80A50004. Refer to the IBM 4690 Store System: Messages
Guide for a detailed description of the 80A50004 return code.
Parity checking and other data used by the hardware are not passed to the application. The return code
from the READ LINE statement contains the amount of data returned.
Integer Format for Single-Track MSR Driver: The integer represents information in the form
RRRRRRLL. RR, RR, RR, and LL represent one of the four bytes. The RRRRRR bytes are reserved for
system use.
Integer Format for Dual-Track MSR Driver: The integer represents information in the form of
RRSSRRLL, where RR, SS, RR, and LL each represent one of the four bytes. The only difference
between the single and dual-track data is SS, which represents the status information. The RR bytes are
reserved for system use.
Integer Format for Three-Track MSR Driver: The integer represents information in the form
RRSSFFLL, where RR, SS, FF, and LL each represent one of the four bytes. The RR bytes is reserved
for system use.
STOP
END
STOP
END
Characteristics
The printer is composed of a single bidirectional print head and two stations that provide three logical
stations. The first station is called the customer receipt/document insert (CR/DI) station; the second is
called the summary journal (SJ) station.
You can use the CR/DI station to print on a customer receipt or an inserted document. When a document
is used, it is positioned between the customer receipt and the print head. You cannot use the CR/DI
station to print on the customer receipt tape and a document at the same time.
At each station, the print head can print 38 characters on a line. It prints each character on a 7 x 8 dot
matrix. Three columns of dots to the right of each character are reserved for spacing. The print line for
each station measures 380 dots across.
One line feed advances the paper 11 vertical dots. A printed line becomes visible to the operator at either
station after the printed line is advanced eight line feeds.
Printing one line takes approximately 0.5 seconds. One line feed takes approximately 0.075 seconds in
the CR/DI station and up to 0.158 seconds in the SJ station.
The operating system supports logo printing, character printing, and check printing. This facility allows you
to print any dot in the middle 300 dots of a 380-dot line at the CR/DI station. Logos cannot be printed at
the SJ station. Partial line feeds are available for the CR/DI station. Each partial line feed advances the
line by one dot. You can print logos taller than 8 dots by using partial line feeds to print adjoining logo
patterns.
A default dot matrix is supplied for many of the available 256 code points. You can redefine the dot matrix
configuration for most characters. You cannot define horizontally adjacent dots. The system prints
undefined characters as a single dot. Refer to the IBM 4680 BASIC: Language Reference for the
definition of the default character set.
The CLOSE statement ends communication with a printer station. You must issue a CLOSE statement for
each print station to which your application has issued an OPEN.
The printer driver prints the line asynchronously to execution of your application. You can issue multiple
WRITE FORM statements to queue more than one print line to the printer driver. If you attempt to queue
more than five statements, your application must wait until buffer space becomes available in the queue.
Each print line must contain 38 bytes of data. The system performs line feeds after the data is printed.
To line feed before printing a line, execute a WRITE FORM specifying the number of line feeds required
with data of all blanks. If the data in a print line is all blanks, the system moves the print head only if
necessary to return the head to home position. Home position is between the CR/DI and SJ stations.
Bit 4 controls whether manual or automatic document insertion mode is selected. If manual mode is
selected (bit 4=0), the document is inserted from the side of the DI station, manually aligned, and the
station manually closed using a printer button. Keyboard input can be used to let the application know
that the document is ready for printing. If automatic mode is selected (bit 4=1), the document is inserted
from the front until the document is stopped by the gate. When printing is started at the DI station, the
station closes and performs the print operation. The difference between manual and automatic mode as
viewed from the application program is that the printer driver closes the station in automatic mode when
printing is started at the DI station. In manual mode, the operator must close the station.
If a document is pulled from the top of the DI station, the station can be left closed without a document
inserted. You can open the station by using the printer open and close button, or by using the CR/DI
station line feed button. Your application can also issue a WRITE FORM to the CR station.
Bit 5 controls whether the application is notified if a document is removed and replaced between print lines
at the DI station. If a document is not in the DI station when a print at the DI station is being performed,
Bits 6 and 7 control options for use of a document while printing at the CR station. Documents can be
inserted from the front or side of the DI station. If the document is inserted from the side, it can be
aligned to reach above the print head path so that any printing at the CR station is printed on the
document because it is physically in front of the CR paper. If the document is inserted from the front, it
stops when the gate is reached, and printing at the CR station is done on the CR paper (not the
document). If the document is inserted from the front before a DI print, the document is ready for printing
without having to prompt the operator to insert the document. The printer controls the use of a document
during CR printing as follows:
¹ If bit 6=0 and bit 7=0, a document cannot be inserted if printing is done at the CR station. A print to
the CR station results in an error if a document is inserted.
¹ Bit 6=0 and bit 7=1 is not a valid combination. If a PUTLONG is issued with this combination, the
PUTLONG results in an error.
¹ If bit 6=1 and bit 7=0, a document can be inserted even if a print is issued to the CR station. No error
results because a document is inserted.
¹ If bit 6=1 and bit 7=1, a document must be placed in the DI station when printing at the CR station. If
a print to the CR station is issued and a document is not inserted, an error results stating that a
document is missing. This option is normally used to ensure that a document is inserted before
printing on the CR receipt tape. The document can be printed after the CR receipt is printed.
When your application issues a PUTLONG statement, the options specified affect all WRITE FORM
statements issued after the PUTLONG. The new PUTLONG options do not affect queued print operations
resulting from WRITE FORM statements that were issued before the PUTLONG.
Printing Checks
Checks are inserted vertically and the characters printed sideways. Check printing can be done only at
the DI station of a Model 2 printer. The check must conform to the United Kingdom Association for
Payment Clearing Services (APACS) standard, or all of the data to be printed on the check must fit into
the area between the 84th print position to the right of the left margin and the 156th print position to the
left of the right margin. (A total of 380 print positions are available.) To print an APACS check, the check
is inserted with the amount field at the top.
The format of the data array specified on the WRITE LOGO statement is similar to normal WRITE LOGO
data. The printing field is variable in size and smaller than the 300 dot print field of a normal WRITE
LOGO statement. The first three array elements contain some control information. The application can
give more than one line of check data to the driver on one WRITE LOGO. This function allows the printer
driver to print the check faster. The maximum amount of check data must fit into the 381 array elements
used by the WRITE LOGO statement. The check data passed to the driver with the WRITE LOGO
statement is in slice form, which means that each byte represents a column of eight dots on the paper.
The data on a normal WRITE LOGO statement is also in slice form. The application is responsible for
translation of character data to slice data and the rotation of the data for vertical printing. The system
sends the data to the printer horizontally.
The printer has a total of 380 print positions: there are 190 called primary and 190 called secondary. The
even-numbered print positions are primary beginning at zero, and the odd-numbered positions are
secondary. The first byte in the buffer is the number of primary print positions between the home position
and the first right position of the data to be printed.
Note: When counting print positions, begin counting from right to left. The lowest number is the print
position closest to home. The highest number is the print position closest to the margin.
Check data can be printed only from primary position 78 to primary position 148. Use caution in changing
the value of this byte. If one WRITE LOGO contains a different value in this byte than the previous
WRITE LOGO for the same check, the printer moves the print head to home before printing the new data
with the new offset. Check printing can slow if small changes are frequently made to this byte.
Performance is improved if the application does not revert to the previous offset. However, increasing the
value in this byte decreases the area where the print head is moved, which can improve performance.
The following control information must be contained in the first three array elements (bytes 1, 2, and 3):
¹ Byte 1 plus the dividend of byte 2 divided by 2 equals the number of primary print positions taken up
by the print line. Byte 1 divided by 2 is less than or equal to 148.
¹ Byte 2 in the buffer equals the length of the data (that is, the number of bytes of data for one line of
the check data). Byte 2 cannot be less than 50 bytes and should be an even integer.
¹ Byte 3 equals the number of lines buffered in the WRITE LOGO buffer. The buffer that passes to the
printer driver on a WRITE LOGO always has 380 bytes for print data. One line of check data is
always less than 377 bytes. Byte 3 should always be less than or equal to 377 when it is divided by
the value of byte 2 and rounded to the nearest integer.
Note: To reduce processing time, the application can pass multiple check print lines to the driver
simultaneously.
Problem Determination
To perform problem determination, an ASYNC error with the error number 80900524 results from one of
the following conditions:
¹ The first three bytes of the data in the WRITE LOGO buffer do not conform.
¹ There are adjacent wire-fires in the print data.
¹ The printer does not support check printing.
Your application can determine the cause of the error by checking bit 3 of byte SS. The return code is
ERRN=80900524H.
Your application must verify that no adjacent wire-fires are in check data. For example, if bytes 34 and 35
are part of the same print pass, ANDing the two should give you zero.
Warning: Adjacent wire-fires can result in the destruction of the print head. If the design of the
character-to-slice translation table is correct, the application should not have to check for adjacent
wire-fires.
Programming Considerations
The following procedures are not checked by the printer driver. They should be performed by the
application.
¹ After any document insert line feed commands, a blank APACS print should be done before printing
the check. Otherwise line feeding is incomplete after the first print pass.
¹ The value in the low-order four bits of byte 381 of the logo buffer should not be greater than 9.
¹ One pass of the print head must be used to print one, and only one, column of characters. If columns
of characters are split between print passes, print quality is not readable.
Example
See Appendix C for an example application using check printing.
The WRITE LOGO statement prints all-points-addressable data at the CR/DI station. The dots to be
printed are specified in an array with this statement. The number of elements in the array must be a
multiple of 381. Each set of 381 bytes has 380 bytes of logo print data followed by one byte that contains
the number of dots that the paper is advanced after printing. Only the first 300 bytes of the 380 bytes of
print data can be printed. These bytes are printed in the center 300-dot columns of the line. The system
ignores the last 80 bytes of print data. Each byte controls the printing of one 8-dot column. The first byte
in the array corresponds to the leftmost print position. Bit zero of each byte corresponds to the topmost
dot of each dot column. If a bit=1, the corresponding dot is printed.
Only one WRITE LOGO statement can be queued. If a WRITE LOGO is issued before the previous logo
print ends, execution is suspended until the previous logo print is complete. The system passes errors to
the ON ASYNC ERROR subprogram. The error can be bypassed or the entire logo can be reprinted.
Requests for retries of logo prints should not be made.
Performance Considerations
There is a margin to the left of the CR/DI station and a margin to the right of the SJ station. When
printing is done at a station, the print head first moves from the home position to the station margin or
from the margin to the home position depending on where the head was left from the previous print. If the
print head is in the margin of one station and the next print request is for the other station, the print head
must move back to the home position before it reaches the station at which the print is requested. In such
a case the print head travels across one station without printing.
To maximize performance, your application can print so that print head travel time is minimized. Your
application should start with the head in the home position (following TCLOSE) and print an even number
of times at one station before printing at the other station. In some cases your application prints the same
data at both the CR/DI station and the SJ station. In such cases, you should alternate which station is
printed at first (CR, SJ, SJ, CR, CR, SJ, and so on). This results in an even number of prints at one
station before moving to the other.
For logo printing, the print head must travel across the print line either two or four times. Only two passes
are required if you compose the logo by using every other column of dots. You should use either all odd
dot columns or all even dot columns.
Characteristics
The Model 3 or 4 printer is a two-station impact printer that provides three functions. It provides a CR
function in one station, an SJ function in a second station, and a DI function in the same CR and SJ
stations. The CR function provides a hard copy of the transaction. It also can function as a general
output device to provide data to the operator. The SJ function records data on every transaction for an
audit trail or performs any other printing function that the user program dictates. The DI function allows
The CR and SJ stations each print up to 38 characters at 15 characters per inch (CPI). The DI station
prints up to 86 characters at 15 CPI. Other fonts are stored in the printer that include 12 CPI, and 7.5
CPI. The 7.5 CPI characters also can be printed double high. Lowercase characters can be printed in
addition to normal characters. Double strike is available in all stations for emphasis, but at a reduced rate
because of unidirectional printing.
The default line spacing for the CR, SJ, and DI stations is six lines per inch. The line spacing for each
station can be changed by the PUTLONG statement and the current line spacing is returned by the
GETLONG function. Refer to the IBM 4680 BASIC: Language Reference for additional information on the
PUTLONG and GETLONG functions.
The application program can specify how the printer driver is to interpret the line feed specification (A
value) of the WRITE statement. The application can advance the paper in the various stations in
increments of full lines or motor steps. (There are 9 motor steps per line at a line spacing of 8 lines per
inch and there are 12 motor steps per line at a line spacing of 6 lines per inch.) If PUTLONG and
GETLONG bit 4 of byte LL is zero, the driver interprets the A value of the WRITE statement as a full line
feed. If bit 4 of byte LL is 1, the driver interprets the A value in motor steps. For compatibility with current
applications, the driver defaults to interpreting the WRITE A value in full line feeds.
Logo printing is supported in the printer code, but at approximately half the speed because of
unidirectional printing. Double high fonts are also printed at a lower speed. (Single-line logos print at full
speed.) However, the driver code does not support logo printing in the SJ station. See “Logo Printing” on
page 3-78 for additional information.
While printing in the normal mode, the print speed is up to 250 lines per minute, depending on the
application.
If a single application program is used with both the Model 3 and 4 printers and the existing Model 1 and
Model 2 printers, the application program needs to determine which printer is being used and execute the
preceding changes only for the Model 3 or 4 printer. See “Determining the Printer Status” on page 3-76
for more information.
If you are not familiar with 4680 BASIC or the methods used to interface to these printers, refer to the IBM
4680 BASIC: Language Reference.
Use the CLOSE statement to end communication with a printer station. You must issue a CLOSE
statement for each print station to which your application has issued an OPEN.
The printer driver prints the line asynchronously to execution of your application. You can issue multiple
WRITE FORM statements to queue more than one print line to the printer driver. When the printer driver
queue becomes full, your application must wait until buffer space becomes available in the queue. The
system performs line feeds after the data is printed. To line feed before printing a line, issue a WRITE
FORM specifying the number of line feeds required with data of all blanks. If the data in a print line is all
blanks, the system moves the print head only if necessary to return the head to a home position. The
home position is between the CR and SJ stations and to the left of the CR station.
Emphasized Printing: Emphasized, or double strike printing, is available in all printer stations at a
speed that is one-third the normal printing speed. In emphasized print mode, the line is printed once, the
print head is returned to the starting position, and the line is printed a second time. Therefore, every line
of print requires three passes of the print head.
Emphasized printing is primarily intended to be used when printing on thick multiple-part forms. A second
strike of the print head wires on most forms results in the copies having darker, more easily readable print.
An application program puts the printer in emphasized mode by imbedding control characters at the
beginning of the print data sent by the WRITE statement. Table 3-4 shows the character sequences for
emphasized printing. Emphasized mode must be used for the entire line and remains in effect for only
one line. Emphasized printing is available with all printer fonts.
Emphasized Printing Programming Example: The following example illustrates the method
used to print a line using emphasized printing:
After receiving the character sequence denoting a font change, the printer continues to print in that font
until the end of the line is reached or until another font change character sequence is found. At the end of
the line, the printer resets to the default font of 15 CPI.
Only 15 CPI and 7.5 CPI fonts can be mixed in one WRITE statement. However, single high and double
high characters cannot be mixed in one WRITE statement. If different pitch characters must be printed on
the same line, the application can print the line using two WRITE statements with no line feed between the
two statements. This technique requires two passes to print one line.
The application program should ensure that the number of characters specified in a WRITE statement for
a given font can be printed on the station being used. The printer driver returns an illegal data error
(ERR=ID; ERRN = X'80900524') if the line width exceeds the width of the station.
Table 3-5 shows the maximum number of printable characters for each font type and station type. The
table also shows the fonts supported by the Model 3 or 4 printer and the control characters used to
designate the fonts. Each font control character pair inserted in the WRITE data field increases the size of
the field by two bytes. To account for the larger data field size, the 4680 BASIC runtime subroutines
support data fields greater than 38 characters. However, the Model 1 and Model 2 printer drivers return
an error if more than 38 characters are used.
Font Description Control Character Designator Maximum Characters Per Line Comments
15 CPI CHR$(27),CHR$(59) 38 CR, SJ; 86 DI Default Font
12 CPI CHR$(27),CHR$(58) 30 CR, SJ; 68 DI
15 CPI Double
7.5 CPI CHR$(27),CHR$(14) 19 CR, SJ; 43 DI Wide Font
7.5 CPI Double High,
Double High CHR$(27),CHR$(23) 19 CR, SJ; 43 DI Double Wide
Font Change Programming Example: The following example illustrates the method used to
change fonts with the Model 3 or 4 printer:
LINE$ = " Welcome to " + FONT75$ + "BROOKS" + FONT15$ + " Dept. Store "
WRITE FORM "C36 A1"; #5; LINE$ ! REM Print Welcome line on Receipt
In the preceding example, the 7.5 CPI pitch characters used for the word BROOKS take twice the space
of characters printed at 15 CPI (the highlighted characters in the example are used to simulate a
double-wide font). This extra width results in only 32 data characters filling the 38 character-wide receipt
paper. It is important when mixing fonts in a single line of print that the line width of the individual printer
station not be exceeded.
When your application issues a PUTLONG statement, the options specified affect all WRITE FORM
statements issued after the PUTLONG. The new PUTLONG options do not affect queued print operations
resulting from WRITE FORM statements that were issued before the PUTLONG. Refer to the IBM 4680
BASIC: Language Reference for additional information on the PUTLONG statement.
Top or Front Loaded Documents: Documents can be inserted from the top or the front on the
Model 3 or 4 printer. A sensor is activated as the operator inserts the document to the positive stop feed
rollers and a light emitting diode (LED) on the front of the printer lights when the sensor is activated.
An application can use the GETLONG function to determine the presence of a document. Bit 0 of byte
SS is 1 when a document has been inserted in the top document station or the top of the form has been
detected for a document inserted in the front document station. Bit 4 of byte SS is 1 when a document
has been inserted in the front document station or the bottom of form has been detected for a document
loaded in the top document station. Both top and bottom document sensors must be activated before
printing can begin at the document station.
An application can use the two document sensors to sense how a document was inserted. Based on this
determination, the application can order the print lines accordingly, for example, either printing the lines in
reverse order for top-inserted forms or standard order for forms inserted from the front.
Manual or Automatic Document Insertion: GETLONG or PUTLONG byte MM, bit 4, controls
whether manual or automatic document insertion mode is used. If manual mode is selected, the
document is inserted to the feed rollers, and the station is activated using the document station ready
button on the front of the printer. Pressing the printer document station ready button causes the document
to be fed into the printer until the first printable position is in the print field. If the operator wants to start
printing in a position other than the top of form, the operator can use the printer line feed buttons to further
position the document, or the application can advance the document.
If automatic mode is selected (bit 4=1), the document is again inserted to the feed rollers, but the station is
automatically activated and the document is automatically positioned to the first print position when the
first WRITE statement is sent to the document station. The application can advance the document
additional spaces before printing the first line by issuing a WRITE statement with the desired line feed
information. The difference between manual and automatic mode as viewed from the application program
is that the printer driver gets the station ready in automatic mode when printing is started at the document
station. In manual mode, the operator must get the station ready by pressing the document station ready
button.
Documents inserted from the top block the CR and SJ stations when the form is stopped against the feed
rollers. The operator must not insert a form from the top until printing at the CR station has completed.
An error is returned if a WRITE statement is issued to the CR station when a document is in place.
Since users can insert documents from either the top or the front of the Model 3 or 4 printer, designing an
application to accommodate both insertion methods is not trivial. Mistakes could be made even if a
message is displayed prompting you on the method of insertion. To compensate for user error and to
make the process of designing applications easier for the programmer, the printer is designed to
automatically interpret the intended insertion direction and automatically correct for user errors.
The document will be automatically registered at the top-of-form if an application program is designed for
automatic front insertion of documents. The following is an example of an application program that is
designed for automatic front insertion of documents:
¹ The document motor direction is front-to-top (bit 1 of PUTLONG byte MM is zero).
¹ The automatic insert bit is 1 (bit 4 of byte MM).
¹ The document is inserted from the front.
If, however, you insert the document from the top, the printer automatically advances the document
through the printer until the document is registered at the top-of-form. The advantage to this method is
that even though the application was designed for front insertion, the result of inserting the document from
the top is exactly the same as inserting from the front.
The operation of the opposite insertion method is also automatic. If an application is designed for
automatic top document insertion and you place the document in the front opening, the printer
automatically advances the form through the printer, registering the document at the bottom-of-form.
This feature of the printer should allow for more efficient application programs and improved usability.
Removing and Replacing a Document: Bit 5 of byte MM controls whether the application is
notified if a document is removed and replaced between print lines at the DI station. If a document is not
in the DI station when a print at the DI station is being performed, your application receives an error
notification that the document is missing. If your application needs notification on document removal (bit
5=0), the driver remembers that the document was removed. The driver remembers this even if the
document was removed while no print operation was being done. After removal, on the next print at the
DI station, the application receives an error stating the document is not inserted. This error occurs even if
the document was replaced before the print operation. The error notification allows your application to
take action on this condition. Such action could be to void the transaction or to log the occurrence. The
status is reset from document-inserted to not-inserted when either the error is passed to the application or
when a print occurs at the CR station.
Document Options: Bits 6 and 7 control options for use of a document while printing at the CR station.
These options can be used only with documents inserted from the front of the DI station. If the document
is inserted from the front, it stops when the rollers are reached, and printing at the CR station is done on
the CR paper (not the document). If the document is inserted from the front before a DI print, the
document is ready for printing without having to prompt the operator to insert the document. The printer
controls the use of a document during CR printing as follows:
¹ If bit 6=0 and bit 7=0, a document cannot be inserted if printing is done at the CR station. A print to
the CR station results in an error if a document is inserted.
¹ Bit 6=0 and bit 7=1 is not a valid combination. If a PUTLONG is issued with this combination, the
PUTLONG results in an error.
¹ If bit 6=1 and bit 7=0, a document can be inserted even if a print is issued to the CR station. No error
results because a document is inserted.
¹ If bit 6=1 and bit 7=1, a document must be placed in the DI station when printing at the CR station. If
a print to the CR station is issued and a document is not inserted, an error results stating that a
Journal Buffering When Printing on Documents: The SJ station of the Model 3 or 4 printer
is blocked when a document is being printed. Therefore, simultaneous printing on the DI and SJ stations
is not possible. To minimize the impact to the application program, the printer driver buffers all data
written to the SJ station when a document is being printed.
Note: Buffering of the journal data is not required when printing on the CR.
The default method of journal buffering is transparent to the application and is activated from the
document sensors. The driver buffers all data sent to the SJ station after a form has been detected by the
top document sensor and prints the data following the removal of the document.
The application program can control when the buffered journal data is printed by setting bit 2 of byte LL in
the PUTLONG statement. When this bit is zero, the buffered journal data is printed after the document
has been removed. If bit 2 is 1, the buffered data is held until this bit is reset to zero. This method of
controlling the print execution of the buffered journal data can be advantageous when a transaction
requires more than one document (for example, the driver continues to buffer the data until all of the
documents have been printed). Immediately after resetting bit 2 from 1 to zero, the printer driver begins
printing the journal data. Therefore, the application should ensure that the user has completely removed
the document from the printer before resetting this bit to zero.
Use terminal configuration to specify the maximum number of journal lines the driver buffers. The driver
reads the configuration data and allocates the memory required to store the number of lines specified.
The driver holds this memory in reserve at all times to ensure it is available when required.
Note: For planning purposes, 64 bytes of memory are reserved for each line specified in configuration.
This value includes 38 bytes for data and 26 bytes for line feed and other control information.
If more lines are sent to the SJ station than specified during configuration, the driver logs error message
W354. The application program receives a return code, ERRN=8090052F ERR=BO, in response to
WRITE statements to the SJ station after the journal buffer is exceeded. If the application receives this
return code, it should eject the document and display a message indicating the journal buffer was
exceeded. When the document is ejected, the data is printed (assuming bit 2 of byte LL is zero), and the
journal buffer is cleared. An application program can issue a GETLONG command to determine the
status of the journal buffer. If bit 0 of byte LL is zero, the journal buffer is empty. After clearing the buffer,
a message can be displayed prompting the operator to reinsert the document and complete the
transaction. No data is lost if the document is ejected when this error is first received. Retries are not
allowed in response to the journal buffer overflow return code.
Reinserting Documents for Printing: Some transactions require that a document be inserted
into the printer many times for printing at a different location each time (for example, documenting
exception conditions or for voiding transactions). These documents can be positioned for printing using
the automatic method described in “Manual or Automatic Document Insertion” on page 3-72, or they can
be positioned using a manual method for the Model 3 or 4 printer. The following steps are required for
reinserting a document using the manual method:
1. Insert the document to the feed rollers and press the printer line advance button until the desired print
location is positioned just above the printer cover.
2. Press the document station ready button to reverse feed the document into the printer. The document
is now correctly positioned for printing and the application can issue WRITE statements to the DI
station.
This feature makes the Model 3 or 4 printer compatible with existing application programs that require
documents to be inserted from the side and manually positioned for printing.
Document Eject Command: The document station of the Model 3 or 4 printer holds documents
tightly in place, preventing manual repositioning. This method allows for more accurate positioning when
advancing a document under program control, but it also prevents an operator from pulling a document
out of the printer after printing has completed.
For fast removal of documents after printing, use the document eject command. Issuing this command
results in the document being fed rapidly out of the printer until it is free from the document feed rollers.
The document eject command is initiated by sending the control character sequence “CHR$(27),
CHR$(12)” in a WRITE statement to the DI station. The direction the document is advanced out of the
printer is controlled by the document line feed setting specified by PUTLONG or GETLONG byte MM, bit
1. The TCLOSE command ensures that the document eject is completed before the application is able to
issue another printer command, and it is recommended that this command be used after the document
eject command.
Positioning the Print Head: Before inserting documents, the print head should be moved to the
center home position. Inserting documents is easier if the print head is at the center home position. To
center the print head at the home position, the application should issue a TCLOSE command before
inserting the document.
Note: Some forms might insert more easily with the print head positioned at the far left sensor position.
Testing your application with the various print head locations is highly recommended.
Document Station Character Line Lengths: For maximum performance, the Model 3 or 4
printer driver checks the length of the data sent to the document station to determine how far the print
head should travel. If 38 characters or less are written to the document station, the print head travels only
half the width of the station. The data is printed right-justified over the journal station. If more than
38 characters are printed, the print head travels the entire width of the document station. Using the larger
character fonts, some blanks can be truncated to meet the 38-character limit. If this occurs, increase the
length of the data string to greater than 38 characters to force the print head to travel the entire distance.
The printer driver issues this return code whenever the printer cover has been opened and the outstanding
print line completed successfully. No retries are required by the application in response to this return
code, but the application may display an informational message indicating the printer cover is open.
Note: If printing is in progress when the cover is opened, the line in progress completes. However, no
additional printing can occur until the cover has been closed.
The cutter control characters must be included in a WRITE statement following the last line before the cut.
These characters must be the only characters included in the WRITE statement. No line advance occurs
as part of the cutter command, and therefore, the A value in the WRITE FORM statement is ignored on a
cutter command.
The application must advance the paper at the end of the transaction so that the last line clears the cutter.
Ten line feeds are needed to clear the tear bar when the receipt station line spacing is set to 6 lines per
inch. Twelve line feeds are required when the line spacing is set to 8 lines per inch.
Receipt Paper Cutter Example: The following example illustrates the method used to issue a
paper cut command.
OPEN "CR:" as 5
WRITE FORM "C38 A10"; #5; "THIS IS LAST LINE OF THE TRANSACTION "
WRITE FORM "2C1 A0"; #5; CHR$(27), CHR$(80) ! REM Issue cut command
! REM 'A' line advance value ignored
Printing Checks
Checks can be printed in normal mode (horizontally) in the document station of the Model 3 or 4 printer.
Therefore, the Model 2 check printing feature is not supported on the Model 3 or 4 printer. For additional
information on the Model 2 check printing feature, see “Printing Checks” on page 3-62.
A check printing utility is available from IBM for users of IBM application programs (for example, General
Sales Application or Supermarket) and also for users not using an IBM-supplied application. For
additional information, contact your IBM marketing representative.
The WRITE LOGO statement prints all-points-addressable data at the CR and DI stations. The dots to be
printed are specified in an array with this statement. The number of elements in the array must be a
multiple of 381. Each set of 381 bytes has 380 bytes of logo print data followed by one byte that contains
the number of dots that the paper is advanced after printing. Each byte controls the printing of one 8-dot
column. The first byte in the array corresponds to the leftmost print position. Bit zero of each byte
corresponds to the topmost dot of each dot column. If a bit=1, the corresponding dot is printed. Due to
hardware limitations, only the first 300 bytes of the 380 bytes of print data can be printed with the Model 1
and 2 printers.
No hardware restriction exists with the Model 3 or 4 printer to limit the width of logo printing to 300 slices.
However, to maintain compatibility with current 4680 or 4690 application programs, the Model 3 or 4
printer drivers default to the current logo width of 300 columns. To use the full 380-column width of the
receipt or document station, set bit 1 of byte LL of the PUTLONG statement to 1. Use the GETLONG
statement to determine the current bit value.
There is no provision in the Model 3 or 4 printer drivers for logo printing across the entire width of the
86-character wide document station. Therefore, the maximum logo width in either the receipt or document
station is 380 slices.
Only one WRITE LOGO statement can be queued. If a WRITE LOGO is issued before the previous logo
print ends, execution is suspended until the previous logo print is complete. The system passes errors to
the ON ASYNC ERROR subprogram. The error can be bypassed or the entire logo can be reprinted.
Requests for retries of logo prints should not be made.
Performance Considerations
There is a margin to the left of the CR station and a margin to the right of the SJ station. When printing is
done at a station, the print head first moves from the home position to the station margin or from the
margin to the home position depending on where the head was left from the previous print. If the print
head is in the margin of one station and the next print request is for the other station, the print head must
move back to the home position before it reaches the station at which the print is requested. In such a
case, the print head travels across one station without printing.
To maximize performance, your application can print so that print head travel time is minimized. Your
application should start with the head in the home position (following TCLOSE) and print an even number
of times at one station before printing at the other station. In some cases your application prints the same
data at both the CR station and the SJ station. In such cases, you should alternate which station is
printed at first (CR, SJ, SJ, CR, CR, SJ, and so on). This results in an even number of prints at one
station before moving to the other.
Note
You can perform printing (franking) on the back of a check when you insert it in the far right of the DI
station. However, only the last 20 characters of the narrow document print command can be printed
on the check while in that position.
From the time that the check is inserted in the far right position and the MICR command is sent, until
the check is removed from the printer, all DI print commands must be DI narrow print with the first 18
characters buffered with blanks. The application is responsible for ensuring that this restriction is
followed. No checking will be done by the printer driver.
After the application obtains the MICR data, it can use the optional MICR data parsing routines described
in this section or can parse the data using proprietary routines. The printer driver returns the data as
passed by the hardware and performs no manipulation on the data.
Understanding MICR Errors: Any error encountered on either the WAIT for the printer or the
READ LINE to the printer will trigger the ON ERROR statement currently in effect. Only errors on printer
WRITE statements will trigger the ON ASYNC ERROR in effect.
Any of the defined printer driver errors may be encountered during MICR actions. Printer driver return
codes can be determined by checking the first two bytes of the four byte return code for 8090nnnnH,
where nnnn is the unique portion of the return code, and the 8090 signifies that the error is from the
printer driver. The following table contains the most common MICR errors.
or
| Applications written for the standard Model 3 printer are compatible with the Fiscal Printer Model 3A and
| Model 3F. Logo commands cannot be printed by the fiscal printer, but no error occurs if a logo print
| command is executed. Refer to the IBM Fiscal Printer Software Supplement for your specific country, for
| a detailed description of the fiscal commands.
| The application opens the document insert station when issuing fiscal commands. Opening the document
| insert station allows 115 bytes of data to be sent with the fiscal commands. Opening the customer receipt
| or summary journal station only allows 75 bytes of data and may not be enough for some fiscal
| commands.
| Note: The IBM 4680 BASIC WRITE LOGO command and special characters are not supported by the
| 4680 Fiscal System.
| Error Handling and Recovery Procedures: For user programming errors, see the IBM 4680
| BASIC: Language Reference for details regarding error reporting procedures and user actions. For
| functional hardware errors, see the IBM Fiscal Printer Hardware Supplement for your specific country.
| Lines reprinted by the fiscal unit (when applicable) are identified by the number sign (#).
| GETLONG Function: Use the GETLONG function to get status information from the impact printer
| driver.
| i4 = A 4-byte integer that represents the driver status. The integer represents information in the form
| RRLLMMSS, where RR, LL, MM, and SS each represent one of the four bytes.
| number = The same 2-byte integer variable or constant assigned to any one of the printer stations in
| the OPEN statement.
| Note: The changes made to support the Model 3 printer have been marked with an asterisk (*).
| PUTLONG Function: Use the PUTLONG function to make changes to the customer receipt,
| summary journal, and document insert station mode.
| number = the same 2-byte integer variable or constant assigned to any one of the printer stations in
| the OPEN statement.
| i4 = a 4-byte integer that represents the driver status. The integer represents information in the form
| RRRRLLMM, where RR, RR, LL, and MM each represent one of the four bytes. The first two bytes
| are reserved for system use.
| Note: The changes made to support the Model 3 printer have been marked with an asterisk (*).
| Notes:
| 1. The function provided by bit 1 is not supported by the Model 3A fiscal printer.
| 2. The function provided by bit 6 is not supported by the Model 3A fiscal printer.
| 3. The function provided by bits 5 and 7 is not supported by the Model 3A fiscal printer in fiscal mode.
| Reading from the Model 3 Fiscal Printer: The CBASIC language does not permit reading from
| the printer. This function is provided by a library routine in the file ADXFISRL.286 (for medium memory
| models) or ADXFISBL.286 (for big memory models), that must be linked with applications using the fiscal
| printer.
| Using the FISREAD call: To read the printer data, the following sequence should be used:
| 1. Write the FISCAL READ command (X'DA' or X'DB') to the printer with a WRITE statement.
| 2. Issue a TCLOSE to the printer to flush the print buffer.
| 3. Call the FISREAD routine to retrieve the fiscal data into the application buffer.
| 4. Check the FISERR value for an error indication.
| 5. For an error, obtain the return code from the FISRC variable, or if no error, extract the needed data
| from the FISDATA string variable.
| CALL FISREAD(FISRC,FISERR,FISDATA)
Characteristics
| ¹ One scale can be attached to a terminal and can be one of the following:
| – Non-IBM scale attached to Feature Expansion Card B or C (4683 only)
| – Integrated scanner/scale attached to a terminal socket
| Refer to the 4690 Store System: Planning, Installation, and Configuration Guide for the terminal sockets
| that support a scanner/scale on your terminal
| ¹ You can select to have either English or Metric weight
| English - weight returned is:
| maximum of four digits
| hundredths of pounds
| Metric - weight returned is::
| maximum of five digits
| thousandths of kilograms
Use the CLOSE statement to end communication with the scale driver.
Receiving Data
Issue a READ FORM statement to receive data from the scale. If valid data is available, the variable
specified in the READ FORM statement contains the weight. If an error occurs, control passes to the ON
ERROR routine.
Example
To run the following example, put a weight on the scale. The program reads the scale, displays the
weight one time, and then stops.
%ENVIRON T
! Declare variables.
INTEGER*4 hx%,sx%,WEIGHT%
INTEGER*2 SCALE%,ANDSP%
ON ERROR GOTO ERRORA
! Indicate "ON ERROR" label.
ANDSP% = 1
! Set alphanumeric display session number to 1.
SCALE% = 2
! Set scale session number to 2.
OPEN "ANDISPLAY:" as ANDSP%
! Open alphanumeric display.
CLEARS ANDSP%
! Clear alphanumeric display.
Characteristics
The serial I/O communications driver has the following characteristics:
¹ Each IBM 4683 Point of Sale Terminal supports a maximum of two feature expansion cards. Each of
these can contain two ports to attach serial communication I/O devices. One port can attach an I/O
device that is compatible with an Electronics Industries Association (EIA) RS232C interface and the
other port can attach an I/O device compatible with an EIA RS232C interface or an asynchronous
20-milliampere current-loop interface.
¹ Each port can be used in either a half-duplex or full-duplex mode.
¹ The terminal serial I/O port functions as Data Communications Equipment (DCE) and the serial
communication device functions as Data Terminal Equipment (DTE) in terms of RS232C interface.
| ¹ 4684 terminals support serial ports COM1 and COM8 on the native serial ports and the ports on the
| dual asynchronous adapter. 4693 terminals support serial ports COM1 and COM2 on the native serial
| ports and COM1 through COM8 on the Dual Async adapter. 4694 terminals and 4683-4x1 terminal
| upgrades support serial ports COM1 through COM2 on the native serial ports. These serial I/O ports
| function as DTEs, and the serial communication device functions as DCEs as related to an RS232C
| interface.
To attach a device to the serial I/O port, you need the interface requirements of the particular device
and the EIA RS232C or asynchronous current-loop interface requirements. Current loop is supported
on 4683 terminals.
Commands allow you to communicate with the device. Your application has responsibility for any
protocol requirements such as checkpointing, pacing, positive or negative response, or error recovery.
You determine how to set these parameters by the interface requirements of the device attached to the
serial I/O port. The maximum application buffer size is the maximum number of bytes that you will
transmit or receive from the device on a single write or read operation.
Once you have issued the OPEN SERIAL to a port, you cannot change any of the parameters associated
with the OPEN SERIAL unless you issue a CLOSE to delete your I/O session and then issue another
OPEN SERIAL with different parameters.
Use the CLOSE statement to end your application's use of the serial I/O port.
Data in the driver buffer becomes available to your application when any of the following conditions occur:
¹ Data has been received and the timer expires before the next character is received.
¹ The driver buffer is full.
¹ Data has been received and an error or special event is detected (see “Waiting for Received Data” for
a list of the errors or events).
The normal condition that causes data to be available to your application should be the expiration of the
intercharacter timer. This value must be compatible with the device sending the data so that the timer
expires before 247 bytes are received. If the driver buffer is filled, data is lost if more data is received
before the application reads the driver buffer data.
If your device can send multiple blocks of data without a response from your application, you should read
the driver buffer promptly following the availability of data. If data becomes available because the timer
expired, and new data characters are received before the application performs a read operation, the new
characters are added to the driver buffer data. This could result in a buffer overrun condition if the driver
buffer data is not read promptly.
If data has been received and an error is detected, the error is not reported until the application reads the
data already received. The error is reported the next time the application performs a wait or read
operation. Any data received following the error is discarded until the application is notified of the error.
Any of the following conditions causes a WAIT to be satisfied by the serial I/O driver:
¹ The intercharacter timer expires.
¹ The 247-byte system buffer is full.
¹ One of the following errors or events occurs:
– A framing error is detected. A framing error results when the asynchronous character stop bit is
not detected at the proper time during reception of a character.
– A parity error is detected. Feature Expansion hardware error is detected.
– A break is received from the device.
– For a 4683 feature expansion card I/O port, DTR is inactive when DTR monitoring is requested
with a PUTLONG, and not configured as a current TCC Network.
– For an I/O port not on a feature expansion card, DSR is inactive when DSR monitoring is
requested with a PUTLONG.
| The status information contains the following information for 4684 and 4693 ports (both native and on Dual
| Async adapters), 4694, and 4683-421 terminal upgrade native serial ports.
¹ Data available
¹ Data lost
¹ DSR status (at the time GETLONG is executed)
¹ CTS status (at the time GETLONG is executed)
¹ Transmit buffer empty
For an I/O port not on a feature expansion card, issue a PUTLONG to condition DTR, RTS, and to set the
option that causes the driver to wait or not wait for DSR on transmit (byte CC, bit zero). These settings
must be according to the requirements of your device.
If an error is detected on a write operation, control is given to your ON ASYNC ERROR routine.
Example
This sample program uses the serial I/O interface to print the following 59-byte character set in a rippled
pattern on a serial printer or video display using the RS232-EIA port.
"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789&*:;'""@?,.$=!><()-%+#/ "
SUB ASYNC.ERR(RFLAG,OVER)
INTEGER*2 RFLAG
STRING OVER
RFLAG = 0
OVER = ""
hx% = errn
errfx$ = ""
for s% = 28 to 0 step -4
sx% = shift(hx%,s%)
the.sum% = sx% and 000fh
IF THE.SUM% > 9 THEN \
THE.SUM%=THE.SUM%+55 \
ELSE \
THE.SUM%=THE.SUM%+48
A$=CHR$(THE.SUM%)
errfx$ = errfx$ + A$
next s%
clears ANDSP%
EXERCISE:
FOR I% = 1 TO 20
C1$ = MID$(B1$,I%,80) !!! MSG DATA-RIPLE PATRN
WRITE # EIAP%; C1$ !!! SEND 1 MSG EACH PASS
NEXT I%
CLOSE EIAP% !! CLOSE SERIAL I/O
WRITE #ANDSP% ; "END OF SAMPLE"
CLOSE ANDSP% !! CLOSE AN DISPLAY
STOP !! STOP PROGRAM
ERRORA:
!!ERROR ASSEMBLY ROUTINE!!
hx% = errn
errfx$ = ""
for s% = 28 to 0 step -4
sx% = shift(hx%,s%)
the.sum% = sx% and 000fh
IF THE.SUM% > 9 THEN \
THE.SUM%=THE.SUM%+55 \
ELSE \
THE.SUM%=THE.SUM%+48
A$=CHR$(THE.SUM%)
errfx$ = errfx$ + A$
next s%
clears ANDSP%
write #ANDSP%;"err=",err," errl=",errl
locate #ANDSP%;2,1
write #ANDSP%;"errf=",errf%," errn=",errfx$
wait ;15000
resume
Characteristics
The tone driver has the following characteristics:
¹ The tone is an output device that provides audible feedback at the terminals.
¹ Your application controls the occurrence, frequency, and duration of tones.
¹ The operator can set the volume of the tones to be high or low by keying input to the terminal system
functions. The IBM 4690 Store System: User’s Guide explains how to set the tone volume.
Use the CLOSE statement to end your application’s use of the tone device driver.
Generating a Tone
Use the WRITE FORM statement to generate a tone. You must specify the frequency of the tone as
either low, medium, or high. You must also choose to either generate a tone of a specified duration or
control the tone through individual WRITE FORM statements. If you specify a tone duration, the tone
driver turns the tone on, waits the specified duration, and turns the tone off. If you do not specify the
duration, you must turn the tone on or off with separate WRITE FORM statements. You can set the
volume of the tone by specifying HI or LOW as the duration on a WRITE FORM statement.
When you issue a WRITE FORM statement, the request is queued to the tone driver. Control proceeds to
the statement following the WRITE FORM unless an error occurs. The driver allows a maximum of one
tone request being sounded and two queued requests; it discards any others. If you request the tone ON
(duration not specified), your next tone request must be a tone OFF request. Any tone requests other
than tone OFF are discarded.
The terminal tone volume can be controlled by using the WRITE FORM statement with HI or LOW as the
duration. To set the volume to high, specify HI as the duration. Specify LOW for low volume. In either
case, you must also include a valid frequency. A WRITE FORM with a HI or LOW does not produce any
tone, but sets the volume for future tone requests. The tone volume remains in effect until the next HI or
LOW is specified or until system function 6 is entered from the keyboard to toggle the tone volume.
When the driver processes a tone request, it ensures that at least 0.2 seconds elapse between completion
of the request and processing another one. This pause ensures that queued tone requests do not sound
like a single tone.
The I/O processor can also generate tones. You can specify in the input state table that a tone should
result from certain input sequences. The I/O processor issues the tone when these input sequences
occur.
Characteristics
The totals retention driver has the following characteristics:
¹ 1024 bytes are available for your application to store data that needs to be saved if the 4683 terminal
| loses power for a prolonged period. 16 KB are available for your application with a 4693/4694.
¹ Your application can use the totals retention storage area like it does for either a direct file or a
sequential file. The following functions are available:
– Direct Mode
- Write data to a specified address.
- Read data to a specified address.
– Sequential Mode
- Write data.
- Read data.
- Specify offset for next read or write.
- Get offset of last record read or written.
¹ For direct or sequential mode access, four bytes consisting of length and cyclic redundancy check
(CRC) information are added to each record written. You must include this overhead when calculating
record addresses or space requirements. The overhead bytes are not passed to your application
when you read a record.
For sequential mode, there is an additional overhead of four bytes for an end-of-file (EOF) marker.
This marker is appended to the end of a record on a write. If the offset is not changed, the previous
EOF marker is overlaid by each sequential record write.
The maximum record size that your application can write is 60 bytes in direct mode and 56 bytes in
sequential mode for a 4683 terminal, or 1020 bytes in direct mode and 1016 bytes in sequential mode
| for a 4693/4694 terminal. The totals retention driver automatically adds the required overhead bytes
to your records.
| The application address space for totals retention is 1 through 1024 for a 4683 terminal, or 1 to 16384
| for a 4693-xxx and 4694 terminal. Your application has the responsibility to determine the record start
and length in direct mode.
The CLOSE statement ends communication with the totals retention driver.
If you want to access the last record read or written, use the PTRRTN function to return the address of the
last record accessed. This address can be used on a POINT statement to prepare to reread or rewrite the
last record accessed.
When you write records sequentially by letting the next record pointer indicate the address, the previous
EOF marker is overwritten and replaced by the new record and new EOF marker. If you use the POINT
statement to change the address of the next write, it is possible to create multiple EOF markers in Totals
Retention storage.
ERROR1:
! Prevent recursion.
ON ERROR GOTO ERROR2
! Determine error type and perform appropriate recovery
! and resume steps.
ERROR2:
STOP
END
ON ERROR Statement
The ON ERROR statement specifies a label in control when an error associated with a synchronous
operation occurs. This statement should be the first executable (nondeclarative) statement in your main
application. All operations that your program generates are synchronous operations except for writing
data to the terminal printer, using the serial I/O driver, and writing data to a host communication session or
link.
Your ON ERROR routine can contain any valid IBM 4680 BASIC statement or function. The first
statement in your ON ERROR routine should be a test to see if you have run out of memory (ERR=OM).
If you get this error, do not attempt to initialize or increase the size of a string or an array. This would
result in another OM error and your program would end up in an infinite loop.
Your application can have multiple ON ERROR statements. However, one ON ERROR routine is in effect
at any one time. If your application consists of multiple functions and subprograms, each of these can
contain its own ON ERROR routine. When you enter the function or subprogram and an ON ERROR
statement is executed, the runtime library remembers the previous ON ERROR routine that was in effect.
When you exit the function or subprogram, the runtime library restores the ON ERROR routine to the label
it had before entering the procedure.
The ON ERROR routines in the terminal should check to determine if the terminal experiencing the I/O
error is powered-OFF. The applications for the Mod1 and Mod2 terminals both execute when the Mod1
terminal is powered-ON. Because Mod2 might be powered-OFF while the Mod1 terminal application is
still running, the ON ERROR routine should always check whether the I/O error was caused by the
powered-OFF terminal. You should use the ADXSERVE function for the application status to determine
whether the terminal is powered-ON or powered-OFF. ADXSERVE always indicates that the Mod1
terminal is powered-ON. See “ADXSERVE (Requesting an Application Service)” on page 15-17 for more
information on the ADXSERVE function.
When you have determined the type and source of the error, you must issue a RESUME statement to
recover from the error.
| When a runtime error occurs during an I/O operation, that I/O session number should not be closed in the
| ON ERROR code. Closing it before resuming from the error leaves runtime data pertaining to that session
| number in an indeterminate state. If a file, pipe, device or communication link must be closed because of
| an error, the ON ERROR code should set a flag to be checked in the mainline code where the I/O session
| can be safely closed.
Your ON ASYNC ERROR CALL subprogram can contain most valid IBM 4680 BASIC statements and
functions. This subprogram must have its own ON ERROR routine, local to this subprogram, to handle
any synchronous errors that occur when executing this recovery path.
Your application can have multiple ON ASYNC ERROR CALL statements. Only one ON ASYNC ERROR
CALL subprogram is in effect at any one time, however. If your application consists of multiple functions
and subprograms, each of these can contain its own ON ASYNC ERROR CALL subprogram. When you
enter the function or subprogram and an ON ASYNC ERROR CALL statement is executed, the runtime
library remembers the previous ON ASYNC ERROR CALL subprogram that was in effect. When you exit
the function or subprogram, the runtime library restores the ON ASYNC ERROR CALL subprogram to the
label it had prior to entering the procedure.
The ON ASYNC ERROR CALL subprograms in the terminal should check to determine whether the
terminal experiencing the I/O error is powered-OFF. See “ON ERROR Statement” on page 4-2 for
information on using the power on or off indication.
Refer to the IBM 4680 BASIC: Language Reference for information regarding the definition of the
subprogram and returning control to the application where the error occurred.
IF END# Statement
The IF END# statement specifies a label where control is given when a file-not-found, end-of-file, or
disk-full error occurs for a specified sequential, random, or direct file. For a keyed file, the label gets
control when a file-not-found or record-not-found error occurs.
An IF END# statement, unlike the ON ERROR and ON ASYNC ERROR CALL statements, is associated
with only one file. You can have only one IF END# statement active for each file; but you can have
several files active, each with its own IF END# statement.
Your IF END# routine can contain any valid IBM 4680 BASIC statement or function.
When you have taken some corrective action in your IF END# routine, you must issue a GOTO statement
to return to some point in your application.
RESUME Statement
The RESUME statement allows some type of recovery from all synchronous errors. The recovery options
available depend on the type of error that occurred. There are two types of errors: I/O errors and non-I/O
errors. The options available for recovery from an I/O error are RESUME, RESUME RETRY, and
RESUME label. The only option available for non-I/O errors, which are usually logic errors, is RESUME
label.
| Note: The RESUME statement may only be executed within an ON ERROR routine. Do not place the
| RESUME statement in a subprogram, function, or subroutine which is called by the ON ERROR
| routine.
RESUME RETRY: Execution of a RESUME RETRY statement causes the failing I/O statement to be
executed again. The application must keep track of the number of times the statement is executed to
avoid an infinite loop if there is a hard I/O failure.
RESUME label: Execution of a RESUME label statement causes the failing statement to be
bypassed and control to be given to a specified point in the application. You might want to designate
several key recovery points in your application where control should be given in case of a logic error or
some other unrecoverable error. This way you will be able to branch to one of several recovery points in
your application, depending on how far you have gotten through your program when the error occurs. You
| can also call an application service to take a system dump so that debugging data is available. Do not
| RESUME to a label that identifies a subroutine.
ERR Function
The ERR function returns a two-character string containing the error message of the last runtime error that
occurred. If no error has occurred when ERR function executes, it returns a null string. To identify and
get an explanation of the two-byte error code, refer to the IBM 4680 BASIC: Language Reference.
ERRL Function
Use the ERRL function when debugging your application. It returns the line number at which the error
occurred. If no error has occurred when this function executes, it returns a zero.
ERRF% Function
The ERRF% function returns the I/O session number associated with the most recent I/O error.
ERRN Function
The ERRN function returns a four-byte error code associated with I/O and operating system errors. This
error code can help isolate the specific cause of an error when multiple conditions exist that could
generate a single error code.
System Log
The operating system provides an event and error logging function that gives you a record of events
surrounding a system error. You can use the data collected by this function to help resolve problems that
you identify after a logged event or error takes place.
The data collected by the event or error logging function is stored in a set of files called the system log.
Placing system log data into these files helps isolate serious log entries (for example, a broken terminal
printer) from entries resulting from expected occurrences (for example, a terminal recovering from a power
line disturbance). The system uses the following guidelines for selecting a file for a particular event or
error:
File Use
Store Controller Used for faults that can be corrected by hardware repair at the store controller.
Hardware Errors
Terminal Hardware Used for faults that can be corrected by hardware repair at the terminal.
Errors
Terminal Events Used for recording errors or events in terminals.
Store Controller Events Used for recording errors or events in the controller.
System Events Used for a wide variety of normal events (for example, initial program loads (IPLs), PLD
recoveries), program-induced faults (for example, program checks), logical environment
faults (for example, missing data sets), or certain operator-induced events (for example,
choosing a system application).
Application Events Used for events generated by application programs. The application can execute in
either the terminals or store controller.
System Messages
Your operating system uses system messages to communicate exception conditions. These messages
result from internal conditions that the operating system detects and logs as events or errors in the system
log. In addition, system messages can result from your application calls to ADXERROR to accomplish
desired application event logging.
System messages give information about errors and tell you the action needed to correct such errors.
The messages consist of an identifier and descriptive text.
System Messages at the Store Controller: The main operator interface program handles
system message requests in the store controller. This program receives requests, formats and writes
system log entries, manages the six system log files, and based on severity code, adds messages to the
SYSTEM MESSAGE DISPLAY screen.
The general format for messages displayed at the store controller is:
mm/dd hh:mm cc ttt s annn xxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxx
where:
mm/dd hh:mm is the log entry time stamp.
cc is the controller identifier.
ttt is the terminal number.
For more specific information about the content and use of system messages, refer to the IBM 4690 Store
System: Messages Guide.
Severity Codes: You can specify which messages you want displayed on the SYSTEM MESSAGE
DISPLAY screen through the use of severity codes. Depending on the severity code you set, messages
at or below a certain severity level are shown as they are logged.
Severity codes are assigned to system message entries. Use these codes to indicate the impact of
certain events or errors on a store’s operation. For information on the severity codes, refer to the IBM
4690 Store System: Messages Guide.
For information on setting the system message display level, refer to the IBM 4690 Store System: User’s
Guide.
Severity Codes at the Terminal: System messages displayed at the terminal consist of a system
message identifier and text and pertain only to problems the terminal operator needs to know about for
recovery. These messages originate only from conditions detected by the operating system.
Terminal Services, an interface program for terminal software, provides logging and system message
support for the terminal. Events or errors in each terminal component are reported to Terminal Services
by specifying a message number, a group character, a request type, and any error or event parameters.
When Terminal Services receives error or event data, it sends the data to the store controller, and the
data can be displayed if desired. If a terminal has more than one display, the Terminal Services
messages will be displayed on the system display. Depending on the request type specified, the message
is displayed immediately or delayed. Delayed messages can be viewed only by entering key sequences
that display the message. For information on system message display operations at the terminal, refer to
the IBM 4690 Store System: User’s Guide.
The format of the terminal message depends on the type of display attached to the terminal. For
information on terminal message format, refer to the IBM 4690 Store System: Messages Guide.
Audible Alarm
The 4690 Operating System provides a function to sound an audible alarm at the store controller when
system messages are logged. This alarm alerts operators to situations that might require immediate
action to keep store operations running smoothly.
You can activate the alarm for a specified length of time, deactivate the alarm, and report the status of the
alarm. The functions can be used locally or remotely from a host processor.
You can select a report on the SYSTEM MESSAGE AUDIBLE ALARM FUNCTIONS screen to indicate the
status of the audible alarm at each controller. The report includes the store controller ID (if it is activated),
the length of time the alarm is set to sound, and informs you if the alarm is activated. The message
numbers can be displayed, printed, or written to a file.
To set the audible Alarm, select the Installation and Update Aids option from the SYSTEM MAIN MENU.
Then select the System Message Audible Alarm option on the INSTALLATION AND UPDATE AIDS
screen.
To build a list of messages to sound the alarm, type 1 from the SYSTEM MESSAGE AUDIBLE ALARM
FUNCTIONS screen. A table appears where you can enter message numbers. After determining which
messages you want to activate the audible alarm, enter the message numbers in the table on the screen.
If you have more message numbers than will fit on one screen, press the PgDn key. Another screen will
appear that will allow you to enter numbers. You can enter up to 100 message numbers. After you have
entered the desired message numbers, press the Enter key to save the numbers.
Note: The message numbers you select apply for all store controllers on a LAN (MCF Network).
To report the list of messages selected, select 2 from the SYSTEM MESSAGE AUDIBLE ALARM
FUNCTIONS screen. You can direct the report output to the screen, the printer, or to a file by placing a
value of 1, 2, or 3 in the Destination of Output field on the screen. If you select to direct the report output
to a file, the report is placed in ADX_SDT1:ADXCS1RF.DAT.
Message numbers are four character spaces in length. The first space is a character (A, B, C, D, T, U,
W, X, Y, or Z). The next three spaces are numbers from 000 to 999. Refer to the IBM 4690 Store
System: Messages Guide for an explanation of these messages.
Setting the Audible Alarm Function through RCP: The audible alarm function can also be
set using the Remote Command Processor (RCP). Refer to the IBM 4690 Store System: Communications
Programming Reference for more information on the Remote Command Processor.
You cannot perform the Build Audible Alarm Message File function through RCP. You must build the
audible alarm message file at your central site 4690 store controller. The file containing the messages
that sound the alarm is ADX_SDT1:ADXCS1AF.DAT. After building the file at your central site 4690 store
controller, you must send this file to your central site host processor. You can then transmit the file to
each remote 4690 store controller. The RCP commands allow you to perform the report, activate, and
deactivate functions directly.
For information on command formats using RCP, refer to the IBM 4690 Store System: Communications
Programming Reference.
You can limit the length of time the alarm will sound when a chosen message is logged. In the Alarm time
limit in seconds field, you can enter an asterisk (*) indicating that the alarm will sound continuously until
The message will be highlighted on the SYSTEM MESSAGE DISPLAY screen even if the alarm has
finished sounding.
In the Alarm Based on System Message Level field, you can indicate which of the two ways a message
alarm can be sounded. This option is important because a message can be logged with different severity
levels at different times. When enabling the audible alarm function, you should decide under which of the
following two conditions the alarm is to be sounded:
1. The first condition is by message number only. This means the alarm will be sounded only if the
logged message number matches a message number that you selected.
2. The second condition is by message number and message severity. This means that the alarm will
be sounded only if:
¹ The logged message matches a message number that you selected and,
¹ The message has a severity level equal to or higher than the current system message level
setting (1 is the highest severity and 5 is the lowest severity).
The severity of a message is an indicator of the severity of the event. Messages with severity 1 indicate
that a serious error has occurred and some action is required. Messages with severity 5 indicate
something of interest has happened, but requires no action on the part of the operator. See “Severity
Codes” on page 4-6 for more information on setting the System Message Display Level and also refer to
the IBM 4690 Store System: User’s Guide.
If you are operating a 4690 system with the Multiple Controller Feature on a LAN, you can request that the
report be generated for all store controllers on the LAN or a specific store controller. You can request this
by placing an asterisk (*) or a two-character store controller ID in the ID of controller field on the screen.
The operator should follow the operating procedures provided by store personnel for each of the
messages that are highlighted. You can enable or disable this function at any time.
When a PLD causes the store controller to shut down, the store controller re-IPLs after power is restored.
When a PLD causes the Mod1 or Mod2 terminals to stop, the storage retention function supplies power to
the memory of the terminal.
The file PLD recovery facility uses a battery-powered NVRAM to save the data to recover the file functions
interrupted by a PLD.
Sector level recovery saves the sector of data to be written to the disk for each disk write. The saved
data contains the original data on the sector and the new data. If a PLD prevents a sector from being
written, the sector is written as part of the store controller IPL.
File Allocation Table recovery keeps track of whether copy 1 or copy 2 of the File Allocation Table is being
updated. The copies are updated serially. If a PLD occurs during the update of either copy of the File
Allocation Table, the system copies the unaffected copy to the affected copy as part of the store controller
IPL.
You should write your store controller applications so that they can be restarted after a PLD. File updates
should be done so that they can always be restarted or the updates should have checkpoints.
The battery retains the power to the memory. The actual length of time depends on the amount of
memory, the size of the battery, and the battery charge. If the power outage lasts longer than the battery
can power the memory, the original contents of memory and function in process are lost and the terminal
re-IPLs when the power is restored.
You can enable and disable the storage retention function from the system screens, a store controller
application, a terminal application, or a terminal keyboard.
If the terminal operating system or application is in a code loop, powering-OFF the device and then
powering-ON with storage retention enabled will only return to the looping condition. Refer to the system
request functions in the IBM 4690 Store System: User’s Guide for information on getting out of the loop.
| Note: The 4694 Point-of-Sale Terminal does not support storage retention.
Terminal Power ON/OFF for the Mod1 Terminal with Storage Retention
Enabled
If power remains at the wall plug for the Mod1 terminal, powering OFF the terminal interrupts power to all
of the terminal functions except the memory. The power-OFF is treated as a PLD by the operating
system. As long as power remains at the wall plug, memory is retained and the storage retention
batteries are recharging. If the power is interrupted at the wall plug while the storage retention feature is
enabled, the battery powers the memory until power is restored or until the battery discharges.
When the terminal is powered-ON and the memory is still retained, the application is restarted by the
same process used in a PLD recovery.
Several types of errors can occur when a disk I/O statement is executed. Some of the errors indicate that
your program has attempted a function that is not valid; others indicate that there is a problem with the
Your error handling routines should be different for the terminal and the store controller. For example, in
some situations you might want to design the terminal application to function in a stand-alone mode when
access to the store controller is lost.
You can use the IF END# statement to detect end-of-file, missing records in keyed files, missing files, and
disk-full situations. Refer to the IBM 4680 BASIC: Language Reference for the details of using the IF
END# statement. Your application can either use a different IF END# routine for reads, writes, and so on,
or must set a variable to indicate to the IF END# routine the file function attempted.
All other disk and file errors cause the ON ERROR routine to be given control. If an IF END# statement is
not used, the IF END# types of errors also cause the ON ERROR statement to be given control. IF END#
statements are defined on a unique file basis and an ON ERROR statement is applicable to all disk and
file errors.
When errors detected on a READ statement cause the application to execute the ON ERROR routine, all
of the variables specified on the failing READ statement are set to zero or null when a RESUME
statement is executed.
Table 4-1 shows errors that can occur for some or all of the disk 4680 BASIC statements. Only the most
likely errors needing application recovery code are listed. Most of the errors not listed in this section could
be treated as your application would treat other program defects. You should review all of the possible
disk and file errors by referring to the IBM 4680 BASIC: Language Reference.
Table 4-1 shows errors that apply to both the store controller and the terminal. The xx values indicate
values that you need not pay attention to.
The following list describes the type of action for your application. For all of the following, your application
should report the error to the operator or log the error for later analysis. Avoid redundant logging.
Action
Type Explanation
10 Your application is requesting access rights that cannot be satisfied. This is probably a file
security problem. Your application should report that the user is trying to access a file for a
function that is not authorized.
11 Your application is requesting access to a file and it is in conflict with the current usage of the file.
12 Record specified by application was beyond the current end-of-file.
13 The keyed file has a problem that requires user attention.
14 The file does not exist as defined by the name.
15 The user changed the diskette. Prompt the user to restore the original media and continue.
16 The record specified for a READ does not exist.
17 There is insufficient dynamically allocatable memory in the store controller to perform the
requested function.
18 There is insufficient dynamically allocatable memory in the terminal to perform the requested
function.
19 The terminals are attempting to open more files than defined by configuration.
20 The disk drive is full and requires user attention to free disk space.
21 No files are available in the store controller. The application should execute in offline mode if
possible. When the store controller is available, the system will open the files again. The
application should not assume that previous file functions were successful. For example, the
application should repeat a READ AUTOLOCK instead of using the results of a previous READ
AUTOLOCK prior to executing a WRITE AUTOUNLOCK.
22 This could be a program defect; the program is trying to unlock a record that it does not have
locked. It could also occur if the terminal temporarily loses communication with the store
controller. The application should repeat the READ with AUTOLOCK and WRITE with
AUTOUNLOCK sequence for this record.
23 The file record is already locked. Your application should wait and retry. If the condition persists,
notify the user that this record cannot be accessed.
Application Responses
The type of response your application makes to an error condition depends on the type of error that
occurred. Depending on the type of error, your application must perform one of the following:
Request operator intervention. Your application asks the operator to take corrective action by
putting a message on a device other than the failing one. For example, if the error is caused by a
paper jam, the application could write a message to the display requesting that the operator clear the
jam. The application could then wait for the operator to signal (usually by a keyboard entry) that
corrective action has been taken.
Retry the operation. Your application requests that the failing I/O operation be retried. If the error
caused entry to the ON ERROR routine, the retry is done by a RESUME with the RETRY parameter.
| For a terminal printer error, the retry occurs when you set the retry flag parameter on (set to -1) in the
| ON ASYNC ERROR subprogram and then exit the subprogram.
| Bypass the operation. Your application requests that the failing I/O operation not be retried. If the
| error caused entry to the ON ERROR routine, the bypass is done by a RESUME without the RETRY
| parameter or a RESUME with a label specified. If the error caused entry to the ON ASYNC ERROR
| subprogram, the bypass is done when you exit the subprogram with the retry flag parameter off (set to
| 0).
| Refer to the IBM 4690 Store System: Messages Guide for error codes for I/O devices.
If the file mode attribute is Distribute At Close, and the application requires that a snap-shot of the file be
taken periodically so that the image version closely matches the prime version, you should be very
cautious about how often TCLOSE is used. You should be especially cautious if the file is large because
TCLOSE can take considerable time distributing a large file over the LAN (MCF Network). Refer to the
IBM 4680 BASIC: Language Reference manual for a discussion of the TCLOSE instruction.
While TCLOSE permits more frequent distribution of the file without requiring both a close and an open, it
could also have a significant performance impact on the system because of the resulting network traffic.
Note: A checkout application has priority over the distribution function and therefore should not be
affected. In contrast, the performance of a sales support program could be degraded. Depending on file
size and system utilization, file distribution could take several minutes.
The reason for this restriction is important. Unless a TCLOSE had just completed, an application reading
an image version of a file distributed at close could possibly receive obsolete data.
The importance of this restriction is seen in the case of an accounting totals file. This file, which is
updated continually by a sales support application and distributed at close, needs the most current data,
which is contained in the prime version.
In contrast, an application can read the image version of a per update file. If an application had to read
the prime version of a per update file such as an item record file, then all price lookup data from 4690
store controllers would have to go across the LAN (MCF Network) and back. This could cause a
performance problem.
If the remote 4690 store controller with the prime version of the file is disabled, the terminal application,
with one exception, will receive a write error because the record cannot be delivered over the LAN (MCF
Network) to the disabled 4690 store controller.
The one exception is if the terminal application issues a WRITE MATRIX. WRITE MATRIX is a
4680 BASIC language instruction that permits terminal applications to write string arrays to sequential
files. Refer to the IBM 4680 BASIC: Language Reference manual for details on the WRITE MATRIX
instruction. Instead of generating a write error, the WRITE MATRIX record is saved in a spool file created
on the 4690 store controller that supports the terminal. These saved records are sent (despooled) to the
intended file’s prime version later, when the disabled 4690 store controller is returned to service.
This process is called WRITE MATRIX spooling, and is described by the example below, using a
two-controller LAN system, with the master version of the transaction log on the master or file server. The
Alternate Master or Alternate File Server supports the TCC Network, and terminals on the network are
using a sales application that is issuing a WRITE MATRIX at the end of each transaction.
If the master or file server becomes disabled, the Multiple Controller Feature on the alternate master or
alternate file server will create a sequential spool file, ADXFSSSF.SPL, when it receives its first WRITE
MATRIX from a terminal application.
As the alternate file server receives a normal WRITE MATRIX from each terminal on the network, it
discards the WRITE MATRIX record, and a message is sent to the terminal telling it to send the record
again as a different type of WRITE MATRIX record. This new WRITE MATRIX is the same as the original
but has a 26-byte header containing the file name of the original target file. This header information is
used later in despooling to send each record to the correct file.
The new WRITE MATRIX, with the header, is sent by the terminal applications addressed to the spool file
now instead of the original file. The operating system receives the new WRITE MATRIX record and logs it
to the spool file. Thus, the sequential spool file grows with each WRITE MATRIX.
When the file server is enabled again, the operating system determines that the file server is back up, and
can now start logging directly to the prime version of the target file again. As each terminal sends in the
next WRITE MATRIX, the header is stripped off, and the record is sent to the prime version on the file
server. A message is sent to the terminal to begin sending each WRITE MATRIX to the master version of
the target file.
In the meantime, DDA starts despooling the spool file starting with the first record. The despooled records
are sent to the master version of the target file. Both the terminal application and DDA may be writing
records to the same file. This means that the spooled records will be intermixed with new records written
by the terminals.
When the DDA comes to the end of the sequential spool file, it closes the file and starts issuing requests
every two minutes to erase the spool file. Each erase command will fail until all opens to the spool file
have been closed. From the beginning, the system has counted the number of terminals that have been
writing to the spool file, and decrements the count each time the system redirects a new terminal to the
target file. When all terminals have been notified (the count goes to zero), the spool file is closed. At this
point there are no opens to the spool file, DDA’s erase command works, and the spool file disappears.
If the data received from the TCC Network by the 4690 store controller needs to be distributed to another
4690 store controller, and the total WRITE MATRIX data consists of more than one 508 buffer, a header
count byte in the first buffer indicates this. A message tells the receiving 4690 store controller to expect
the required number of buffers. When the whole WRITE MATRIX (consisting of more than one buffer)
distribution is completed over the LAN (MCF Network), the sending 4690 store controller sends an unlock
indicator as part of the last message to indicate that the data distribution is complete.
If a WRITE MATRIX sent by the terminal is less than 508 bytes, there will only be one message sent per
distribution. If the WRITE MATRIX length is over 508 bytes, then the number of LAN messages is the
absolute value of (1 + n/508) where n is the size of the data block.
Thus the overhead of distributing a 509-byte data block (one over the limit) in terms of LAN messages
required, is 2 to 1 for the 508 data block.
To access a file on an OS/2 remote node, a 4690 application program must specify the remote node
name. The complete file specification should follow this format:
nodename::path:filename.ext
The OS/2 computer name (the name designated during installation) should replace the nodename, and the
shared file resource name should be used in the path position.
OS/2 application programs reference files on a 4690 store controller using the device name from the NET
USE command. Before invoking an OS/2 application that opens or creates files on a 4690 store
controller, the NET USE command should have been issued.
For a C-language program written to copy the General Sales Application transaction summary log from a
4690 store controller to an OS/2 machine, see “Example of a C/2 C-Language Program” on page 5-5. It
shows that only standard C-language commands and library functions were used to perform the copy
process.
The “Example of a 4680 BASIC Program” on page 5-8 also shows how to copy files between the 4690
Operating System and OS/2. The program prompts the user for the source and destination file names
prior to invoking the program statements that result in the file being copied. As noted in the program
comments, this particular program is limited to copying files no larger than 32,767 bytes. This size
restriction can be eliminated by using a more complex program that calculates the size of the file and
determines an appropriate record size.
#include <stdio.h>
main()
{
FILE *FP1, *FP2;
long length;
char buf[512];
} /* End */
To access a file on a remote DOS node, a 4690 application program must use a file specification that
includes the node name of the remote computer. The complete file specification should follow this format:
nodename::path:filename.ext
The DOS computer name (the name designated by the NET START command) should be substituted for
the nodename, and the shared resource short name should be used in the path position.
DOS application programs reference files on a 4690 store controller using the device name from the NET
USE command. Before invoking a DOS application that opens or creates files on a 4690 store controller,
the NET USE command must have been issued.
See “Example of a DOS C-language Program” on page 5-7 for an example of a C-language program
written to copy the General Sales Application transaction summary log from a 4690 store controller to a
DOS PC. It shows that only standard C-language commands and library functions were used to perform
the copy process.
“Example of a 4680 BASIC Program” on page 5-8 includes a 4680 BASIC program used to copy files
between the two operating systems. The program prompts the user for the source and destination file
names prior to invoking the program statements that result in the file being copied. As noted in the
program comments, this particular program is limited to copying files no larger than 32,767 bytes. This
size restriction can be eliminated by using a more complex program that calculates the size of the file and
determines an appropriate record size.
#include <stdio.h>
#include <stdlib.h>
void main()
{
FILE *FP1, *FP2;
int length;
char buf[512];
} /* END */
The IBM 4690 Operating System provides a Keyed File Utility (KFU) to allow you to create and manage
keyed files. You can start the utility from the SYSTEM MAIN MENU screen, from Command Mode, or
from the host processor.
When you start the KFU from the SYSTEM MAIN MENU, you are using it in an operator-interactive mode.
When you start the utility from a batch file, you provide the necessary input on the command statement
that starts the utility. When you start the utility from the host processor, you provide the necessary input
through Host Command Processor (HCP) commands. Refer to the IBM 4690 Store System:
Communications Programming Reference for information on using the KFU from the host processor.
To learn more about the characteristics of keyed files, see “Internal Processes of Keyed Files” on
page 6-12.
This screen, and the ones that follow it, guide you in creating keyed files or checking the performance of
existing keyed files. You can also create keyed files from a BASIC application program using the
CREATE POSFILE statement.
When you have selected your file size, randomizing divisor, and hashing algorithm, request the Create
Keyed File option on the KEYED FILE MANAGEMENT screen. You are prompted to enter all of the
variables needed to create the keyed file. The KFU begins writing records to the keyed file.
Information messages appear on your screen as the keyed file is being created. The system displays the
current phase and a count of the records that the utility has written to the keyed file. Checkpoints are
taken by the KFU at 20-minute intervals. When creation of the keyed file is complete, the utility asks if
you would like to erase the input file. If you do not need the input file for any other purpose, erase it.
If the keyed file creation process is interrupted, you can restart the process from the last checkpoint.
When you start the KFU after creation of a keyed file has been interrupted, the CHECKPOINT RESTART
menu appears. You can restart creation of the keyed file or cancel the checkpoint.
After you convert your file, you can access it and make the desired changes. Then recreate the keyed file
using the Create a Keyed File option with the direct file as the input.
Use the batch file method to create keyed files by doing the following:
¹ Create a keyed file from a direct file.
¹ Create a direct file from a keyed file.
¹ Create an empty file.
¹ Produce statistics for a keyed file.
¹ Report chaining statistics from a direct file.
¹ Restart from a checkpoint.
¹ Restart from the last checkpoint if the checkpoint exists for the specified keyed file. If a checkpoint
does not exist for the specified keyed file, delete the checkpoint and create the specified keyed file
from a direct file.
Format
ADXCSK0L a b c d e f g h i j k l m n o p
where:
a Function request. Valid values are:
1 Create a keyed file from a direct file.
7 Restart from the last checkpoint if the checkpoint exists for the specified keyed file. If a
checkpoint does not exist for the specified keyed file, delete the checkpoint, and create the
specified keyed from a direct file.
9 Cancel the checkpoint and create a keyed file.
b Report output device:
2 Printer output
3 File output
c Disposition of direct file after processing is finished:
N Do not erase the input file.
Y Erase the input file.
d Disposition of an existing version of the keyed file:
N Do not erase an existing version of the keyed file.
Y Erase an existing version of the keyed file.
e Name of direct file (up to 35 characters).
f Name of keyed file (up to 35 characters).
g Record length of a direct file (range of 1 to 508).
h Record length of keyed file (range of 1 to 508).
i Length of key (<= record length).
j Number of records to be allocated on disk. (This should be the maximum number of records
anticipated plus a minimum of 25%.)
k Randomizing divisor. If k = 0 is entered, a system generated randomizing divisor is used.
l Chaining threshold.
Format
ADXCSK0L 2 b c d e f m
where:
b Report output device:
2 Printer output
3 File output
c Disposition of keyed file after processing is finished:
N Do not erase keyed file when finished.
Y Erase keyed file when finished.
d Disposition of an existing version of the direct file:
N Do not erase an existing version of the direct file.
Y Erase an existing version of the direct file.
e Name of keyed file (up to 35 characters).
f Name of direct file (up to 35 characters).
m File attributes:
1 Local
2 Mirrored at update
3 Mirrored at close
4 Compound at update
5 Compound at close
Format
ADXCSK0L 4 b c d e f g h i j k l m n
where:
b Report output device:
2 Printer output
3 File output
c Y or N (used only as a placeholder).
d Disposition of an existing version of the keyed file:
N Do not erase an existing version of the keyed file.
Y Erase an existing version of the keyed file.
e Dummy name (used only as a placeholder).
f Name of keyed file (up to 35 characters).
g Record length (used only as a placeholder).
h Record length of keyed file (range of 1 to 508).
i Length of key (<= record length).
j Number of records to be allocated on disk.
k Randomizing divisor. If k=0, a system generated randomizing divisor is used.
l Chaining threshold.
m File attributes:
1 Local
2 Mirrored at update
3 Mirrored at close
4 Compound at update
5 Compound at close
n Hashing algorithm. (This optional parameter can be used to override any hashing algorithm
specified using logical names. It can be 0, 1, or 2. See “Hashing Algorithms” on page 6-10.)
Format
ADXCSK0L 3 b c d e
where:
b Report output device:
2 Printer output
3 File output
c Y (not used)
d Disposition of statistics after producing the report:
N Do not clear statistics after producing report.
Y Clear statistics after producing report.
e Name of keyed file (up to 35 characters).
Format
ADXCSK0L 5 b c g i j k [n] [o] [p]
where:
Note: Parameters n, o, and p are optional. They are positional parameters. If one is specified, all of the
preceding parameters must be specified.
b Report output device:
2 Printer output
3 File output
c Name of direct file (up to 35 characters).
g Record length of keyed file (1 to 508).
i Length of key (<= record length).
j Number of records to be allocated in the keyed file.
k Randomizing divisor. If k=0, a system generated randomizing divisor is used.
n Hashing algorithm. (Must be 0, 1, or 2. See “Hashing Algorithms” on page 6-10.)
o Maximum in memory table buffers. (This optional parameter can be used to limit the number of 32K
buffers that can be allocated.)
p Minimum in memory table buffers. (This optional parameter can be used to specify the minimum
number of 32K buffers to be allocated.)
Format
ADXCSK0L 6
Format
ADXCSK0L 8
Hashing Algorithms
The IBM 4690 Operating System provides a default hashing algorithm for all keyed files: the IBM Folding
algorithm. It also provides the Exclusive OR (XOR) rotation hashing algorithm and the polynomial hashing
algorithm for use on large keyed files. Using the XOR rotation hashing algorithm or the polynomial
hashing algorithm on large keyed files results in fewer chained records and improved performance in file
build and file access.
The polynomial hashing algorithm improves record distribution when keys contain repeated numeric
patterns. A key that has ASCII characters is an example of a key with repeated numeric patterns.
Hashing algorithms other than the default should be chosen for files having more than 40K records and a
randomizing divisor greater than 6000. An item record file is an example of a file whose performance
might be improved through use of a hashing algorithm other than the default.
You can select the hashing algorithm when a keyed file is created and specified through logical names.
The logical names are entered using the User Logical File Names option on the CONTROLLER
CONFIGURATION screen. You must define the logical name at the store controller (master store
controller or file server) where the file is created. Perform the following steps:
Note: If you are using the IBM Folding hashing algorithm, you do not need to perform this procedure.
1. From the SYSTEM MAIN MENU, select the Installation and Update Aids option.
The INSTALLATION AND UPDATE AIDS screen appears.
2. Select Change Configuration.
The CHANGE CONFIGURATION screen appears.
3. Select Controller Configuration, and then select User Logical File Names.
4. Define the logical name for the file. The logical name is the file name with an H appended, for
example, EALITEMRH for the file EALITEMR.DAT. The name is the same as it appears in the disk
directory but without the file extension.
The User Logical File Names screen is displayed. Select the Define a Logical File Name option, and
type the logical name (the file name with the H appended). The Define Logical File Names screen
appears. Enter either 0, 1, or 2 on this screen to define the desired hashing algorithm for use with the
file:
0 IBM Folding algorithm
1 Exclusive OR (XOR) rotation hashing algorithm
2 Polynomial hashing algorithm
For example, to select the XOR rotation hashing algorithm for file EALITEMR.DAT, the logical name
EALITEMRH = 1.
When the system creates a file, it searches the logical names table in the following order:
¹ File name with H appended
¹ If the above file name is not found, it searches the system default hashing algorithm name
ADXHASH.
¹ If neither logical file name is found, the system selects the default hashing algorithm.
5. After defining the logical name, return to the CONTROLLER CONFIGURATION screen and select the
Activate Configuration option.
6. When you activate the configuration, IPL the store controller to load the new definitions. You can
verify the definitions as described in “Verifying Definitions” on page 6-12.
7. If the logical name shows the correct hashing algorithm, create the keyed file. Use either a 4680
BASIC program or the KFU.
Note: If you use the KFU to create the keyed file, you can override the hashing algorithm selection made
using logical names.
If you want to change the hashing algorithm on a keyed file, use the KFU to create a direct file from the
keyed file. Then erase the keyed file. Create the keyed file from the direct file by specifying the desired
hashing algorithm.
You can define the system default hashing algorithm using the logical name ADXHASH. If you define
logical name ADXHASH as 1, all keyed files created use the XOR rotation hashing algorithm. If you
define the logical name ADXHASH as 2, all keyed files created use the polynomial hashing algorithm.
The KFU has an optional parameter to override the system default when creating a keyed file from a direct
file.
Verifying Definitions
To verify new definitions that have been activated, select the Command Mode option from the SYSTEM
MAIN MENU. When the prompt appears, enter DEFINE -S-N logical name. The system searches the
logical names table for the logical name that you entered.
IBM Folding Algorithm: The IBM Folding algorithm randomizes the distribution of keyed records in
the data set. Randomizing transforms record keys into expected block addresses relative to the start of
the data set. The procedure is divided into two distinct parts: key folding and randomizing.
Key Folding: Folding is a logical accumulation of the bytes of the key into two accumulation bytes; these
bytes are initialized to zero. Alternate key bytes are folded into accumulators with the Exclusive OR
(XOR), starting with the low-order key byte into the low-order accumulator and the next byte of the key
into the high-order accumulator. This process continues, working through the key from low-order to
high-order (right to left), until the key is entirely processed. The result is a two-byte value derived from the
entire key. See Figure 6-1 on page 6-13 for more information.
Key: 6 5 4 3 2 1 Key: 6 5 4 3 2 1
--Exclusive OR--
-Folded Key-
Step 3: Step 4:
Key: 6 5 4 3 2 1 Key: 6 5 4 3 2 1
--Exclusive OR--
-Folded Key-
Step 5: Step 6:
Key: 6 5 4 3 2 1 Key: 6 5 4 3 2 1
--Exclusive OR--
-Folded Key-
Notes:
1. MSB denotes the most significant byte.
2. LSB denotes the least significant byte.
Randomizing: A randomizing divisor divides the folded key. The divisor must be less than the number
of blocks allocated for the keyed data set. The remainder from the division is the expected relative block
number. The choice of the randomizing divisor and record keys affects the distribution of records in the
data set. You must choose these variables so that the data set contains a uniform distribution of records.
While no records randomize greater than the randomizing divisor, these blocks are used for overflow
records if any additional blocks are needed and available.
Randomization is performed by dividing the two-byte folded key (MSBLSB) by the randomizing divisor.
The resulting remainder is the relative block number in the keyed file that contains the keyed logical record
or an overflow chain pointer to the block containing the record. If the remainder is equal to zero, the
relative block number is equal to the randomizing divisor.
Example of the XOR Rotation Hashing Algorithm: Assume a 4-byte key of eight packed
decimal digits shown here.
10 53 02 37
(XOR)
0001 0000 = 10 0101 0011 = 53
0000 0010 = 10 0011 0111 = 37
12 MSB 64 LSB
12 64 FOLDED KEY
Note:
BCD denotes "binary code decimal"
MSB denotes "most significant byte"
LSB denotes "least significant byte"
XOR denotes "Exclusive OR" explained below:
0 0 0
0 1 1
1 0 1
1 1 0
The IBM folding algorithm (see Figure 6-1 on page 6-13) is performed to produce this folded key.
12 64
As it computes the folded key, the algorithm calculates the bit rotation count as follows:
1. Converts the digits to binary in reverse order and divides by 31. 73203501 / 31 = 2361403 with a
remainder of 8.
2. Halves the remainder to produce the bit rotation count. 8 / 2 = 4.
Polynomial Hashing Algorithm: The polynomial hashing algorithm uses the same technique that
generates the Frame Check Sequenced (FCS) field for SDLC transmission frame. This algorithm is for
users who choose to generate the FCS without using the Hashing Utility, KFU.
The following example illustrates the polynomial hashing algorithm. You can use the following application
to generate a keyed file without using the KFU.
ptr = data;
crcbyte1 = 0xFF
crcbyte2 = 0xFF
return_val.bytes[0] = ˜crcbyte2;
return_val.bytes[1] = ˜crcbyte1;
return(return_val.ret);
}
The following table shows the output from the example program when used with the input data shown.
The I/O is two bytes and hexadecimal form.
Input Output
1234 DEC1
1111 8206
4143 2066
Record Chaining: Each block has two chain pointers, each two bytes long. One pointer points
forward, the other, backward. The system uses these pointers to chain together records that overflow one
block into another. The next block that the overflow data is put into cannot be the next sequential sector
on the disk. By chaining them together using pointers, the system knows which home block the data is
related to.
The block the overflow data is related to is called a home block. If the system tries to add a record to a
home block that is already full of records, it checks to see if an overflow chain exists for that block. If one
does, the system checks it for available space. If the system finds the available space, it adds the record
to the block with the available space. If there is no available space in that overflow chain, the system
locates another block without overflow records, and adds this block to the end of that block’s overflow
chain.
If no overflow chain exists for the original home block, the system creates one. It scans the keyed file for
a block with sufficient room for the record. The block cannot already contain other overflow records. The
record is added to this block; this block is added to the record’s home block overflow chain.
Note: Overflow chains will not contain overflow records from more than one home block.
When creating a keyed file, the system sets a value for a number called the chaining threshold. The
system logs a message in the system log when adding records and an overflow chain is encountered that
is longer than the threshold value. This message indicates that either the keyed data storage is getting
too full or that the file is poorly randomized.
Figure 6-2 through Figure 6-5 on page 6-20 illustrate space management with and without overflow
chains.
0 2 4 44 84 124 512
Block
Before fdwd bkwd home home home free space
Rec 4 chain chain rec1 rec2 rec3 (binary zero)
Added
Data set after overflow block allocated and record five added. Record five becomes the first overflow
chain for block 'a'.
Figure 6-4. Example of Adding a Record to a Full Home Block Creating Overflow Chain
Note: The same process is performed if the last block in the overflow chain is full. Space is found in
another block not containing any overflow records, and this block is added to the current overflow chain.
Notice that blocks 'a' and 'b' remain unchanged from their original positions.
All fields marked with an asterisk (*) should be initialized (zero might be valid for some of these fields). All
binary fields are in 80286 convention (for example, decimal 512 would be B'0002').
| This chapter is your guide to using the Input Sequence Table Build Utility for building and maintaining your
| application's input sequence tables. The tables' concepts and definitions are described in Chapter 3 on
| page 3-1 in the I/O Processor section. You should review that section if you are not familiar with input
| sequence tables. This utility has extensive help screens, that are a valuable resource for learning about
| the input sequence tables.
| The input sequence tables are used by the I/O processor to determine what operator input is allowed and
| how to process it.
The utility also maintains a working table for each table you have changed but not activated. This function
allows your application to use the input sequence table unchanged while you change the working tables.
The utility automatically names and updates the working tables as you update the input sequence table.
When you use the utility options to manage your input sequence table, the utility also manages any
associated symbol and working files. For this reason, you should always use the utility options to manage
your tables rather than using other programs that are not aware of the additional tables.
When you use the Copy option from the INPUT SEQUENCE TABLE screen to copy a table, the new table
will be a local file regardless of the attributes of the source file.
If file security is enabled on your system, you cannot change an input sequence table in the ADX_IPGM
subdirectory. The Input Sequence Table Utility executes as user ID = 1 and group ID = 3, and can
therefore only create files in the ADX_UPGM subdirectory or in the root. While this is important to
protecting your files, it can be inconvenient when updating a table in the ADX_IPGM subdirectory. To
overcome this temporary inconvenience, you can copy input sequence table files produced by the utility
from the ADX_IPGM subdirectory to the ADX_UPGM subdirectory by using the Copy option on the INPUT
SEQUENCE TABLE screen.
Display a table: The display option displays a formatted report of a table. For the input state table you
can request a report for part of the table.
Print a table: The print option prints a formatted report of a table. For the input state table you can
request a report for part of the table.
File the report of a table: The file option writes a formatted report of a table to a file name you choose.
For the input state table you can request a report for part of the table. The name for this file must be in
the root or in ADX_UPGM. You are responsible for erasing the report file.
Erase a table: When you erase a table, the system erases the named table and any associated symbol
and working tables. The system asks you for a confirmation of your option choice before erasing the
table.
Copy a table: This option copies a table and associated symbol and working tables.
Change a table: This option allows you to change an existing table and still use the unchanged table.
When you change a table, the utility allows you to change the working table if one already exists. If there
is no working table, one is created by making a copy of the table. You make changes to the working table
while your applications continue to use the original one.
You can change a portion of a table, leave the utility, and return to work on it later. The utility maintains
your changes in the working table. The utility will not make the changed table active until you request the
option to activate a table.
Activate a table: This option allows you to replace the currently active table with the associated working
table. When you activate the working table, the utility erases the currently active table and associated
symbol table and renames the working table and working symbol table to the names of the original tables.
The utility cannot erase a file in ADX_IPGM due to file security.
Add a new table: This option allows you to build a new table. Because of references between tables,
the input sequence table should be created in the following order:
1. Label format table
2. Modulo check table
3. Input state table
where:
xxx = Three characters of your choice. If you are defining additional tables for the IBM licensed
products, use UUU.
a = A character of your choice.
@ = The fifth character of each file name.
bbb = Three characters of your choice. These characters are optional.
The utility automatically names symbol and working tables. The symbol table name is created by
replacing the @ character with the $ character. The working table names are created by replacing the @
character with a character and replacing the $ character with a character.
When you are adding states or function codes and you name a next state, the named state must have
already been defined or you will receive an error message. To bypass the error, you can temporarily call
the next state CURRENT or LOCK. You can then change to the correct state name after the state has
been added.
Once a state ID is assigned, you cannot change the ID. You can change only the state symbolic name.
When you are entering messages to be displayed, there is a difference between spacing with the space
bar and moving the cursor. When you use the space bar, a blank is displayed in that position. When
you move the cursor, nothing will be displayed for that position (unless you previously entered something).
When you choose to add to a table, default values appear in the screen input fields. When you add a
state, you can request another state be used as a model. This model state is used for default values.
When you add function codes to a state or common state information, the previous function code you
added for the state or common state is used to set up default values.
The maximum size of any table is 64 KB. You can use the directory function of the operating system to
determine the size of your tables.
This chapter tells you how to use the LIB86 Library Utility. It includes information on creating library files,
appending an existing library, and replacing or deleting library modules.
A library file consists of one or more object modules. To increase the speed of the linking process, a
library file contains an index. The index contains all the public functions and subprograms that are in each
module, enabling LINK86 to determine which routines in the library are required to create the program.
LIB86 is a library utility that enables you to create and modify your own library files.
LIB86 is a versatile library manager for developing library files to use with LINK86. LIB86 can:
¹ Create a library file from a group of object files
¹ Append modules to an existing library file
¹ Replace modules in an existing library file
¹ Delete modules from an existing library file
¹ Select specific modules from a library file
¹ Display library information
LIB86 generates library files according to instructions you specify in the command line. Input files can
have a file extension of OBJ or L86. LIB86 assumes an input file has an OBJ file extension if you do not
specify a different file extension. To conclude processing, LIB86 displays the total number of modules
processed and the use factor. The use factor is a decimal percentage value specifying the amount of
memory LIB86 uses.
The command line starts LIB86 and specifies the input files to be processed.
LIB86 checks for errors and displays literal error messages. The error messages are described in “LIB86
Error Messages” on page B-1.
You can specify either the option or its abbreviation in a command line. The remainder of this chapter
explains the use of command-line options.
LIB86 can process any number of files. The length of a command line can be a maximum of 128
characters. When you must use a command line that exceeds 128 characters, you can shorten file
names, or place the command line in a file and use the INPUT option.
You can create command-line files with an INP file extension using a text editor. Enter the new library
name before an equal sign and list each input file, with options, after the equal sign, the same way you do
in a command line. Do not include the characters LIB86 in the file. You can place tab characters,
carriage returns, and line feeds anywhere in a command line file.
The following example shows the beginning of a command-line file named LIBRARY1.INP:
LIBRARY1 = SUBTOT [XREF], ADD2, SUB45, MULT, DIV2,
NET1, NET2, NET3,
TOTAL, GROSS1, GROSS2, GROSS3,
CHART1, CHART2, CHART3,
.
.
.
The preceding example specifies the INPUT option, instructing LIB86 to read the remainder of the
command line from the LIBRARY1.INP disk file.
You can create one large library file from several smaller library files.
The following example creates a large library file named TESTLIB.L86 from the input files LIB1.L86 and
LIB2.L86. L86 files contain more than one module.
A:>LIB86 TESTLIB=LIB1.L86,LIB2.L86
You can combine OBJ and L86 files in one command line to create a library, as shown in the following
example:
A:>LIB86 MATHLIB=MULT,DIVIDE.L86
The preceding example creates a library file named MATHLIB.L86 from the input files MULT.OBJ and
DIVIDE.L86.
The following example appends the files ONE.OBJ and LIB1.L86 to the existing library file TESTLIB.L86:
A:>LIB86 TESTLIB=TESTLIB.L86,ONE,LIB1.L86
You can rename an appended library file, as shown in the following example:
A:>LIB86 NEWTEST=TESTLIB.L86,ONE,LIB1.L86
The preceding example appends the files ONE.OBJ and LIB1.L86 to the existing library TESTLIB.L86,
creating a new library file named NEWTEST.L86.
The following command line replaces the module ONE with the file NEWONE.OBJ in the library file
TESTLIB.L86.
Note: See the correct use of brackets in the command line.
A:>LIB86 TESTLIB=TESTLIB.L86 [REPLACE [ONE=NEWONE]]
If you want to replace a module but maintain the same module name, specify the name only once after
the REPLACE option.
The following example replaces the module ONE with a new ONE.OBJ file in the library TESTLIB.L86,
and renames the library NEWLIB.L86:
A:>LIB86 NEWLIB=TESTLIB.L86 [REPLACE [ONE]]
You can replace several modules with one command line. Separate the REPLACE option specifications
with commas, as shown in the following example:
A:>LIB86 NEWLIB=TESTLIB.L86 [REPLACE [ONE=NEW1, TWO=NEW2]]
You cannot use the command-line options DELETE and SELECT with REPLACE in the same command
line.
LIB86 displays an error message if it cannot find a specified module in the library file.
You can delete several modules with one command line. Separate modules after the option DELETE with
commas.
The following example deletes three modules to create a new library named NEWLIB.L86:
A:>LIB86 NEWLIB=TESTLIB.L86 [DELETE [ONE, TWO, FIVE]]
You can delete a group of contiguous library modules using a hyphen, as shown in the following example:
A:>LIB86 NEWLIB=TESTLIB.L86 [DELETE [ONE - FIVE]]
The preceding command line deletes all modules from module ONE through module FIVE.
You cannot use the command-line options REPLACE and SELECT with the DELETE option in one
command line.
LIB86 displays an error message if it cannot find a specified module in a library file.
The following example creates a new library named NEWLIB.L86 that consists of three modules selected
from OLDLIB.L86:
A:>LIB86 NEWLIB=OLDLIB.L86 [SELECT [TWO, FOUR, FIVE]]
You can select a group of contiguous library modules using a hyphen, as shown in the following example.
A new library is created that consists of five modules selected from an existing library, assuming modules
ONE, TWO, THREE, FOUR, and FIVE are contiguous in the library file.
A:>LIB86 NEWLIB=OLDLIB.L86 [SELECT [ONE - FIVE]]
You cannot use the command-line options DELETE and REPLACE with the SELECT option in the same
command line.
LIB86 displays an error message if it cannot find a specified module in a library file.
Use the XREF option to create a cross-reference listing for a specified library file.
The following example creates a cross-reference file named TESTLIB.XRF for the TESTLIB.L86 library
file:
A:>LIB86 TESTLIB.L86 [XREF]
A module map contains an alphabetized list of all modules in a library file. Following each module name
is a list of all segments in the module and the length of each segment. A module map also includes a list
of all public and external symbols specified in the module.
Use the MAP option to create a module map for a specified library file.
The following example creates a module map named TESTLIB.MAP for the TESTLIB.L86 library file:
A:>LIB86 TESTLIB.L86 [MAP]
Usually, LIB86 alphabetizes the names of modules in a module map listing. Use the NOALPHA option to
produce a module map that lists module names in order of occurrence, as shown in the following example:
A:>LIB86 TESTLIB.L86 [MAP, NOALPHA]
You can use LIB86 to create partial library information maps using the MODULES, SEGMENTS,
PUBLICS, and EXTERNALS options. You can use the four options in any combination.
The following example creates a module map that contains only public and external symbols:
A:>LIB86 TESTLIB.L86 [PUBLICS, EXTERNALS]
The linker is available to run in a DOS, OS/2, or 4690 Operating System environment. The file
LINK86.286 runs in the 4690 Operating System environment. LINK86.EXE runs in either a DOS (Version
3.3 or higher) or OS/2 (Version 1.2 or higher) environment. The linker utility is shipped in the 4690
Optional Programs diskette.
During processing, LINK86 displays unresolved symbols. An unresolved symbol is declared to be external
in one or more modules, but is not publicly defined in any module.
| When processing is complete, LINK86 displays the size of each section of the load module. See
Figure 9-1 on page 9-3.
filespec is a file specification, consisting of an optional path specification and a file name with optional file
extension. If you enter a file name to the left of the equal sign, LINK86 creates output files with that file
name and the appropriate file extensions.
For example, using the files PARTA, PARTB, and PARTC, the following command creates MYFILE.286:
A:>LINK86 MYFILE = PARTA,PARTB,PARTC
Note: The files PARTA, PARTB, and PARTC can be a combination of object files and library files. If no
file extension is specified, the linker assumes a file extension of OBJ.
If you do not specify an output file name, LINK86 creates the output files using the first file name in the
command line.
Chapter 9. Using the Linker Utility and the POSTLINK Utility 9-3
You can also instruct LINK86 to read its command line from a file, thus making it possible to store long or
commonly used link commands on disk:
A:>LINK86 LINKFIL[I]
| No extra steps are required when linking BASIC object files with SRTL files. Do not specify the runtime
| libraries SB286L.L86 or SB286TVL.L86. They are automatically requested by the compiler.
Note: See “SHARED and NOSHARED Options” on page 9-8 for information on linking with shared
runtime libraries.
Command options in the first category affect the contents of the command file and apply to the entire link
operation. Command options in the second category affect the SYM and MAP files. These options turn
on and off as LINK86 processes the command line from left to right. Command options in the third
category affect the library and input files and apply to one file in the command line.
When you specify command options, enclose them in square brackets following the file name.
For example, to specify the command option MAP for the file TEST1 and the NOLOCALS option for the
file TEST2, enter the following:
A:>LINK86 TEST1[MAP],TEST2[NOLOCALS]
You can use spaces to improve the readability of the command line, and you can put more than one
option in square brackets by separating them with commas.
The following example specifies that the MAP and NOLOCALS options be used for the TEST1 file and the
option LOCALS for the TEST2 file:
A:>LINK86 TEST1 [MAP, NOLOCALS], TEST2 [LOCALS]
Command-File Options
The options described in this section affect the contents of the command file created by LINK86.
Table 9-2 lists the command-file option parameters.
Chapter 9. Using the Linker Utility and the POSTLINK Utility 9-5
GROUP and SEGMENT
The GROUP and SEGMENT parameters each contain a list of groups or segments that you want LINK86
to put into a specified section of the load module.
For example, the following command instructs LINK86 to put the segments CODE1, CODE2, and all the
segments in group XYZ into the CODE section of the file TEST.286:
A:>LINK86 TEST [CODE [SEGMENT [CODE1, CODE2], BGROUP [XYZ]]]
The ADDITIONAL and MAXIMUM parameters tell LINK86 the values to put in the load module header.
These parameters override the default values that LINK86 uses.
The ADDITIONAL parameter specifies the amount of additional memory, in paragraphs, required by the
specified section of the load module.
Note: A paragraph is 16 (X'10') bytes.
The MAXIMUM parameter specifies the maximum amount of memory needed by the section of the load
module. The program loader attempts to allocate as much of the requested maximum as possible.
These options must appear in the command line after the specific file or files to which they apply. When
you specify one of these options, it remains in effect until you specify another option. Therefore, if a
command line or input file (INP) contains two options, the leftmost option affects all of the listed files until
the next option is encountered. The next option affects all remaining files specified on the command line
or input file.
NOSYMS: The NOSYMS option prevents the generation of a SYM file. In this case, all other SYM file
options are ignored.
For example, the following command creates a SYM file containing local symbols from TEST2.OBJ and
TEST3.OBJ, but not from TEST1.OBJ:
A:>LINK86 TEST1 [NOLOCALS], TEST2 [LOCALS], TEST3
LIBSYMS and NOLIBSYMS: The LIBSYMS option instructs LINK86 to include in the SYM file
symbols from a library searched during the link operation. The NOLIBSYMS option instructs LINK86 not
to include library symbols in the SYM file. A library search usually involves the runtime subroutine library
of a high-level language such as IBM 4680 BASIC. Because the symbols in such a library are usually of
no interest to the programmer, the default is NOLIBSYMS.
The LINES and NOLINES options specify whether or not LINK86 creates a LIN file.
The LINES option, which is active by default, instructs LINK86 to create a LIN file, if possible. If no line
information is present in the object file, LINK86 does not create the LIN file. The NOLINES option
instructs LINK86 not to create a LIN file, even if line numbers are present in the object file:
A:>LINK86 TEST [NOLIN]
The amount of information that LINK86 puts into the MAP file is controlled by the following optional
parameters:
OBJMAP NOOBJMAP
L86MAP NOL86MAP
ALL NOCOMMON
The optional parameters are enclosed in brackets following the MAP option. The OBJMAP parameter
directs LINK86 to put segment information about OBJ files in the MAP file. The NOOBJMAP parameter
suppresses this information. The L86MAP parameter instructs LINK86 to put segment information from
L86 files into the MAP file. The NOL86MAP parameter suppresses this information. The ALL parameter
instructs LINK86 to put all the information into the MAP file. The NOCOMMON parameter suppresses all
common segments from the MAP file.
Chapter 9. Using the Linker Utility and the POSTLINK Utility 9-7
When you instruct LINK86 to create a MAP file, you can change the parameters to the MAP option at
different points in the command line. For example, the following command directs LINK86 to create a map
file containing segment information from FINANCE.OBJ and SCREEN.L86:
A:>LINK86 FINANCE [MAP[ALL]],SCREEN.L86,GRAPH.L86 [MAP[NOL86MAP]]
Notes:
1. Segment information for GRAPH.L86 is suppressed by the NOL86MAP option.
2. If you specify the MAP option with no parameters, LINK86 uses OBJMAP and NOL86MAP as defaults.
SEARCH and NOSEARCH Options: The SEARCH option instructs LINK86 to search the
preceding library, and include in the load module only those modules that satisfy external references from
other modules. Because SEARCH is the default value, using it as a value is redundant. The NOSEARCH
option instructs the linker to include in the load module all modules whether an external reference is
satisfied or not.
Note: LINK86 searches L86 files automatically.
For example, the following command creates the file TEST1.286 by combining the object files TEST1.OBJ,
TEST2.OBJ, and modules from MATH.L86 that are referenced in TEST1.OBJ or TEST2.OBJ:
A:>LINK86 TEST1, TEST2, MATH.L86
The modules in the library file do not have to be in any special order. LINK86 makes multiple passes
through the library index when attempting to resolve references from other modules.
SHARED and NOSHARED Options: The SHARED and NOSHARED options determine whether
a library file is to be used as an SRTL. When a runtime library is NOSHARED, both the code and the
data from that library are linked with the object files. When a runtime library is SHARED, only the data
from that library is linked with the object files, and a single copy of the library code resides in a special
load module called an executable shared runtime library (XSRTL). The code stored in an XSRTL file can
be accessed by any file linked as a user of the SRTL.
When an SRTL is created, it is given an attribute that determines whether the library is to be treated as a
SHARED or a NOSHARED option.
The store controller runtime library for IBM 4680 BASIC (SB286L.L86) was created with the SHARED
attribute.
If an SRTL has a default attribute of SHARED, you can force LINK86 to treat it as a normal library by
specifying the NOSHARED option. This forces the referenced SRTL routines to be resident in the user’s
code file, and the loader does not have to perform a load-time resolution of external references.
CODESHARED: Normally a load module created by the linker has a bit set in the header that
identifies to the loader that only one process can use the code segments at one time. By specifying the
CODESHARED option, you can force the loader to use the same copy of the module’s code segments for
multiple processes.
Note: A load module that has been linked with the CODESHARED option must be POSTLINKed using
the POSTLINK Utility before the 4690 Operating System will allow it to run.
If you are executing the same application program in both the Model 1 and Model 2 terminals, you should
use this option because it saves a significant amount of storage. If your application uses the Display
Manager* product, you must NOT use this option because the Display Manager’s code is not shareable.
The INPUT option instructs LINK86 to obtain further command-line input from the file. Other files can
appear in the command line, but the input file must be the last file name on the command line. When
LINK86 encounters the INPUT option, it stops scanning the command line entered from the keyboard.
Note: You cannot nest command input files. A command input file cannot contain the INPUT option.
The input file consists of file names and options the same as a command line entered from the keyboard.
| An input file can contain up to 4096 characters, including spaces but excluding comments. Comment
| delimiters recognized by LINK86 are ; and * *. When LINK86 encounters either of these delimiters in an
| input file, the remaining characters on that line are ignored. Use comments as often as you like to make
| the input file easier to understand and maintain.
| In the following example, the file TEST.INP might include the lines:
| ;This is a comment
| MEMTEST=TEST1,TEST2,TEST3,
| IOLIB.L86[S],MATH.L86[S], **This is another comment
| TEST4,TEST5[LOCALS]
To direct LINK86 to use this file for input, enter the following command format:
A:>LINK86 TEST.INP [INPUT]
The ECHO option causes LINK86 to display the contents of the INP file on the display:
A:>LINK86 TEST [ECHO,I]
Input/Output Option
The $ option controls the source and destination devices under LINK86. The general form of the $ option
is:
$tpathname
Note: t is a file type, and pathname is a fully specified path or a drive letter followed by a colon.
Chapter 9. Using the Linker Utility and the POSTLINK Utility 9-9
| File Types: LINK86 recognizes the following seven file types:
| C - Load Module (286 or OVR)
| D - Debug Information File (DBG)
| L - Library File (L86)
| M - Map File (MAP)
| N - Line Number File (LIN)
| O - Object File (OBJ or L86)
| S - Symbol File (SYM)
The value of a $ option remains in effect until LINK86 encounters a countermanding option as it processes
the command line from left to right. For example, the following command will link TEST1.OBJ and
TEST2.OBJ files from subdirectory C:\OBJ1 with the TEST3.OBJ file in subdirectory C:\OBJ2:
C:>LINK86 TEST.286=TEST1 [$OC:\OBJ1],TEST2,TEST3[ $OC:\OBJ2]
LINK86 usually creates the load module in the same subdirectory as the first object file in the command
line. The $C option instructs LINK86 to place the load module in the specified directory. The $C option
also applies to OVR files when you use LINK86 to create overlays.
A:>LINK86 TEST [$CC:\286S]
| LINK86 normally creates the DBG file in the default directory. The $D option instructs LINK86 to place the
| DBG file in the directory you specified with the pathname.
| A:>LINK86 TEST [$D:\DBGS]
LINK86 searches the default directory for runtime subroutine libraries that are linked automatically. The $L
option instructs LINK86 to search the specified pathname for the runtime subroutine libraries.
A:>LINK86 TEST [$LC:\LIBS]
LINK86 normally creates the MAP file in the default directory. The $M option instructs LINK86 to place
the MAP file in the specified directory.
A:>LINK86 TEST [$MC:\MAPS]
LINK86 searches for the OBJ or L86 files that you specify in the command line on the default drive, unless
such files have drive prefixes. The $O option allows you to specify the drive location of multiple OBJ or
L86 files without adding a path name prefix to each file name.
In the following example, the command instructs LINK86 that all the object files except the last one are
located in subdirectory D:\OBJS.
A:>LINK86 P [$OD:\OBJS],Q,R,S,T,U.L86,B:V
Note: This does not apply to libraries that are linked automatically. See the $L option.
LINK86 normally creates the symbol file in the same subdirectory as the load module. The $S option
directs LINK86 to place this file in the subdirectory specified by the pathname that follows the $S option.
A:>LINK86 TEST [$SC:\SYMS]
| DBINFO Option: The DBINFO option instructs LINK86 to create a DBG file containing necessary
| information for the 4680/4690 Application Debugger. If you are combining several OBJ and/or L86
| modules, specify the DBI option on the first OBJ file listed on the command line or in the INP file.
| Refer to the IBM 4680-4690 Application Debugger User’s Guide for additional information about compiling
| and linking an application to prepare it for debugging.
Using the LNK86PATH environment variable, you can define the search order so the linker looks first in
the changed files directory and, if not found, then looks in the base directory.
The LNK86PATH environment variable is defined using the SET command (DOS or OS/2) or the DEFINE
command (4690). This variable must be set at least once before running the linker utility, and it must be
set during the same session.
where pathn represents the directories that you intend to search for files to be read by the linker.
Chapter 9. Using the Linker Utility and the POSTLINK Utility 9-11
Under 4690 Operating System, use the following command:
A:>DEFINE LNK86PATH=path1;path2;path3 <.... pathn>
intend to search for files to be read by the linker.
In the above example, if the link of the TEST file fails the message “We have a problem” is written to the
file RESULTS.
Overlays
Overlays are supported only in the store controller. This section describes how LINK86 creates programs
with separate files called overlays. Each overlay file is a separate program module that is loaded into
memory when it is needed by the program. By loading only those program modules that are needed at a
particular time, the amount of memory used by the program is kept to a minimum; however, you must link
your application with the runtime library using the NOSHARED option.
As an example, many application programs are menu-driven, with the user selecting the functions to
perform. Because the program’s modules are separate and invoked sequentially, they need not reside in
memory simultaneously. Using overlays, each function on the menu can be a separate subprogram that is
stored on disk, and loaded only when required. When one function is completed, control returns to the
menu portion of the program. You then select the next function.
Figure 9-2 shows the concept of using large program overlays. Assume that a menu-driven application
program consists of three separate user-selectable functions. If each function requires 30K of memory,
and the menu portion requires 10K, then the total memory required for the program is 100K (without
overlays). However, if the three functions are designed as overlays (separate overlays), the program
requires only 40K, because all three functions share the same locations in memory.
Note: The POSTLINK Utility must not be used on overlay files or the root module of an overlay file.
40K
Function 30K
1
You can also create nested overlays in the form of a tree structure. Figure 9-3 shows a tree structure
overlay.
The top of the highest overlay determines the total amount of memory required. In Figure 9-3, the highest
overlay is SUB4. This overlay requires substantially less memory than would be required if all the
functions and subfunctions were to reside in memory simultaneously.
Sub4
Sub1 Sub2 Sub3
Menu
You can specify an overlay in one of the following formats, where ROOT.OBJ is the object file that calls
the overlays:
Chapter 9. Using the Linker Utility and the POSTLINK Utility 9-13
A:>LINK86 ROOT (OVERLAY1)
A:>LINK86 ROOT (OVERLAY1,PART2,PART3)
A:>LINK86 ROOT (OVERLAY1=PART1,PART2,PART3)
¹ The first form produces the files ROOT.286 and OVERLAY1.OVR from ROOT.OBJ and
OVERLAY1.OBJ.
¹ The second form produces the files ROOT.286 and OVERLAY1.OVR from ROOT.OBJ,
OVERLAY1.OBJ, PART2.OBJ, and PART3.OBJ.
¹ The third form produces the files ROOT.286 and OVERLAY1.OVR from ROOT.OBJ, PART1.OBJ,
PART2.OBJ, and PART3.OBJ.
On the command line, a left parenthesis indicates the start of a new overlay specification and the end of
the previous overlay specification. You can use spaces to improve readability, and commas can separate
parts of a single overlay. However, do not use commas to separate the overlay specifications from the
root module or from each other.
To nest overlays, you must specify them in the command line with nested parentheses.
In the following example, the command line creates the overlay system shown in Figure 9-3:
A:>LINK86 MENU(FUNC1(SUB1)(SUB2))(FUNC2)(FUNC3(SUB3)(SUB4))
When linking files to be overlayed along with files not to be overlayed, the files to be overlayed are
specified last. When you create the file ROOT.286 from the files ROOT.OBJ, PARTA.OBJ, and
PARTB.OBJ, to link OVER1.OBJ and OVER2.OBJ as overlays, enter the following command line:
A:>LINK86 ROOT,PARTA,PARTB(OVER1, OVER2)
When POSTLINK is invoked, a temporary file called FILENAME.PST is created. When POSTLINK has
completed converting the LINK86 load module into a new load module, the temporary file is erased.
Notes:
1. The POSTLINK Utility must not be used on overlay files or the root module of an overlay file.
| 2. A Postlinked load module that contains large unreferenced object modules can cause unpredictable
| results when loaded on a 4683 point-of-sale terminal.
filespec is a file specification of a load module consisting of an optional path specification and a filename
with an extension.
The output file has the same filespec as the input file.
A:>POSTLINK C:\LOADMODS\TEST.286
In the above example, if the POSTLINK is unsuccessful the message “We have a problem” is written to
the file RESULTS.
Chapter 9. Using the Linker Utility and the POSTLINK Utility 9-15
9-16 4690 Store System: Programming Guide
Chapter 10. Using the Print Spooler Utility
Obtaining Job Status after a TCLOSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-1
Issuing a Command to the Print Spooler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-2
Using Special Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3
Error Return Codes for the Print Spooler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-5
The IBM 4690 Operating System has a Print Spooler Facility that allows you to send your files to one of
eight queues for printing on one of eight printers. This spooling facility can be shared by concurrently
executing applications.
System configuration allows a maximum of eight printers to be defined. Printers are assigned numbers
(PRN1: through PRN8:) at configuration time. An application program uses this number to gain access to
a particular printer. An application can gain access to the printer assigned to the console the application
is running on by using the printer name PRN:.
One of the printers (PRN1: through PRN8:) can also be defined as the system printer. Any application
can access the system printer using PRN0:.
Note: By using the application service ADXSERVE, applications can determine the printer assigned to
the console it is running on.
Your application must open the printer in UNLOCKED mode. This mode allows multiple applications to
use the printer. The printer must be closed before printing can be scheduled. You can use either CLOSE
or TCLOSE. CLOSE releases the application from all control of the file; TCLOSE allows limited control.
If your application uses TCLOSE, the application can receive job or printer status information. The
TCLOSE is performed when the application completes sending data to the print spooler. The file is then
scheduled for print. The print spooler allows only reading of a job’s status. If the application decides
some action needs to be taken, it can issue special commands to perform the action on a print job or
queue. See “Using Special Commands” on page 10-3 for more information on these special commands.
The job status is obtained by the application performing a read after a TCLOSE. The spooler returns job
and queue status as detailed in the next section. Special commands are issued by performing a WRITE
FORM with a string of characters representing the desired command.
If any of these seven characters is occupied by a space, that particular event did not occur since the last
read was performed. An event that has occurred since the last read is marked by an asterisk. The
characters indicate the following events:
¹ Character 0
Job completed. The job has been entirely despooled to the printer and removed from the system.
¹ Character 1
Job canceled. The job was removed from the system before it could be printed. The user either
canceled that particular job or an authorized user purged an entire print queue.
The only error that is returned from a read is an implementation error. (This type of error is defined in
“Error Return Codes for the Print Spooler” on page 10-5.) This error is returned if a read is attempted and
the job has not been closed using TCLOSE.
The format for these special commands is the following (number in parentheses is the number of
characters for that variable):
command(2),jobid(3),source(1),destination(1),node(8),
All parameters are optional depending on the command and whether or not a default exists. A delimiting
comma must replace each parameter not entered. For example, if an application wanted to terminate one
of its own jobs, the following command would terminate job 001 corresponding to the I/O session number
used:
CJ,001,,,,
The following command transfers all current and future files for PRN1: to PRN3:.
TQ,,1,3,,
The following command results in job 073 being transferred to the PRN5: printer at node DD (if such a
printer exists).
TJ,073,,5,ADXLXDDN
This command cancels all jobs currently queued (and not being held) for PRN4:.
CQ,,4,,,
node
destination
source
job ID
¹ CJ (Cancel a job)
This operation may be carried out on any job scheduled to print, regardless of whether it is currently
queued or being held. The job entry will be deleted from the appropriate queue and the job’s file will
be erased. No recovery is possible.
CJ,001,1,,,
source
job ID
¹ HJ (Hold a job)
Any job which is currently queued may be placed on hold. If an attempt is made to place an already
held job on hold, a successful return code is received. Jobs placed on hold will be held indefinitely.
However, a limit of 32 held jobs exists. Any attempt to hold more than this will receive a queue full
error.
HJ,001,1,,,
source
job ID
¹ AJ (Activate a job)
This command can be used on any held job. It will be activated in the queue from which it was held.
If an alternate queue is desired, then the move command should be used.
AJ,001,1,,,
source
job ID
¹ LQ (Load a queue)
Note: Only an authorized user with an access of Group 2 - User 1 or higher can perform the
following commands (transfer, resume, and cancel queue).
¹ TQ (Transfer a queue)
When a printer needs to be taken offline, it is possible to transfer all of its jobs to an alternate printer.
This alternate printer must be within the system or within the network. Transfers within the system are
checked for situations where, for example, PRN2: is redirected to PRN1: and PRN1: is redirected to
PRN2:. Transfers across the network are not checked, and it is the user’s responsibility to prevent a
loop. All transfers remain active.
TQ,,1,1,ADXLXCCN
node
destination
source
¹ RQ (Resume a queue)
After a printer has been transferred, you can place it back online using this command.
To ensure that the WRITE FORM statement goes to the correct print spooler driver, open the device
SPRN1: on the controller that the application is running. Otherwise, if your PRN1: is transferred to
another controller your WRITE FORM might receive an implement error (80894009).
RQ,,1,,,
source
If a proper special command is written to the spooler following a TCLOSE, the following error return codes
are possible:
¹ JOB HELD (80890006)
For a PJ command, this means the job is not in a queue and needs to be activated first. For an HJ
command, it means that because of a system failure, the held job has no printer associated with it and
to be activated, a transfer command needs to be used.
¹ NOJOB (80890002)
The job ID specified is not currently in use in the system (the job was finished or canceled).
¹ LOOP (80890003)
In addition, any errors that might result from trying to open a printer can also be returned (when
performing a network move or a network redirection.)
When an error occurs, the print spooler handles each of the printer errors in the same way. If any other
action is desired, you must initiate it.
When the spooler detects an error, it sets up a timer lasting 30 seconds. Upon completion of the timer,
the spooler resumes where it left off and continues trying to send data to the printer. For the timeout
error, the print drivers handle the time. Therefore, the spooler does not start a timer; it continues trying to
send data.
The type of reaction to these errors should depend on how serious a situation is considered to be. While
timeout and paper out do not cause the loss of data and might not be a serious error, a printer error can
cause the loss of data, which can be serious.
If an application detects these errors, a reasonable response would be to print a message for you
indicating something is wrong. If the error involves certain data loss, it would even be reasonable to issue
a command to hold the queue. A hold causes the current job to be restarted from the beginning when the
queue is activated thus ensuring it is printed in its entirety.
However, if the printer is connected through serial interface, many (possibly all, depending on the interface
and communication scheme) of the errors are detectable only as timeout errors. Therefore, there would
be no way to distinguish between the errors.
Note: If the same application is to perform both reads and writes of a special command after TCLOSE,
the reads and writes must be performed under different I/O session numbers.
Using the Disk Surface Analysis Utility allows you to recover from surface failures by replacing only the
data affected by the surface failure. You do not need to replace or format the fixed disk. If host
communications are available, an operator can perform the disk surface analysis remotely at the host site.
The IPL Command Processor provides the capability to execute a sequence of commands during the
store controller IPL. The IPL Command Processor is necessary to start the Disk Surface Analysis Utility
from the host.
The IPL Command Processor assumes that each command in the command file is the name of a .286 file
and executes it directly. Therefore, you cannot specify shell commands, such as ERASE, directly in the
command file. To execute shell commands from the command file, you must specify command.286 with
the command specified as an argument. The -c option must be present between “command” and the
argument.
For example:
-3 command -c erase junk.dat
The above command erases the file JUNK.DAT. The return code for an internal command is not logged
because the shell actually executes it. The return code that is logged represents the return code from the
execution of command.286. The following is a list of shell commands:
ASSIGN DVRUNIT
DEFINE DVRUNLK
ERASE MKDIR
DVRLINK RMDIR
DVRLOAD SECURITY
For more information on these commands, refer to the 4690 Store System: User’s Guide.
There are three options that may precede the command. Each option should begin with the switch
character (-). The options are:
1. The Exit On Error option: -x
2. A time frame indicator: -1, -2, or -3. The default indicator is -3.
3. A node indicator: -nXX. XX is the two-character node ID. The default is the local node ID.
Note: Each command must be entered on one line. The commands must not be split between lines.
For each defective surface area, ADXCSW0L reports the file name or subdirectory name that is allocated
in the defective disk space. Unallocated areas with surface defects are also reported.
You can use the following formats to invoke the Disk Surface Analysis Utility. These formats are
explained in “Command Formats for ADXCSW0L” on page 11-4.
¹ ADXCSW0L drive:
¹ ADXCSW0L drive:\filename.filetype
¹ ADXCSW0L drive: -parameters
¹ ADXCSW0L drive:\filename.filetype -parameters
Subdirectories are reported as being defective, but are not fixed. Information appears that includes the
defective cluster number, the subdirectory name, and a brief message indicating that the correction has
not been performed.
After invoking a Disk Surface Analysis Utility command, two sections of information appear. The first
section displays the defective cluster information. The information can be a sector number specified by a
user or reported by the utility. The surface analysis information includes the following:
The second part of the report lists the file names that are relocated. The following information is
displayed:
¹ New cluster number that contains the recovered data
¹ The defective cluster number that was replaced
¹ The name of the file
¹ The offset and size of the data area that was defective
You can invoke the Disk Surface Analysis Utility without the -F parameter to report the current defects and
changes that have been made.
Example 1: The following command scans the entire C: drive. Surface defects are listed but not
corrected. The output report is listed below the command.
C>ADXCSW0L C:
Surface defects are reported but not fixed.
Attempting to recover C:
****************************
**** Surface Defects ****
****************************
***************************
**** Files Repaired ****
***************************
ADXCSW0L drive:\filename.filetype performs a surface analysis on the disk space occupied by the
specified file. If an error is located, the defect is reported. The fill character defaults to X'2E'.
Note: The correction is made if the -F parameter is specified.
Example 2: The following command recovers the file TEST2.DAT on the D: drive. Surface defects are
reported but not corrected. The output report is listed below the command.
C>ADXCSW0L D:\TEST2.DAT
Surface defects are reported but not fixed.
ADXCSW0L drive: -parameters allows any combination of the parameters. However, a sector number
cannot be specified when a file name is specified.
Example 3: In this example, the command uses the sector parameter, the fill character parameter, and
the -F parameter. The specified sector parameter is assumed to be defective. All of the data on the
defective sector is relocated. The specified fill character is used in the reallocated disk space. All
changes are written to the disk because the -F parameter is issued. The output report is listed after the
command.
C>ADXCSW0L D: -R0x25D1 -C0x3D -F
Attempting to recover D:
***************************
**** Files Repaired ****
***************************
Cluster Number: 0950
Replaces Bad Customer: 094B
File Name: TEST3.DAT
Lost Data Offset: Lost Data Sizes
1800 200
Example 4: The following command recovers the file TEST4.DAT on the D: drive. The -F and -C
parameters allow the surface defect areas to be corrected and filled with the fill character 0x4A. The
output report is listed below the command.
ADXCSW0L D:\TEST4.DAT -COx4A -F
Attempting to recover D:\TEST4.DAT
***************************
**** Files Repaired ****
***************************
The store controller might dump, or a power line disturbance might occur during an IPL. The command
file should be organized so that problems are not caused by running the same command multiple times.
For more information on command files, see “Example of a Command File” on page 11-3.
To ensure that the command file executes only one time, place an ERASE command at the end of the
command file. Perform the erase at time frame 3 to distribute the request.
If you use RCP to re-IPL, and you configure it to start at each IPL as a background application, the IPL
Command Processor command file ADXILI0F.DAT should contain a time frame 3 command to erase the
RCP selection file ADXCSHCF.DAT. The ERASE command prevents a store controller IPL loop.
If a surface defect prevents the IPL of a store controller, or if host communications cannot be established,
the Disk Surface Analysis Utility can be invoked from the supplemental diskettes. You can use the disk
rebuild function to obtain specific replacement files from another store controller on the LAN (MCF
Network). In a non-LAN environment, you must obtain the replacement files from a diskette or tape.
RENAME and COPY are executed within time frame -2, so the operation is not distributed. If a RENAME,
COPY, or ERASE in the command file is to be distributed, the command should be preceded by -3.
You should use time frame -1 only for executing CHKDSK and the Disk Surface Analysis Utility. Use time
frame -2 only for renaming, erasing, or copying to files that have been repaired by the Disk Surface
Analysis Utility.
Action:
1. Create the following command file at the host site and transmit it to the store as
ADX_SDT1:ADXILI0F.DAT
-1 adxcsw0l c:
2. Execute the following RCP command to re-IPL the store controller:
adxcs20l N 13
3. Retrieve ADX_SDT1:ADXNSCCF.DAT (assumes store controller node is CC) from the store. Verify
that the only file with a surface defect is ADXCSL0L.286.
4. Transmit a new copy of ADXCSL0L.286 to subdirectory ADX_SMNT.
5. Create the following command file at the host site and transmit it to the store as
ADX_SDT1:ADXILI0F.DAT
-x -1 adxcsw0l c: -f
command -c erase ADX_SPGM:ADXCSL0L.286
rename ADX_SMNT:ADXCSL0L.286 ADX_SPGM:ADXCSL0L.286
6. Execute the following RCP command to re-IPL the store controller:
adxcs20l N 13
7. Retrieve ADX_SDT1:ADXNSCCF.DAT (assumes store controller node is CC) from the store. Verify
that recovery was successful.
8. Transmit a copy of ADX_SDT1:ADXIlL0F.DAT, which contains no commands to the store.
9. Delete ADX_SDT1:ADXNSCCF.DAT.
10. If a different version of ADXCSL0L.286 was in the ADX_SMNT subdirectory prior to this recovery
procedure, re-transmit that version to the store.
Action:
1. Create the following command file at the host site and transmit it to the store as
ADX_SDT1:ADXILI0F.DAT
-1 -nCC adxcsw0l c:
A user in a two-controller LAN environment cannot execute the Format Dump Data Utility
(ADXCSL0L.286) on the alternate master. The master is node CC and the alternate master is node DD.
Action:
1. Create the following command file at the host site and transmit it to the store as
ADX_SDT1:ADXILI0F.DAT
-1 -ndd adxcsw0l c:
2. Execute the following RCP command to re-IPL the alternate master.
dd::adxcs20l N 13
3. Retrieve ADX_SDT1:ADXNSDDF.DAT from the store. Verify that the only file with a surface defect is
ADXCSL0L.286.
4. Create the following command file at the host site and transmit it to the store as
ADX_SDT1:ADXILI0F.DAT
-ndd -x -1 adxcsw0l c: -f
-ndd -2 copy adxlxccn::adx_spgm:adxcsL0L.286 gadx_sp m:adxcsL0L.286
5. Execute the following RCP command to re-IPL the alternate master.
dd::adxcs20l N 13
6. Retrieve ADX_SDT1:ADXNSDDF.DAT from the store. Verify that recovery was successful.
7. Transmit a copy of ADX_SDT1:ADXILI0F.DAT that contains no commands to the store.
8. Delete ADX_DST1:ADXNSDDF.DAT.
Action:
1. Create the following command file at the host site and transmit it to the store as
ADX_SDT1:ADXILI0F.DAT
-1 adxcsw0l c: -f
2. Execute the following RCP command to re-IPL the store controller:
adxcs20l N 13
3. Retrieve ADX_SDT1:ADXNSCFF.DAT from the store. Verify that recovery was successful. The error
is associated with an allocated cluster of the transmitted file.
4. Transmit a copy of ADX_SDT1:ADXILI0F.DAT that contains no commands to the store.
5. Delete ADX_SDT1:ADXNSCCF.DAT.
6. Retransmit the original file to the store.
Action:
1. Create the following command file at the host site and transmit it to the store as
ADX_SDT1:ADXILI0F.DAT
-1 -ncc adxcsw0l c: -f
2. Execute the following RCP command on the master to re-IPL it:
adxcs20l N 13
3. Retrieve ADX_SDT1:ADXNSCCF.DAT from the store. Verify that the recovery was successful. The
error is associated with an allocated cluster of the transmitted file.
4. Transmit a copy of ADX_SDT1:ADXILI0F.DAT that contains no commands to the store.
5. Delete ADX_SDT1:ADXNSCCF.DAT.
6. Retransmit the original file to the store.
Message W754 B4/S004/E021 with RC=80210004 or RC=8021000D was logged at node DD.
Action:
1. Create the following command file at the host site and transmit it to the store as
ADX_SDT1:ADXILI0F.DAT
-1 -ndd adxcsw0l c: -f
2. Execute the following RCP command to re-IPL the alternate master:
dd::adxcs20l N 13
3. Retrieve ADX_SDT1:ADXNSDDF.DAT from the store. Verify that the recovery was successful. The
file that was transmitted from the host is reconciled during the IPL of the alternate master.
4. Transmit a copy of ADX_SDT1:ADXILI0F.DAT that contains no commands to the store.
5. Delete ADX_SDT1:ADXNSDDF.DAT.
Action:
1. Create the following command file at the host site and transmit it to the store as
ADX_SDT1:ADXILI0F.DAT
-1 adxcsw0l d:
2. Execute the following RCP command to re-IPL the store controller:
adxcs20l N 13
3. Retrieve ADX_SDT1:ADXNSCCF.DAT (assumes store controller node is CC) from the store. Verify
that the only file with a surface defect is EALITEMR.DAT.
4. Create the following command file at the host site and transmit it to the store as
ADX_SDT1:ADXILI0F.DAT
-1 adxcsw0l d: -f -c0
Note: A fill character of binary 0 is recommended for use when recovering a keyed file.
5. Execute the following RCP command to re-IPL the store controller:
adxcs20l N 13
6. Retrieve ADX_SDT1:ADXNSCCF.DAT (assumes store controller node is CC) from the store. Verify
that recovery was successful.
7. Transmit a copy of ADX_SDT1:ADXILI0F.DAT that contains no commands to the store.
The following return codes were logged against the item record file on the master:
¹ W754 B4/S004/E021 with RC=80210004 or RC=8021000D
¹ W754 B4/S004/E018 with file name: EALITEMR.DAT
Action:
1. Create the following command file at the host site and transmit it to the store as
ADX_SDT1:ADXILI0F.DAT
-ncc -1 adxcsw0l d:
2. Execute the following RCP command on the master to re-IPL it:
adxcs20l N 13
3. Retrieve ADX_SDT1:ADXNSCCF.DAT from the store. Verify that the only file with a surface defect is
EALITEMR.DAT.
4. Create the following command file at the host site and transmit it to the store as
ADX_SDT1:ADXILI0F.DAT.
-1 -ncc -x adxcsw0l d: -f -c0
-2 -ncc command -c erase d:adx_idt1\ealitemr.dat
-2 -ncc copy adxlxddn::d:\adx_idt1\ealitemr.dat &d:\adx us.idt1\ealitemr.dat
5. Execute the following RCP command on the master to re-IPL it:
adxcs20l N 13
6. Retrieve ADX_SDT1:ADXNSCCF.DAT from the store. Verify that recovery was successful.
7. Transmit a copy of ADX_SDT1:ADXILI0F.DAT that contains no commands to the store.
8. Delete ADX_SDT1:ADXNSCCF.DAT.
Action:
1. Create the following command file at the host site and transmit it to the store as
ADX_SDT1:ADXILI0F.DAT
The following errors were logged as the terminals attempt to write to the transaction log:
¹ W754 B4/S004/E021 with RC=80210004 or RC=8021000D
¹ W754 B4/S004/E018 with file name: EALTRANS.DAT
Action:
1. Create the following command file at the host site and transmit it to the store as
ADX_SDT1:ADXILI0F.DAT
-1 adxcsw0l c: -f
2. Execute the following RCP command to re-IPL the store controller:
adxcs20l N 13
3. Retrieve ADX_SDT1:ADXNSCCF.DAT from the store. Verify that recovery was successful.
4. Transmit a copy of ADX_SDT1:ADXILI0F.DAT that contains no commands to the store.
5. Delete ADX_SDT1:ADXNSCCF.DAT.
The following errors are logged as the terminals attempt to write to the transaction log:
¹ W754 B4/S004/E021 with RC=80210004 or RC=8021000D
¹ W754 B4/S004/E018 with file name: EALTRANS.DAT
Action:
1. Create the following command file at the host site and transmit it to the store as
ADX_SDT1:ADXILI0F.DAT
-1 -ncc adxcsw0l c: -f
2. Execute the following RCP command to re-IPL the file server:
adxcs20l N 13
3. Retrieve ADX_SDT1:ADXNSCCF.DAT from the store. Verify that recovery was successful.
4. Transmit a copy of ADX_SDT1:ADXILI0F.DAT that contains no commands to the store.
5. Delete ADX_SDT1:ADXNSCCF.DAT.
LAN (MCF Network), Defect Near End of TLOG on Alternate File Server
Symptom: In a two-controller LAN environment, the file server node is CC and the alternate file server is
DD. The Distribution Exception Log for the file server contains an entry for the transaction log.
Action:
1. Create the following command file at the host site and transmit it to the store as
ADX_DST1:ADXILI0F.DAT
-1 -ndd adxcsw0l c: -f
2. Execute the following RCP command to re-IPL the alternate file server:
dd::adxcs20l N 13
3. Retrieve ADX_SDT1:ADXNSDDF.DAT from the store. Verify that the recovery was successful.
Reconciliation should update the alternate file server with a current copy of the transaction log.
4. Transmit a copy of ADX_SDT1:ADXILI0F.DAT that contains no commands to the store.
5. Delete ADX_SDT1:ADXNSDDF.DAT.
The application initially displays status for the first primary or backup loop adapter found. If no primary or
backup loop adapter is found, status for the first loop adapter appears in the controller running the Loop
Status Application.
The application views each controller as having two loop adapters. If a loop adapter is not physically
present, or is present but not configured, the application reports the adapter’s configuration as “Not Used.”
Use one of the following formats to invoke the Loop Status Application Utility:
Format:
ADXLAS0L
Format:
ADXLAS0L -Rnnn
where:
nnn = the number of seconds between automatic refreshes. Specifying a zero-seconds interval disables
automatic refresh. The default interval is 30 seconds.
where:
p = The number of seconds between refreshes of the report. The default interval is 30 seconds.
You can select loop adapters for status display by performing the following steps:
1. Press the PgDn key to view the next adapter.
2. Press the PgUp key to view the previous adapter.
3. Enter the controller ID and loop adapter number of the desired adapter.
4. Enter the terminal number of an active terminal.
Loop adapter status is checked at regular intervals and the status screen is automatically updated. You
can also request the current status at any time by pressing the Refresh key (F9).
HELP information is available at any time by pressing the Help key (F1).
@
L O O P S T A T U S Loop 3 of 4
Requirements
This utility is useful only if you enable the Multiple Controller Feature and configure the controllers to allow
backup. By only IPLing one controller at a time, the terminals automatically switch to an active controller.
On most systems, the order can be chosen so that the terminals end up on their primary controller.
Automatic resume may be necessary in some topographies, especially those that have two TCC adapters
on different controllers that back each other up. See “Recommended Use” on page 13-5 for more
information.
Applications Only
The Staged IPL utility can cause a dump IPL code loop if used for activating either the 4690 Operating
System or LAN (MCF Network) because there is a brief time when both controllers are up and running
different software levels of code. For this reason, the Staged IPL utility does not permit activation of either
4690 Operating System or LAN with the staged IPL.
If your test reveals that an incompatibility problem could result from running the LAN (MCF Network) at
different software levels on each controller, you can minimize this exposure by taking the following
precautions:
¹ Make the master store controller and file server the last node to IPL. Thus, the files that are open by
the terminals continue to use the older level files until the terminals are ready to load. This
arrangement prevents an incompatibility problem when terminal code has a corequisite change to
controller code or data files.
¹ IPL the terminals immediately after they come on line with a controller that has activated the new
maintenance, but only if an IPL of the terminals is necessary to load new terminal code. Use the TL
parameter on the ADXCST0L command, not the disable terminal IPL function of the ADXSERVE
command. If the terminals must be loaded, the TL parameter is recommended under any
circumstances. If terminal code has a corequisite change to controller code or data files, avoid the
disable terminal IPL function of the ADXSERVE command so that old terminal code does not try to
interface with new controller code. If there is no corequisite change with controller code or data files,
the disable terminal IPL function is recommended while cashiers are signed on. (See “Loading
Terminal Storage” on page 13-7.)
¹ Minimize the wait time between controller IPLs so that the controllers do not have much time to
communicate with each other. This prevents an incompatibility problem when controller code has a
corequisite change to code or data files on another controller. However, this option is undesirable
because of the time required for all of the background applications and runtimes to load. It may be
necessary to set the wait time to zero seconds if the software levels are found to be incompatible. If
you do so, any terminal request to the controller will take more time than usual because the request
must compete with the loading of background applications and runtimes.
Application Interface
This section describes the application interfaces that you can use with the Staged IPL Utility.
A dump or a power outage after you select NI and before the Staged IPL Utility runs can cause ASM to
run prematurely during the IPL. That should not cause any problem except for a longer than normal IPL,
which would cause terminals to be offline for a longer than normal period. You can minimize this window
by running the Staged IPL Utility immediately after running ADXCST0L with the NI parameter.
The activation file created by running ADXCST0L with the “NI” parameter will always be erased by the
Staged IPL Utility or by the IPL portion of Apply Software Maintenance. If the Staged IPL Utility does not
complete successfully and must be restarted, you must also restart ADXCST0L.
RCP Command
The Staged IPL Utility is an RCP command named ADXCS50L, which is placed in the RCP command file,
usually immediately following the ADXCST0L command.
Format:
ADXCS50L i w t n n n...
where:
i = The RCP status file reset indicator:
Y = Reset RCP status file before the command executes.
N = Do not reset RCP status file.
Note: Normally, this indicator is N because it usually runs after ADXCST0L. Also, you would not
want to erase resulting messages from ADXCST0L.
w = Wait time. This indicator is the number of seconds to wait after the remote node comes up. The
node is considered up by this utility after the IBM logo is first displayed on the controller, and the
background applications have begun to load and start. The wait time should usually be the estimated
amount of time it takes to load and start the background applications. The value must be between 0
and 2147483 (about 24 days). The value must not have a decimal point, comma, or minus sign.
t = Timeout value. This indicator is the number of minutes to wait for the remote node to come up. If
the node does not come up within the number of minutes specified, this utility ends with an error
message and attempts to cancel maintenance on the controllers that have already successfully
Examples:
ADXCS50L N 300 120 DD CC
This example does not reset the RCP status file. It requests that controller DD be IPLed first. After
controller DD comes up, wait 300 seconds (5 minutes) for the background applications to finish loading
and then IPL controller CC. If DD does not come up within 120 minutes, do not IPL CC.
DD::ADXCS50L N 0 180 CC DD
This example does not reset the RCP status file. It requests that this utility be run on controller DD so
that you can IPL controller CC first. After CC comes up, immediately IPL controller DD. If CC does not
come up within 180 minutes, do not IPL DD.
Error Recovery
If any error is detected while IPLing the controllers, this utility does not IPL the remaining controllers. If a
controller has already IPLed before the error is detected, this utility attempts to cancel the maintenance
from all controllers that have successfully activated maintenance. To cancel maintenance, the activation
must have been in test mode, and the controller must have come back up. If the error was a timeout
waiting for a controller to IPL, the maintenance of that controller cannot be canceled, leaving the
controllers at different software levels.
Some examples of errors that can stop the IPL sequence after controllers have already started IPLing are:
¹ A timeout waiting for the controller to complete the IPL. The timeout value is specified as a
parameter.
¹ An error while activating maintenance during the IPL. The return code of the activation process is
kept in a temporary file, ADX_SDT1:ADXCS5TF.DAT. This error is rare and would be accompanied
by a W638 message in the System Event Log. If a W638 is logged, the activation of maintenance has
failed and remains in the same state as before the attempt to activate maintenance. The new
maintenance might be in the ADX?SMNT? subdirectory, depending on when the error occurred.
¹ The request to IPL could not be communicated to a remote controller for a reason other than not
being active on the LAN (MCF Network).
¹ One of the controllers that has come up with the new software has dumped.
All progress and error messages are logged in the RCP status file on the acting master controller. If
messages cannot be written to the acting master, which happens if it is not the last controller to IPL,
messages are written to the local controller. Before this utility terminates, the messages are transferred to
the acting master. If this transfer fails, the messages must be gathered from both the acting master and
the local controller.
Test Mode: Activation of maintenance should be in test mode. This mode allows automatic
cancelation of maintenance if anything goes wrong. If disk space is a concern, the maintenance can be
accepted after the RCP status file has been checked to verify the successful completion of the IPLs. An
acceptance of maintenance in test mode does not require an IPL of the controllers. If the RCP status file
indicates that the controllers are now at different software levels, you must run an appropriate ADXCST0L
command to direct the controllers to start running the same level of software.
Wait Time: Before using this utility in a live store, you should apply the maintenance to a test system
using this utility with a very long wait time. Observe how well the system runs with the controllers at
different software levels.
If the new software is highly compatible with the old software, the wait time should be about 300 seconds.
This gives the applications time to load and open all of the necessary files. Some systems might take
longer to load applications, depending on the number and complexity of the applications to be loaded. If
the wait time expires before all of the applications are loaded, any terminal request to the controller will
take longer than usual because the request must compete with the loading of background applications and
runtimes.
If testing reveals an incompatibility problem with running the old and new software on another controller,
the wait time should be zero.
Timeout Value: Set the timeout value long enough so that it expires only when a controller has taken
too long to come up. If the timeout does expire, this utility attempts to cancel the maintenance that has
already been successfully applied to other controllers. Make sure that you allow time for exception log
processing, for an IPL to activate configuration changes, and for other contingencies; 120 minutes should
be adequate for most systems. Set the timeout value short enough so that all controllers are back up and
operating at the same software level in time for the busiest part of the day.
Examples: Assume that you have a four-controller LAN requiring 100 minutes per controller to activate
maintenance through an IPL, reconcile the exception log, and load the background applications. Assume
that the timeout value chosen is 120 minutes and that the third controller does not come up within that
time. The total elapsed time for the first two controllers to IPL is 200 minutes, plus 120 minutes for the
third controller to timeout, and 200 minutes to cancel maintenance on the first two controllers. This time
totals 520 minutes. Calculate the worst case situation for your system, and choose the timeout value
accordingly.
Where to Run this Staged IPL Utility: You can run this utility on any controller by putting the
controller ID in front of the command. The controller running ADXCS50L must be IPLed last. Otherwise,
this utility will end when the controller running it is IPLed.
Examples:
DD::ADXCS50L N 0 120 CC DD
This command causes the Staged IPL Utility, ADXCS50L, to run on the controller DD.
AA::ADXCS50L N 0 120 CC DD
IPL Order: You should IPL the primary controller before the backup controller. When the backup
controller is IPLed, the primary controller will resume. Otherwise, you must provide some means for the
resume operation, for example, configure automatic resume, resume manually, or IPL the backup
controller.
Example:
If CC is the primary store controller and DD is the backup store controller, the command should be:
DD::ADXCS50L N 0 120 CC DD
If CC is running one TCC Network and DD is running another, and they are backing each other up, you
should activate automatic resume.
You should IPL the acting master last. Because the RCP status file is opened on the acting master,
messages to be written while the acting master is down must be saved in the local RCP status file and
written to the acting master RCP status file after it comes back up. This should not be a problem unless
there are errors trying to open files and or moving the messages.
If there are two controllers and they back up each other, no sequence will result in both controllers
returning to their primary node (backup or primary) unless the resume is automatic or manual.
Load Terminals: If you apply maintenance that must be loaded in the terminal to make it active, you
must load terminal storage in all terminals. You should use the TL parameter of ADXCST0L to
accomplish this. The terminals do not reload until the TCC Networks switch to a controller that has been
IPLed to apply the new maintenance. Also, you should disable loading of terminal storage whenever a
cashier is signed on. See “Loading Terminal Storage” on page 13-7 for more information about disabling
loading of terminal storage.
Other methods exist to load the terminals, but they all require a separate action that must be invoked after
the controllers have come back up. You can invoke one of the following after checking the RCP status file
for errors:
¹ Use the ADXCS20L N 11 RCP command.
¹ Select the Load Terminal Storage option from the STORE CONTROL FUNCTIONS menu accessed
using the SysReq key.
¹ Power off half of the terminals at a time so that there are always some terminals online. This only
works if memory retention is disabled.
User Applications that IPL the Controller: If you have an application that runs whenever there
is an IPL or that detects an IPL, ensure that the actions taken by that application do not cause the
controller to IPL or otherwise interfere with the IPLing of the controllers. Do not manually or otherwise IPL
any controller while this utility is running. Allow this utility to perform all IPLs until it has finished.
ADXSERVE (function 54) disables the loading of terminals. If this ADXSERVE call was made in the user
exit for operator signon, and enabled (function 53) again in the user exit for operator signoff, the load all
terminals request would only load terminals that were signed off. When the remaining terminals sign off,
each then reloads. All terminals will eventually load, but not while the operator is running customer
checkout. To use this recommendation, the old terminal code must be compatible with the new controller
code.
Note: This function does not prevent a terminal from dumping or reloading as a result of a request to
load a specific terminal.
For the enable terminal IPL parameters, see “Using the Enable IPL Function” on page 15-28.
For the disable terminal IPL parameters, see “Using the Disable Terminal IPL Function” on page 15-29.
Messages
The following table explains the messages which can appear when you use this utility.
| This utility is built into the installation and migration tools used by 4690 OS and is also used by the Apply
| Software Maintenance procedures to minimize the number of diskettes that maintenance requires. Other
| uses might include archiving a subdirectory before replacing some files for testing purposes. To receive a
| helpful reminder of the command line options, you may start the application as follows to receive minimal
| documentation.
| Format:
| ADXNSXZL
| Format:
| ADXNSXZL C TEST.DAT ADXCSLCF.DAT
| This example creates a file called TEST.DAT which contains a compressed version of the 4690 dump file
| ADXCSLCF.DAT.
| Efficiency of compression varies greatly depending upon the contents and the size of the file to be
| compressed. Large dump files compress very well. In contrast, there is negligible compression on small
| text files. It is possible that the resulting combine file is actually larger than the original uncompressed
| files. However, in general, ADXNSXZL recognizes if a file is unlikely to benefit from compression, and in
| this case, simply adds the file to the combine file without attempting to compress it. In particular,
| ADXNSXZL never tries to compress files that are smaller than 2K bytes in size. This provides some
| optimization of speed versus compression.
| Alternatively, if you wanted to compress all the files in ADX_UPGM: you could use the following command:
| Format:
| ADXNSXZL C MYFILES.DAT ADX_UPGM:**
| The resulting combine file, MYFILES.DAT, contains all the files in ADX_UPGM and the original files are
| left untouched.
| When called with the C parameter to create a combine file, ADXNSXZL first checks for the existence of
| the combine file. If it already exists, an error is reported.
| If you wish to add files to an already existing combine file, you must use the A parameter.
| Format:
| ADXNSXZL A MYFILES.DAT C:\TEST.LOG
| Wildcards may also be used with the A parameter to add files to an existing combine file.
| Format:
| ADXNSXZL A MYFILES.DAT ADX_UDT1:*.DAT
| This example adds all files with an extension of DAT in the subdirectory ADX_UDT1 to the existing
| combine file MYFILES.DAT without affecting the original files in ADX_UDT1.
| Format:
| ADXNSXZL M TEST.DAT
| This example lists the contents of the combine file TEST.DAT and reports the original sizes, time stamps,
| and other information. The following is an example of the output:
| Format:
| This example shows that the combine file only contains one compressed file, ADXNSSLG.DAT, that had
| an original size of 468663 bytes, a distribution attribute of 1 (local file), and a time stamp of 3:23 PM on
| the 5th of April 1995. It also lists to what extent the file was compressed as 61% (the compressed version
| of ADXNSSLG.DAT was 61% of the original size).
| The final symbols ( ) reflect whether the compressed version of the file is split across several
| combine files. If the size option for add and compress is not used, this will always show three solid
| blocks, indicating that the compressed version of the file is contained completely within this combine file.
| Through the use of the size option, at times a compressed file will not fit completely within a single
| combine file, then other symbols are shown in this space, as follows:
| If the complete file is not included within the combine file, you will need to look in other combine files to
| find the remaining portions of the compressed file before you will be able to split out the original files.
| Format:
| ADXNSXZL S TEST.DAT ADX_UPGM:
| This restores all the files compressed in TEST.DAT to the subdirectory ADX_UPGM:.
| Alternatively, you can request individual files to be split out of the combine file by adding the filename as
| an optional parameter.
| Format:
| ADXNSXZL S TEST.DAT ADX_UPGM: AMCTESTF.DAT
| This restores just the file AMCTESTF.DAT from the combine file TEST.DAT into the subdirectory
| ADX_UPGM:.
| The subdirectory is not an optional parameter. If you wish to restore files into the current subdirectory,
| then use the following format:
| Format:
| ADXNSXZL S TEST.DAT .\
| This relies upon the fact that ‘.’ is the current directory. Also, the subdirectory must have a colon (‘:’) or a
| back slash (‘\’) at the end of its name. The following is an example of an error:
| Incorrect Format:
| ADXNSXZL S TEST.DAT C:\ADX_UPGM (missing trailing back slash)
| This reports errors for each of the files it attempts to split out of the combine file. Because it tries to
| create the target file by adding the filename to the directory name as given, it results in an attempt to
| create files such as C:\ADX_UGPMAMCTESTF.DAT, which is a filename that is not valid.
| Correct Format:
| ADXNSXZL S TEST.DAT C:\ADX_UPGM\ (notice trailing back slash)
| This restores all the files listed in FILES.LST from the combine file TEST.DAT into the subdirectory
| ADX_UPGM:. FILES.LST should be a list of filenames, with one file per line, followed by a carriage return
| line feed. This can be created with a text editor.
| Log Files
| If ADXNSXZL is being used as part of another process, perhaps being called from a BATCH file, then it
| may be useful to have any messages generated logged to a file rather than displayed to the screen. This
| can be accomplished by using the optional log file parameter on the split and list commands.
| Format:
| ADXNSXZL S TEST.DAT .\ (C:\ADXNSXZL.LOG
| This splits all the files contained in the TEST.DAT combine file into the current directory and reports all
| messages to ADXNSXZL.LOG in the root directory of the C: drive.
| Return Codes
| ADXNSXZL displays messages and progress indicators for most of the common functions provided.
| However, for functions involving split combine files, it often relies upon return codes to report progress and
| errors.
| These return codes are not visible when calling ADXNSXZL directly from the command line. They can be
| detected through the use of IF ERRORLEVEL when ADXNSXZL is invoked from a BATCH file.
The IBM 4690 Operating System is a protected-mode operating system. This means that an application
can only access code and data areas that are part of that application. Also, because of file security
capabilities, the application can only access files that it has created or been designated to access.
Memory requirements vary depending on your application’s objectives and design. You can make an
application a single module or split it into several load modules and chain from one to the other.
The IBM 4690 Operating System limits access to files and operating system functions. Each file and
function is assigned security attributes that limit its use according to the authorization level of the user.
The system maintains a system authorization file, ADXCSOUF.DAT, that defines these authorization
levels. For more information on the system authorization file and file protection, see “System
Authorization” on page 15-8 and “Protecting Files” on page 2-23.
For additional information on how to use the functions of your system, refer to the IBM 4690 Store
System: User’s Guide.
Types of Applications
The store controller operating system supports two types of applications: interactive and background. An
interactive application uses the store controller keyboard and display or auxiliary console to directly
communicate with the operator. A background application communicates directly with the operator
through the BACKGROUND APPLICATION CONTROL screen. This screen is a background application
control screen used for communication between the operator and background applications.
Using a window, you can run several interactive applications at the same time. Each application runs until
it either finishes or operator input is required. When input is required, the application waits for further input
before continuing.
Interactive Applications
Interactive applications fall into two categories: primary and secondary. The primary application is the
main application that runs in your store’s normal operating environment. Secondary applications are
applications that are selected from the SECONDARY APPLICATION menu. This menu is reached by
choosing the second option on the SYSTEM MAIN MENU.
Each interactive application is assigned a window. Windows enable each application to execute as if it
had actual control of the screen and keyboard. The IBM 4690 Store System: User’s Guide explains
windows.
Background Applications
Background applications are non-interactive store controller applications. Some background applications
start or stop running when the system is IPLed or when the acting master store controller or acting file
server is changed on a LAN (MCF Network) system. The operator or the host must start other
applications that do not start automatically.
There are two kinds of background applications: permanent and temporary. You define permanent
background applications when designing your store’s configuration. You define the name of the
background application, the parameters passed to it, the text, and whether it begins at IPL by using the
configuration screens.
Temporary background applications are started from the host site or from your application using the
ADXSTART interface (see “ADXSTART” on page 15-6). HCP, if begun from the host site, runs as a
temporary background application. The operator can remove temporary applications if they are not active
by pressing the Clear key while viewing the BACKGROUND APPLICATION CONTROL screen.
Your applications update the BACKGROUND APPLICATION CONTROL status screen by writing
messages to it periodically. Use a function called Display Background Application Status to write these
status messages. This function is described in “Using Application Services” on page 15-17.
Application Size
The IBM 4690 Operating System has several size restrictions on memory and disk space that your
programs must meet. The restrictions are different for the terminal and the store controller.
When planning your applications, you should know how much disk space is available to you. The IBM
4690 Operating System keeps track of the amount of space already used and the amount available on
your disk. You can determine this information by using the CHKDSK or DIR commands.
The CHKDSK command has options through which you can get a report of how much total disk space you
have, how much of it contains files, how much space is still available, and how much space, if any, is
considered defective.
The DIR command gives you a listing of the files on your disk, how much space they occupy, and how
much space remains available. For more information on these commands, refer to the IBM 4690 Store
System: User’s Guide.
Memory Models
IBM BASIC supports three different memory models: large (for store controllers) and big and medium (for
terminals). With large or big memory models, your application can have more than 64 KB of code and
more than 64 KB of heap data (see “Data Size” on page 15-4). Big memory models allow up to one 64
KB segment of static data, while large memory models allow multiple 64 KB segments of static data.
Medium memory models require that all stack, static, and heap data reside within one 64 KB segment.
Use the compiler directive %ENVIRON to specify whether your application is to execute in the store
controller or in the terminal. For more details on memory models, refer to the memory allocation chapter
in the IBM 4680 BASIC: Language Reference.
Code Size
Each IBM 4680 BASIC program module that you compile produces an object module (OBJ file). An object
module contains a code segment and a data segment.
Each code segment can have a maximum of 64 KB. When you compile a program module, the compiler
lists the number of bytes required for the code segment. When you link your program modules together to
form a load module, the link editor lists the code size (which is the total number of bytes for all of the code
segments of the modules).
The maximum code size supported by the link editor is one million bytes. If your code size exceeds the
amount of memory you have available, you may consider chaining from one load module to another to
decrease the memory required by each load module. See “Chaining Applications” on page 15-30 for
more information on chaining.
Data Size
The total data area for a load module is composed of three elements: static data, heap data, and stack
data.
The terminal medium memory model default data size is almost 64 KB. If you want to change the value of
the terminal data size, use the DATA[MAX[]] option on the LINK86 command. The maximum data area
size is almost 64 KB. To define the maximum data area size, use the DATA[MAX[FFF]] option.
The terminal big memory model and store controller default data area size is the sum of the initial 8 KB
heap plus the load module static data plus the stack. The data area size changes dynamically with the
size of the heap.
The static data area is used to hold your integer and real variable data for your code modules. It also
contains a pointer for each string variable and a pointer for each array definition. In addition, it contains
these same types of data for the shared runtime library, common variables, and overlay variables.
When you compile a program module, the compiler lists the number of bytes of static data required.
When you link your program modules together to form a load module, the link editor lists the static data
size, which is the total number of bytes of static data for all of the program modules. The maximum static
data area for a medium model terminal load module is 64 KB minus the stack and minus the heap. The
maximum static data area for a big memory model terminal load module is 64 KB. The maximum static
data area for a store controller load module is one million bytes.
For medium memory models (terminals only), there is one data area whose size can be no larger than 64
KB minus 16 bytes. (This is the default.) This area contains the stack (2K), the static data, and the heap
data. Big memory models allow up to 64 KB of static data. Large memory models allow multiple 64 KB of
static data— up to 1 MB. Both large and big memory models allow up to 64 KB of stack space.
The heap data area is where variable length items are kept. These items include all string variables, array
elements, application file and device buffers, and other runtime subroutine library data. In the terminal, the
size of the heap is determined by the number of bytes remaining in the data area after the stack and the
static data are allocated. In the store controller, and in the terminal big memory model, the size of the
heap is determined dynamically. The program requests heap space as needed.
You can determine the amount of available heap space from the application. The FRE function indicates
the total number of bytes available everywhere in the heap, and the MFRE function indicates the largest
number of contiguous bytes available anywhere in the heap.
The stack data area is used to pass parameters from one function or subprogram to another. It is also
used by the runtime subroutine library procedures to pass internal data. The stack also contains the
caller’s return address.
The size of the stack is determined when the application load module is loaded. The loader must be able
| to obtain the minimum stack size request, which is 128 bytes for the terminal medium memory model,
| 1024 bytes for the terminal big memory model, and 2560 bytes for the store controller, or the application
| The runtime stack in the BASIC terminal medium memory model occupies the first 2 Kb of the data
| segment. This stack size is fixed and cannot be changed.
| The maximum stack size for big and large memory model applications is 64 Kb. Check the LINK86 output
| messages for the default maximum stack size defined. You may change this with the LINK86
| STACK[MAX[]] option. In order to leave more space for dynamic data (the heap), the stack should be no
| larger than is necessary for the application to run correctly. Refer to Chapter 9 for more information on
| STACK and other link options.
File Size
Depending on your needs, you can decide to keep the current default size of system files or change the
size. Changing file size can help you manage your storage more efficiently. The IBM 4690 Store System:
User’s Guide tells you how to change file size when performing controller configuration.
You do not have to change system file sizes. When the system is IPLed, the operating system checks the
size of your store controller dump file. If the store controller system dump file size is not large enough, file
size is automatically increased. The terminal dump file size is not automatically adjusted.
Application Priorities
The IBM 4690 Operating System runs all controller foreground applications and all terminal applications at
priority 5. Background controller applications can run at any priority between 1 (high priority) and 9 (low
priority). For most systems, background applications should be run at priority 5, which is the same priority
as any foreground applications. Applications are scheduled to run as follows:
¹ If several applications are running at the same priority, then the 4690 Operating System uses the
time-slice method. The time-slice method maintains a queue of application requests and allows each
application to process for a certain time period and interrupts execution, so the next application may
process.
¹ The 4690 Operating System allows the application with the highest priority to execute until one of the
following conditions is met:
– The application has completed execution.
– The application must wait for access to a resource such as a file.
– Another application with a higher priority is executed.
When you specify PRIORITY, the operations of that file are performed before requests from other terminal
files. For example, if you create a file using PRIORITY, reading from and writing to that file takes priority
over other pending terminal file requests without PRIORITY.
Note: All terminal file requests have a higher priority than store controller file requests.
ADXSTART
This function starts a background application using the 4690 Operating System.
where:
NAME$ = Name of background application to be started (without R::) (maximum length = 21 bytes)
PARM$ = Parameters for the background application (maximum length = 46 bytes)
MESS$ = Initial message to be displayed on the background status screen (maximum length = 46 bytes)
This function returns a zero if a command was issued to start the application. Table 15-1 shows return
codes and their descriptions.
Every application has a priority ranging from 1 (highest) to 9 (lowest) with 5 being the default. If several
applications are running at the same priority, the operating system uses a time-slice method to service
them. Each application is allowed to run for a certain period and stop, so that the next application may
run. The 4690 Operating System allows the application with the highest priority to execute until one of the
following conditions occur:
¹ The application is complete.
¹ An application with a higher priority becomes scheduled to run and is executed.
¹ The application is forced to wait for an external event to end.
For example, if a system is running three applications, one at priority 2 and two at priority 5, then the
application at priority 2 executes until it has completed or is forced to wait. If an application at priority 1 is
submitted, then the application at priority 2 is preempted. The priority 5 applications would begin
execution on a time-slice basis after the higher priority applications had completed execution or entered
wait states.
Use the ADXPSTAR function carefully. As the 4690 Operating System allows the highest priority
application to execute until it ends or is preempted, it is possible that a high-priority application could
cause your system to neglect all lower priority applications. This occurs if the high-priority application
takes a long time to either complete or experiences few wait states.
The ADXPSTAR function allows you only to set the priority of the background applications. All previous
applications and any applications initiated by the host, whether background or previous applications, run at
the default priority 5.
where:
NAME$ = Name of background application to be started (maximum length = 21 bytes)
PARM$ = Parameters for the background application (maximum length = 46 bytes)
MESS$ = Initial message to be displayed on the background status screen (maximum length = 46
bytes)
PRIORITY = Priority of the background application (value from 1 to 9; default=5)
This function returns a zero if a command was issued to start the application. Table 15-2 on page 15-8
shows return codes and their descriptions.
System Authorization
To ensure system and data security, the IBM 4690 Operating System requires that each operator using
the system be authorized. This authorization is granted through a system authorization file named
ADXCSOUF.DAT. It contains operator authorization records. Each operator using the system must have
a record in this file. This record contains the operator identifier (ID), password, group ID, and user ID and
specifies which system request keys and menu options the operator ID can use.
When an operator signs onto the store controller console, the system verifies the operator ID and
password entered with the ID and password in the system authorization file. If both are valid, the operator
is allowed to use those system functions specified for the ID by the operator authorization record.
The system authorization file is placed on your system during installation. The ADXCSOUF.DAT file
resides in subdirectory ADX_IDT1 and has the same file protection as your other application files.
The operating system does not provide operator authorization for terminal signon. The IBM 4680 or 4690
applications provide this function. If you write your own application, it must provide this function if it is
needed.
ADXAUTH
For your operators to sign on and use the system, you must create and maintain authorization records for
each one. To add, change, or delete an operator authorization record, your application program must use
the function ADXAUTH. The application program using this function should be an interactive application.
You can also use this function in a background application, but only with functions that do not require
screens to be used (functions 3, 8, 9, and 10). This function can be used only in the store controller and
is only in ADXACRCL.L86.
The user ID and group ID for each operator can be set with ADXAUTH. Operators needing access to files
in command mode should be assigned according to:
where:
FUNC = The action to be taken.
OPID$ = The operator ID on which an action is to be taken.
OPPW$ = The password for the ID.
OPID2$ = The current operator ID or the template ID depending on the requested function. For
FUNC parameter 10, OPID2$ indicates two IDs separated by a colon. The first is the
template, and the second is the OPID whose authorization must not be exceeded.
AUTH.RET is a 2-byte integer variable that receives the return code from the function.
Note: The operating system does not restrict access to your primary and secondary applications. If
security is required for these applications, you must provide it in the application. The current operator ID
is the only parameter passed to these applications and can be used as part of an application authorization
function if required.
FUNC Parameter for Operator Authorization: The FUNC parameter tells you what action can
be taken. The functions you can choose are:
1 =
Change an operator authorization record.
2 =
Add an operator authorization record.
3 =
Delete an operator authorization record.
8 =
Change password only.
9 =
Make operator ID have the same authorization as the operator ID specified by OPID2$. If OPID2$
does not exist, a new ID is created.
10 = This function is the same as FUNC 9 except OPID2$ contains a template ID and a second ID
whose authorization must not be exceeded.
If you choose the ADD or CHANGE functions, the system displays several screens from which you select
the system functions the operator can use. The current operator (OPID2$) can select for another ID
(OPID$) only those functions for which the current operator ID is authorized.
Note: You must have at least one ID on your system that is authorized for all system functions.
The current operator ID making a change to a record cannot be the same as the operator ID being
changed.
If you try to change an authorization record that does not exist, you receive error code 1010, and your
request is handled as an add function. The system creates a record having default authorization. The
initial default authorization for the add function makes no system functions available. The operator would
be allowed only to sign on and select primary and secondary applications.
If you try to add a record for an operator ID that already exists, you receive error code -1010, and your
request is handled as a change function.
If you try to delete an authorization record that does not exist, you receive error code -1010.
If the template ID you specify for the make function does not exist, error code -1011 is returned and
default authorization is used as the template. A new ID having default authorization is created.
Table 15-3 shows the FUNC parameter return codes and their descriptions.
OPID$ Parameter—Operator ID: This parameter indicates the operator ID to add, change, or
delete. The OPID$ parameter should be a string containing up to nine ASCII alphanumeric characters.
There should be no leading blanks. Leading blanks and zeros are considered part of the operator ID.
Trailing blanks are ignored.
OPID2$ Parameter: For FUNC parameters 1 and 2, the OPID2$ parameter should be a previously
defined operator ID. For FUNC parameter 9, this parameter indicates the operator ID to be used to set
the authorization for the ID specified by OPID$. The OPID2$ parameter should be a string containing up
to nine ASCII alphanumeric characters without any leading blanks. Leading zeros are considered part of
the operator ID. Trailing blanks are ignored. For FUNC parameter 10, OPID2$ contains two IDs
separated by a colon. The first is the template ID, and the second ID is the ID whose authorization must
not be exceeded (this can be the currently signed on ID). Both IDs should be strings containing up to nine
alphanumeric characters.
For example:
"1234" + ":" + "4567"
For other FUNC parameters, this parameter is ignored.
where:
RETCODE = Contains the return code from the call.
PWIN$ = Contains the password to be encrypted.
PWOUT$ = Receives the encrypted value.
The PWIN$ parameter should be a string containing up to eight ASCII alphanumeric characters with no
leading blanks. Leading zeros are considered part of the password. If this parameter is missing, error
code -1100 is returned.
The PWOUT$ parameter returns an eight-character string containing ASCII characters that represent
decimal digits.
You can use this subprogram in both the store controller and the terminal. It is in ADXACRCL.L86,
ADXUCLTL.L86, and ADXUCRTL.L86.
Use pipes to communicate data that can be recreated by the application writing the data; if there is a
power line disturbance the store controller is IPLed, and the contents of the pipe are lost. Use disk files
for data that cannot be recreated.
A pipe is an area of memory that is like a sequential file. Your application creates a pipe by using the
CREATE command and specifying a pipe name. A pipe name has the same characteristics as a file
name. The identifier pi: must precede the pipe name and no extension (xxx) is allowed.
More than one program can write to a pipe, but only one reads data from it. Because pipes are used this
way, two pipes must be used to communicate both ways between applications.
A pipe is temporary. When the last application that has access to a pipe closes that pipe, the pipe is
deleted. If a program using a pipe is terminated by the operating system (not a normal application
termination), the operating system automatically closes the pipe. Refer to the IBM 4680 BASIC: Language
Reference for more detailed information on pipes.
A pipe may be created with a zero-length buffer size for use as a simple semaphore. A READ operation
of a semaphore pipe obtains the semaphore and a WRITE releases it. If another process has obtained
the pipe previously, the READing process waits until a WRITE to that pipe has been performed. Write
operations, on the other hand, never wait; even if the pipe was released previously, the call returns without
an error. To create a semaphore pipe in a BASIC application, omit the BUFFSIZE parameter and specify
BUFF as 0 in the CREATE statement.
To exchange data with other store controllers or terminals, you must use the pipes created through Pipe
Routing Services.
Identify these pipes using pipe IDs. A pipe ID is a letter between A and Z. Make each ID in a store
controller or terminal unique. Each store controller or terminal can have up to 26 IDs (A to Z). If you have
several applications running in a store controller at once, each must use a different pipe ID.
One of three runtime libraries (one for the controller and two for the terminal) contain these functions,
depending on whether you are requesting services for the store controller or the terminal.
| The large memory model controller library is ADXACRCL.L86.
| The medium memory model terminal library is ADXUCRTL.L86.
| The big memory model terminal library is ADXUCLTL.L86.
The system has separate functions for the terminals and the store controllers. The function names are as
follows:
PRSxyyy
where:
x = T for functions used in the terminal
x = C for functions used in the store controller
yyy = CRT for the create pipe function
= WRT for the write function
= INT for the initialization function
To prepare for receiving data through a Controller Pipe Routing Services pipe, call this function:
FUNCTION PRSxCRT (IONUM,SIZE%,PIPEID) EXTERNAL
INTEGER*2 PRSxCRT
INTEGER*2 IONUM,SIZE%
STRING PIPEID
END FUNCTION
Table 15-4 shows the two-byte integers the PRSxCRT function returns.
Note: Your calling program should have an ON ERROR routine to handle normal pipe creation runtime
errors.
Before reading data from a Pipe Routing Services pipe, your application should use the WAIT statement to
obtain notification that there is data in the pipe.
Note: If a terminal application issues a WAIT for a Pipe Routing Services pipe, you should be aware that
the terminal sends a message to the controller by way of the TCC Network. This message tells the
controller that the terminal is waiting for data to become available in the pipe. If the WAIT ends because
the timeout interval specified on the WAIT is exhausted, the terminal sends another message to the
controller by way of the TCC Network. This message tells the controller that the terminal is no longer
waiting for data in that pipe. Repeatedly issuing WAITs for Pipe Routing Services pipes with short timeout
intervals in the terminal results in a large number of TCC Network messages being sent to the controller.
This additional volume of TCC Network messages can have an adverse impact on the controller’s
response time to terminal requests. Therefore, short timeout intervals on the WAIT should be used only if
absolutely necessary. In no case should the timeout interval be less than 100 milliseconds, as this much
time is required to send the WAIT message to the controller and to receive a response back from the
controller. When the WAIT statement finishes for the pipe, the application should use the READ FORM#
statement to read the data from the pipe. The READ FORM# statement should specify the number of
bytes to read according to the type of message written to the Pipe Routing Services pipe. You can use
fixed-length or variable-length message types.
For fixed-length message types, the number of bytes read from the pipe must be the same as the number
of bytes written to the pipe. Fixed-length messages require that the application writing to the pipe and the
application reading from the pipe always use the same number of bytes in their messages.
For variable-length message types, the number of bytes read from the pipe must be less than or equal to
the number of bytes written to the pipe.
A variable-length message consists of two parts. The first part is fixed-length and indicates whether there
is a second part and the size of the second part. The application writing the variable-length message
writes both parts of the message together as one message. The application reading the variable-length
message reads the first part of the message by reading a fixed-length message. From the first part of the
message the application determines the number of bytes to read for the second part.
Sending data to other terminals or store controllers is a two-part process. First, your application must
initialize the writing service. Use the function shown here to perform this initialization.
FUNCTION PRSxINT EXTERNAL
INTEGER*4 PRSxINT
END FUNCTION
INTEGER*4 PRSNUM
PRSNUM=PRSxINT
This function returns a four-byte integer. Your application must save this integer for use when writing.
You should call the initialization function only one time for each load of the application.
If your controller application calls the PRSCINT function, and if your controller application uses the CHAIN
statement to transfer control to another controller application, your application should call the PRSCCLS
function before chaining:
FUNCTION PRSCCLS EXTERNAL
INTEGER*1 PRSCCLS
END FUNCTION
CALL PRSCCLS
PRSCCLS releases the resource obtained by the PRSCINT function and makes it available to other
programs. If you omit this call to PRSCCLS, eventually this resource could be depleted. PRSCCLS does
not return a return code.
After initialization, you can write to another store controller or terminal. Do this using the following
function:
FUNCTION PRSxWRT (PRSNUM,DEST,BUFFER) EXTERNAL
INTEGER*4 PRSxWRT
INTEGER*4 PRSNUM
STRING DEST, BUFFER
END FUNCTION
Table 15-5 shows the 4-byte integers that are returned by the PRSxWRT function.
| Additionally, you may choose to use the conditional pipe write. This write is identical in every way to the
| normal PRSxWRT pipe write with one additional function. If the destination pipe is full or does not have
| enough room left to contain the entire message being written, the write will not wait for room to become
available. Instead, the application is given control immediately with a -1 return code. At this point, the
application can make a decision to either discard the data being written or to retry the write at a later time.
The intended use for the conditional pipe write is for situations where it is undesirable for an application to
wait for extended periods of time. To use the conditional pipe write, use the following function:
where:
PRSNUM = Contains the value returned by the initialization function.
| BUFFER = Contains the data to be sent. The maximum length of data that controller applications may
| write to controller pipes or terminal pipes is 120 bytes. The maximum length of data that a
| terminal application may write to a terminal pipe is also 120 bytes. The maximum length of
| data that a terminal application may write to a controller pipe is 512 bytes.
DEST = Contains the destination address. This is four characters of the form aaaw.
| The aaa indicates the terminal or store controller to which to send. For terminals, aaa is the
| terminal number in ASCII. For store controllers, it consists of 0xy where x and y are
| characters between C and Z. Thus, for the store controller, aaa can range from 0CC to 0ZZ.
| There are also two special values of aaa for store controllers: 0AA and 0BB. Use 0AA
| when the destination is the master store controller. Use 0BB when the destination is the
| controller to which the terminal is attached. You can think of these destinations as logical
| destinations. The destination is associated with the machine performing the function rather
| than the physical machine that is assigned the address. Where necessary, the operating
| system switches a destination to another machine when a configuration change occurs that
| affects the destinations. For example, the system switches destinations when one store
| controller takes over another store controller’s TCC Network. Pipe Routing Services perform
| the translations of 0AA and 0BB so that your application does not have to actually know the
| real store controller IDs.
| The w part of the destination address indicates which pipe to write to in the specified store
| controller or terminal. It is a pipe ID. It should be one of the pipe IDs used by an application
| in the destination terminal or controller to create a Pipe Routing Services pipe.
| Note: If a terminal application is writing to a pipe created by another terminal, both
| terminals must be located on the same controller. A terminal application cannot write a
| message across the LAN to a terminal located on a different controller.
where:
RET = Is the return code. It is zero if the operation was successful, or negative if the operation
failed. Return code values are listed below.
FUNC = Specifies which ADXSERVE service is to be called.
PARM1 = Varies according to the function. See the following function descriptions.
PARM2 = Varies according to the function that is called.
Note: If your controller application calls ADXSERVE, it should also call ADXSERCL (see “ADXSERCL
(Closing an Application Service)” on page 15-39) prior to chaining to another application in order to free
system resources.
Dump System Storage: The Dump System Storage function causes all of the storage in the machine at
which the request is made to be dumped to a disk file. Both the application and operating system storage
are dumped.
Enable Terminal Storage Retention: This function enables storage retention on terminals. If this
function is called in a non multiple-controller LAN (MCF Network), all the terminals on that TCC Network
are enabled. If this function is called in a terminal, only that terminal’s storage retention is enabled. If this
function is called only from the acting master store controller in a multiple-controller LAN (MCF Network),
all terminals on that network are enabled.
The Enable Terminal Storage Retention function uses the following parameters:
FUNC = 2
PARM1 = Unused; the value is ignored.
PARM2 = Unused; the value is ignored.
Disable Terminal Storage Retention: This function disables storage retention on terminals. If this
function is called in a non multiple-controller LAN (MCF Network), all the terminals on that TCC Network
are disabled. If this function is called in a terminal, only that terminal’s storage retention is disabled. If
this function is called from only the acting master store controller in a multiple-controller LAN (MCF
Network), all terminals on that network are disabled.
If the function is called in the terminal, the effect is temporary. See “Enable Terminal Storage Retention”
on page 15-18.
The Disable Terminal Storage Retention function uses the following parameters:
FUNC = 3
PARM1 = Unused; the value is ignored.
PARM2 = Unused; the value is ignored.
Get Application Status Information: This function gathers status information and places it in the string
variable you specify with PARM2. The information returns in ASCII data format. Use the MID$ statement
to extract selected fields from PARM2. MID$ references the offset in the PARM2 string from the left which
ensures that your program works properly if PARM2 size is extended.
The Get Application Status Information function uses the following parameters:
FUNC = 4
PARM1 = Unused; the value is ignored.
PARM2 = Specify a string variable.
Table 15-8 shows the data for the store controller application status.
Table 15-9 shows the data for the terminal application status.
Programmable Power: Programmable power allows terminal or controller applications to issue program
calls to enable or disable the programmable power feature, and to issue program calls to power OFF a
terminal or controller.
When the application calls the power-OFF function, it will specify the day and time that the power is to be
turned back on. The time must be specified in the international format. A 0000 or 2400 will be accepted
as midnight. The day of month is also specified and must meet either of the following criteria:
¹ If the day and time are prior to the current day and time, the day must be valid for the next calendar
month.
¹ If the day and time are after the current day and time, the day must fall within the current month.
Note: Using 999 for the time will indicate that a power down is to be done without enabling a power-ON
time.
The maximum time that a controller or terminal can be programmed to wait before powering-ON is one
month plus or minus a few minutes due to clock variances.
Power OFF a Remote Controller: This function is used to power OFF a remote LAN (MCF Network)
| controller. This function can be invoked on a controller from any supported family (personal computer,
| 4684, or 469x). The controller on which this function is invoked must be the master controller in a LAN
system. The remote controller being powered-OFF must be in the 469x family to have the programmable
power feature. The day, hours, and minutes in the PARM2 string are the power-ON time.
Power OFF a Remote Terminal: This function is used to power OFF a remote terminal. The terminal can
be store loop attached or token ring attached. This function can be invoked on a controller from any
| supported family (personal computer, 4684, or 469x). The controller on which this function is invoked
must be the master controller if on a LAN (MCF Network) system, or from the stand-alone controller
running either the store loop or token ring for terminals. The remote terminal being powered-OFF must be
in the 469x family to have the programmable power feature. The day, hours, and minutes in the PARM2
string are the power-ON time.
Disable Controller Programmable Power: This function is used to disable programmable power on the
local controller. This function must be invoked on the controller on which programmable power is to be
disabled. The controller on which this function is invoked must be in the 469x family to have the
programmable power feature.
Enable Controller Programmable Power: This function is used to enable programmable power on the
local controller. This function must be invoked on the controller on which programmable power is to be
enabled. The controller on which this function is invoked must be in the 469x family to have the
programmable power feature.
Power OFF a Local Machine (Controller or Terminal): This function is used to power OFF a local
machine. The machine may be a controller or terminal, provided that the controller or terminal is in the
469x family. This function should be invoked on the machine that is to be powered-OFF. The day, hours,
and minutes in the PARM2 string are the power-ON time.
Display Application Status Message: Interactive applications use this function to display status on the
SYSTEM WINDOW CONTROL Screen. Applications started in Command Mode cannot use this function.
This function displays the specified text on the WINDOW CONTROL screen. It puts the message in the
description field of the window for the application using this function.
The message is available any time you swap to the WINDOW CONTROL screen. It is displayed until the
application ends. This message function provides one place where you can look to see the status of all
active applications.
Display Background Application Status Message: The following function gives status for background
applications only. Applications started in Command Mode cannot use this function.
This function displays the specified text on the BACKGROUND APPLICATION CONTROL screen. It puts
the message in the message field of the requesting background application. The message is available
any time you swap to the BACKGROUND APPLICATION CONTROL screen. It is displayed until the
application ends. This message function provides one place where you can look to see the status of all
active background applications.
Stop Application with Message: Interactive applications use this function to display status on the
SYSTEM WINDOW CONTROL screen. Applications started in Command Mode cannot use this function.
The primary purpose of this function is to handle initialization problems preventing the application from
operating. It should not be used once the application has displayed its first screen.
After this function stops the application, it displays the message text that you have specified. It displays
this text on the message line of the system screen used to start the requesting application.
Get Disk Free Space: This function returns the amount of free space on the specified remote or local
drive.
Get Configured Controllers on the Network: This function returns the IDs of all the store controllers on
the network. Each ID is two bytes long. Store controller IDs range from CC through ZZ. A store
controller ID of 00 indicates the end of the list.
The data returned is a negative return code, a numeric value for the store controller ID representing the
ASCII values CC through ZZ or X'0' if the terminal was not defined.
Note: This function returns a controller ID CC through ZZ only if the function was issued at the master
store controller or if the terminal is local to the controller issuing the function.
Convert ASCII Characters to EBCDIC Characters: This function converts ASCII characters in a string
to EBCDIC characters.
Convert EBCDIC Characters to ASCII Characters: This function converts EBCDIC characters in a
string to ASCII characters.
Terminal Dump Preservation: This function prevents terminal dumps from being written to the terminal
dump file until the dump currently in the file can be copied to a diskette. This function is enabled by
creating a user logical name ADXTDUMP.
The terminal dump preservation function automatically sets a flag whenever a terminal dump occurs. The
preservation flag is reset after the dump is successfully copied to a diskette using the Create Problem
Analysis Diskette function. The preservation flag is also reset when the Create Problem Analysis Diskette
encounters an incomplete terminal dump and the user chooses to bypass copying the terminal dump to a
diskette. While the flag is set, terminal dump requests will be rejected so that the dump currently in the
terminal dump file will not be overwritten.
The node and the TCC Network must be the first three characters of the string when the ADXSERVE
function is called. When the ADXSERVE function returns, the three most recent messages will follow the
node and TCC Network in the string. If no messages exist for the specified node and TCC Network,
blanks will be returned for the messages. The oldest message will be put in the buffer first. Each
message is 133 characters long.
Get Loop Status: This function returns the configuration and current status of the two loop adapters.
Data is returned in RET in the form WWXXYYZZ (hex) where:
ZZ = The 1st adapter configuration
YY = The 1st adapter status
XX = The 2nd adapter configuration
WW = The 2nd adapter status
Get All Active Controllers on the Network: This function returns the IDs of all the active store
controllers on the network. Each ID is two bytes long. A store controller ID of 00 indicates the end of the
list.
Get Controller ID and Loop ID for a Specified Terminal: The data returned in RET is two bytes for the
Loop ID followed by the two bytes for the controller ID. A X'01' is returned if the terminal number cannot
be found.
Get the Controller Machine Model and Type: This function retrieves the machine model and type and
places the 3-byte hexadecimal values to the left in the RET parameter. The 3-byte hexadecimal values
will be returned in PARM2 if PARM2 is specified. Use the MID$ statement to extract the individual bytes
from PARM2. The MID$ statement references, from the left, the offset in the PARM2 string.
| Check the Master or File Server Exception Log: This function returns whether or not there are any
| entries in the exception log.
Set Terminal Sleep Mode Inactive Timeout: This function allows an application running in a store
controller to set the Terminal Sleep Mode Inactive Timeout. When you enable Terminal Storage
Retention, you set this value to determine how many minutes a terminal will remain idle before being
powered-down.
Note: This function is supported only on the store controller. In order for the sleep mode inactive timeout
to take effect, you must invoke this function before enabling the Terminal Storage Retention. You may
also specify the terminal sleep mode inactive timeout by selecting the Enable Terminal Storage Retention
option on the TERMINAL FUNCTIONS screen. The default for the terminal sleep mode inactive timeout is
30 minutes.
Enable/Disable IPL: Terminals are able to run offline from the controller. The primary reason to run
offline is if there is a problem with the controller.
In many cases, maintenance is applied to the controller to correct the problem. One of the modules that
may be applied to the controller as maintenance is the terminal operating system (ADXRT1SL.286). The
controller and terminal interact to ensure the terminal is running the latest terminal operating system. The
latest is the terminal operating system file currently being used on the controller. The controller is IPLed
to apply maintenance. If the terminal is not running the same level of the operating system that exists in
ADX_SPGM on the controller, the terminal is IPLed to load the latest terminal operating system.
When the terminals run offline, the application can write the transaction data to the terminal RAM disk.
This allows the terminals to run offline while a controller problem is being addressed. The terminals
eventually communicate with the controller and transfer all saved transactions in terminal RAM disk to
normal transaction files in the controller. If the terminal is IPLed prior to the completion of the saved
transaction movement to the controller, the saved transactions are lost.
Enable/Disable IPL allows an application program that is processing in a terminal to temporarily prevent
automatic reloading of the terminal. Automatic terminal reload can occur when the terminal is offline and
returns online or when an operator requests the Load Terminal Storage Function with an “*” specified as
the terminal number. Automatic terminal reloads can also occur when ADXCS20L is invoked with the
Load All Terminals function code.
Application programs should use the Disable IPL function when the terminal application recognizes that it
is offline and begins to save data on the RAM disk. When the terminal application recognizes it is online
with the controller, the saved data can be transferred to the controller. After all data has been transferred
to the controller, the terminal application can use the Enable IPL function to allow any possible IPL.
The requests to enable and disable the IPL of the terminal for the Mod1 and the Mod2 are handled
independently. If a Disable Terminal IPL was outstanding on both terminals and one terminal’s application
issued an “Enable Terminal IPL” request, an IPL is not possible for the Mod1 and the Mod2 pair. Both
terminals must have the IPL enabled before an IPL can occur.
| Load Specific Terminal: This function allows an application running in a store controller to load a
| specific terminal.
Using the Enable IPL Function: This function enables the terminals to IPL. If terminals were IPLed
earlier, but could not because the user had disabled the IPL, requesting this function would cause the
terminals to IPL.
This function is also used to enable programmable power. It allows the terminal to accept power-OFF
commands. If a previous power-OFF command had been issued while programmable power had been
Using the Disable Terminal IPL Function: This function prevents the automatic reload which may occur
when a terminal comes online. This function allows the terminal application to effectively use the terminal
RAM disk support for temporarily logging data. In most cases, when the controller returns online, the
terminal application transfers the saved transaction files to the controller.
This function is also used to disable programmable power. It allows the terminal application to block or
delay a power down command.
ADXERROR (Application Event Logging): Your application can use a routine called
ADXERROR to make entries in the system log and optionally display system messages. The routine
should be declared as follows:
FUNCTION ADXERROR (TERM,MSGGRP,MSGNUM,SEVERITY,EVENT,UNIQUE) EXTERNAL
INTEGER*2 TERM,MSGNUM,ADXERROR
INTEGER*1 SEVERITY,MSGGRP,EVENT
STRING UNIQUE
END FUNCTION
The function always returns zero and uses the following parameters:
TERM The parameter is the terminal number. This information comes from the GET APPLICATION
STATUS INFORMATION application service request in the terminal. If the application calling
this routine resides in the store controller, the TERM parameter should be zero.
MSGGRP The (message group) parameter is a one-byte integer that contains the ASCII equivalent of
the message group character. The message group is unique for each product and should be
in the range of J to S.
MSGNUM The message number, if any. The message number should be zero if no message is to be
displayed. The system takes this number and converts it to three printable decimal digits,
which it appends to the message group to form the message identifier. The message
identifier is used to scan the Application Message file. Your application must provide this file
for the system message display.
SEVERITY A number ranging from 1 to 5 that is used to indicate the importance of each message. The
system uses the field as a message level indicator. The most important messages have a 1
in this field. The operator can request a message level from 1 to 5, and only messages
whose severity number is less than or equal to the current message level appears.
EVENT A one-byte integer whose value is completely determined by the application. It can be used
to indicate why the request is being made.
For store controller application events 64 to 79, decimal, and terminal application events 64
to 81, decimal, the system uses the log data to generate Network Problem Determination
Alert (NPDA) messages. For a description of NPDA support, refer to the IBM 4690 Store
System: Communications Programming Reference.
Application Message Logging: The system references a message display file that your application can
provide for messages. This file is called ADXCSOZF.DAT and must be in subdirectory ADX_IPGM:.
This message file contains fixed length records, so entries must follow this format:
cXXX_sssssssss
where:
c = 1-character message group passed through parameter MSGGRP to application services.
XXX = 3-digit message number passed through parameter MSGNUM to application services.
_ = Blank space.
sssssssss = Message text explaining the message. This text must fill 106 character spaces. If the
message text is not that long, pad it with blanks.
Note: The 106-character message is displayed as two lines of 53 characters, so be careful of word
breaks in your message text.
The system uses the first four characters (cXXX) of the message to scan the message file for a match. If
it finds one, the system displays the message identifier and accompanying text on the SYSTEM
MESSAGE DISPLAY screen.
Chaining Applications
Chaining means to transfer control from a currently executing application program directly to another
application program. Before the CHAIN statement is issued, any Display Manager files must be closed
using the CLSDIS command. Failure to do this results in a loss of system resources needed to open files.
Chaining can be performed in one of two ways: chaining to a directly executable module or chaining to an
overlay. Directly executable modules have a file extension of 286. Overlays have a file extension of
OVR.
Refer to the IBM 4680 BASIC: Language Reference for more information on chaining.
Chaining to Overlays
Chaining to overlays is supported only in the store controller.
You can share data with an overlay by using common variables. You cannot pass parameters to an
overlay with the CHAIN statement. Applications using overlays are made up of a root section and overlay
sections.
The root section should define all the public functions and subprograms that overlays need to use. This
allows the overlays to share a single definition of the function or subprogram instead of each overlay
having its own copy of the function or subprogram. You can chain from the root to an overlay and from
one overlay to another. You cannot chain from an overlay to the root.
When you chain to an overlay, execution begins at the first executable statement in the program. If you
use overlays, you must link edit your application with its own copy of the runtime subroutine library,
because a shared copy of the runtime library does not support overlays.
You can share data by passing parameters to the modules in the CHAIN statement. When a directly
executable module is chained to, execution begins at the first executable statement in the program.
Directly executable modules can use a shared copy of the runtime subroutine library.
The IBM 4690 Operating System allows you to optionally install up to four virtual disks in the controller’s
RAM memory and up to two virtual disks in the terminal’s RAM memory. Virtual disks can be
automatically installed at IPL if your system is configured for RAM disk memory.
The controller’s optional disks are named disk devices T:, U:, V:, and W:. Terminal applications can
access only disk T:. Controller applications can access all disks.
The terminal’s optional disks are named disk devices X: and Y:. Terminal applications can access these
disks, but controller applications cannot.
Some characteristics of RAM disks are fixed and cannot be redefined by the user. These characteristics
include:
Sector size 512 bytes
Cluster size 512 bytes
Track size 8 sectors
The maximum disk size is dependent on the terminal memory size, space available, and number of files.
Disk memory is allocated in increments of 32 KB. Directory space is allocated in increments of 16 files.
FAT space is calculated based on the number of sectors.
Data on the RAM disks is lost during a power outage. Therefore, you should set checkpoints during
processing for copying the data from the RAM disk to the hardware disk. The distribution characteristics
of RAM disks are similar to those of diskettes: files are not distributed. However, options of ADXCOPYF
allow preservation of distribution attributes so that distribution occurs when the files are copied to the fixed
ADXCOPYF (Copying RAM Disk Files): The subprogram is designed specifically for RAM disk
files, but can be used on any files when the target file is on the same controller as the source file. This
subprogram is not supported for copying files across the LAN (MCF Network).
| Warning: If ADXCOPYF fails, the target file is deleted, because partial data might have been written.
| Therefore, if ADXCOPYF fails while copying to a file which already exists, that file is erased.
| When you specify a filename for this routine you must specify the exact filename that you want to copy.
| You must also specify the exact source and target filenames. Do not use global (or wildcard) filename
| characters. The ADXCOPYF subroutine is in the system runtime library: ADXACRCL.L86 for store
controller applications, ADXUCRTL.L86 for terminal medium memory model applications, and
ADXUCLTL.L86 for terminal big memory model applications.
ADXCOPYF issued from a terminal will always attempt to transmit to all terminals requesting a file at the
same time.
Your 4680 BASIC application should include a declaration similar to the following:
SUB ADXCOPYF (RETC,INFILE,OUTFILE,OPT0,OPT1) EXTERNAL
INTEGER*4 RETC
STRING INFILE,OUTFILE
INTEGER*2 OPT0,OPT1
END SUB
Where:
retc = A 4-byte integer return code.
infile = A string containing the file name to be copied from (source file).
Note: For the terminal ADXCOPYF, the total length of a controller input file name must be less
than 25 characters. You can use a logical name to avoid this restriction. See “Using Logical
Names” on page 2-11 for more information.
outfile = A string containing the filename to be copied to (target file).
opt0 = A 2-byte integer indicating whether or not copy operation should be performed:
Table 15-10 shows the ADXCOPYF defined return codes and their descriptions:
Some of the conditions that can cause file sharing problems are incomplete transactions, terminal
hardware failures, incomplete controller functions, and software failures. ADXFILES provides the following
functions to manage the canceling of shared file usage:
¹ Restricting a file for exclusive use
¹ Unrestricting a file that was restricted
¹ Determining despool status
Your 4680 BASIC application should include a declaration similar to the following:
SUB ADXFILES (RET,FUNC,PARM1,PARM2) EXTERNAL
INTEGER*4 RET
INTEGER*2 FUNC, PARM1
STRING PARM2
END SUB
ADXFILES Restrict: ADXFILES restrict forces the exclusive use of a single file. This function is
intended to be used only for store closing procedures and should not be used as a general purpose
function.
ADXFILES restrict function causes all applications currently using that file to lose their access to that file
until they have closed and reopened the file. When an application attempts to use a file that has been
restricted, the file request is rejected and a new return code is returned. In the controller the return code
is 80F306F0 and the associated ERR code in BASIC is *I. In the terminal, the first terminal access to a
restricted file receives a 80F306F0 and subsequent accesses (by the same or other terminals) receive a
80004007 (bad file number). Both of these return codes in the terminal have an associated ERR code of
*I. When an application has a file open and receives either of these return codes for a file request, it
should close and reopen that file.
¹ Purpose:
To restrict the use of a file by all other applications. The restrict applies to applications on all
controllers and all terminals. To restrict the use of a mirrored or compound file you restrict the prime
version of the file on the file server or master respectively. You cannot use restrict for a
distribute-on-close type file. After a file is restricted:
– It cannot be opened by any application.
– An application that is using a file that is restricted by another application must close and reopen a
file to use the file again.
¹ Restrictions:
– Only one ADXFILES to restrict a file can be active at a time.
– To restrict a file on a file server or a master the controller application executing the restrict must
be connected to the active file server or master.
– To restrict a mirrored file or compound file an application must restrict the prime version of the file.
– A distribute-on-close type file cannot be restricted.
¹ Location of usage:
– Any application on any controller.
– It cannot be used by a terminal application.
¹ Calling sequence:
CALL ADXFILES (ret,func,parm1,parm2)
ADXFILES Unrestrict: ADXFILES unrestrict stops the effect of the ADXFILES restrict. The unrestrict is
requested for the same file name that was used for the restrict even if the file was renamed while it was
restricted. After the unrestrict is executed that file name may be used by all applications again.
¹ Purpose:
To unrestrict the use of a file that had been previously restricted. To unrestrict the use of a Mirrored
or Compound file, unrestrict the prime version of the file on the File Server or Master respectively.
After a file is unrestricted:
– The file name can be used to open files according to the normal guidelines.
– An application that lost access to a file due to restrict must issue a CLOSE followed by an OPEN
after the unrestrict is issued to gain access to the file again.
ADXFILES Despool: ADXFILES despool determines how many total bytes of data remain in all the spool
files and how many controllers have spool files. By using this function the applications can determine that
the store personnel should be notified that a store closing must be delayed and can give the store
personnel an idea of the length of the delay.
¹ Purpose:
This function determines the status of the operating system despooling of files. This function
determines how many bytes of data are yet to be despooled and how many controllers have data in
their spool files to be despooled. The values determined by this function are probably different than
the sizes of the spool files because the size of the spool files are not set to zero until all the data has
been despooled from them.
For example, you may want to start the end of day processing in every store in your IBM 4690 Store
System network. Before starting this processing you must be sure that each store is closed. Closed
means you are no longer processing transactions. To determine if all the stores are closed, invoke
ADXCSEOL in each store using the NetView* DM INITIATECLIST command. The code returned to
NetView DM from the 4690 controller may indicate the store is still processing sales transactions. In this
case the NetView DM plan which starts the end of day processing bypasses the store.
The ADXCSEOL application is written in IBM 4680 BASIC and allows for a user exit. The user exit
determines the status of the store. If a zero (0) is returned to the main program, the store is closed. If the
A user exit is required because determination of the store being closed differs for each sales application
product. The name of the user exit must be ADXCSEUR. You must link your user exit with the base
application to form ADXCSEOL. The default user exit returns a store closed status of -1 which is open.
The purpose of this user exit routine is to enable you to write code in 4680 BASIC to accomplish any
processing that you want. For example, printing reports or saving critical data files.
The subroutine should terminate with a recognizable return code that is returned to the host.
A user exit subroutine is available for the IBM General Sales Application. It queries the store status field
in the terminal status file and return a code of zero (closed) or negative one (open). For other sales
applications, a user exit is not available.
ADXEXIT (Set the ERRORLEVEL VALUE): ADXEXIT can be used in a BASIC application to
set the ERRORLEVEL value that can be tested in a BAT file. This value provides a way for a BAT
program to test the results of a BASIC program that it has invoked.
Calling ADXEXIT terminates the calling program and sets a 2-byte integer that is used to set the
ERRORLEVEL value for a BAT file. To call ADXEXIT in a BASIC program, you must first define it as
follows:
SUB ADXEXIT (PARM1) EXTERNAL
INTEGER*2 PARM1
END SUB
In addition, the BASIC program calling ADXEXIT must be linked with the ADXACRCL.L86 file containing
ADXEXIT.
This section lists functions available only to applications running at the store controller. Use the
ADXSERVE request call for these functions.
ADXSERCL allows applications that chain to deallocate system resources. These resources are allocated
the first time the application uses ADXSERVE. It is not necessary to close ADXSERVE each time it is
used. If an ADXSERCL is used after each execution of ADXSERVE, system performance is impaired.
Warning: If you have invoked ADXSERVE and you are not chaining applications, ADXSERCL must not
be used.
The ADXSERCL routine for store controller applications is written in IBM 4680 BASIC. The application
should include the following declaration statement:
SUB ADXSERCL EXTERNAL
END SUB
ADXDIR (Listing Terminal RAM Disk Files): Terminal applications use the ADXDIR
subprogram to list the files in RAM disks X: and Y: and the amount of free space on the disks. This
subprogram displays the same type of information about terminal RAM disks that the DIR command
| displays about controller disks. The ADXDIR subprogram is in the system runtime subroutine library
| ADXUCRTL.L86 for medium memory model terminal applications and ADXUCLTL.L86 for big memory
| model terminal applications.
where:
retcode = 4-byte integer return code.
disk = String containing the disk ID (X: or Y:) and optionally continuing with a file name with or
without global file name characters (*).
direntry = String that contains information for one directory entry on return to the caller.
opt = Option indicating whether the first or next directory entry is desired. An integer value of 0
indicates first and 1 indicates next.
The ADXDIR subprogram is typically called within a loop in the application, such that each repetition of the
loop passes the information for a directory entry. The opt parameter should indicate the first entry on the
first repetition of the loop, and it should indicate the next entry on the following repetition. When the
application is executing such a loop, the ADXDIR subprogram passes information for each file on the RAM
disk in the direntry string as the loop progresses. As the loop is executed and file information is passed in
the direntry string, the application can display it, collect it, or send it to an application in the controller, for
example. When information for all existing files has been passed, the retcode indicates this condition and
the application can terminate the loop.
Table 15-11. Successful ADXDIR Return Codes that do not imply error conditions.
Return Code Description
0 Indicates successful passing of file information
1 Indicates no more files on the disk
Table 15-12. ADXDIR Error Return Codes that imply error conditions.
Return Code Description
3001 Indicates the disk ID is not X: or Y:
3002 Indicates the requested X: or Y: disk is not configured.
If the return code is 1, the direntry string contains the number of files and the number of free bytes in the
positions indicated above, but all other positions contain blanks.
Extended Memory Management for the IBM Point of Sale Terminal: Extended memory
management is an alternative to terminal RAM disk. It is typically used when the terminal does not have
enough memory for the RAM disk, but the application needs more memory for data than its 64K data
segment. Extended memory management is a library of subroutines that is linked with the terminal
application. There are two sets of libraries available that contain these subroutines: ADXMEM0L.L86 and
ADXMEM1L.L86 are used when linking an application that was compiled using the 4680 CBASIC medium
memory model compiler; ADXMEL0L.L86 and ADXMEL1L.L86 are used when linking an application that
was compiled using the 4680/90 CBASIC big memory model.
ADXMEM0L.L86 and ADXMEL0L.L86 libraries contain subroutines that allow the application to allocate,
free, read, write, and search the memory. ADXMEM1L.L86 and ADXMEL1L.L86 libraries contain
subroutines that allow the application to insert and delete keyed records in memory. Applications in the
Mod1 and Mod2 terminals can share a section of memory while using any of these routines.
The subroutines are linked by adding the appropriate library to your link input file.
Notes:
1. If you are a medium memory model user: If you use only extended memory management routines
contained in the ADXMEM0L.L86 library, you do not need to link with the ADXMEM1L.L86 library. If
you use any routines contained in the ADXMEM1L.L86 library, you must also link with the
ADXMEM0L.L86 library. Also, the ADXMEM1L.L86 library must precede the ADXMEM0L.L86 library
in the link order to avoid link errors.
2. If you are a big memory model user: If you use only extended memory management routines
contained in the ADXMEL0L.L86 library, you do not need to link with the ADXMEL1L.L86 library. If
you use any routines contained in the ADXMEL1L.L86 library, you must also link with the
ADXMEL0L.L86 library. Also, the ADXMEL1L.L86 library must precede the ADXMEL0L.L86 library in
the link order to avoid link errors.
The following table describes each subroutine and defines its library name.
Using Extended Memory Management: A section of memory that is managed by these subroutines is
called an in-memory file. An in-memory file is not the same as a RAM disk file. In-memory files have
much less overhead than RAM disk files. In-memory files are intended for terminals that have 1 MB of
| memory. Normally these terminals do not contain enough memory for RAM disk use.
The subroutines can be divided into five different categories, according to their functions.
1. The first category contains subroutines that are used to access or to release access to memory.
GETMEM is used to allocate a section of memory of a size specified by the application. GETMEM
has an option to allocate a section of memory that can be shared by other applications. If another
application needs to access an in-memory file that was allocated in this way, it issues an OPENMEM
call. It can then access the in-memory file just as if it had allocated it by issuing GETMEM.
FREEMEM is used to release access to an in-memory file. In the case of shared in-memory files, the
memory is released when the last application issues the FREEMEM against the in-memory file.
2. The second category contains subroutines which read and write the memory. These subroutines
function the same whether or not the in-memory file is shared. The simplest subroutines are
MEMREAD and MEMWRITE.
MEMSRCHS is a routine that is used for a sequential search of an in-memory file for a particular key.
MEMSRCHB is used for a binary search. MEMSRCHB should be used for doing searches only if the
| in-memory file is sequenced by a key in ascending order; otherwise MEMSRCHS should be used.
The MEMWRKEY subroutine is used to build a key sequenced memory file. A binary search is faster
than a sequential search, but a binary search does not work if the data is not sorted.
Using the MEMSRCHS and MEMSRCHB subroutines, the caller passes a search argument, search
argument length, and the offset into the in-memory file records of the key. The search argument is
compared with the key. If they match, the search completes successfully.
3. The third category of subroutines is used by applications to synchronize access to shared in-memory
files. If an application temporarily needs exclusive access to a shared memory file, it should call
MEMSYN before beginning the access. After it is finished with the access it should call MEMUNSYN.
Following is an explanation of how MEMSYN and MEMUNSYN are used. There are two applications:
application A and application B. They share an in-memory file. The in-memory file contains a counter
that is incremented at the end of every transaction, so that it contains the total number of transactions
that have occurred on the Mod1 and Mod2 pair. At the end of each transaction, the application must
read in the counter using MEMREAD, increment it, and write it back using MEMWRITE.
Defining Extended Memory Management Subroutines: The following section contains an explanation
of the subroutines that are supported by extended memory management.
Note: The following explains the parentheses within the parameter list:
Warning: Before reading data from a memory file, a string of data must be allocated in IBM 4680 BASIC.
The memory manager does not allocate or increase the size of the receiving string.
Example Subroutine Declarations using IBM 4680 BASIC: The following examples explain how to
format an IBM 4680 BASIC declaration.
This chapter contains coding guidelines and restrictions that you should consider when you are writing a
program in a language other than IBM 4680 BASIC to run under the IBM 4690 Operating System. It
contains specific information about programming applications in C language and COBOL.
The interfaces described in this chapter provide access to many parts of the 4690 Operating System. This
chapter explains how to use these interfaces.
| The functions described in this chapter can be used only with IBM 4690 store controller applications.
| However, with the IBM C Programming Interface for 4690 terminals, C applications can be written for a
| 4690 Terminal. See the CAPITPGP.DOC included with the IBM C Programming Interface for 4690
| Terminals product for more information.
These functions are written in C language and can be used by applications written in C language and
COBOL. The functions were compiled using a memory model that generates 32-bit addresses. The
memory model permits multiple code and data segments. To use these functions, link with
ADXAPACL.L86 located on the optional diskette. Use the search option to link only the required code with
the application and not the entire library. These functions were written in MetaWare High C.**. Any
application that is not written in High C also must link with ADXAPABL.L86.
| The parameters are assumed to be passed with the first parameter being pushed last on the stack. The
first parameter for most functions is a four-byte return code. A negative return code indicates an error
code. Any nonsystem error codes that may be returned by these functions are listed with the function
descriptions. System error codes are returned as four-byte hexadecimal values. Refer to the IBM 4690
Store System: Messages Guide for a complete list of system error codes. The conversion function can be
used to convert the four-byte hexadecimal bytes to eight printable ASCII characters.
The bit numbering scheme numbers the bits right to left with the least significant bit (lsb) being bit zero
and the most significant bit (msb), being bit 15. The following is an example of numbering for a two-byte
word.
msb BIT NUMBERING lsb
Bits 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
An application using these functions must be compiled in the same manner. The HUGE memory model
produces 32-bit addresses and far calls. It allows literal names if the compiler directive /LITLINK is used.
The directive /NOIBMCOMP causes the compiler to store data in one byte binary fields. The directive
/LITLINK causes the compiler to create external references to the literal names of the functions in this
chapter. The directive /VSC2 allows the use of the BY VALUE in the CALL statement. If the application
is written in COBOL/2, the directive /OS(FLEXOS) is needed for compatibility with the LINK86 command.
If the directive OS(FLEXOS) is not recognized, a later level of COBOL/2 is required. COBOL/2 references
FAR_DATA in the OBJ files and OS(FLEXOS) removes it. If CBLINK.BAT is used to link files, the
message “FAR_DATA NOT FOUND” will be generated and the resulting 286 file will not execute properly.
To avoid this problem, edit the file MF_LNK.INP that is used by CBLINK.BAT and remove
“,class[FAR_DATA,DATA]” from the data statement. Or you can use LINK86 with an INP file that does not
contain FAR_DATA.
For applications using these functions, the usage type, COMP-5, is assumed for numeric variables. This
usage indicates that the value which can be stored for a numeric variable is not limited to the number of
decimal digits specified in the picture clause. The value can be the largest binary number that can be
stored in the indicated space.
In this chapter, some of the descriptions about how to call each function contain a variable that is listed as
USAGE IS POINTER. The address of this pointer is coded BY VALUE in the CALL statement. These
variables are specified in this manner to allow variation in applications and programming styles. The
following is an example of how the variables may be defined in a program:
File Access
Access to files is initiated using a CREATE or an OPEN operation. Use a CREATE to open a new file.
Use an OPEN to gain access to an existing file. For both operations, a file name will be specified and a
four-byte file number will be returned. The file number is then used for all subsequent operations on that
file. When the file is closed the file number is deleted. If the file is reopened, a new number is assigned.
The DELETE statement removes a file from the disk directory. Files to be deleted are indicated by the file
name. A file cannot be deleted when it is read-only or if it is currently open. A file can be automatically
deleted by setting one of two flag bits when the file is created. One flag bit determines whether a file is to
be treated as temporary or permanent. If a file is marked as temporary, it will be deleted after the last
open is closed. If a file is marked as a permanent file, the file will remain after the last CLOSE. The other
flag bit that may be selected when the file is created determines what action will be taken if a file with the
same name exists. If this flag bit is set, the existing file will be deleted before the new file is created. If
this bit is not set, an error will be returned.
Access Modes: Access modes determine if a file may be shared. If the file is shared, the following
modes are selected when the file is opened:
¹ Exclusive access by calling process
¹ Allow reads by other processes
¹ Allow reads and writes by other processes
Exclusive access to a file in one process prevents any other process from sharing the file. Exclusive
access to a file is denied if another process has the file open. If a process tries to open a file with WRITE
privilege and the file has been opened in ALLOW-READS mode, then the OPEN is denied and an error is
returned.
ALLOW/READ/WRITE mode has two options: shared or unique file pointer. The shared file pointer mode
is only available to processes with the same family ID, and all processes in the family must specify this
mode. For processes outside the family, the file appears in exclusive mode. There are no restrictions
when the unique file pointer option is selected.
The file pointer is initialized to zero when a file is created or opened. Subsequent READs and WRITEs
move the file pointer to the byte position of the next sequential location. For example, if a new file is
created and 12 bytes are written, the file pointer would be pointing at the 13th byte (essentially the EOF
marker).
Separate processes sharing access to the same file can share the same file pointer or can have separate
ones. File pointer sharing is limited to processes with the same family identification (FID) number. When
the pointer is shared, reads or writes by any process update the file pointer. The seek function can be
used to determine the file pointer’s location or to position the file pointer.
Pipe Management
Two or more processes can communicate by using a type of file known as a pipe which is supported
through a special device known as pi:. Creating a pipe establishes a buffer used for the deposit and
withdrawal of messages. Pipe files have two ends, one to write into and the other to read from.
Messages are deposited and withdrawn from the pipe on a first-in-first-out (FIFO) basis. The pipe length
is the only limit to the number of messages you can store in a pipe at one time.
In all calls that require a pipe name, the pipe name must be preceded with the device name (pi:) or a
logical name may be defined that includes the pi: reference.
Creating and Deleting Pipes: Use the CREATE function to make a pipe. All pipes are handled in
the same manner as sequential files. The CREATE parameters are used as follows:
¹ Set the flags to request READ, WRITE, or DELETE privileges and to request the access mode. The
privileges have the same meaning for pipes as they do for disk files.
¹ The pipe name must include the device name, (pi:) plus up to eight (8) alphanumeric characters. Pipe
names are case sensitive. The default is lowercase.
¹ The record size parameter controls the message blocks. For example, if a record size of four is
specified, all pipe I/O is conducted in four-byte blocks. Record size of zero or one must be specified if
the application uses the WAIT function with the pipe.
¹ Set the size to the pipe buffer length. The size is independent of the message length but must be a
multiple of the record size.
Use a DELETE to remove a pipe. A pipe that is marked as temporary when it is created will be
automatically deleted on the last CLOSE. If a pipe marked as temporary is used to communicate between
two processes, the pipe is deleted automatically from the system when the processes terminate because
files are automatically closed when a process ends.
Pipe Access: Pipe access privileges are affected by existing access modes. The following rules
govern the privileges available:
¹ A process’ open access is never restricted by an open connection previously made by the same
process.
¹ The READ and WRITE ends of a pipe are considered separate with respect to open restrictions. For
example, an OPEN with exclusive READ does not restrict a process from opening a pipe as shared
WRITE.
¹ Any exclusive OPEN prevents other access requests to the same end.
A pipe is used differently if an end is opened in exclusive or shared mode. If one end of a pipe is opened
in exclusive mode and then closed, a READ or WRITE attempt to the other end results in an EOF error. It
does not matter how the other end was opened.
If one end of a pipe is opened in shared mode and then closed, the IBM 4690 Operating System uses the
pipe as if it were still open on the other end. Therefore, any process accessing the pipe waits until the
operation is complete. A pipe opened in shared file pointer mode is shared only by those processes with
the same FID. Notice the distinction between shared mode and shared file pointer mode. If one end of a
pipe is opened in shared file pointer mode, and then the pipe is closed by all of the processes accessing
that end, any processes accessing the other end will receive an EOF error.
Interprocess Communications: The READ and WRITE functions operate the same way for pipes as for
files and the READ and WRITE flags and parameters are used in the same way. Any number of
processes can participate in the exchange.
The amount of data written to and read from the pipe is independent of the pipe size. The following
procedures are observed when the amount exceeds the size:
¹ On WRITEs when the pipe is full, the process waits for another process to read data from the other
end. When the reading process removes enough to allow the data to be written, the operation
completes.
¹ On READs when the pipe is empty, the process waits for another process to write data to the other
end. The operation completes when enough data has been written to satisfy the READ request.
A READ request issued when there is no data in the pipe will cause the process to wait until there is
enough data available in the pipe to satisfy the read request. To avoid a possible hang, use the WAIT
operation to wait for a specified time. Then the application can select whether or not to wait again if the
time limit expires before data is available to read.
Synchronization and Exclusion: A pipe may be created with a zero-length buffer size for use as a
simple semaphore. For semaphore pipes, a READ operation obtains the pipe and a WRITE releases it. If
another process has obtained the pipe previously, the calling process waits until a WRITE to that pipe has
been performed. WRITE operations, on the other hand, never wait; if the pipe was released previously,
the call returns without an error.
Nondestructive Read: The information stored in a pipe can be previewed using the READ operation by
setting the specific flag bit to request a nondestructive read. This allows a pipe to be used as a common
data area among multiple applications. It also allows an application to pre-read a length field or message
type field within a message and then read the complete message at a later time. To read records of
varying lengths, specify record length of one when the pipe is created so that the operating system will not
perform record checking; otherwise, an invalid record size error will be returned.
Warning: Nondestructive reads can be dangerous if there are multiple readers of a pipe. It is the
responsibility of the application to handle synchronization of pipe usage when there are multiple processes
involved.
Pipe Routing Services: PRS for communications between a store controller and a terminal. The WAIT
operation available is the same as for regular pipes. Pipe Routing Services (PRS) enables applications to
exchange data with applications in other store controllers or terminals by using pipes. These pipes are
On the 4690 store controller, pipes are treated like sequential files. A PRS pipe must first be created.
Then the application should wait for data to be available before requesting a READ. For PRS pipes in the
store controller, the READ buffer may be large but in the terminal the limit is 240 bytes. The maximum
size for all PRS messages is 120 bytes.
To write to a PRS pipe, the PRS driver must be initialized. This initialization must be requested only once
for each load of an application. After the driver is initialized, a write can be performed. All PRS pipes are
temporary. A pipe will be deleted when the last process that has access to it has ended. The PRS
functions described for C language and COBOL can only be used in store controller applications.
Create Point-of-Sale Keyed File: Creating a point-of-sale keyed file sets up the file as a keyed
file and write the keyed file control block as the first record. See “Keyed File Control Record” on
page 6-21 for a description of the keyed file control block. The file is opened if no error occurred. The
file must be closed if no access is needed.
| C Interface:
| void ADX_CCREATE_KFILE(long *fnum, unsigned int flags, char *filename, long filesize,
| unsigned int *buffadr, long buffsize);
COBOL Interface
77 FNUM PIC S9(8) USAGE IS COMP-5.
77 FLAGS PIC 9(4) USAGE IS COMP-5.
77 FILENAME PIC X(n) USAGE IS DISPLAY.
* n = length of FILE-NAME including
terminating NULL or blank.
77 FILESIZE PIC 9(8) USAGE IS COMP-5.
77 BUFFADR USAGE IS POINTER.
77 BUFFSIZE PIC 9(8) USAGE IS COMP-5.
Parameters:
flags
bit 0: 1 = Delete file
0 = No delete
bit 1: Reserved (must be 0)
bit 2: 1 = Write
0 = No write
The total number of records should be at least 20% greater than the maximum number of
records expected to account for the way the records must be distributed in the file and to
allow for future growth.
buffadr The address of the buffer containing keyed file information (BUF14 or BUF18 (see bit 11
of pflags)).
buffsize The size of buffer (BUF14 size = 14. BUF18 size = 18.)
BUF14—Information buffer for creating a keyed file less than 32MB. Size = 14 bytes.
Figure 16-1 on page 16-9 illustrates how the bytes are allocated if the buffsize is 14.
Byte
0 pflags
2 numblocks
4 randivsr
6 keyrecl
8 keylen
10 cthresh
12 Reserved
BUF18 – Information buffer for creating a keyed file greater than or equal to 32
megabytes. Size = 18 bytes. Figure 16-2 illustrates how the bytes are allocated if the
buffsize is 18.
BUF18
Byte
0 pflags
2 numblocks
6 randivsr
10 keyrecl
12 keylen
14 cthresh
16 Reserved
pflags
bit 0: 1 = Keyed file create
bit 1 to 3: 0 = Reserved (must be zero)
Refer to the IBM 4690 Store System: Messages Guide for system errors.
| void ADX_COPEN_KFILE(long *fnum, unsigned int flags, char *filename, unsigned int *parmbuff, long
| pbuffsize);
COBOL Interface
77 FNUM PIC S9(8) USAGE IS COMP-5.
77 FLAGS PIC 9(4) USAGE IS COMP-5.
77 FILENAME PIC X(n) USAGE IS DISPLAY.
* n=length of FILE-NAME including terminating NULL or blank.
77 PARMBUFF USAGE IS POINTER.
77 PBUFSIZE PIC 9(8) USAGE IS COMP-5.
Parameters:
flags
bit 0: 1 = Delete file
0 = No delete
bit 1: 1 = Execute
0 = No execute
bit 2: 1 = Write
0 = No write
bit 3: 1 = Read
0 = No read
bit 4: 1 = Shared
0 = Exclusive
bit 5: 1 = Allow shared reads if shared
0 = Allow shared read or write if shared
bits 6 to 15: Reserved (must be zero)
filename Address of NULL or blank terminated name string or a previously defined logical name. If
the file is not in the current directory, the string must include the path specification. The
maximum length is 128 bytes, including the NULL or blank.
parmbuff User address where the keyed record size and key length will be returned. The record
size is in the first two bytes of the buffer and the key length is in the second two bytes of
the buffer. The buffer must be at least four bytes in size. If pbufsize = 0, no values will
be returned.
pbufsize Size of parmbuff, in bytes. If pbufsize = 0, no values will be returned in parmbuff.
fnum Return code. It will contain the file number if no error occurred. If an error occurred, the
file will be closed and an error code is returned.
Refer to the IBM 4690 Store System: Messages Guide for system errors.
Close Keyed File: This operation closes a keyed file and frees all associated buffer space. A partial
CLOSE flushes the associated I/O buffer but leaves the file open.
| void ADX_CCLOSE_KFILE(long *ret, unsigned int option, unsigned int flags, long fnum)
COBOL Interface
77 RET PIC S9(8) USAGE IS COMP-5.
77 OPTION PIC 9(4) USAGE IS COMP-5.
77 FLAGS PIC 9(4) USAGE IS COMP-5.
77 FNUM PIC S9(8) USAGE IS COMP-5.
Parameters:
option 0 = close file
1 = zero and close file (only valid for keyed files)
flags 0 = full close
1 = partial close (flush only)
fnum File number of file to be closed, as returned from an OPEN or CREATE.
ret Return code. An error code is returned if an error occurred.
Refer to the IBM 4690 Store System: Messages Guide for system errors.
Read Keyed Record: This operation reads data from the indicated record in the specified keyed file.
| C Interface:
| void ADX_CREAD_KREC(long *nbytes, unsigned int option, long fnum, char *buffadr, long buffsize,
| long keylen);
Example:
COBOL Interface
77 NBYTES PIC S9(8) USAGE IS COMP-5.
77 OPTION PIC 9(4) USAGE IS COMP-5.
77 FNUM PIC S9(8) USAGE IS COMP-5.
77 BUFFADR USAGE IS POINTER.
77 BUFFSIZE PIC 9(8) USAGE IS COMP-5.
77 KEYLEN PIC 9(8) USAGE IS COMP-5.
Parameters:
option 0 = Read no lock
1 = Read and lock
The record is locked before it is read. The application program must wait for the record
to become available.
fnum File number of file from which to read data. The file must be activated by a CREATE or
OPEN before requesting a READ.
Refer to the IBM 4690 Store System: Messages Guide for system errors.
Write Keyed Record: This operation writes a keyed record in the specified file.
| C Interface:
| void ADX_CWRITE_KREC(long *nbytes, unsigned int option, unsigned int flags, long fnum, char *bufaddr,
| long buffsize);
COBOL Interface
77 NBYTES PIC S9(8) USAGE IS COMP-5.
77 OPTION PIC 9(4) USAGE IS COMP-5.
77 FLAGS PIC 9(4) USAGE IS COMP-5.
77 FNUM PIC S9(8) USAGE IS COMP-5.
77 BUFFADR USAGE IS POINTER.
77 BUFFSIZE PIC 9(8) USAGE IS COMP-5.
Parameters:
option
bit 0: 0 = Unlock = no
1 = Unlock = yes
The record is unlocked after being written.
bit 1: 0 = Do not hold the write
1 = Hold the write
The hold flag prevents the data from being physically written to a disk file until
the next write with hold option is issued by this process.
bits 2 to 15: Must be zero
flags Not used
fnum File number where data is to be written, as returned from a CREATE or an OPEN.
buffadr Address of buffer containing data to write. The buffer must contain the desired record’s
key at offset 0.
buffsize Number of bytes to write.
nbytes Return code. It contains the number of bytes written if no error occurred. Notice that a
zero (0) return value is a special case for the WRITE with HOLD and is considered a
correct value. An error code is returned if an error occurred.
Delete Keyed Record: This operation deletes a specified record from a keyed file.
| C Interface:
COBOL Interface
77 FNUM PIC S9(8) USAGE IS COMP-5.
77 BUFFADR USAGE IS POINTER.
77 BUFFSIZE PIC 9(8) USAGE IS COMP-5.
77 RET PIC S9(8) USAGE IS COMP-5.
Parameters:
fnum File number of file containing record to delete, as returned by an OPEN or CREATE.
buffadr Address of buffer containing the key of the record to be deleted.
buffsize Length of key string pointed to by buffadr.
ret Return code. It contains an error code if an error occurred.
Refer to the IBM 4690 Store System: Messages Guide for system errors.
Create Point-of-Sale Non-Keyed File: This operation will create a point-of-sale nonkeyed file. A
point-of-sale file is different from any other file because it may be distributed to other controllers as a
mirrored or a compound file. After the file is created, it will be opened if no error occurred. The file must
be closed if no access is needed.
| C Interface:
| void ADX_CCREATE_POSFILE(long *fnum, unsigned int flags, char *filename, long filesize, unsigned int
| recsize, unsigned int ftype, unsigned int fdistrib);
Parameters:
flags
bit 0: 1 = Delete file
0 = No delete
bit 1: Reserved (must be zero)
bit 2: 1 = Write
0 = No write
bit 3: 1 = Read
0 = No read
bit 4: 1 = Shared
0 = Exclusive
bit 5: 1 = Allow shared READ commands if shared
0 = Allow shared READ or WRITE commands if shared
bit 6: 1 = Shared file pointer
0 = Unique file pointer
bit 7: Reserved (must be zero)
bit 8: 1 = Temporary—delete on last close
0 = Permanent
bit 9: Reserved (must be zero)
bit 10: 1 = Delete file if it already exists
0 = Return error if file exists
bit 11 to 15: Reserved (must be zero)
filename Address of NULL or blank terminated name string or a previously defined logical name. If
the file is not in the current directory, the string must include the path specification. The
maximum length is 128 bytes, including the NULL or blank.
filesize File size in bytes
recsize The READ, WRITE, and LOCK operations use this value to ensure that the requested
action falls on record boundaries. Use a record size of zero or one if you do not want
boundary checks performed.
Refer to the IBM 4690 Store System: Messages Guide for system errors.
Create Non-Point-of-Sale File or Pipe: This operation will create a non-point-of-sale file or a
pipe. The file is opened if no error occurred and it should be closed if no access is needed.
| C Interface:
| void ADX_CCREATE_FILE(long *fnum, unsigned int flags,char *filename, long filesize, unsigned int
| recsize);
Example:
COBOL Interface
77 FLAGS PIC 9(4) USAGE IS COMP-5.
77 FILENAME PIC X(n) USAGE IS DISPLAY.
* n = length of FILE-NAME including
terminating NULL or blank.
77 RECSIZE PIC 9(4) USAGE IS COMP-5.
77 FILESIZE PIC 9(8) USAGE IS COMP-5.
77 FNUM PIC S9(8) USAGE IS COMP-5.
Parameters:
flags
bit 0: 1 = Delete file
0 = No delete
bit 1: Reserved (must be zero)
bit 2: 1 = Write
0 = No write
bit 3: 1 = Read
0 = No read
bit 4: 1 = Shared
0 = Exclusive
bit 5: 1 = Allow shared READ commands if shared
0 = Allow shared READ or WRITE commands if shared
Refer to the IBM 4690 Store System: Messages Guide for system errors.
Open File or Pipe: This operation will open a point-of-sale nonkeyed file, non-point-of-sale file, or a
pipe. Use Open Keyed File option to open a keyed file. The file pointer is initialized to zero when the file
is opened.
| C Interface:
COBOL Interface
77 FNUM PIC S9(8) USAGE IS COMP-5.
77 FLAGS PIC 9(4) USAGE IS COMP-5.
77 FILENAME PIC X(n) USAGE IS DISPLAY.
* n = length of FILE-NAME including terminating NULL or blank
Refer to the IBM 4690 Store System: Messages Guide for system errors.
Close File or Pipe: This operation closes a file or a pipe and frees all associated buffer space. A
partial CLOSE flushes the associated I/O buffer but leaves the file open.
| C Interface:
COBOL Interface
77 RET PIC S9(8) USAGE IS COMP-5.
77 FLAGS PIC 9(4) USAGE IS COMP-5.
77 FNUM PIC S9(8) USAGE IS COMP-5.
Refer to the IBM 4690 Store System: Messages Guide for system errors.
Read Record from File or Pipe: This operation reads data from the indicated record in a
specified non-keyed file or a pipe file. The file pointer is updated on every READ to be the byte position
immediately following the last data byte that was read.
| C Interface:
| void ADX_CREAD_REC(long *nbytes, unsigned int flags, long fnum, char *buffadr, long buffsize, long
| boffset);
Example:
COBOL Interface
77 NBYTES PIC S9(8) USAGE IS COMP-5.
77 FLAGS PIC 9(4) USAGE IS COMP-5.
77 FNUM PIC S9(8) USAGE IS COMP-5.
77 BUFFADR USAGE IS POINTER.
77 BUFFSIZE PIC 9(8) USAGE IS COMP-5.
77 BOFFSET PIC S9(8) USAGE IS COMP-5.
Parameters:
flags
bit 0: 1 = Read from device
0 = Read from internal buffers
bit 1: Reserved (must be zero)
bit 2: 1 = Nondestructive read
0 = Normal read
bits 3 to 7: Reserved (must be zero)
bits 8 and 9: Interpretation of offset field
00 = Relative to beginning of file
01 = Relative to file pointer (disk file only)
10 = Relative to end of file (disk file only)
bits 10 to 15 Reserved (must be zero)
fnum File number from which to read data, as returned from OPEN or CREATE.
buffadr Address of buffer in which to put data that is read.
buffsize Number of bytes to READ.
Refer to the IBM 4690 Store System: Messages Guide for system errors.
Write a Record to a File (nonkeyed) or Pipe: This operation writes data into the indicated
record of a specified nonkeyed file or a pipe. See “Write Keyed Record” for keyed files. The file pointer is
updated on every WRITE to be the byte position immediately following the last data byte that was written.
| C Interface:
| void ADX_CWRITE_REC(long *nbytes, unsigned int option, unsigned int flags, long fnum, char *buffadr,
| long buffsize, long boffset);
Example:
COBOL Interface
77 NBYTES PIC S9(8) USAGE IS COMP-5.
77 OPTION PIC 9(4) USAGE IS COMP-5.
77 FLAGS PIC 9(4) USAGE IS COMP-5.
77 FNUM PIC S9(8) USAGE IS COMP-5.
77 BUFFADR USAGE IS POINTER.
77 BUFFSIZE PIC 9(8) USAGE IS COMP-5.
77 BOFFSET PIC S9(8) USAGE IS COMP-5.
Parameters:
option 0 = Do not hold the write.
1 = Hold the write (not valid for pipes).
The Hold flag prevents the data from being physically written to a disk file until the next write
with hold option is issued by this process. Each record must be less than or equal to 512
bytes in length when using the HOLD option.
flags
bit 0: 1 = Flush buffers after write (disk file only).
0 = Do not flush buffers.
This forces the data to the media. If this is a zero length request, the media is
updated with any pending writes.
bits 1 to 7: Reserved (must be zero).
bits 8 and 9: Determine how the offset field is interpreted:
00 = Relative to beginning of file
01 = Relative to file pointer (disk file only)
10 = Relative to end of file (disk file only)
bits 10 to 15: Reserved (must be zero)
Refer to the IBM 4690 Store System: Messages Guide for system errors.
Lock and Unlock Record: Access to records in a nonkeyed file are controlled by selectively
locking and unlocking the record. LOCK the record before reading it, then UNLOCK the record after
writing to it. The area to lock or unlock is determined from the offset and how it is used. This operation is
only valid for disk files.
| C Interface:
| void ADX_CLOCK_REC(long *ret, unsigned int flags, long fnum, long boffset, long nbytes);
COBOL Interface
77 FLAGS PIC 9(4) USAGE IS COMP-5.
77 FNUM PIC S9(8) USAGE IS COMP-5.
77 BOFFSET PIC S9(8) USAGE IS COMP-5.
77 NBYTES PIC S9(8) USAGE IS COMP-5.
77 RET PIC S9(8) USAGE IS COMP-5.
Parameters:
flags
bits 0 and 1: Lock Mode
00 = Unlock—release the indicated area
01 = Exclusive lock—prevents other processes from locking, reading
from, or writing to the locked area
10 = Exclusive write lock—allows other processes to read the area
but not to write to it or lock it
11 = Shared write lock—allows other processes to read the area and
establish shared write lock but not to write to the area
bits 2 and 3: Reserved (must be zero)
bit 4: 1 = Return error on lock conflict
0 = Wait on lock conflict
bits 5 to 7: Reserved (must be zero)
Refer to the IBM 4690 Store System: Messages Guide for system errors.
Delete File or Pipe: This operation will delete the designated file or pipe.
| C Interface:
COBOL Interface
77 FLAGS PIC 9(4) USAGE IS COMP-5.
77 FILENAME PIC X(n) USAGE IS DISPLAY.
* n = length of FILE-NAME including terminating NULL or blank.
77 RET PIC S9(8) USAGE IS COMP-5.
Parameters:
flags 1 = Force case to media default (pipes only).
0 = Do not affect name case.
filename Address of NULL or blank terminated name string or a previously defined logical name. If
the file is not in the current directory, the string must include the path specification. The
maximum length is 128 bytes including the NULL or blank. The name for a pipe must
include pi: either in this string or in the logical name definition prefix.
ret Return code. An error code is returned if an if error occurred.
Refer to the IBM 4690 Store System: Messages Guide for system errors.
Rename a File: The rename operation changes the name of an existing disk file. If the file is
currently open by another process, the file is not renamed and an error code is returned. If the new file
name specifies another directory, the file is moved to that location. This feature is limited to directories on
the same drive. Attributes, ownership, protection and date stamps are not changed.
| C Interface:
COBOL Interface
Parameters:
filename Address of NULL or blank terminated string containing the current name of the file (Max
length = 128 including NULL)
newname Address of NULL or blank terminated string containing the new name for the file (Max
length = 128 including NULL)
ret Return code. It will contain an error code if an error occurred.
Refer to the IBM 4690 Store System: Messages Guide for system errors.
Seek (Change or Get File Pointer): This operation either returns or changes the file pointer
position for the specified file. To get the current pointer position, select the Relative to file pointer option in
flag bits 8 and 9 and specify an offset of 0. Any other combination of values for flag bits 8 and 9 and the
offset cause a change in the file pointer position. For all calls, a positive return value indicates the current
file pointer position.
The offset value can be positive or negative. An error is returned, however, if the new pointer position is
less than 0. If the file consists of multibyte records, the offset must fall on a record boundary.
| C Interface:
| void ADX_CSEEK_PTR(long *pposit, unsigned int flags, long fnum, long boffset);
COBOL Interface
77 PPOSIT PIC S9(8) USAGE IS COMP-5.
77 FLAGS PIC 9(4) USAGE IS COMP-5.
77 FNUM PIC S9(8) USAGE IS COMP-5.
77 BOFFSET PIC S9(8) USAGE IS COMP-5.
Parameters:
flags
bits 0 to 7: Reserved (must be zero)
bits 8 and 9: Determine how the offset field is interpreted
00 = Relative to beginning of file
01 = Relative to file pointer
10 = Relative to end of file
bits 10 to 15: Reserved (must be zero)
fnum File number as returned from an OPEN or a CREATE.
boffset Number of bytes relative to reference selected in flag bits 8 and 9.
Refer to the IBM 4690 Store System: Messages Guide for system errors.
Change File Attributes: This operation will change disk file attributes to enable a file to be
distributed. To use this operation, the file must be open on the store controller with ownership of the file.
The master controller owns compound files and the master file server owns mirrored files. After the
attributes have been changed at least one record in the file must be written so that the operating system
will mark the file for distribution. If the file has never been distributed or if there is currently no copy on
the other store controllers, the receiving store controllers must be IPLed for the file to be distributed.
| C Interface:
| void ADX_CCHANGE_ATTRIB(long *ret, long fnum, unsigned int ftype, unsigned int fdistrib, long recsize);
COBOL Interface
77 FNUM PIC S9(8) USAGE IS COMP-5.
77 FTYPE PIC 9(4) USAGE IS COMP-5.
77 FDISTRIB PIC 9(4) USAGE IS COMP-5.
77 RECSIZE PIC 9(8) USAGE IS COMP-5.
77 RET PIC S9(8) USAGE IS COMP-5.
Parameters:
fnum File number returned by a create or an open.
ftype 0 = Local only file
1 = Mirrored file
2 = Compound file
fdistrib 0 = Distribute at close
1 = Distribute Per Update
recsize Size of record, as specified when the file was created
ret Return code. An error code is returned if an error occurred.
Refer to the IBM 4690 Store System: Messages Guide for system errors.
| Canceling the Shared Use of a File: ADX_CFILES cancels the shared use of a file such as the
| transaction log. Without the use of ADX_CFILES, a shared file cannot be renamed or deleted because it
| is in use by more than one user.
| Some of the conditions that can cause file sharing problems are incomplete transactions, terminal
| hardware failures, incomplete controller functions, and software failures. ADX_CFILES provides the
| following functions to manage the canceling of shared file usage:
| ¹ Restricting a file for exclusive use
| ¹ Unrestricting a file that was restricted
| ¹ Determining despool status
| ADX_CFILES restrict function causes all applications currently using that file to lose their access to that
| file until they have closed and reopened the file. When an application attempts to use a file that has been
| restricted, the file request is rejected and a new return code is returned. In the controller the return code
| is 80F306F0. In the terminal, the first terminal access to a restricted file receives a 80F306F0 and
| subsequent accesses (by the same or other terminals) receive a 80004007 (bad file number). When an
| application has a file open and receives either of these return codes for a file request, it should close and
| reopen that file.
| ¹ Purpose:
| To restrict the use of a file by all other applications. The restrict applies to applications on all
| controllers and all terminals. To restrict the use of a mirrored or compound file you restrict the prime
| version of the file on the file server or master respectively. You cannot use restrict for a
| distribute-on-close type file. After a file is restricted:
| – It cannot be opened by any application.
| – An application that is using a file that is restricted by another application must close and reopen a
| file to use the file again.
| ¹ Restrictions:
| – Only one ADX_CFILES to restrict a file can be active at a time.
| – To restrict a file on a file server or a master the controller application executing the restrict must
| be connected to the active file server or master.
| – To restrict a mirrored file or compound file an application must restrict the prime version of the file.
| – A distribute-on-close type file cannot be restricted.
| ¹ Location of usage:
| – Any application on any controller.
| – It cannot be used by a terminal application.
| C Interface:
COBOL Interface
This function is currently not supported for COBOL.
Parameters:
ret = 4-byte integer that indicates the status of the restrict function
hi lo
xx xx yy yy = Indicates how the file was being used when the restrict was executed:
xxxx = Number of other controller applications that were using this file
when it was restricted.
yyyy = Number of controllers where terminal applications were using this
file when it was restricted.
0000 = No other application has the file open.
80 F3 06 F4 = Application attempted to restrict a file while another restrict is active.
80 F3 06 F5 = Application attempted to restrict a distribute-on-close file.
80 F3 06 F6 = Application attempted to restrict the file on the wrong node.
ADX_CFILES Unrestrict: ADX_CFILES unrestrict stops the effect of the ADX_CFILES restrict. The
unrestrict is requested for the same file name that was used for the restrict even if the file was renamed
while it was restricted. After the unrestrict is executed that file name may be used by all applications
again.
¹ Purpose:
To unrestrict the use of a file that had been previously restricted. To unrestrict the use of a Mirrored
or Compound file, unrestrict the prime version of the file on the File Server or Master respectively.
After a file is unrestricted:
– The file name can be used to open files according to the normal guidelines.
– An application that lost access to a file due to restrict must issue a CLOSE followed by an OPEN
after the unrestrict is issued to gain access to the file again.
¹ Prerequisites:
The application executing the unrestrict ADX_CFILES must have executed the restrict ADX_CFILES.
¹ Restrictions:
If an application is unrestricting a file on a file server or a master, the controller executing the
application must be connected to the active file server or master.
¹ Location of usage:
– Any application on any controller.
– It cannot be used by a terminal application.
| C Interface:
COBOL Interface
This function is currently not supported for COBOL.
Parameters:
ret = 4-byte integer that identifies the unrestrict status.
hi lo
00 00 00 00 = Unrestrict is successful.
ADX_CFILES Despool: ADX_CFILES despool determines how many total bytes of data remain in all the
spool files and how many controllers have spool files. By using this function the applications can
determine that the store personnel should be notified that a store closing must be delayed and can give
the store personnel an idea of the length of the delay.
¹ Purpose:
This function determines the status of the operating system despooling of files. This function
determines how many bytes of data are yet to be despooled and how many controllers have data in
their spool files to be despooled. The values determined by this function are probably different than
the sizes of the spool files because the size of the spool files are not set to zero until all the data has
been despooled from them.
¹ Prerequisites:
None currently identified.
¹ Restrictions:
This function can only determine despool status for controllers that are currently in session with this
controller on the LAN.
¹ Location of Usage:
– Any application on any controller.
– It cannot be used by a terminal application.
| C Interface:
| COBOL Interface
| This function is currently not supported for COBOL.
| Parameters:
| RET = 4-byte integer that specifies the despool status.
| hi lo
| 0w xx yy yy = where:
Create a Pipe Routing Services Pipe: Pipe Routing Services pipes are created for exclusive,
READ mode only.
| C Interface:
COBOL Interface
77 PNUM PIC S9(8) USAGE IS COMP-5.
77 PSIZE PIC 9(8) USAGE IS COMP-5.
77 PIPEID PIC X USAGE IS DISPLAY.
Parameters:
psize Pipe size, in bytes. The maximum size for store controller pipe is 65,536 bytes.
pipeid One alphabetic character (A to Z) to identify the pipe.
pnum Return code. It will be the pipe identifier or an error code if the create was unsuccessful.
The unique error codes are “-1000 Invalid pipe id” and “-1001 Pipe already exists.” Refer to IBM 4690
Store System: Messages Guide for system errors.
COBOL Interface
Parameters:
pnum Pipe identifier returned from pipe routing services CREATE.
buffadr Buffer to receive data
buffsize Number of bytes to read
nbytes Return code. It will contain the number of bytes read or an error code if an error
occurred.
Refer to the IBM 4690 Store System: Messages Guide for system errors.
Initialize Pipe Routing Service Driver: The Pipe Routing Services Driver must be initialized
before an application can write to a pipe routing services pipe. It should be initialized only once for each
load of an application.
| C Interface:
COBOL Interface
77 PRSNUM PIC S9(8) USAGE IS COMP-5.
Parameters:
prsnum Return code. It will contain the PRS identifier or an error code if an error occurred.
Refer to the IBM 4690 Store System: Messages Guide for system errors.
| void ADX_CPRS_WRITE(long *ret, long prsnum, char *buffadr, long buffsize, char *dest);
COBOL Interface
77 RET PIC S9(8) USAGE IS COMP-5.
77 PRSNUM PIC S9(8) USAGE IS COMP-5.
77 BUFFADR USAGE IS POINTER.
77 BUFFSIZE PIC 9(8) USAGE IS COMP-5.
77 DEST PIC X(4) USAGE IS DISPLAY.
Parameters:
prsnum PRS identifier returned from ADX_CPRS_INIT
buffadr Buffer containing data to write
buffsize Number of bytes to write
dest Destination address (where to send data). It contains four characters in the form aaaw.
The aaaw indicates which terminal or store controller to send the data to. The w part of
the destination address is the pipeID for a pipe routing services pipe created by an
application executing in the specified store controller or terminal. For terminals, aaa is
the terminal number in ASCII. For store controllers, it is 0xy where 0 is an ASCII zero, x
and y are ASCII characters between C and Z. There are two special values for 0xy for
store controllers: 0AA and 0BB. Use 0AA when the destination is the master store
controller and use 0BB when the destination is the store controller where the calling
application is executing (in the local store controller). Pipe routing services translates
these special destination addresses so that the application does not need to define the
actual address assigned to the physical machine. If the operating system switches
destinations when a configuration changes, PRS will translate the change and no change
is required for the application because of the switch.
ret Return code. Table 16-1 shows the return codes for the Pipe Routing Services function.
| void ADX_CPRS_CWRITE(long *ret, long prsnum, char *buffadr, long buffsize, char *dest);
Parameters:
prsnum PRS identifier returned from ADX_CPRS_INIT
buffadr Buffer containing data to write
buffsize Number of bytes to write
dest Destination address (where to send data). It contains four characters in the form aaaw. The
aaaw indicates the terminal or store controller to which send the data. The w part of the
destination address is the pipe ID for a pipe routing services pipe created by an application
executing in the specified store controller or terminal. For terminals, aaa is the terminal
number in ASCII. For store controllers, it is 0xy where 0 is an ASCII zero, x and y are ASCII
characters between C and Z. There are two special values for 0xy for store controllers: 0AA
and 0BB. Use 0AA when the destination is the master store controller and use 0BB when the
destination is the store controller where the calling application is executing (in the local store
controller). Pipe routing services translates these special destination addresses so that the
application does not need to define the actual address assigned to the physical machine. If the
operating system switches destinations when a configuration changes, PRS translates the
change and no change is required for the application because of the switch.
ret Return code. Table 16-2 contains return codes for the Conditional Write to Pipe Routing
Services Pipe function.
Table 16-2. Return Codes for Conditional Write to a Pipe Routing Services Pipe
Return Code Description
0 Good completion occurred.
-1 Destination pipe is full or does not have enough space available in the pipe to hold the data
written.
| -1010 The specified destination specified is not valid.
| -1011 Destination is not found.
| -1012 Error on write to destination.
| -1013 Data greater than 120-byte maximum
| Usage: This write is similar to ADX_CPRS_WRITE with the following exception: If the destination pipe is
| full or does not have enough room left to contain the entire message written, the write does not wait for
room to become available. Instead, the application is given control immediately with a -1 return code. At
this point the application must make a decision to either discard the data being written or retry the write at
a later time.
The intended use for the conditional pipe write is for situations where it is undesirable for an application to
wait for an extended period of time.
Specialized Services
The Specialized Services function provide a variety of functions for controller applications written in
C language and COBOL. For background information, see Chapter 15 for a description of these services
for BASIC applications.
Operator Authorization: This authorization function can be used to create and maintain
authorization records that enable operators to sign on and use the system.
This authorization function is only valid for store controller applications written in C language and COBOL.
If the authorization function requested is change or add, the user will be prompted for input. When the
add or change is complete, the screen will be cleared and the cursor will be enabled and returned to the
home position.
| C Interface:
| void ADX_CAUTH(long *ret, int func, char *opid, char *password, char *opid2);
COBOL Interface
77 RET PIC S9(8) USAGE IS COMP-5.
77 FUNC PIC 9(4) USAGE IS COMP-5.
77 OPID PIC X(9) USAGE IS DISPLAY.
77 PASSWORD PIC X(8) USAGE IS DISPLAY.
77 OPID2 PIC X(19) USAGE IS DISPLAY.
Parameters:
func Action to be taken:
1 =CHANGE an operator authorization record
2 =ADD an operator authorization record
3 =DELETE an operator authorization record
8 =CHANGE PASSWORD only
9 =MAKE operator ID have the same authorization as the operator ID specified by opid2. If
opid2 does not exist, a new ID is created with limited (default) authorization.
10 = MAKE WITH CHECK—same as 9 except opid2 has template ID and authority ID.
Authorization for new ID may not be higher than authority ID even if the template
authorization is higher.
Table 16-3 on page 16-34 shows the return codes returned by this function.
For any system errors that are returned, refer to the IBM 4690 Store System: Messages Guide.
Password Encryption: This function encrypts an eight-character ASCII password. The IBM 4690
Operating System uses one-way encrypted passwords for authorization to sign on to the system. The
encryption method can also be used by an application to establish authorization for use of applications,
data files, or other things that need access controlled by the application.
| C Interface:
COBOL Interface
77 RET PIC S9(8) USAGE IS COMP-5.
77 PWIN PIC X(8) USAGE IS DISPLAY.
77 PWOUT PIC X(8) USAGE IS DISPLAY.
Parameters:
pwin Password to be encrypted. Must be terminated with a NULL or blank if less than
eight characters.
pwout Encrypted value returned.
ret Return code = 0 indicates encryption completed. If PWIN is blank or has a leading blank, error
code -1100 is returned.
The password to be encrypted should be an ASCII string of up to eight alphanumeric characters. This
parameter can have no leading blanks. Trailing blanks are ignored. Leading zeros are counted as part of
the password. The encrypted value returned in PWOUT is an eight-character string of ASCII characters
that represents decimal digits.
The parameters here are slightly different from those described for ADXSERVE.
| C Interface:
COBOL Interface
77 RET PIC S9(8) USAGE IS COMP-5.
77 FUNCNUM PIC 9(4) USAGE IS COMP-5.
77 DATABUFF USAGE IS POINTER.
77 DBUFFSIZE PIC 9(4) USAGE IS COMP-5.
Parameters:
funcnum Function number for the service requested.
databuff Buffer for data sent to service requested or for data received from service requested.
dbuffsize Size (bytes) of data-buff or data for requested service if data-buff is not used.
ret Return code values vary with the service requested. An error code is returned if an error
occurred.
Special error codes are returned. See Table 15-7 on page 15-18 for a list of the return codes. For any
system errors that are returned, refer to the IBM 4690 Store System: Messages Guide.
Application Services for C-language and COBOL: The following is a list of the Application
Services available when ADX_CSERVE is called. The function number and the required data, if any, are
listed for each service.
Dump System Storage: The Dump System Storage function causes all of the storage in the controller to
be dumped to a disk file named ADXCSLCF.DAT in the root directory. Both the application and the
operating system storage are dumped.
Enable Terminal Storage Retention: This function enables storage retention in all of the terminals on
the TCC Network of the store controller requesting the enable.
The Enable Terminal Storage Retention function uses the following parameters:
FUNC-NUM = 2
DATA-BUFF = Unused
DBUFF-SIZE = Unused
Disable Terminal Storage Retention: This function disables storage retention in all of the terminals on
the TCC Network of the store controller requesting the disable.
The Disable Terminal Storage Retention function uses the following parameters:
Get Application Status Information: The Get Application Status Information function returns the store
controller application status. See “Get Application Status Information” on page 15-19 for the format of the
data returned.
Programmable Power: The programmable power function allows terminal or controller applications to
issue program calls to enable or disable the programmable power feature, and to issue program calls to
power OFF a terminal or controller.
Display Application Status Message: The Display Application Status Message function displays the
specified message on the WINDOW CONTROL screen in the description field of the window for the
application that called this function.
Stop Application with Message: The Stop Application with Message function displays the specified
message on the WINDOW CONTROL screen used to start the application. The message appears after
the application is stopped. This function provides a way to indicate problems that are preventing an
application from running properly.
Get Disk Free Space: The Get Disk Free Space function returns the free space on the specified remote
or local disk drive. Example: local = C:\, non-local = ADXLNXnnN::C:\ (where nn = store controller ID).
Count of characters should be exact, not general size of DATA-BUFF.
Get Configured Controllers on the Network: The Get Configured Controllers on the Network function
returns the IDs for all of the store controllers on the network. Each ID is two bytes long. Store controller
IDs range from CC through ZZ. If there are less than 20 controllers, 00 (ASCII zeros, not numeric)
indicates the end of the list.
Get The Controller ID for a Specified Terminal: The Get The Controller ID for a Specified Terminal
function returns the store controller ID for the specified terminal. The ID is returned in the RET parameter
as ASCII value CC through ZZ or X'0' if the terminal was not defined. These values are returned only if
the store controller requesting the ID is the master store controller or if the terminal is local to the store
controller.
Convert ASCII Characters to EBCDIC Characters: This function converts ASCII characters to EBCDIC
characters. The characters are changed byte by byte, therefore the original characters are no longer
present when the function completes the conversion.
Convert EBCDIC Characters To ASCII Characters: This function converts EBCDIC characters to ASCII
characters. The characters are changed byte by byte, therefore the original characters are no longer
present when the function completes the conversion.
Set/Reset/Query Terminal Dump Preservation Flag: This function lets you set, reset, and query the
terminal dump preservation flag. Setting the preservation flag prevents a terminal dump from being written
to the terminal dump file. Resetting the preservation flag allows a dump to be written to the file. The
query request returns the status of the preservation flag.
A return code of 1 indicates that the preservation flag is ON. A return code of 0 indicates that the
preservation flag is OFF.
If the user logical name ADXTDUMP has not been created to enable the Terminal Dump Preservation
Function, you will receive a return code of -1022 if you try to access this function.
Get Loop Message: This function gets the three most recent system messages for the store loop or
token-ring adapter specified in DATA-BUFF. DATA-BUFF is a string consisting of node (for example, CD),
TCC Network (1 or 2), and three TCC Network messages.
The node and the TCC Network must be the first three characters of the string when the ADX_CSERVE
function is called. When the ADX_CSERVE function returns, the three most recent messages will follow
the node and TCC Network in the string. If no messages exist for the specified node and TCC Network,
blanks will be returned for the messages. The oldest message will be put in the buffer first. Each
message is 133 characters long.
Get Loop Status: This function returns the configuration and current status of the two loop adapters.
Data is returned in RET in the form WWXXYYZZ (hex) where:
ZZ = First adapter configuration
YY = First adapter status
XX = Second adapter configuration
WW = Second adapter status
Get All Active Controllers on the Network: This function returns the IDs of all active store controllers
on the network. Each ID is two bytes long. A store controller ID of 00 indicates the end of the list.
Get Controller ID and Loop for a Specified Terminal: The data returned in RET is two bytes for the
loop ID followed by the two bytes for the store controller ID. A X'01' is returned if the terminal number
cannot be found.
Note: The RET is valid only if this function is issued at the master store controller.
| Check the Master or File Server Exception Log: This function returns whether or not there are any
| entries in the exception log.
Set Terminal Sleep Mode Inactive Timeout: This function allows an application running in a store
controller to set the Terminal Sleep Mode Inactive Timeout. When you enable Terminal Storage
Retention, you set this value to determine how many minutes a terminal will remain idle before being
powered-down.
Note: This function is supported only on the store controller. In order for the sleep mode inactive timeout
to take effect, you must invoke this function before enabling the Terminal Storage Retention. You may
also specify the terminal sleep mode inactive timeout by selecting the Enable Terminal Storage Retention
option on the TERMINAL FUNCTIONS screen. The default for the terminal sleep mode inactive timeout is
30 minutes.
Starting a Background Application: This operation can be called from an application written in
C and COBOL to start a background application on the 4690 Operating System. The ability to set a
priority level for the background application is included. This function is valid only for store controller
applications. See “ADXSTART” on page 15-6 for a description of starting as background application from
a CBASIC application.
| C Interface:
| void ADX_CSTARTP(long *pid, char *bacappl, char *parms, int parmlen, char *initmsg, int imsglen, int
| cpriority);
Table 16-4 shows unique error codes that you may receive:
For any system errors that are returned, refer to the IBM 4690 Store System: Messages Guide.
Logging an Error: This function can be called from a store controller application written in C or
COBOL to log an error in the application error log. See “ADXERROR (Application Event Logging)” on
page 15-29 for a description of logging an error from a BASIC application. The function will look for a file
of error messages to display along with the unique data. These messages should be in file
ADXCSOZF.DAT in the form specified. The application name is automatically included in the log entry.
| void ADX_CERROR(int msggrp, int msgnum, int severity, int event, char *unique, int ulen);
COBOL Interface
77 MSGGRP PIC 9(4) USAGE IS COMP-5.
77 MSGNUM PIC 9(4) USAGE IS COMP-5.
77 SEVERITY PIC 9(4) USAGE IS COMP-5.
77 EVENT PIC 9(4) USAGE IS COMP-5.
77 UNIQUE PIC X(10) USAGE IS DISPLAY.
77 ULEN PIC 9(4) USAGE IS COMP-5.
Parameters
msggrp Two-byte integer that contains the ASCII equivalent of the message group character used to
identify the error messages for a product. This character is unique for each product and may be
in the range J to S. Example: MSGGRP = 75 for the letter K.
msgnum Two-byte integer message number, if any. If the message number is zero, no message will be
displayed. This number is converted to three printable decimal digits and appended to the
message group letter to form the message identifier. This identifier is used to search the
Application Message file for a message to display.
severity Two-byte integer ranging from 1 to 5 that is used to indicate the importance of each message.
This number is a message level indicator with the most important messages as severity = 1. An
operator can request messages to be displayed. The messages with severity level less than or
equal to the level requested will be displayed.
event Two-byte integer that may be set by the application to indicate a specific situation or problem.
This must be in the range 64 to 79 for the controller. The system uses the log data to generate
Network Problem Determination Alert messages.
unique Short string of characters to be included in message. Maximum length is 10 bytes. If the
message is longer than 10 bytes, only the first 10 bytes will be used. If the message is less than
10 bytes, blanks will be added.
ulen Number of characters in unique message including imbedded blanks.
Miscellaneous Services
The Miscellaneous Services functions provide a variety of functions to end a program, exit a program, get
additional storage, and so on.
Ending a Program: This operation removes a process from the system. Any outstanding events for
the process are canceled, opened files are closed, and memory is released. A process can only be ended
by another process with the same user and group or by a superuser.
| C Interface:
COBOL Interface
Parameters:
pid Process ID of target process to end.
ret Return code. An error code is returned if an error occurred.
Refer to the IBM 4690 Store System: Messages Guide for information on the error codes returned by this
function.
Exiting a Program: This operation terminates the program, returns control to the operating system,
and passes back the completion status value to the calling program. Any outstanding events are canceled
and open files closed.
The low order word of the status can be used by an application to indicate status when the application
was exited. Bits 0–14 of this application status word are available to the application. By convention, a 0
value is used to indicate success while positive values indicate some form of partial completion. Bit 15 is
set by the operating system (making the application status word negative) when the attempt to create the
process resulted in an error or the process was abnormally terminated. This error can be used if the
program is started from a batch file.
| C Interface:
COBOL Interface
77 ESTAT PIC S9(8) USAGE IS COMP-5.
Parameters:
estat A 32-bit value. The low order word is the completion status. The high order word is reserved.
Bits 0–14 may be used to indicate completion status.
Bits 15–31 are reserved and must = 0.
Getting Additional Storage: This operation either adds contiguous memory to the end of an
existing heap or allocates a new heap. Use the option field to select one or the other and the Memory
Parameter Block to specify the minimum and maximum memory requirements. Set the Memory
Parameter Block’s start parameter to the base address of the existing heap for option 0 or to zero for
option 1.
Note: Processes are not automatically given an initial heap allocation. Consequently, option 1 must be
called the first time that heap space is needed.
When option 0 is selected, the designated heap is extended contiguously. The Memory Parameter Block
start address (start) and minimum allocation (min) are modified to reflect the new starting address and
actual allocation, respectively. The original heap’s base address and contents remain unchanged.
| C Interface:
Parameters:
option 0 = Expand existing heap
1 = Allocate a new heap
mpbptr Address of Memory Parameter Block.
ret Return code. An error code is returned if an error occurred.
0 start
4 min
8 max
start For option equal 0, set the base address of the heap segment to be expanded in this field. The
base address of the added memory portion will be put here when the allocation has completed.
For option equal 1, set this field to zero and the base address of the new heap will be put here.
min Specify the minimum number of bytes required. The actual number allocated will be returned.
max Specify the maximum number of bytes required. This value will not be changed.
Refer to the IBM 4690 Store System: Messages Guide for information on the error codes returned by this
function.
Freeing Storage: This operation releases the memory in a heap from the address specified to the
end of the heap.
| C Interface:
Parameters:
mstart Beginning address of heap to free.
ret Return code. An error code is returned if an error occurred.
Refer to the IBM 4690 Store System: Messages Guide for information on the error codes returned by this
function.
If absolute time is specified and the current time of day is beyond it, the process delays until the specified
time on the next day.
| C Interface:
COBOL Interface
77 FLAGS PIC 9(4) USAGE IS COMP-5.
77 STIME PIC 9(8) USAGE IS COMP-5.
77 RET PIC S9(8) USAGE IS COMP-5.
Parameters:
flags 1—absolute
0—relative
stime If FLAGS = 1 (absolute), stime indicates the number of milliseconds to delay after midnight.
If FLAGS = 0 (relative), number of milliseconds to delay.
ret Return code. An error code is returned if error occurred.
Refer to the IBM 4690 Store System: Messages Guide for information about the error codes returned by
this function.
Waiting for Event Completion: An application can initiate a WAIT. This operation waits for data
to be available in a pipe or for a change of status from the host. Several WAITs may be initiated in one
call. The first WAIT to be satisfied will be indicated in the return code. The WAIT will also terminate if the
specified time to wait elapses before any event completes.
If more than one WAIT is satisfied at the same time, the one that occurs first in the parameter list will be
indicated in the return code. Thus, the order of the parameters in the list may be significant. If no time
limit is specified, the operating system will wait indefinitely until at least one of the waits is satisfied.
For pipes, the wait for data to be available in a pipe is satisfied when at least one byte is in the pipe. For
change in status from the host, the application must have requested the status before calling for a wait
because the change is considered as change since the status was last requested.
The maximum number of waits that may be requested at a time is 30. However, the OS also uses waits,
so this maximum may not be available. If more waits are requested than are available, the application will
end and cause a dump if the dump is enabled.
| struct waitblk
| {
| long fnum;
| char wtype;
| } wblk[n]; /*n == number of waits required by the application. */
| void ADX_CWAIT(long *ret, long wtime, int wcount, struct waitblk wblk[]);
COBOL Interface
01 WAITBLK OCCURS n TIMES INDEXED BY NWAITS.
* Where n is the maximum number of waits that the
* application requires.
02 FNUM PIC S9(8) USAGE IS COMP-5.
02 WTYPE PIC 9(2) USAGE IS COMP-5.
77 RET PIC S9(8) USAGE IS COMP-5.
77 WTIME PIC S9(8) USAGE IS COMP-5.
77 WCOUNT PIC 9(4) USAGE IS COMP-5.
77 WBLK USAGE IS POINTER.
Parameters:
wtime Time to wait, in milliseconds. For example, to wait 1 second set wtime = 1000.
Note: 0000 = infinite.
wcount Count of fnums entered in wblk. This should be the actual count of wait events to initiate and not
the maximum. For most applications this count will be less than 10 and usually 1 or 2.
Maximum count = 30.
fnum For pipes, fnum is the file number or pipe identifier returned when the pipe was created. For host
communications, fnum is the link number or session number returned when the link or session
was opened.
wtype Type of event for wait. (This is a one-byte integer, not an ASCII character.)
1 = pipe
2 = host
Any other value will cause an error to be returned.
ret Return code. If ret is positive an event completed and ret is the index number of the completed
event. For example, if wcount = 2 when ADX_CWAIT is called, ret = 1 indicates the first event
completed, ret = 2 indicates the second event completed. If ret = 0, then the specified time
expired before an event completed. If ret is negative, then an error occurred.
Table 16-5 on page 16-48 shows the error codes unique to this function.
Refer to the IBM 4690 Store System: Messages Guide for any system error that is returned.
Converting HEX to ASCII: This function will convert four hexadecimal bytes to eight bytes of
ASCII characters. This can be used to convert the 4690 system error codes from hexadecimal characters
to printable ASCII characters.
| C Interface:
COBOL Interface
77 ANUM PIC X(8) USAGE IS DISPLAY.
77 HNUM PIC S9(8) USAGE IS COMP-5.
Parameters:
anum Buffer to receive ASCII characters. It must be eight bytes.
hnum Hexadecimal number to convert. It must be four bytes.
Following are the currently known differences between the 80286 or 80386 and the 8088 or 8086
instructions. You can reference the currently available Intel** documents for the details of the following
items and for any additional differences.
Some of these functional differences may be handled by the IBM 4690 Operating System; however, all of
the known differences are listed here.
The following differences are handled by the IBM 4690 Operating System:
¹ The interrupts that only occur for instructions that are new in the 80286 or 80386 or for protection
exceptions. The interrupts are for:
Interrupt Number Description
5 BOUND instruction fault
6 Undefined opcode attempted
7 Processor extension not available
8 Double fault
9 Processor extension segment overrun
10 Invalid Task State Segment (TSS)
11 Segment not present
12 Stack exception
13 General protection exception
16 Math fault
¹ Divide exceptions point at the DIV instruction.
¹ Do not single step external interrupt handlers.
¹ Do not rely on NMI interrupting NMI handlers.
The IBM 4690 Operating System includes an interface that emulates the environment of the IBM Personal
Computer Disk Operating System (IBM DOS) Version 2.1. This chapter gives you the information you
need to run or write applications for that environment. The chapter contains information on software
interrupts, Personal Computer Basic Input/Output System (PC BIOS) calls, and guidelines for applications
written to run under the IBM DOS environment.
An IBM DOS application should run under the 4690 DOS emulation provided:
¹ It meets the guidelines for IBM DOS applications as described
¹ It uses only the hardware listed.
To help you determine if an application is suitable for the 4690 DOS emulator, four optional debug reports
are available. The four reports are activated using the DEFINE command and setting the EOPTIONS
parameter.
To run in the IBM 4690 Operating System, IBM DOS applications must conform to the following
guidelines.
Generally, you should not access absolute addresses in memory directly. The only exceptions are the
following virtual hexadecimal addresses:
¹ Screen region buffers B0000-B3FFF (monochrome) and B8000-BBFFF (color)
¹ Zero page 0-5FF; however, do not depend on the values in 400-5FF.
For better program performance, avoid instructions that load segment registers (SR). These include:
LDS
LES
POP sr
MOV sr,...
CALLF
RETF
JMPF
In addition, small memory model programs perform better than programs written in other memory models.
Because the 4690 Operating System is a multitasking system in which several programs run at the same
time, memory must be carefully allocated. Use the ADDMEM parameter to allocate memory, if needed.
The assumption made by the emulator is for a 128 KB (DOS) machine. If the DOS program is designed
to work in a 128 KB or less memory, no memory adjustments are required. If the program requires more
than 128 KB, you must define the ADDMEM parameter with the correct machine size.
The DEFINE command used to define the DOS machine has the following form:
DEFINE addmem=n
If the program fails to load because of a lack of memory, a message indicating the amount of memory
required will be displayed. The message will look like:
Code: zzzzzzzz - Not enough memory. Need xxx KB.
Requested machine size was: yyy KB.
Where xxx and yyy will be numbers appropriate to the situation. An ADDMEM value of xxx should permit
the program to load. Code zzzzzzzz is explained in “Emulator Messages” on page 17-6.
To activate the reports, you must define the EOPTIONS parameter with the desired report selected;
otherwise no reports will be created.
All reports are added to a file called E_DATA in the root directory of the C: drive. You must rename,
copy, or move this file if you want to keep the results of the DOS application execution.
The DEFINE command used to select all reports has the following form:
DEFINE eoptions=abcd
Where abcd must be “yyyy” to activate all (4) available reports. An “n” in any position will prevent that
report.
Report “a”—Errors
Report “a” records all errors encountered by the emulator. An example of this output is:
DOS E M U L A T I O N
Environment:
BIOS Calls
Note: Only BIOS calls and subfunctions documented in this section are supported. All others are
unsupported.
Software Interrupts
Int 20H: Supported.
Int 22H: Supported.
Int 23H: Supported.
Int 24H: Supported.
Int 25H: Supported.
Int 26H: Supported with restrictions to maintain system integrity.
Emulator Messages
Potential emulator messages follow:
Informational Execution has been ended.
The IBM 4690 Operating System supports a hierarchical directory structure. This structure begins with the
root directory on each fixed disk or diskette. The root directory may contain entries for files or entries for
more directories. Each directory may contain entries for files or more directories. The directories beyond
the root are referred to as subdirectories. This hierarchical structure allows a file to be placed in the root
or in any subdirectory. The sequence of subdirectories starting with the root and proceeding to the
subdirectory containing the file is called the subdirectory path.
The IBM 4690 Operating System has a predefined set of subdirectories for the use of the operating
system and the application programs. You may also define additional subdirectories for other uses. All
subdirectories predefined for the operating system are defined from the root directory. This means that
they are only one level deep. These subdirectories are created on the C drive during the installation
process.
To use the IBM 4690 Apply Software Maintenance procedures, you must have a set of three
subdirectories on the same drive. The names for these subdirectories must have the same first five
characters and must end with PGM, MNT, and BUL. The names must begin with ADX_, and they must
be defined as logical subdirectory names in the logical names files.
* Access privileges:
R = Read
W = Write
E = Execute
D = Delete
When copying files to ADX_xPGM and ADX_xDT1 subdirectories, you must be authorized as the same
user ID and group ID of the destination subdirectory.
where:
ADX = 4690 Operating System prefix
xxxxx = Remainder of file name (5 characters)
eee = File extension (0 to 3 characters)
Base files from the 4690 Operating System do not follow this format (for example, CHKDSK.286).
Most ADX files follow another convention in which the last character of the file name and the file extension
identify the type of file. For more information, see “Rules for Naming Subdirectories and Files” on
page 2-8.
ADX_BSX to ADX_UPGM
Table A-1 (Page 1 of 2). Dictionary of Predefined Subdirectories and Their Contents
Subdir. Directory Contents
ADX_BSX root Symbol files.
ADX_IBUL root Backup level of maintenance modules for application programs. Modules
that were replaced from ADX_IPGM by the modules in ADX_IMNT by Apply
Software Maintenance.
ADX_IDT1 root Data files used by the application programs. This subdirectory is used on
every drive.
ADX_IDT4 root Data files used by the application programs. This subdirectory is used on
every drive.
ADX_IMNT root Maintenance modules for application programs. Maintenance modules for
the modules in ADX_IPGM that are to be maintained by Apply Software
Maintenance.
ADX_IOSS root Print spooler data and controls.
ADX_IPGM root Active application programs. Terminal and store controller application
programs and associated files for messages, display screens, configuration
data, and so on. This subdirectory is used for the programs that provide
store checkout and accounting functions. If the IBM Licensed Program for
the IBM 4690 Store System is used, it will be placed in the set of ADX_Ixxx
subdirectories.
ADX_KBUL root Backup level for ADX_KMNT.
ADX_KDT1 root Data files for SSRT.
ADX_KMNT root Maintenance modules for ADX_KPGM.
ADX_KPGM root SSRT code and code related data.
ADX_SBUL root Backup level of maintenance modules for system programs. Modules that
were replaced from ADX_SPGM by the modules in ADX_SMNT by Apply
Software Maintenance.
ADX_SDT1 root Data files used by the system programs. This subdirectory is used on
every drive.
ADX_SMNT root Maintenance modules for system programs. Maintenance modules for the
modules in ADX_SPGM that are to be maintained by Apply Software
Maintenance.
ADX_SPGM root Active system programs. Terminal and store controller system programs
and associated files for messages, display screens, configuration data, and
so on.
ADX_UBUL root Backup level of maintenance modules for user programs. Modules that
were replaced from ADX_UPGM by the modules in ADX_UMNT by Apply
Software Maintenance.
ADX_UDT1 root Data files used by the user programs.
ADX316KF to ADXCSCCF
Table A-2 (Page 1 of 2). Dictionary of File Names, Extensions, and Directories Where Files are Located
File Name Ext. Directory Description
ADX316KF DAT ADX_UPGM 3270-3151/61/64 keyboard template
ADXACRBW SRL ADX_SPGM Controller BASIC shared runtimes
ADXACRCL L86 ADX_IPGM Controller operating system application services runtime
subroutines
ADXACRMF DAT ADX_SPGM System application common messages
ADXACROS DAT ADX_SPGM System application common output screens
ADXADMAL L86 ADX_UPGM Display Manager runtime library for COBOL/2
ADXADMBL L86 ADX_UPGM Display Manager runtime library for BASIC
ADXADMHL L86 ADX_UPGM Display Manager runtime library for C
ADXAPABL L86 ADX_UPGM Operating system interface routines
ADXAPACL L86 ADX_UPGM Operating system interface routines
| ADXASMSF DAT ADX_SMNT Message file for ASMBUNDL.BAT
ADXASTCF DAT ADX_SDT1 Auto-STC trigger file
| ADXCxxxF.DAT DAT ADX_SPGM Display character sets for 16x60 and 16x80 terminal VGA video
| display formats.
ADXCOP0L 286 ADX_SPGM Communications control functions
| ADXCPxxx DAT ADX_SPGM Display character sets for controller VGA consoles, and 12x40 and
| 25x80 terminal VGA video display formats.
ADXCS1AF DAT ADX_SDT1 Alarmed messages file
ADXCS1AS DAT ADX_SPGM Build audible alarm message screens
ADXCS1DF DAT ADX_SPGM Audible alarm activation file
ADXCS1MF DAT ADX_SPGM Audible alarm message file
ADXCS1RF DAT ADX_SDT1 Audible alarm report file
ADXCS1WF DAT root Audible alarm report work file
ADXCS10L 286 ADX_SPGM Audible alarm program
ADXCS2MF DAT ADX_SPGM System functions message file
ADXCS20L 286 ADX_SPGM System functions program
ADXCS3AS DAT ADX_SPGM Compression/decompression screens
ADXCS3MF DAT ADX_SPGM Compression/decompression messages
ADXCS30L 286 ADX_SPGM Program for compression/decompression
ADXCS3PF DAT ADX_SDT1 Status file for RCP-started compression
| ADXCS5MF DAT ADX_SPGM Staged IPL messages files
ADXCS50L 286 ADX_SPGM Staged IPL Utility
ADXCS60L 286 ADX_SPGM Optical Drive Utility
ADXCS6AS DAT ADX_SPGM Optical drive screen file
ADXCS6BF DAT ADX_SDT1 Optical drive debug file
This appendix contains error messages that occur while using the library utility (LIB86), the POSTLINK
utility (POSTLINK), and the linker utility (Link86).
DIRECTORY FULL:
Explanation: There is not enough directory space for the output files.
Library Action: LIB86 terminates and displays this message.
User Response: Erase unnecessary files or use a disk with fewer files.
DISK FULL:
Explanation: There is not enough disk space for the output files.
Library Action: LIB86 terminates and displays this message.
User Response: Erase unnecessary files or use a disk with more space.
LIB86 ERROR 1:
Explanation: Internal LIB86 error.
Library Action: LIB86 terminates and displays this message.
User Response: Copy the library, the files you are trying to add, replace, and so on, (if
any) onto a diskette. Then run the library command again, but add the following to the
end of the command line, preceded by a single blank space:
>filename.ext
This creates a file that captures the console output of the library utility. Copy
filename.ext onto the same diskette with the library and other files. Contact your service
representative when you have gathered the above information.
MULTIPLE DEFINITION:
Explanation: The indicated symbol is defined as PUBLIC in more than one module.
Library Action: LIB86 displays this message, followed by the name of the symbol.
User Response: Correct the problem in the source file, regenerate the object file, and
try again.
NO FILE:
Explanation: LIB86 could not find the indicated file.
Library Action: LIB86 terminates and displays this message, followed by the name of
the file.
User Response: Correct the filename or drive identifier and try again.
RENAME ERROR:
Explanation: LIB86 cannot rename a file.
Library Action: LIB86 terminates and displays this message.
User Response: Make sure the disk is not write-protected, and then try again.
SYNTAX ERROR:
Explanation: LIB86 detected a syntax error in the command line, probably due to an
improper filename or a command option that is not valid.
Library Action: LIB86 stops, displays this message, and echoes the command line up
to the point where it found the error.
User Response: Retype the command line or edit the INP file, and try again.
INVALID FIXUP:
Explanation: POSTLINK was started and an incorrect fixup record was found.
Postlinker Action: POSTLINK terminates and displays error message.
User Response: Correct the error by rerunning the correct linker for your compiler.
CANNOT CLOSE:
Explanation: LINK86 cannot close an output file.
Linker Action: LINK86 terminates and displays this error message, followed by the
name of the file.
User Response: Restart LINK86 after making sure the correct disk is in the drive and
that it is not write-protected.
DIRECTORY FULL:
Explanation: Not enough directory space exists for the output files.
Linker Action: LINK86 terminates and displays this error message.
User Response: Either erase some unnecessary files or get another disk with more
directory space and run LINK86 again.
LINK86 ERROR 1:
Explanation: An inconsistency exists in the LINK86 internal tables.
Linker Action: LINK86 terminates and displays this error message.
User Response: If an internal linker error occurs during the linking of your application
program, copy your object files, runtime libraries, and input file onto a diskette. Then
relink your application with the same command line options, but add the following to the
end of the command line, preceded by a single blank space:
>filename.ext
This command creates a file that captures the console output of the linker. Copy
filename.ext onto the same diskette as the files and libraries. Contact your service
representative when you have gathered this information.
MULTIPLE DEFINITION:
Explanation: The indicated symbol is defined as PUBLIC in more than one module.
Linker Action: LINK86 terminates and displays this error message, followed by the
name of the symbol.
User Response: Correct the problem in the source files, regenerate the object files,
and try again.
NO FILE:
Explanation: LINK86 cannot find the indicated input, object, or library on the indicated
drive.
Linker Action: LINK86 terminates and displays this error message, followed by the
name of the missing file.
User Response: Correct the file name or drive identifier and try again.
SYNTAX ERROR:
Explanation: LINK86 detected a syntax error in the command line, probably because
of an improper file name or an command option that is not valid.
Linker Action: LINK86 stops, displays this error message, and echoes the command
line up to the point where it found the error.
User Response: Retype the command line or edit the INP file, and try again.
UNDEFINED SYMBOLS:
Explanation: The symbols following this message are referenced but not defined in
any of the modules being linked.
Linker Action: LINK86 terminates and displays this error message, followed by the
undefined symbols.
User Response: Edit your source files to define the symbols in the modules being
linked, regenerate the object files, and try again.
This appendix contains the normal and double width character sets used to print checks. It also contains
an example application that was tested for check printing. For more information, see “Printing Checks” on
page 3-62.
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00 SP
1F,00,00,00,1F,00,00,00,1F,00,00,00,1F,00,00,00 !
0A,00,0A,00,0A,00,00,00,00,00,00,00,00,00,00,00 "
00,00,1F,00,00,00,1F,00,00,00,1F,00,00,00,00,00 #
00,00,00,1F,00,00,00,1F,00,00,00,1F,00,00,00,00 $
1F,00,00,00,1F,00,00,00,1F,00,00,00,1F,00,00,00 %
04,00,0A,00,00,0A,04,00,08,00,15,00,12,00,0D,00 &
04,00,04,00,04,00,00,00,00,00,00,00,00,00,00,00 '
02,04,08,00,08,00,00,10,00,00,08,00,08,04,02,00 (
08,04,02,00,02,00,00,01,00,00,02,00,02,04,08,00 )
00,00,11,00,0A,00,1F,00,0A,00,11,00,00,00,00,00 *
00,00,00,00,00,00,0C,00,0C,00,04,08,10,00,00,00 ,
00,00,00,00,00,00,1F,00,00,00,00,00,00,00,00,00 -
00,00,00,00,00,00,00,00,00,00,00,00,0C,00,0C,00 .
01,00,02,00,02,00,04,00,04,00,08,00,08,00,10,00 /
0E,00,11,00,11,02,11,04,11,08,11,00,11,00,0E,00 0
04,00,0C,00,04,00,04,00,04,00,04,00,04,00,0E,00 1
0E,00,11,00,02,00,04,00,08,00,10,00,10,00,1F,00 2
1E,00,01,00,01,00,07,00,01,00,01,00,01,00,1E,00 3
11,00,11,00,11,00,11,00,1F,00,01,00,01,00,01,00 4
1F,00,10,00,10,00,1E,00,01,00,01,00,01,00,1E,00 5
0E,00,11,00,10,00,1E,00,11,00,11,00,11,00,0E,00 6
1F,00,01,00,02,00,04,00,08,00,10,00,10,00,10,00 7
7E,00,83,00,85,00,89,00,91,00,A1,00,C1,00,7E,00 0
18,00,28,00,08,00,08,00,08,00,08,00,08,00,3E,00 1
7E,00,81,00,01,02,04,08,10,20,40,00,80,00,FF,00 2
FC,02,01,00,01,02,0C,02,01,00,01,00,01,02,FC,00 3
41,00,41,00,41,00,41,00,7F,00,01,00,01,00,01,00 4
FE,00,80,00,80,00,FC,02,01,00,01,00,01,02,7C,00 5
6E,40,80,00,80,00,FC,02,81,00,81,00,81,42,3C,00 6
FF,00,01,02,00,04,00,08,00,10,20,00,20,00,00,20 7
3C,42,81,00,81,42,3C,42,81,00,81,00,81,42,3C,00 8
3C,42,81,00,81,00,7F,00,01,00,01,00,01,02,7C,00 9
7E,00,54,00,2A,00,54,00,2A,00,54,00,2A,00,7E,00 Box
The application begins by opening the document insert station and performing a PUTLONG. This
statement begins the check printing mode. Then the paper advances to the amount field and the amount
is printed in double width characters. This process takes ten print passes including one last blank print
pass. The remainder of the check data is printed in 36 passes. Check printing normally takes a
maximum of 9.5 seconds.
The example application includes the check data in the program as data statements. Your application
would not use data statements. The data would be read in from a lookup table or a disk file. This
application has minimal error recovery.
%ENVIRON T
INTEGER*2 I%
INTEGER*2 J%
INTEGER*4 X%
INTEGER*1 TEMP%(1)
DIM TEMP%(381)
SUB ASYNCSUB(RFLAG,OVER)
INTEGER*2 RFLAG
STRING OVER
WAIT; 10000
! Display the error.
CLEARS 10
WRITE #10; "ASYNC ERROR = ",ERR
! Do not retry.
RFLAG = 0
EXIT SUB
END SUB
ON ASYNC ERROR CALL ASYNCSUB
ON ERROR GOTO ERR.HNDLR
address space. The complete range of addresses that American National Standards Institute (ANSI). An
is available to a programmer. organization for the purpose of establishing voluntary
industry standards.
addressing. (1) The assignment of addresses to the
instructions of a program. (2) In data communication, ANPOS keyboard. Alphanumeric point-of-sale
the way in which a station selects the station to which it keyboard.
is to send data.
ANSI. American National Standards Institute.
Advanced Data Communications for Stores
(ADCS). An IBM-licensed product that functions at the APAR. Authorized program analysis report.
host processor to permit host-to-store communication.
API. Application program interface.
advanced program-to-program communications
(APPC). An implementation of the SNA/SDLC LU 6.2 APPC. Advanced program-to-program
protocol that allows interconnected systems to communications.
communicate and share the processing of programs.
application program. (1) A program written for or by
alert. (1) An error message sent to the system a user that applies to the user’s own work. (2) A
services control point (SSCP) at the host system. program written for or by a user that applies to a
Glossary X-3
cash drawer. A drawer at a point-of-sale terminal that COBOL. Common business-oriented language. A
can be programmed to open automatically. See till. high-level programming language, based on English,
that is used primarily for business applications.
CD. Corrective diskette.
code generator. One of the components of the
chain. (1) Transfer of control from the currently compiler. The code generator produces object code,
executing program to another program or overlay. which once linked, is machine-executable.
(2) Referencing a data record from a previous data
record. command. (1) A request for performance of an
operation or execution of a program. (2) A character
chaining. A method of storing records in which each string from a source external to a system that
record belongs to a list or group of records and has a represents a request for system action.
linking field for tracing the chain.
Common Programming Interface-Communications
chaining threshold. The number of chains in a keyed (CPI-C). Provides languages, commands, and calls
file that causes a message to be logged by the that allow the development of applications that are more
operating system. easily integrated and moved across environments
supported by Systems Applications Architecture (SAA).
channel. (1) A functional unit, controlled by a host
computer, that handles the transfer of data between communications and systems management
processor storage and local peripheral equipment. (C & SM). A set of tools, programs, and network
(2) A path along which signals can be sent. (3) The functions used to plan, operate, and control an SNA
portion of a storage medium that is accessible to a communications network. C & SM runs on the store
given reading or writing station. controller and must also exist at the host site.
charge. A sales transaction in which a customer has compile. (1) To translate all or part of a program
the partial or total value of purchased merchandise expressed in a high-level language into a computer
added to an account for later payment. program expressed in an intermediate language, an
assembly language, or a machine language. (2) To
charge account. An account established by a prepare a machine language program from a computer
merchant that permits the customer to buy goods or program written in another programming language by
services and defer payment until billed. making use of the overall logic structure of the program,
or generating more than one computer instruction for
checkpoint. A point at which information about the each symbolic statement, or both, as well as performing
status of a job and the system can be recorded so that the function of an assembler. (3) To translate a source
the job step can be restarted later. program into an executable program (an object
program). (4) To translate a program written in a
checksum. (1) The sum of a group of data associated
high-level programming language into a machine
with the group and used for checking purposes. (2) On
language program.
a diskette, data written in a sector for error-detection
purposes. A calculated checksum that does not match compiler. A program that decodes instructions written
the checksum of data written in the sector indicates a as pseudo codes and produces a machine language
bad sector. Note: The data is either numeric or other program to be executed at a later time. Contrast with
character strings regarded as numeric for the purpose interpretive routine. Synonymous with compiling
of calculating the checksum. See also module integrity program.
value.
compiler directive. A nonexecutable statement that
clear. To delete data from a screen or from memory. supplies information to a compiler to affect its action but
which usually does not directly result in executable
cluster. The allocation unit used by the operating
code.
system to allocate space when creating files on disks
and diskettes. The operating system will allocate space compiling program. Synonym for compiler.
to files in cluster increments; therefore the space
allocated for a file is always some multiple of this component. (1) Any part of a network other than an
allocation unit. The minimum allocation for a file is one attaching device, such as an IBM 8228 Multistation
cluster. Cluster size expressed in bytes is always a Access Unit. (2) Hardware or software that is part of a
power of 2. Cluster size is set during formatting and functional unit.
cannot be changed by the user.
compound files. Files that are kept on all store
controllers.
concatenate. To join one string to another. cyclic redundancy check (CRC). Synonym for frame
check sequence (FCS).
configuration. The group of devices, options, and
programs that make up a data processing system or
network as defined by the nature, number, and chief D
characteristics of its functional units. More specifically,
the term may refer to a hardware configuration or a data. (1) A representation of facts, concepts, or
software configuration. See also system configuration. instructions in a formalized manner suitable for
communication, interpretation, or processing by human
configuration file. The collective set of definitions that or automatic means. (2) Any representations such as
describes a configuration. characters or analog quantities to which meaning is or
might be assigned.
connect. In a LAN, to physically join a cable from a
station to an access unit or network connection point. data circuit-terminating equipment (DCE). In a data
Contrast with attach. station, the equipment that provides the signal
conversion and coding between the data terminal
constant. String or numeric value that does not equipment (DTE) and the line.
change throughout program execution.
data file. A collection of related data records
contiguous. Touching or joining at the edge or organized in a specific manner; for example, a payroll
boundary; adjacent. For example, an unbroken file (one record for each employee, showing such
consecutive series of memory locations. information as rate of pay and deductions) or an
inventory file (one record for each inventory item,
control block. (1) A storage area used by a computer showing such information as cost, selling price, and
program to hold control information. (2) In the IBM number in stock.) See also data set, file.
Token-Ring Network, a specifically formatted block of
information provided from the application program to the data integrity. (1) The condition that exists as long as
Adapter Support Interface to request an operation. accidental or intentional destruction, alteration, or loss
of data does not occur. (2) Preservation of data for its
control character. A character whose occurrence in a intended use.
particular context initiates, modifies, or stops a control
operation. A control character may be recorded for use data link. (1) Any physical link, such as a wire or a
in a subsequent action, and it may have a graphic telephone circuit, that connects one or more remote
representation in some circumstances. terminals to a communication control unit, or connects
one communication control unit with another. (2) The
controller. A unit that controls input/output operations assembly of parts of two data terminal equipment (DTE)
for one or more devices. devices that are controlled by a link protocol, and the
interconnecting data circuit, that enable data to be
conversation partner. One of the two programs transferred from a data source to a data link. (3) In
involved in a conversation. SNA, see also link. Note: A telecommunication line is
only the physical medium of transmission. A data link
conversation state. The condition of a conversation includes the physical medium of transmission, the
that reflects what the past action on that conversation protocol, and associated devices and programs; it is
has been and that determines what the next set of both physical and logical.
actions may be.
data processing system. A network, including
corrective diskette (CD). A set of diskettes that computer systems and associated personnel, that
contain modules to replace the modules in the active accepts information, processes it according to a plan,
program subdirectory. The first diskette of the set must and produces the desired results.
contain a product control file that describes which
product the modules are to be applied to and a list of all data set. Logically related records treated as a single
modules that are to be replaced. unit. See also file.
CRC. Cyclic redundancy check. data terminal equipment (DTE). (1) That part of a
data station that serves as a data source, data receiver,
cursor. A movable point of light (or a short line) that or both. (2) Equipment that sends or receives data, or
indicates where the next character is to be entered on both.
the display screen.
Glossary X-5
data type. The mathematical properties and internal program uses to locate one or more blocks of data that
representation of data and functions. are stored in separate areas of a data set in direct
access storage.
DCE. Data circuit-terminating equipment.
disabled. (1) Pertaining to a state of a processing unit
DDA. Data Distribution Application. that prevents the occurrence of certain types of
interruptions. (2) Pertaining to the state in which a
debug. To detect, diagnose, and eliminate errors in transmission control unit or audio response unit cannot
computer programs. accept incoming calls on a line.
declaration statement. A nonexecutable statement disk. A round, flat plate coated with a magnetic
that supplies information about data in a computer substance on which computer data is stored. See also
program. Synonymous with declarative statement. integrated disk, fixed disk.
default. Pertaining to an attribute, value, or option that diskette. A thin, flexible magnetic disk permanently
is assumed when none is explicitly specified. enclosed in a protective jacket. A diskette is used to
store information for processing.
default value. The value the system supplies when
the user does not specify a value. diskette drive. The mechanism used to seek, read,
and write data on diskettes.
delimiter. (1) A character used to indicate the
beginning or end of a character string. (2) A bit pattern Disk Operating System (DOS). An operating system
that defines the beginning or end of a frame or token on for computer systems that use disks and diskettes for
a LAN. auxiliary storage of programs and data.
destination. Any point or location, such as a node, display. (1) A visual presentation of data. (2) A
station, or particular terminal, to which information is to device that presents visual information to the
be sent. point-of-sale terminal operator and to the customer, or
to the display station operator.
destination address. A field in the medium access
control (MAC) frame that identifies the physical location distributed. Physically separate but connected by
to which information is to be sent. Contrast with source cables.
address.
Distributed Systems Executive (DSX). An IBM
device. (1) A mechanical, electrical, or electronic licensed program available for IBM host systems that
contrivance with a specific purpose. (2) An input/output allows the host system to get, send, and remove files,
unit such as a terminal, display, or printer. See also programs, formats and procedures in a network of
attaching device. computers.
device driver. The code needed to attach and use a domain. An SSCP and the resources that it can
device on a computer or a network. control.
diagnostics. Modules or tests used by computer users DSX. Distributed Systems Executive.
and service personnel to diagnose hardware problems.
DTE. Data terminal equipment.
direct file. A file in which records are assigned
specific record positions. No matter what order the dump. (1) To write at a particular instant the contents
records are put in a direct file, they always occupy the of storage, or part of storage, onto another data
assigned position. A direct file is the same as a medium for the purpose of safeguarding or debugging
random file except that a direct file contains no the data. (2) Data that has been dumped.
delimiting characters, such as quotes enclosing string
fields. duplex. In data communication, pertaining to a
simultaneous two-way independent transmission in both
directory. (1) A table of identifiers and references that directions. Synonymous with full-duplex. Contrast with
correspond to items of data. (2) An index that a control half-duplex.
error message. A message that is issued because an feature. A part of an IBM product that may be ordered
error has been detected. separately by the customer.
European article number (EAN). A number that is Feature Expansion. A card that plugs into an IBM
assigned to and encoded on an article of merchandise 4683 Point of Sale Terminal and allows additional
for scanning in some countries. devices to be used.
Glossary X-7
file access. Methods of entering a file to retrieve the frame. (1) The unit of transmission in some LANs,
information stored in the file. including the IBM Token-Ring Network. It includes
delimiters, control characters, information, and checking
file allocation table (FAT). A table used by the characters. On a token-ring network, a frame is created
operating system to allocate space on a disk for a file from a token when the token has data appended to it.
and to locate and chain together parts of the file that On a token-bus network, all frames including the token
may be scattered on different sectors so that the file frame contain a preamble, start delimiter, control
can be used in a random or sequential manner. address, optional data and checking characters, end
delimiter, and are followed by a minimum silence
file extension. Extension to a file name. A file period. (2) A housing for machine elements. (3) In
extension is optional and can be up to three characters synchronous data link control (SDLC), the vehicle for
long. All characters permitted in a file name are every command, every response, and all information
permitted in a file extension. The file extension must be that is transmitted using SDLC procedures. Each frame
separated from the file name by a period. begins and ends with a flag.
file mode. The attribute of a file that specifies when it frame check sequence (FCS). (1) A system of error
is distributed. checking performed at both the sending and receiving
station after a block-check character has been
file name. (1) A name assigned or declared for a file. accumulated. (2) A numeric value derived from the bits
(2) The name used by a program to identify a file. in a message that is used to check for any bit errors in
transmission. (3) A redundancy check in which the
file server. (1) A store controller that maintains prime
check key is generated by a cyclic algorithm.
versions of all non-system mirrored files. (2) A
Synonymous with cyclic redundancy check (CRC).
high-capacity disk storage device or a computer that
each computer on a network can access to retrieve files frequency. The rate of signal oscillation, expressed in
that can be shared among the attached computers. hertz (cycles per second).
file sharing. The ability of a disk file to be shared by front end. One of the two main components of the
more than one program. compiler. The front end consists of the lexical analyzer,
the parser, and the symbol table generator.
file specification. Unique file identifier. A file
specification includes an optional drive specification full-duplex. Synonym for duplex.
followed by a colon, a primary file name of one to eight
characters, and an optional period and file type of zero function. (1) A specific purpose of an entity, or its
to three characters. characteristic action. (2) A subroutine that returns the
value of a single variable. (3) In data communications,
file type. The attribute of a file that specifies to which a machine action such as a carriage return or line feed.
store controllers it is distributed.
function key. A key on a terminal, such as an ENTER
first-in–first-out (FIFO). A queuing technique in which key, that causes the transmission of a signal not
the next item to be retrieved is the item that has been in associated with a character that can be printed or
the queue for the longest time. displayed. Detection of the signal usually causes the
system to perform some predefined action for the
fixed disk (drive). In a personal computer system unit, operator or determined by the application program.
a disk storage device that reads and writes on rigid
magnetic disks. It is faster and has a larger storage
capacity than a diskette and is permanently installed. G
flag. A character or indicator that signals the gateway. A device and its associated software that
occurrence of some condition, such as the setting of a interconnect networks of systems of different
switch, or the end of a word. architectures. The connection is usually made above
the Reference Model network layer. For example, a
foreground. On a color display, the part of the display gateway allows LANs access to System/370 host
area that is the character itself. computers. Contrast with bridge and router.
foreground application. An interactive program that global. Pertaining to that which is defined in one
can be selected by system menus or started in subdivision of a computer program and used in at least
command mode. Contrast with background application. one other subdivision of that computer program.
HCP. Host command processor for advanced data image version. Copy of a prime version of a file. See
communications. prime version.
HCP. Host command processor. inactive. (1) Not operational. (2) Pertaining to a node
or device not connected or not available for connection
header. The portion of a message that contains to another node or device. (3) In the IBM Token-Ring
control information for the message such as one or Network, pertaining to a station that is only repeating
more destination fields, name of the originating station, frames or tokens, or both.
input sequence number, character string indicating the
type of message, and priority level for the message. information (I) frame. A frame in I format used for
numbered information transfer. See also supervisory
header record. A record containing common, frame, unnumbered frame.
constant, or identifying information for a group of
records that follows. initialize. In a LAN, to prepare the adapter (and
adapter support code, if used) for use by an application
heap. Dynamic data storage area used to store data program.
that can vary in size during the execution of a program,
such as strings and arrays. initial program load (IPL). The initialization procedure
that causes an operating system to begin operation.
home record. The first record in a chain of records.
input device. Synonym for input unit.
host command processor (HCP). The SNA logical
unit of the programmable Store System store controller. input/output (I/O). (1) Pertaining to a device whose
parts can perform an input process and an output
host computer. (1) The primary or controlling process at the same time. (2) Pertaining to a functional
computer in a multi-computer installation or network. unit or channel involved in an input process, output
(2) In a network, a processing unit in which resides a process, or both, concurrently or not, and to the data
network access method. Synonymous with host involved in such a process.
processor.
input sequence table. Defines all input data that is
host node. A subarea node that contains a system expected by the application from the keyboard, OCR
services control point (SSCP). device, point-of-sale scanner, and wand on the IBM
point-of-sale terminal. The table allows the terminal I/O
host processor. (1) In a network, a computer that processor to recognize operator input and organize it
primarily provides services such as computation, data into a form the application expects.
base access, or special programs or programming
languages. (2) Synonym for host computer. input unit. A device in a data processing system by
means of which data can be entered into the system.
Synonymous with input device.
Glossary X-9
insert. To make an attaching device an active part of item. (1) One member of a group. (2) In a store, one
a LAN. unit of a commodity, such as one box, one bag, or one
can. Usually an item is the smallest unit of a
instruction. In a programming language, a meaningful commodity to be sold.
expression that specifies one operation and identifies its
operands, if any.
K
integrated disk. An integral part of the processor that
is used for magnetically storing files, application K. When referring to storage capacity, a symbol that
programs, and diagnostics. Synonymous with disk. represents two to the tenth power, or 1024.
interactive. Pertaining to an application or program in keyboard. A group of numeric keys, alphabetic keys,
which each entry calls forth a response from a system special character keys, or function keys used for
or program. An interactive program may also be entering information into the terminal and into the
conversational, implying a continuous dialog between system.
the user and the system.
keyed file. Type of file composed of keyed records.
interface. (1) A shared boundary between two Each keyed record has two parts: a key and data. A
functional units, defined by functional characteristics, key is used to identify and access each record in the
common physical interconnection characteristics, signal file.
characteristics, and other characteristics as appropriate.
(2) A shared boundary. An interface may be a
hardware component to link two devices or a portion of L
storage or registers accessed by two or more computer
label. Constant, either numeric or literal, that
programs. (3) Hardware, software, or both, that links
references a statement or function.
systems, programs, or devices.
LAN. Local area network.
interpretive routine. A routine that decodes
instructions written as pseudocodes and immediately
LAN segment. (1) Any portion of a LAN (for example,
executes the instructions. Contrast with compile.
a single bus or ring) that can operate independently but
is connected to other parts of the establishment network
interrupt. (1) A suspension of a process, such as
by bridges. (2) An entire ring or bus network without
execution of a computer program, caused by an
bridges. See cable segment, ring segment.
external event and performed in such a way that the
process can be resumed. (2) To stop a process in
LCD. Liquid Crystal display.
such a way that it can be resumed. (3) In data
communication, to take an action at a receiving station LDSN. Logical drive and subdirectory name.
that causes the sending station to end a transmission.
(4) A means of passing processing control from one LED. Light-emitting diode.
software or microcode module or routine to another, or
of requesting a particular software, microcode, or LFN. Logical file name.
hardware function.
light-emitting diode (LED). A semiconductor chip that
I/O. Input/output. gives off visible or infrared light when activated.
I/O device. Equipment for entering and receiving data link. (1) In the IBM Store System, the logical
from the system. connection between nodes including the end-to-end link
control procedures. (2) The combination of physical
I/O processor. Equipment that receives data from, media, protocols, and programming that connects
processes data, and sends data to one or more I/O devices on a network. (3) In computer programming,
devices. the part of a program, in some cases a single
instruction or an address, that passes control and
I/O session number. Unique identification number you parameters between separate portions of the computer
assign to a file device driver, pipe, or communication program. (4) To interconnect items of data or portions
link or session with the CREATE or OPEN statement. of one or more computer programs. (5) In SNA, the
I/O session numbers can be any numeric expression. If combination of the link connection and link stations
the expression evaluates to a real number, it is joining network nodes. See also link connection. Note:
converted to an integer. A link connection is the physical medium of
transmission; for example, a telephone wire or a
IPL. Initial program load.
microwave beam. A link includes the physical medium
load. In computer programming, to enter data into magnetic stripe. The magnetic material (similar to
memory or working registers. recording tape) on merchandise tickets, credit cards,
and employee badges. Information is recorded on the
local area network (LAN). A computer network stripe for later “reading” by the magnetic stripe reader
located on a user’s premises within a limited (MSR) or magnetic wand reader attached to the
geographical area. Note: Communication within a LAN point-of-sale terminal.
is not subject to external regulations; however,
communication across the LAN boundary may be magnetic stripe reader (MSR). A device that reads
subject to some form of regulation. coded information from a magnetic stripe on a card,
such as a credit card, as it passes through a slot in the
logging. The chronological recording of events reader.
occurring in a system or a subsystem for accounting or
data collection purposes. maintenance analysis procedure (MAP). Deprecated
term for procedure. See procedure.
logical file name (LFN). An abbreviated file name
used to represent either an entire file name or the drive Manufacturing Automated Protocol (MAP). A
and subdirectory path part of the file name. broadband LAN with a bus topology that passes tokens
from adapter to adapter on a coaxial cable.
logical link. In an MVS/VS multisystem environment,
the means by which a physical link is related to the MAP. (1) Maintenance analysis procedure.
transactions and terminals that can use the physical (2) Manufacturing Automated Protocol.
link.
mapping. Establishing a correspondence between the
logical unit (LU). (1) In SNA, a port through which an elements of one set and the elements of another set.
end user accesses the SNA network in order to
master store controller. The store controller that
communicate with another end user and through which
maintains prime versions of system mirrored files and
the end user accesses the functions provided by system
all compound files.
services control points (SSCPs). An LU can support at
least two sessions, one with an SSCP and one with
master terminal. An IBM Point of Sale Terminal that
another LU, and may be capable of supporting many
controls a satellite IBM Point of Sale terminal.
sessions with other logical units. (2) A type of network
Glossary X-11
Mb. Megabit. mirrored files. Files that are kept on both the Master
Store Controller and the Alternate Master Store
MB. Megabyte. Controller or on both the File Server and Alternate File
Server. System mirrored files are kept on the Master
MCF Network. Multiple store controllers Store Controller and Alternate Store Controller and
communicating on a network using DDA. This provides non-system mirrored files are kept on the File Server
data redundancy among the store controllers. and Alternate File Server.
media. Plural form of medium. Mod1. A generic name used to refer to a point-of-sale
terminal in the IBM 4690 Store System that loads and
medialess. Not fitted with a direct access storage executes programs. A Mod1 can be any of the
device, such as a diskette drive or fixed disk drive, as in following models: 4683-001, 4683-A01, 4683-P11,
some models of IBM Point of Sale Terminals. 4683-P21, 4683-P41, 4683-421, 4684, and 4693-xx1
(terminal part if a controller/terminal).
medium. (1) A physical carrier of electrical or optical
energy. (2) A physical material in or on which data Mod2. A generic name used to refer to a point-of-sale
may be represented. terminal in the IBM 4690 Store System that does not
load and execute programs, but attaches to a terminal
megabit (Mb). A unit of measure for throughput. 1
that does. A Mod2 can be one of the following models:
megabit = 1,048,576 bits.
4683-002, 4683-A02, or 4693-2x2.
megabyte (MB). A unit of measure for data.
module. A program unit that is discrete and
1 megabyte = 1,048,576 bytes.
identifiable with respect to compiling, combining with
other units, and load; for example, the input to, or
memory. Program-addressable storage from which
output from, an assembler, compiler, linkage editor, or
instructions and other data can be loaded directly into
executive routine.
registers for subsequent execution or processing.
module integrity value (checksum). A 3-byte value
memory mapped I/O (MMIO). In an IBM Personal
that is calculated for each module when a product
Computer, a method of accessing an input or output
control file is built. The checksum is recalculated when
port as if it were a memory location.
activating the maintenance and is compared against the
value in the product control file.
memory model. Predetermined format for program
structure. A memory model determines the sizes of the
modulo check. A function designed to detect most
different program areas (code, data, and stack), and the
common input errors by performing a calculation on
initial values for segment registers. IBM 4680 BASIC
values entered into a system by an operator or
supports three memory models: medium, big, and large.
scanning device.
message. (1) An arbitrary amount of information
modulus. In the modulo check function, the number
whose beginning and end are defined or implied. (2) A
by which the summed digits are divided. See also
group of characters and control bit sequences
modulo check.
transferred as an entity. (3) In telecommunication, a
combination of characters and symbols transmitted from monitor. (1) A functional unit that observes and
one point to another. (4) A logical partition of the user records selected activities for analysis within a data
device’s data stream to and from the adapter. See also processing system. Possible uses are to show
error message, operator message. significant departures from the norm, or to determine
levels of utilization of particular functional units.
Micro Channel. The architecture used by IBM
(2) Software or hardware that observes, supervises,
Personal System/2 computers, Models 50 and above.
controls, or verifies operations of a system.
This term is used to distinguish these computers from
personal computers using a PC I/O channel, such as an
monochrome display. A display device that presents
IBM PC, XT, or an IBM Personal System/2 computer,
display images in only one color.
Model 25 or 30.
MSR. Magnetic stripe reader.
microcode. (1) One or more microinstructions. (2) A
code, representing the instructions of an instruction set, multiple controller system. Synonym for MCF
that is implemented in a part of storage that is not Network.
program-addressable. (3) To design, write, and also
test one or more microinstructions. multitasking. (1) Pertaining to the concurrent
execution of two or more tasks by a computer.
(2) Multiprogramming that provides for the concurrent
name. An alphanumeric term that identifies a data set, nonvolatile random access memory (NVRAM).
statement, program, or cataloged procedure. Random access memory that retains its contents after
electrical power is shut off.
n-bit byte. A string that consists of n bits.
null string. A string containing no entity.
NetView. A host-based IBM network management
licensed program that provides communication network NVRAM. Nonvolatile Random Access Memory.
management (CNM) or communications and systems
management (C & SM) services.
O
NetView Distribution Manager (NetView DM). A
component of the NetView family supporting resource object code. Output of an assembler or compiler that
distribution within Change Management, and providing executes on the target processor.
central control of software and microcode distribution
and installation, to processors in a OCF. Operator console facility.
distributed/departmental (SNA) network system. It
allows a similar control of user data objects across the OCR. Optical character recognition.
network, and provides the facilities to support the
OCR reader. A device that reads hand-written or
remote initiation of command lists.
machine-printed symbols into a computing system.
network. (1) A configuration of data processing
offline. Operation of a functional unit without the
devices and software connected for information
control of a computer or control unit.
interchange. (2) An arrangement of nodes and
connecting branches. Connections are made between
online. Operation of a functional unit that is under the
data stations.
continual control of a computer or control unit. The
term also describes a user’s access to a computer
network administrator. A person who manages the
using a terminal.
use and maintenance of a network.
open. (1) To make an adapter ready for use. (2) A
network architecture. The logical structure and
break in an electrical circuit. (3) To make a file ready
operating principles of a computer network. See also
systems network architecture (SNA) and Open Systems for use.
Interconnect (OSI) architecture. Note: The operating
Open Systems Interconnect (OSI). (1) The
principles of a network include those of services,
interconnection of open systems in accordance with
functions, and protocols.
specific ISO standards. (2) The use of standardized
network management vector transport (NMVT). The procedures to enable the interconnection of data
portion of an alert transport frame that contains the alert processing systems. Note: OSI architecture
message. establishes a framework for coordinating the
development of current and future standards for the
Network Problem Determination Application interconnection of computer systems. Network
(NPDA). A program product that assists the user in functions are divided into seven layers. Each layer
identifying network problems from a central control point represents a group of related data processing and
using interactive display techniques. communication functions that can be carried out in a
standard way to support different applications.
node. (1) Any device, attached to a network, that
transmits and/or receives data. (2) An end point of a Open Systems Interconnect (OSI) architecture.
link, or a junction common to two or more links in a Network architecture that adheres to a particular set of
network. Nodes can be processors, controllers, or ISO standards that relates to Open Systems
workstations. Nodes can vary in routing and other Interconnect (OSI).
functional capabilities. (3) In a network, a point where
one or more functional units interconnect transmission Open Systems Interconnect (OSI) Reference Model.
lines. A model that represents the hierarchical arrangement of
the seven layers described by the Open Systems
Interconnect (OSI) architecture.
Glossary X-13
operating system. Software that controls the overflow exception. A condition caused by the result
execution of programs. An operating system may of an arithmetic operation having a magnitude that
provide services such as resource allocation, exceeds the largest possible number. See also
scheduling, input/output control, and data management. underflow exception.
Examples are IBM DOS and IBM OS/2.
overlay. Part of a larger program read into a
Operating System/2 (OS/2). A set of programs that computer’s main memory only when needed. An
control the operation of high-speed large-memory IBM overlay replaces other portions of the larger program
Personal Computers (such as the IBM Personal that are no longer needed. The use of overlays
System/2 computer, Models 50 and above), providing reduces the amount of main memory required by a
multitasking and the ability to address up to 16 MB of program. An overlay is only supported on the store
memory. Contrast with Disk Operating System (DOS). controller and requires its own copy of the runtime
subroutine library.
operation. (1) A defined action, namely, the act of
obtaining a result from one or more operands in owner. In relation to files, an owner is the user that
accordance with a rule that completely specifies the creates the file and therefore has complete access to
result for any permissible combination of operands. the file.
(2) A program step undertaken or executed by a
computer. (3) An action performed on one or more
data items, such as adding, multiplying, comparing, or P
moving.
pacing. A technique by which a receiving component
operator. (1) A symbol that represents the action controls the rate of transmission by a sending
being performed in a mathematical operation. (2) A component to prevent overrun or congestion.
person who operates a machine.
packet. (1) In data communication, a sequence of
Operator console facility (OCF). A component of binary digits, including data and control signals, that is
Subsystem Support Services that handles input and transmitted and switched as a composite whole.
output on the host processor console printer. (2) Synonymous with data frame. Contrast with frame.
operator message. A message from the operating packet assembler/disassembler (PAD). A functional
system or a program telling the operator to perform a unit that enables data terminal equipments (DTEs) not
specific function or informing the operator of a specific equipped for packet switching to access a packet
condition within the system, such as an error condition. switched network.
optical character recognition (OCR). The machine packing. Method of conserving disk storage space by
identification of printed characters through the use of stripping the high-order nibbles from ASCII numerals
light-sensitive devices. and storing the remaining low-order nibbles two to a
byte.
option. (1) A specification in a statement, a selection
from a menu, or a setting of a switch, that may be used PAD. Packet assembler/disassembler.
to influence the execution of a program. (2) A
hardware or software function that may be selected or page. (1) The portion of a panel that is shown on a
enabled as part of a configuration process. (3) A piece display surface at one time. (2) To move back and
of hardware (such as a network adapter) that can be forth among the pages of a multiple-page panel. See
installed in a device to modify or enhance device also scroll. (3) In a virtual storage system, a
function. fixed-length block that has a virtual address and is
transferred as a unit between main storage and
OS. Operating system. auxiliary storage.
OS/2. Operating System/2. parallel port. (1) A port that transmits the bits of a
byte in parallel along the lines of the bus, one byte at a
OSI. Open Systems Interconnect. time, to an I/O device. (2) On a personal computer, it
is used to connect a device that uses a parallel
output device. A device in a data processing system interface, such as a dot matrix printer, to the computer.
by which data can be received from the system. Contrast with serial port.
Synonymous with output unit.
parameter. (1) A name in a procedure that is used to
output unit. Synonym for output device. refer to an argument passed to that procedure. (2) A
variable that is given a constant value for a specified
application and that may denote the application. (3) An
parity (odd). A condition when the sum of all of the point-of-sale terminal. A unit that provides
digits in an array of binary digits is odd. point-of-sale transaction, data collection, credit
authorization, price look-up, and other inquiry and data
partner. See conversation partner. entry functions.
partner terminal. The term used to describe the polling. (1) Interrogation of devices for purposes such
relationship of a Mod 1 terminal and Mod 2 terminal as to avoid contention, to determine operational status,
when they are attached to each other. or to determine readiness to send or receive data.
(2) In data communication, the process of inviting data
password. In computer security, a string of characters stations to transmit, one at a time. The polling process
known to the computer system and a user, who must usually involves the sequential interrogation of several
specify it to gain full or limited access to a system and data stations.
to the data stored within it.
polling characters (address). A set of characters
path. (1) Reference that specifies the location of a specific to a terminal and the polling operation;
particular file within the various directories and response to these characters indicates to the computer
subdirectories of a hierarchical file system. (2) In a whether the terminal has a message to enter.
network, any route between any two nodes. (3) The
route traversed by the information exchanged between port. (1) An access point for data entry or exit. (2) A
two attaching devices in a network. (4) A command in connector on a device to which cables for other devices
IBM DOS and IBM OS/2 that specifies directories to be such as display stations and printers are attached.
searched for commands or batch files that are not found Synonymous with socket.
by a search of the current directory.
post. (1) To affix to a usual place. (2) To provide
peer node. Any other SNA type (2.1) node (another items such as return code at the end of a command or
4680/4690 store controller, AS/400, or others). function. (3) To define an appendage routine. (4) To
note the occurrence of an event.
peer-to-peer communication. Pertaining to data
communications between two nodes that have equal POST. Power-On Self Test.
status in the interchange. Either node can begin the
conversation. See also LU-LU session type 6.2. power line disturbance (PLD). Interruption or
reduction of electrical power.
personal computer (PC). A desk-top, free-standing,
or portable microcomputer that usually consists of a Power-On Self Test (POST). A series of diagnostic
system unit, a display, a keyboard, one or more diskette tests that are run automatically each time the
drives, internal fixed-disk storage, and an optional computer’s power is switched on.
printer. PCs are designed primarily to give independent
computing power to a single user and are inexpensively presentation space (PS). In 3270 emulation, the
priced for purchase by individuals or small businesses. image of the 3270 screen data that is held in random
Examples include the various models of the IBM access memory. This screen appears on the store
Personal Computers, and the IBM Personal System/2 controller or the terminal display when 3270 emulation
computer. is used in operator console mode; it is the virtual screen
for applications using the 3270 emulator API. The
phase. The relative timing (position) of periodic presentation space is fixed as 24 lines of 80 characters
electrical signals. on the display.
pipe. A sequential file in a memory buffer that is used primary application. A program that controls the
to pass messages from one program to another. normal operating environment of your store (for
example, programs that provide sales support).
PLD. Power line disturbance.
prime version. The version of a file to which updates
plug. (1) A connector for attaching wires from a are made. The prime version of a file may be
device to a cable, such as a store loop. A plug is maintained on either the Master Store Controller or the
Glossary X-15
File Server. Copies of the prime version, called image
versions, are distributed to other store controllers. Q
privilege. An identification that a product or installation queue. A line or list formed by items in a system
defines in order to differentiate SNA service transaction waiting for service; for example, tasks to be performed
programs from other programs, such as application or messages to be transmitted in a message routing
programs. system.
processor. In a computer, a functional unit that random file. A disk file in which records are assigned
interprets and executes instructions. specific record positions. No matter what order the
records are put in a direct file, they always occupy the
product control file (PCF). A file used by Apply assigned position. A random file is the same as a
Software Maintenance to control the process of applying direct file except that a random file requires delimiting
maintenance. characters, such as quotes enclosing string fields,
commas between fields, and carriage returns and line
prompt. A character or word displayed by the
feeds between records.
operating system to indicate that it is ready to accept
input. randomizing. Synonym for hashing.
protection exception. The result of an attempt to randomizing divisor. When creating a keyed file, a
access memory that is not in a program's authorized number used to calculate the number of sectors that
data space. Protection exception causes the can contain data in a keyed file. It is usually the largest
application to abort. prime number less than the total number of sectors in
the file. When a record is searched for, the
protocol. (1) A set of semantic and syntactic rules
randomizing divisor is used to calculate the location of
that determines the behavior of functional units in
the record.
achieving communication. (2) In SNA, the meanings of
and the sequencing rules for requests and responses RCMS. Remote change management server.
used for managing the network, transferring data, and
synchronizing the states of network components. (3) A read. To acquire or to interpret data from a storage
specification for the format and relative timing of device, from a data medium, or from another source.
information exchanged between communicating parties.
read-only memory (ROM). A computer’s or adapter’s
PS. Presentation space. storage area whose contents cannot be modified by the
user except under special circumstances.
public switched (telephone) network (PSN). A
telephone network that provides lines and exchanges to receive. To obtain and store information transmitted
the public. It is operated by the communication from a device.
common carriers in the USA and Canada, and by the
PTT Administrations in other countries. record. A collection of related items of data, treated as
a unit; for example, in stock control, each invoice could
constitute one record. A complete set of such records
may form a file.
Glossary X-17
RPQ. Request for price quotation. network. (2) On a LAN, a data station that provides
facilities to other data stations. Examples are a file
runtime error. Error occurring during program server, print server, and mail server.
execution.
session. (1) A connection between two application
runtime subroutine library (RTSL). Set of common, programs that allows them to communicate. (2) In
frequently needed program operations that is linked to a SNA, a logical connection between two network
compiled program for execution. addressable units that can be activated, tailored to
provide various protocols, and deactivated as
requested. (3) The data transport connection resulting
S from a call or link between two devices. (4) The period
of time during which a user of a node can communicate
SAA. Systems Application Architecture.
with an interactive system, usually the elapsed time
between log on and log off. (5) In network architecture,
sales transaction. See transaction.
an association of facilities necessary for establishing,
scan. To pass an item over or through the scanner so maintaining, and releasing connections for
that the encoded information is read. See also communication between stations.
wanding.
shared runtime library (SRTL). A runtime library that
scanner. A device that examines the bar code on can be used by more than one user.
merchandise tickets, credit cards, and employee badges
signal. (1) A time-dependent value attached to a
and generates analog or digital signals corresponding to
physical phenomenon for conveying data. (2) A
the bar code.
variation of a physical quantity, used to convey data.
scroll. To move all or part of the display image
sign-on. (1) A procedure to be followed at a terminal
vertically or horizontally to display data that cannot be
or workstation to establish a link to a computer. (2) To
observed within a single display image. See also page
begin a session at a workstation.
(2).
SKU. Stock keeping unit.
SCSI. Small computer system interface.
small computer system interface (SCSI). An input
SDLC. Synchronous Data Link Control.
and output bus that provides a standard interface
secondary application. A user-written program that is between the system and peripheral devices.
designed to operate with operator intervention.
SNA. Systems Network Architecture.
sector. A 512-byte area of the control unit diskette, the
socket. Synonym for port (2).
amount of data that is transferred at one time to or from
the diskette.
source. The origin of any data involved in a data
transfer.
segment. See cable segment, LAN segment, ring
segment.
source address. A field in the medium access control
(MAC) frame that identifies the location from which
sequential access. Type of file structure in which
information is sent. Contrast with destination address.
records are obtained from or placed into a file in such a
way that each successive access to the file refers to the
source program. A computer program expressed in a
next record in the file.
source language.
sequential file. A disk file in which records are read
stack. Data structure to which values are added and
from or placed into the file according to the order they
from which values are removed at only one end. That
are processed.
is, the last value placed onto the stack must be the first
value removed from the stack. The stack is used to
serial port. On personal computers, a port used to
pass variables from one routine to another and to store
attach devices such as display devices, letter-quality
all local variables for each iteration of a recursive
printers, modems, plotters, and pointing devices such
procedure.
as light pens and mice; it transmits data one bit at a
time. Contrast with parallel port.
stand-alone. Pertaining to operation that is
independent of any other device, program, or system.
server. (1) A device, program, or code module on a
network dedicated to providing a specific service to a
state. See conversation state. summary journal. A record of the terminal operational
activity that is printed at the terminal.
static data. Data that does not vary in size during the
execution of a program, such as integers and real supervisory (S) frame. A frame in supervisory format
numbers. used to transfer supervisory control functions. See also
information frame, unnumbered frame.
station. (1) A point-of-sale terminal that consists of a
processing unit, a keyboard, and a display. It can also switch. On an adapter, a mechanism used to select a
have input/output devices, such as a printer, a magnetic value for, enable, or disable a configurable option or
stripe reader or cash drawers. (2) A communication feature.
device attached to a network. The term used most
often in LANs is an attaching device or workstation. symbolic name. In a LAN, a name that may be used
(3) An input or output point of a system that uses instead of an adapter or bridge address to identify an
telecommunication facilities; for example, one or more adapter location.
systems, computers, terminals, devices, and associated
programs at a particular location that can send or symbol table. During compilation and link editing the
receive data over a telecommunication line. See also symbol table keeps track of all the identifiers for
attaching device, workstation. address resolution.
stock keeping unit (SKU). An identifier, having up to synchronous. (1) Pertaining to two or more
21 characters, for each item of merchandise. It is the processes that depend upon the occurrence of a
lowest level of numeric identification for merchandise, specific event such as a common timing signal.
usually identified by department, class, vendor, style, (2) Occurring with a regular or predictable timing
color, size, and location. relationship.
store controller. A programmable unit in a network Synchronous Data Link Control (SDLC). A discipline
used to collect data, to direct inquiries, and to control conforming to subsets of the Advanced Data
communication within a point-of-sale system. Communication Control Procedures (ADCCP) of the
American National Standards Institute (ANSI) and
store loop. In the IBM Store System, a cable over High-level Data Link Control (HDLC) of the International
which data is transmitted between the store controller Organization for Standardization, for managing
and the point-of-sale terminals. synchronous, code-transparent, serial-by-bit information
transfer over a link connection. Transmission
Store Loop Adapter. A hardware component used to exchanges may be duplex or half-duplex over switched
connect the loop to a store controller. or nonswitched links. The configuration of the link
connection may be point-to-point, multipoint, or loop.
streamer. Synonym for streaming tape drive.
system. In data processing, a collection of people,
streaming tape drive. A magnetic tape unit especially machines, and methods organized to accomplish a set
designed to make a nonstop dump or restore of of specific functions. See also data processing system
magnetic disks without stopping at inter-block gaps. and operating system.
Synonymous with streamer. Contrast with start-stop
tape drive. system board. In a system unit, the main circuit board
that supports a variety of basic system devices, such as
string variable. A variable whose values can be either a keyboard or a mouse, and provides other basic
bit strings or character strings. system functions.
subdirectory. Any level of file directory lower than the system configuration. A process that specifies the
root directory within a hierarchical file system. devices and programs that form a particular data
processing system.
subprogram. Section of code that performs a specific
task and is logically separate from the main program. A system disk(ette). A personal computer fixed disk or
subprogram differs from a function in that parameters diskette that has been formatted with IBM DOS or
are passed by reference rather than by value. Operating System/2 (OS/2) by using the FORMAT
command with the /S option.
Glossary X-19
system programs. Testing and utility programs that token. A sequence of bits passed from one device to
reside in the system partition of a fixed disk that are another on the token-ring network that signifies
used to maintain the system. Typically these programs permission to transmit over the network. It consists of a
are the same as those provided on the reference and starting delimiter, an access control field, and an end
diagnostic diskettes. delimiter. The frame control field contains a token bit
that indicates to a receiving device that the token is
Systems Application Architecture (SAA). An ready to accept information. If a device has data to
architecture developed by IBM that consists of a set of send along the network, it appends the data to the
selected software interfaces, conventions, and token. When data is appended, the token then
protocols, and that serves as a common framework for becomes a frame. See frame.
application development, portability, and use across
different IBM hardware systems. token ring. A network with a ring topology that passes
tokens from one attaching device (node) to another. A
Systems Network Architecture (SNA). The node that is ready to send can capture a token and
description of the logical structure, formats, protocols, insert data for transmission.
and operational sequences for transmitting information
units through, and controlling the configuration and token-ring network. (1) A ring network that allows
operation of, networks. Note: The layered structure of unidirectional data transmission between data stations
SNA allows the ultimate origins and destinations of by a token-passing procedure over one transmission
information, that is, the end users, to be independent of, medium so that the transmitted data returns to and is
and unaffected by, the specific SNA network services removed by the transmitting station. The IBM
and facilities used for information exchange. Token-Ring Network is a baseband LAN with a
star-wired ring topology that passes tokens from
network adapter to network adapter. (2) A network that
T uses a ring topology, in which tokens are passed in a
circuit from node to node. A node that is ready to send
task. A basic unit of work. can capture the token and insert data for transmission.
(3) A group of interconnected token rings.
TCC. Terminal Controller Communications
TP. Transaction program.
TCC Network. A system in which the terminals and
controllers communicate using either a store loop or trace. (1) A record of the execution of a computer
token ring. program. It exhibits the sequences in which the
instructions were executed. (2) A record of the frames
terminal. In data communication, a device, usually
and bytes transmitted on a network.
equipped with a keyboard and a display, capable of
sending and receiving information over a transaction. (1) The process of recording item sales,
communication channel. processing refunds, recording coupons, handling voids,
verifying checks before tendering, and arriving at the
terminal number. A number assigned to a terminal to
amount to be paid by or to a customer. The receiving
identify it for addressing purposes.
of payment for merchandise or service is also included
in a transaction. (2) In an SNA network, an exchange
text editor. A program used to create, modify, and
between two programs that usually involves a specific
print or display text files.
set of initial input data that causes the execution of a
threshold. (1) A level, point, or value above which specific task or job. Examples of transactions include
something is true or will take place and below which it the entry of a customer’s deposit that results in the
is not true or will not take place. (2) In IBM bridge updating of the customer’s balance, and the transfer of
programs, a value set for the maximum number of a message to one or more destination points.
frames that are not forwarded across a bridge due to
transaction log. A record of transactions performed at
errors, before a “threshold exceeded” occurrence is
the point-of-sale terminal. This log is magnetically
counted and indicated to network management
recorded on the disk or diskette. See logging.
programs. (3) An initial value from which a counter is
decremented from an initial value. When the counter
transaction program (TP). A program that processes
reaches zero or the threshold value, a decision is made
transactions in or through a logical unit (LU) type 6.2 in
and/or an event occurs.
an SNA network. Application transaction programs are
end users in an SNA network; they process transactions
till. A tray in the cash drawer of the point-of-sale
for service transaction programs and for other end
terminal, used to keep the different denominations of
users. Service transaction programs are IBM-supplied
bills and coins separated and easily accessible.
truncate. To remove the beginning or ending elements verb. In SNA, the general name for a transaction
of a string. program’s request for communication services.
user exit. A point in an IBM-supplied program at which work file. A file that is both created and deleted in the
a user-written program may be given control. same job.
user exit routine. A routine written by a user to take workstation. (1) An I/O device that allows either
control of a program supplied by IBM at a user exit. transmission of data or the reception of data (or both)
from a host system, as needed to perform a job: for
utility program. (1) A computer program in general example, a display station or printer. (2) A
support of the processes of a computer; for instance, a configuration of I/O equipment at which an operator
diagnostic program, a trace program, a sort program. works. (3) A terminal or microcomputer, usually one
(2) A program designed to perform an everyday task connected to a mainframe or network, at which a user
such as copying data from one storage device to can perform tasks.
another.
world. Category of identification defined for file access
protection.
Glossary X-21
equipment (DCE) operating in the packet mode, and
X connected to public data networks by dedicated circuits.
X.25 networks use the connection-mode network
X.25. A CCITT Recommendation that defines the
service.
physical level (physical layer), link level (data link layer),
and packet level (network layer), of the OSI Reference
Model. An X.25 network is an interface between data
terminal equipment (DTE) and data circuit-terminating
Index X-25
character sets commands (continued)
ASCII 15-1 AQ 10-4
check printing C-1 CJ 10-4
double width C-2 CQ 10-5
model 1 printer 3-64 HQ 10-4
model 2 printer 3-64 LQ 10-4
normal width C-1 PJ 10-3
characteristics TJ 10-4
model 3 printer 3-67 TQ 10-5
model 4 printer 3-67 commands, print spooler
check printing AJ 10-4
character sets C-1 AQ 10-4
characteristics of, model 1 or 2 printer 3-62 CJ 10-4, 10-5
example of C-3 HJ 10-4
formatting the data for, model 1 or 2 printer 3-63 HQ 10-4
problem determination for, model 1 or 2 LJ 10-4
printer 3-64 PJ 10-3
programming considerations, model 1 or 2 RJ 10-5
printer 3-64 TJ 10-4, 10-5
warning 3-64 common information for input sequence table 3-33
CJ command (print spooler) 10-4 communicating between applications
CLEAR key use in Input Sequence Table 3-34 in store controller applications 15-11
clearing communications, system 1-2
2x20 displays 3-7 compatibility, printer 3-68
shopper display 3-10 compound file
video display 3-16 creating 16-10
close file or pipe 16-18 parameters 16-16, 16-24
close keyed file 16-11 compressing files using the loop status application
close, partial 16-11, 16-18 utility 12-1
closing ADXSERVE using ADXSERCL 15-39 concurrent operations on the system 1-1
COBOL interfaces 16-3 conditional write to PRS pipe 16-30
COBOL/2, IBM 16-3 configuration considerations, RAM disks 15-31
CODE section 9-5 configured controllers, getting 16-37
code size, when exceeds available memory 15-3 controller applications
CODESHARED option 9-9 accessing RAM disk files from 15-32, 15-41
coding tips for writing non-4680 BASIC programs 16-2 copying RAM disk files from 15-32
coin dispenser driver listing directories RAM disk file from 15-32
accessing 3-29 controller, store configured on network 15-24
characteristics of 3-29 controllers, get all active on network 15-26, 16-39
dispensing coins 3-30 converting
example of code for 3-30 ASCII to EBCDIC 15-25, 16-38
programming tips for 3-29 EBCDIC to ASCII 15-25, 16-38
command HEX to ASCII 16-48
read 3-83 copying
command file, example of 11-3 files 2-23
command formats for ADXCSW0L 11-4 files using ADXCOPYF 15-32
command line syntax 9-13 RAM disk files from controller applications 15-32
command options, LINK86 9-4 table, input sequence table utility 7-2
command stacking CQ command (print spooler) 10-5
example of 3-25 creating
restrictions using 3-25 an empty file (batch method) 6-8
using 3-24 compound files 16-10
command-line files for LIB86 8-2 creating files 16-5
command-line options 8-2 files 2-19, 16-16
commands input file 9-2
AJ 10-4 keyed file 16-7
Index X-27
display character sets (continued) enable
customizing alphanumeric display character set 3-7 security for files and subdirectories 2-25
for 2x20 displays 3-7 terminal IPL 15-28
for shopper display 3-11 terminal storage retention 15-18, 16-35
for video display 3-18 enable/disable IPL
Display Manager 1-4 disable terminal IPL 15-29
displaying enable IPL function 15-28
application status message 15-23, 16-36 using 15-28
background application status msg 15-24, 16-37 encrypting password 15-11, 16-34
logical names table 2-14 ending
table using input sequence table utility 7-2 a program 16-43
displays access to files 2-21
40-character Liquid Crystal Display (LCD) 3-6 environment, operating system 1-1
40-character Vacuum Florescent Display II (VFD erasing
II) 3-6 a table using input sequence table utility 7-2
alphanumeric 3-6 spool file 5-3
operator 3-6 ERR function 4-4
shopper 3-10 ERRF% function 4-4
Two-sided VFD II 3-6 ERRL function 4-4
video 3-12 ERRN function 4-4
distributed file error
accessing in terminal applications 2-14 handling 3-82
at close 16-10 recovery 3-82
ways to 16-16 error codes
distribution errors, logging 2-18 application action 4-11
distribution exception log 4-9 description 4-11
document print spooler 10-5
eject command 3-75 error functions 4-2
insert station 3-61, 3-72 error logging
insertion, manual or automatic 3-72 ADXERROR 15-29
options 3-73 error log 4-4
station character line lengths 3-76 system log 4-4
double strike printing 3-70 error recovery 4-1
drawer, cash 3-27 error statements 4-2
dual track magnetic stripe reader driver ERRORLEVEL test 9-12, 9-15
accessing 3-52 errors
characteristics 3-49 application 4-5
common data characteristics 3-53 application responses 4-13
determining status of 3-54 hardware, store controller 4-5
disallowing data 3-53 hardware, terminal 4-5
example of code for 3-56, 3-58 I/O devices 4-13
Magnetic Stripe Reader 3-48 LINK86 messages B-8
preparing to receive data from 3-52 logging 4-4
receiving data from 3-53 POSTLINK, messages B-4
restrictions 3-52 recovery from 4-1
waiting for received data 3-53 setting error level value files 15-38
dump system storage 15-18, 16-35 store controller 4-5
system 4-5
terminal 4-5
E event completion, waiting for 16-46
EBCDIC to ASCII, converting 15-25, 16-38 event logging, ADXERROR 15-29
ECHO option 9-9 example of 4680 BASIC program 5-8
emphasized printing 3-70 example of a command file 11-3
emulator messages 17-6 example of C/2 C-language program 5-5
emulator report, optional 17-3 example of DOS C-language program 5-7
Index X-29
files (continued) functions (continued)
selecting file types 2-2 storage retention 4-10
sequential 2-5 terminal dump preservation 15-25
sharing 2-21
space allocation for 2-19
system logical names 2-12 G
using logical names 2-11 general file services 16-14, 16-22
write a record 16-20 generating tone 3-96
write with hold 16-20 get all active controllers on network 15-26, 16-39
filetype for overlays (OVRs) 9-10 get controller machine model and type 16-40
filing a report using Input Sequence Table utility 7-2 get loop message 15-26, 16-38
FISDATA 3-86 get loop status 15-26, 16-39
font change programming example 3-71 GETLONG 3-83
font specification 3-71 getting
formatting data for check printing, model 1 or 2 application status 16-36
printer 3-63 application status information 15-19
free space, disk 15-24, 16-37 configured controllers 16-37
freeing storage 16-45 configured controllers on the network 15-24
front or top loaded documents 3-72 controller ID 16-37
function code controller ID for a specified terminal 15-25
defined 3-33 controller ID for a terminal 15-25
information 3-35 disk free space 15-24, 16-37
functions file pointer 16-23
ADX_CFILES 16-24 storage 16-44
ADXEXIT 15-38 group ID 2-23
ADXFILES 15-34 GROUP parameters 9-6
ADXPSTAR 15-7 guidance lights
ADXSTART 15-6 setting on shopper display 3-11
ASCII to EBCDIC, converting 15-25, 16-38 guidelines for assembly language applications 16-48
deleting 16-4 guidelines for writing non-4680 BASIC programs 16-2
disable controller programmable power 15-23
displaying application status 15-23
displaying background application status 15-24
H
hardware errors
EBCDIC to ASCII, converting 15-25, 16-38
store controller 4-5
enable controller programmable power 15-23
terminal 4-5
ERR 4-4
heap 16-44, 16-45
ERRF% 4-4
heap data 15-4
ERRL 4-4
HEX to ASCII, converting 16-48
ERRN 4-4
HOLD option 2-27, 16-13
getting configured controllers on the network 15-24
home block 6-18
getting controller ID for a terminal 15-25
home sensors, printer 3-77
getting disk free space 15-24
HQ command (hold queue) 10-4
HEX to ASCII, converting 16-48
power off a local machine (controller or
terminal) 15-23
power off a remote controller 15-22
I
I/O device errors 4-13
power off a remote terminal 15-22 I/O options
PRSxCRT 15-13 $M 8-6
PRSxINT 15-14 $O 8-6
PRSxWRT 15-14 $X 8-6
query preservation flag 16-38 I/O processor
reset preservation flag 16-38 accessing 3-40
set preservation flag 16-38 allowing operator input 3-41
set terminal sleep mode inactive timeout 15-27, characteristics of 3-31
16-40 determining status of 3-42
stop application with message 15-24
Index X-31
LAN system (continued) liquid crystal display
creating files on 2-19 listing
displaying logical names table 2-14 directories of terminal applications 15-32
distribution exception log 4-9 files on disk 15-3
filenames on 2-7 files using ADXDIR 15-39
input sequence table on 7-2 files using cross-reference map 8-5
logical file names on 2-13 files using library module map 8-5
logical file names table 2-13 library files, LIB86 8-5
language translators 9-2 listing directories RAM disk file from 15-32
large memory model, defined 15-3 loading
left home command 3-77 a module 9-6
LIB86 a module header 9-6
appending an existing library 8-3 local area network (LAN)
creating a library file 8-3 application read restrictions 5-1
error messages B-1 erasing spool file on 5-3
input filetype 8-1 forcing spool file erasure 5-3
LIB86 8-5 spool files on 5-2
listing files 8-5 user application considerations 5-1
using 8-1, 9-2 using D drive for spool file 5-3
LIB86 options using TCLOSE on 5-1
abbreviations for 8-2 using the audible alarm function on 4-7
accessing files in other directories 8-6 WRITE MATRIX spooling 5-2
command-line options 8-2 local file, using 16-10, 16-16, 16-24
DELETE 8-4 local symbols 9-7
EXTERNALS 8-5 LOCALS options 9-7
MAP 8-5 LOCK 16-21
MODULES 8-5 locking a record 16-21
NOALPHA 8-5 logging
PUBLICS 8-5 application events 15-29
SEGMENTS 8-5 distribution errors 2-18
libraries, 4694/4683/4684/4680/4690 ix distribution exception 4-9
libraries, searching 9-11 errors 4-4, 16-42
library utility system errors 4-4
See LIB86 logical file names
LIBSYMS option 9-6 application 2-12
LIN file options 9-7 CHAIN 2-17
LINES option 9-7 defining user 2-12
link path variables 9-11 on LAN system 2-13
LINK86 system 2-12
command line 9-13 user 2-12
command options 9-4 logical names
command-file options 9-5 defining 2-12
error codes B-14 using 2-11
error messages B-8 logical names table
how to invoke 9-3 building 2-14
input option 9-9 changing 2-14
L86 file options 9-8 displaying 2-14
LIN file options 9-7 logical node name 2-18
linking with shared runtime libraries 9-4 logo printing, model 1 or 2 printer 3-65
MAP file options 9-7 logo printing, model 3 or 4 printer 3-78
output option 9-9 loop
SYM file options 9-6 get message 15-26, 16-38
linkage editor 9-2 get status 15-26, 16-39
linker utility status application utility 12-1
See LINK86 LQ command (print spooler) 10-4
Index X-33
open keyed file 16-11 performing file functions, creating files 2-18
open serial statement, opening port 3-90 permanent background applications 15-2
operating system pipe
C interface 16-2 access to 16-5
COBOL interface 16-2 conditional write 15-15
environment 1-1, 15-1 creating 16-16
protected-mode 15-1 definition of 15-11
operating system, protected-mode 15-1 deleting files or pipes 16-22
operator authorization 16-32 management 16-5
operator display message size 15-14
operator input, I/O processor 3-40 non-POS, creating 16-7
operator interactive applications 15-2 PRS, conditional write to 16-30
operator interface, system 1-2 PRS, creating 16-28
operator record PRS, read 16-28
adding to authorization file 15-9 PRS, write to 16-30
changing password 15-9 read a record 16-19
deleting from authorization file 15-9 routing services 15-12, 16-28
option types of messages used with 15-13
$ option 9-9 using 15-11
$C (command) option 9-10 PJ command (print spooler) 10-3
$D (debug) option 9-10 PLD data integrity 2-27
$L (library) option 9-10 PLD protection, when writing 2-27
$M (map) option 9-10 PLD recovery
$N (line number) option 9-10 enable/disable IPL 15-28
$O (object) option 9-11 recovery 4-9
$S (symbol) option 9-11 store controller 4-9
DBINFO option 9-11 terminal 4-9
optional emulator report 17-3 positioning the print head 3-75
options for LIB86, command-line 8-2 POSTLINK error messages B-4
output option 9-9 POSTLINK utility
overlay description of 9-15
(OVR) file 9-2 ERRORLEVEL test 9-15
chaining to 15-30 invoking the utility 9-15
command line syntax 9-13 power
nesting 9-13 disable controller programmable power 15-23
OVR (overlay filetype) 9-10 enable controller programmable power 15-23
OVR (overlays) file 9-2 power off a local machine (controller or
terminal) 15-23
power off a remote controller 15-22
P power off a remote terminal 15-22
parameters predefined subdirectory A-3
ADXCSW0L 11-4 preparing to receive data from the magnetic stripe
BACKGRND 15-3 reader 3-52
GROUP 9-6 primary applications 15-2
parsing routines for model 3 or 4 printer driver 3-81 print spooler 10-1
partial close 16-11, 16-18 print spooler commands
password AJ 10-4
authorization of 16-32 AQ 10-4
changing in operator record 15-9 CJ 10-4, 10-5
definition of 16-33 HJ 10-4
encryption 15-11, 16-34 HQ 10-4
ID 15-8 LJ 10-4
performance PJ 10-3
design considerations for files 2-28 RJ 10-5
file 2-28 TJ 10-4, 10-5
keyed files 2-28
Index X-35
publications, related ix renaming
PUBLICS option, LIB86 8-5 files 2-23, 16-22
PUTLONG 3-84 library files 8-3
PWIN$ parameter for password encryption 15-11 table using input sequence table utility 7-3
PWOUT$ parameter for password encryption 15-11 REPLACE option 8-4
replacing library modules 8-4
reporting keyed file statistics 6-4
Q requesting an application service 15-17
query terminal dump preservation flag 16-38 reset terminal dump preservation flag 16-38
restrictions for assembly language applications 16-48
restrictions for writing non-4680 BASIC programs 16-2
R RESUME 4-3
RAM disk files
RESUME label 4-4
accessing from controller applications 15-31
RESUME RETRY 4-4
accessing from terminal applications 15-32
retention, storage 4-10
copying from terminal applications 15-32
return codes 16-2
in-memory 15-31
reversible document station motor 3-76
listing directories of terminal applications 15-32
root module 9-14
RAM disks
routing services, pipes 15-12, 16-28
configuration considerations 15-31
running input sequence table on LAN system 7-2
copying files from controller applications 15-32
runtime library 15-12
random file access 16-5
random files 2-2
RCP command 13-3 S
reactivating configured file server 5-3 scale driver
read accessing 3-87
attributes from the video display 3-19 characteristics of 3-87
characters from a 2x20 display 3-8 example of code for 3-87
characters from the shopper display 3-11 programming tips for 3-87
characters from the video display 3-19 receiving data 3-87
commands scanner driver
GETLONG 3-83 example of code for 3-44
PUTLONG 3-84 SEARCH option 9-8
file record 16-19 search priorities 9-12
keyed record 16-12 searching libraries 9-11
nondestructive 16-6, 16-19 secondary applications 15-2
pipe record 16-19 section, DATA 9-5
PRS pipe 16-28 security 15-1, 16-32
READ MATRIX 2-25 security for files and subdirectories,
reading totals retention driver data in direct mode 3-99 enable/disable 2-25
receive paper cutter seek file pointer 16-23
control characters 3-76 segment name symbols 8-5
example 3-77 SEGMENT parameters 9-6
receiving data from the I/O processor 3-40 SEGMENTS option, LIB86 8-5
receiving data from the serial I/O communications selecting file types 2-2
driver 3-90 selecting modules from library file 8-5
record, unlocking a 16-21 semaphore 16-6
recovering from errors 4-1 sequential access 16-5
recovery from PLD sequential files
enable/disable IPL 15-28 description of 2-5
on store controller 4-9 example of 2-6
on terminal 4-9 open 2-5
reinserting documents for printing 3-75 using file pointers 16-5
related publications ix write record to 2-5
removing and replacing a document 3-73 serial I/O communications driver
accessing 3-90
Index X-37
store controller (continued) system operator authorization file (continued)
system messages at the 4-5 subdirectory where found 15-8
store controller application services 15-33 system storage dump 15-18, 16-35
store controller services 15-17
store controller-unique application services 15-39
store system libraries ix T
string, FISDATA 3-86 table, erasing using the input sequence table utility 7-2
subdirectory table, logical names
enable/disable security 2-25 building 2-13
naming 2-8 changing 2-13
predefined A-3 displaying 2-13
protecting 2-24 TCLOSE 5-1
protecting IBM-provided A-1 temporary background applications 15-2
subroutine terminal
ADXCOPYF 15-32 disable IPL 15-29
ADXDIR 15-39 enable IPL 15-28
suspended processing 16-46 errors 4-5
SYM (Symbol File) options 9-6 getting controller ID for 15-25
SYM (Symbol Table) file 9-2 power OFF 4-10
Symbol File (SYM) options 9-6 power OFF for Mod1 4-10
Symbol Table (SYM) file 9-2 power OFF for Mod2 4-10
symbols power ON 4-10
external name 8-5 power ON for Mod1 4-10
public 8-1 power ON for Mod2 4-10
public name 8-5 set terminal sleep mode inactive timeout
segment name 8-5 function 15-27, 16-40
unresolved 9-2 system messages at the 4-6
synchronization and exclusion 16-6 terminal application
system accessing RAM disk files from 15-32
authorization 15-8 chaining 15-31
capabilities 1-1 distributed files in 2-14
errors 4-5 WRITE MATRIX record size for 5-4
messages 4-5 terminal application services 15-17, 15-39
messages at the store controller 4-5 terminal C applications 16-2
system authorization, interface to 15-8 terminal default data size 15-4
system capabilities terminal dump preservation function 15-25
backup 1-4 terminal models
communications 1-2 4683-xx1 ix
concurrent operations 1-1 4683-xx2 ix
file handling 1-3 4684 ix
operator interface 1-2 4693-xx1 ix
problem determination aids 1-3 4693-xx2 ix
special facilities 1-3 Mod1 ix
system error log 4-4 Mod2 ix
system input devices terminal PLD recovery 4-9
description of 3-32 Terminal Services program 4-6
system logical file names 2-12 terminal storage retention
system messages at the 4683-xx1 4-10
at the store controller 4-5 at the 4683-xx2 4-10
at the terminal 4-6 disable function 15-19
audible alarm 4-6 enable function 15-18
explanation 4-5 test, ERRORLEVEL 9-12, 9-15
severity codes 4-6 three-track MSR
system operator authorization file accessing 3-52
definition of 15-8 characteristics 3-49
protection on 15-8 common data characteristics 3-53
Index X-39
waiting for (continued)
data from the serial I/O communications driver 3-91
for event completion 16-46
warning, check printing 3-64
when code size exceeds available memory 15-3
where to find more information ix
windowing 15-2
windows 15-2
write
attributes to video display 3-18
characters only to video display 3-18
characters to a 2x20 display 3-7
characters to the shopper display 3-10
characters with current character attribute to video
display 3-17
file records 16-20
non-4680 BASIC programs 16-2
pipe records 16-20
totals retention driver data in direct mode 3-99
write keyed record 16-13
WRITE MATRIX spooling 5-2
write to PRS pipe 16-30
write with hold 2-27, 16-20
X
XOR rotation hashing algorithm 6-14
SC30-3602-02