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.
Contents
Notices . . . . . . . . . . . . . . . . . . . . . . . .
Trademarks . . . . . . . . . . . . . . . . . . . . . .
Preface
. . . . . . . . . . . . . . . . . . . . . . . .
Who Should Read This Book . . . . . . . . . . . .
How to Use This Book . . . . . . . . . . . . . . . .
Terminal Models . . . . . . . . . . . . . . . . . . .
Where to Find More Information . . . . . . . . . .
Store System Related Publications Software
Store System Related Publications Hardware
General Publications . . . . . . . . . . . . . . .
Summary of Changes . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
vii
vii
viii
viii
viii
ix
ix
ix
x
xii
xiii
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-1
1-1
1-1
1-2
1-2
1-2
1-3
1-3
1-3
1-4
1-4
2-1
2-2
2-7
2-8
2-11
2-13
2-14
2-17
2-17
2-18
2-18
2-28
3-1
3-6
3-10
3-12
3-27
3-29
3-31
3-48
3-60
3-67
iii
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
3-79
3-82
3-87
3-89
3-96
3-98
4-1
4-1
4-2
4-4
4-6
4-9
4-9
4-10
4-10
4-10
4-13
5-1
5-1
5-1
5-2
5-3
5-4
5-4
5-6
Part 2: Utilities
Chapter 6. Using the Keyed File Utility
Accessing the Keyed File Utility . . . . .
Using the Keyed File Utility from the Host
Using the Keyed File Utility in a Batch File
Keyed File Utility Working Files . . . . . .
Hashing Algorithms . . . . . . . . . . . . .
Internal Processes of Keyed Files . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
iv
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6-1
6-2
6-2
6-4
6-10
6-10
6-12
7-1
7-1
7-1
7-2
7-2
8-1
8-2
8-3
8-3
8-4
8-4
8-5
8-5
8-6
|
|
|
|
|
|
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
9-1
9-2
9-3
9-4
9-4
9-11
9-12
9-12
9-12
9-15
10-1
10-1
10-2
10-3
10-5
11-1
11-1
11-1
11-3
11-4
11-4
11-7
11-8
11-8
. . . . . . . . . . . . . . . . . . . . . . . .
12-1
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
13-1
13-1
13-2
13-3
13-7
13-8
13-10
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
14-1
14-2
14-3
14-4
14-4
14-5
14-5
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
15-1
15-2
15-3
15-5
15-6
15-8
Contents
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15-11
15-17
15-30
15-31
16-1
16-2
16-48
17-1
17-1
17-2
17-3
17-3
17-3
17-4
17-6
17-6
Appendixes
Appendix A. IBM 4690 Operating System Disk Directory
Protecting the IBM 4690-Provided Subdirectories . . . . . .
Naming Conventions for 4690 Operating System Files . . .
Dictionary of 4690 Operating System Files . . . . . . . . . .
Appendix B. Error Messages
LIB86 Error Messages . . . . .
POSTLINK Error Messages . .
LINK86 Error Messages . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
vi
A-1
A-1
A-2
A-3
B-1
B-1
B-4
B-8
. . . . . . . . . . . . . . . . . . . . .
C-1
C-1
C-2
C-3
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
X-1
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
X-23
Notices
References in this publication to IBM products, programs, or services do not imply that IBM intends to
make these available in all countries in which IBM operates. Any reference to an IBM product, program,
or service in this publication is not intended to state or imply that only IBMs product, program, or service
may be used. Any functionally equivalent product, program, or service that does not infringe any of IBMs
intellectual property rights may be used instead of the IBM product, program, or service. Evaluation and
verification of operation in conjunction with other products, programs, or services, except those expressly
designated by IBM, are the users responsibility.
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:
AS/400
Display Manager
NetView
Personal System/2
System/370
XT
C/2
IBM
Operating System/2
PS/2
Systems Application Architecture
COBOL/2
Micro Channel
OS/2
SAA
AIX
Other company, product, and service names, which may be denoted by a double asterisk (**), may be
trademarks or service marks of others.
vii
Preface
This book describes how to program the IBM 4690 Operating System and the interfaces for application
programs.
viii
Appendixes
Appendix A describes the 4690 Operating System hierarchical directory structure. This appendix
includes information on naming conventions for 4690 Operating System files.
Appendix B provides error messages for the Library, Postlink, and Linker utilities.
Appendix C describes character sets and the check printing application.
The glossary defines new, unique, and unfamiliar terms and abbreviations used in this book.
The index provides a quick reference to the contents of the book.
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.
Table 0-1. Mod1 and Mod2 Terminals by Machine Type
4683 Terminals
4693 Terminals
4694 Terminals
Mod1
Mod2
Mod1
Mod2
Mod1
Mod2
|
|
|
|
|
|
4683-P11
4683-P21
4683-P41
4683-001
4683-A01
4683-421
4683-xx2
4683-xx2
4683-xx2
4683-xx2
4683-xx2
4683-xx2
4693-7x1
4693-5x1
4693-4x1
4693-3x1
4693-xx2
4693-xx2
4693-xx2
Not supported
4694-144
Not supported
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.
ix
IBM
IBM
IBM
IBM
IBM
IBM
IBM
IBM
IBM
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 Administrators 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)
xii
Summary of Changes
The following information has been added or modified in this edition of the manual:
4694
Fiscal Printers
Notices
xiii
xiv
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-1
1-1
1-2
1-2
1-2
1-3
1-3
1-3
1-4
1-4
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 systems 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: Users 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.
1-1
Operator Interface
For some system functions (for example, configuration) you communicate with the system through a
menu-driven interface at the store controller console. For other functions (for example, copying files) you
enter commands directly into the system. You can attach auxiliary consoles to the store controller. For
information on how to use system functions and auxiliary consoles, refer to the IBM 4690 Store System:
Users Guide.
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: Users Guide.
1-2
Files
This list briefly describes file security, file types, and file structures:
The operating system provides protection for your files by limiting access to only authorized users. To
control file access, you assign each user to one of three categories. See Protecting Files on
page 2-23 for a description of these categories and their uses.
You can specify and manage the way disk files are shared with other users. See Sharing Files on
page 2-21 for information on allowing file access.
You can create and manage keyed files and other files. A utility allows you to change keyed files into
direct files or direct files into keyed files. See Keyed on page 2-4 for information about keyed files
and how to change these files into direct files, or direct files into keyed files. Creating Files on
page 2-19 explains how files are created on the system.
The system uses a hierarchical file structure similar to the IBM Personal Computer Disk Operating
System (IBM DOS).
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: Users 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: Users 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: Users Guide
for information on the text editing facility.
1-3
Additional Products
The following list contains information about other products related to the IBM 4690 Operating System:
The IBM 4690 Operating System supports an optional high-level debugging aid called the IBM 4680
Application Debugger. It is available by RPQ P85154.
The IBM 4690 Operating System includes a Display Manager program that allows you to create,
modify, or manage information displayed on the store controller screen. Refer to the IBM 4680 Store
System: Display Manager Users Guide for information about this program.
1-4
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
2-2
2-2
2-3
2-4
2-5
2-7
2-8
2-11
2-12
2-12
2-12
2-12
2-13
2-13
2-14
2-14
2-14
2-14
2-15
2-16
2-16
2-17
2-17
2-18
2-18
2-18
2-19
2-19
2-19
2-20
2-20
2-21
2-21
2-23
2-23
2-23
2-24
2-25
2-25
2-26
2-27
2-27
2-27
2-28
2-28
This chapter shows you how to handle files. It gives you information about file types and describes how to
manage your files and subdirectories.
2-1
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.
FILE.1
RECORD 1
RECORD 2
CR/LF
RECORD 3
111,222,3.3,444,5.5
CR/LF
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
WRITE
WRITE
WRITE
CLOSE
END
2-2
"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
#2,1; A$, B$, C$
#2,2; D$, E$, F$
#2,3; G%, H%, I, J%, K
2
The following program reads the first three fields from record 3 in FILE.1.
IF END #20 THEN 200
OPEN "FILE.1" RECL 40 AS 20
READ #20,3; FIELD1%, FIELD2%, FIELD3
PRINT FIELD1%, FIELD2%, FIELD3
200 END
The preceding program results in the following output.
111
222
3.3
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,
INTEGER*2
REAL C
D
B
CREATE
"DIRECT.DAT" DIRECT
A = "ABC"
B = 32767
C = 27.35
D = "C3, I2, R"
WRITE FORM D; #3,1; A,B,C
RECL 15
AS 3
LOCKED
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
ABC
32767
27.35
2-3
Keyed
Keyed files are composed of fixed-length records that are accessed by using a key, which can be any
combination of characters that can be used in an IBM 4680 BASIC string.
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:
Relative Byte
Offset (in Decimal)
Number of Bytes
(in Decimal)
Keyed File
Information
42
46
48
Randomizing divisor
54
Key length
56
Chaining threshold
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
key1
ABC 32767
2-4
27.35
The following program creates the 19-byte keyed file shown in the Figure 2-3 on page 2-4. The keyed
file consists of one 19-byte record.
STRING A,
INTEGER B
REAL C
D,
KEY
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
2-5
and a terminating CR/LF). The other writes fill the remainder of the fields in increments of 512 or fewer
bytes. The entire record is locked until all of the writes are finished. The record is unlocked if the
connection between the store controller and the terminal is lost. The system writes a WRITE MATRIX
record this way to keep an application from reading the record until it is complete. It also allows an
application to determine whether the record has been completed or not. Records placed in a sequential
file by WRITE MATRIX are not guaranteed to be in the sequence in which they occur.
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.
FILE.2
RECORD 1
RECORD 2
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
WRITE
WRITE
WRITE
CLOSE
END
"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
#2; A$, B$, C$
#2; D$, E$, F$
#2; G%, H%, I, J%, K
2
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.
2-6
The following program reads the fields in FILE.2 sequentially and prints them on the display device, one
field for each line.
IF END #19 THEN 100
OPEN "FILE.2" AS 19
FOR I% = 1 TO 11
READ #19; FIELDS$
PRINT FIELDS$
NEXT I%
100 END
The data type should match the variable type on a field-by-field basis.
The preceding program results in the following output:
FIELD
FIELD
FIELD
Field
Field
ONE
TWO
THREE
1
2
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.
Chapter 2. Managing Files
2-7
filename
The actual name of the file. The file name can contain one to eight characters.
extension
The extension of the file name. You use the extension as an additional set of characters
to uniquely define a file. The extension can contain one to three characters and is
separated by a period from the file name.
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.
11. All 4690 files are found in directories. Some files are placed in the root directory, but most are located
in subdirectories that are one level below the root directory.
2-8
12. 4690 Operating System subdirectory names have the following general form:
ADX_yzzz
Where:
=
=
=
=
IBM applications
Operating system
Store Systems Regression Tester
User
File Name
Extension
ADX_IPGM
ADX_IMNT
ADX_IBUL
Must be 8 characters.
First 3 characters must be the same as
defined in configuration and cannot be
ADX.
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.
First 3 characters must be the same as
the files in ADX_IPGM.
Other 5 characters can be any of the
valid name characters.
Should be DAT.
Exception might be files that are only
referred to by the application and HCP using
logical file name (LFN).
ADX_IDT4
Must be 8 characters.
First 3 characters must be the same as
the files in ADX_IPGM.
Other 5 characters can be any of the
valid name characters.
Should be DAT.
Exception might be files that are only
referred to by the application and HCP using
LFN.
2-9
Table 2-1 (Page 2 of 2). Naming Files on the IBM 4690 Operating System
Subdirectory
File Name
Extension
ADX_SPGM
ADX_SMNT
ADX_SBUL
ADX_SDT1
ADX_UPGM
ADX_UMNT
ADX_UBUL
See note below.
Must be 4 characters.
ADX_UDT1
See note below.
Must be 4 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.
Table 2-2 (Page 1 of 2). File Use Table
File Name
Character
Extension
A86
BAS
C source code
DAT
E
F
G
H
J86
L86
Library files
286
4690-executable file
MAP
MF
DAT
INP
OBJ
LST
LIS
LIN
2-10
Extension
DAT
SYM
BSX
Symbols file
OVR
SRL
XRF
Cross-reference file
SYS
BAT
Batch files
For example, the LOAD ALL TERMINALS function uses these files:
ADXCS20L.286
ADXCS3AS.DAT
ADXCS3MF.DAT
Example of a Name
Using This Type
LDSN
LDSN:filename.extension
ADX_IDT1:EALABCDE.DAT
LFN
LFN
C:\ADX_IDT1\EALPQRST
The operating system provides LDSN forms of logical names for all of the supported subdirectories.
Table 2-4 lists the LDSNs.
Table 2-4 (Page 1 of 2). System-Provided LDSN Format
LDSN
ADX_SPGM:
C:\ADX_SPGM\
ADX_SMNT:
C:\ADX_SMNT\
ADX_SBUL:
C:\ADX_SBUL\
ADX_SDT1:
C:\ADX_SDT1\
ADX_IPGM:
C:\ADX_IPGM\
ADX_IMNT:
C:\ADX_IMNT\
ADX_IBUL:
C:\ADX_IBUL\
ADX_IDT1:
C:\ADX_IDT1\
ADX_IDT4:
C:\ADX_IDT4\
2-11
ADX_UPGM:
C:\ADX_UPGM\
ADX_UMNT:
C:\ADX_UMNT\
ADX_UBUL:
C:\ADX_UBUL\
ADX_UDT1:
C:\ADX_UDT1\
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.
2-12
2-13
These application files can be unique for each store controller so the logical names table can also be
unique for each store controller. The files used in the building of the logical names table are:
ADXDAxyF.DAT
ADXDCxyF.DAT
ADXDExyF.DAT
Operating system logical names file (initially the system default table)
Application logical names file
User logical names file
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.
The operating system uses these steps to create the table:
1. The system starts with the default operating system logical names file.
2. The system adds any new names from the application logical names file.
3. If any of the application logical file names duplicate an operating system logical file name, the
operating system logical file name is overlaid with the application logical file name.
4. The system uses the user logical names file to add new names or overlay existing 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: Users 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.
2-14
Setting up the file on the LAN (MCF Network) and opening the file in the user program is a three-part
process. This process consists of defining the file, creating it, and accessing it through the user program.
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
2
$YFILE = D:\ADX_IDT4\MYFILE.DAT
! Local version
! Prime version
MYFILE = ADXLXxxN::$YFILE
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.
Chapter 2. Managing Files
2-15
9. On the DEFINE LOGICAL FILE NAMES screen, type in the expanded name to define the logical
name for the distributed user file, and press Enter. The sample problem uses
ADXLXAAN::D:\\ADX_IDT4\MYFILE.DAT.
The node name ADXLXAAN:: defines this file to be on the master store controller. The D:\\ defines it
on drive D and the double backslash ensures that drive D is accessed while operating in any
subdirectory. The remaining portion of the node name, ADX_IDT4\MYFILE.DAT, is the standard
subdirectory/filename.extension naming convention.
10. Press F3 to go back through the configuration screens until you return to the CONTROLLER
CONFIGURATION screen. On this screen, select another controller node ID.
11. Repeat steps 5 through 10 until you have defined the user logical name MYFILE on all store
controllers on your network.
12. Press F3 again to back out of the configuration process until you get to the CONFIGURATION screen.
On this screen, type 5, and press Enter.
13. On the next screen, type 2 (Controller Configurations) and press Enter to activate the changes just
made.
14. After you have verified, distributed, and activated the changes, you must IPL the controllers. To do
this, press the SysRq key, then type C to select controller functions. On the next screen, type 2
(Controller functions) again and press Enter. On the next screen, type 9 (Load Controller Storage)
and press Enter.
In the highlighted box that appears, type an asterisk (*) to IPL all store controllers. Answer Y to the
prompt about stopping background programs.
If you do not want background programs stopped now, press F3 to process, and wait until all
background processing is finished before continuing. Before the next steps can be completed, the
controllers must be IPLed. You can choose the time to do that.
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:
Users 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:
Users 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.
2-16
You can open the local file only for READ, because an application cannot update an image version of a
file. If you create the file with a file attribute of distribute at close, the application cannot open $YFILE
because an application cannot read a file with the distribute at close attribute.
LFN
LDSN:filename.extension
drivename:\subdirectory\...\filename.extension
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
2-17
You can access files using either the unique node name or the logical node name.
2-18
Creating Files
You can create files using either the text editor or IBM 4680 BASIC statements. For information on
creating files with the text editor, refer to the IBM 4690 Store System: Users Guide.
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: Users 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.
2-19
Deleting Files
IBM 4680 BASIC provides a DELETE statement for deleting a file from the disk. To delete a file, the
application must have the file open and have DELETE access rights for the file. To ensure that the file is
deleted, the file must not be opened by another application. You can ensure that your application is the
only user by opening the file as LOCKED. See Sharing Files on page 2-21 for information on the
LOCKED option.
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 files 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
2-20
file write. If you open the sequential file as other than LOCKED, then IBM 4680 BASIC runtime library
requests a file write for each application WRITE statement.
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.
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.
2-21
The following list describes the sharing values and their meaning:
Option
Description
LOCKED
Requests access to this file as the only application to use this file. The request is not
allowed if another application has this file open. If the request is allowed, no other
application can open this file for any kind of access.
READONLY
Requests access to this file that allows all other applications to have only READ access to
this file.
The request is not allowed:
If another application has this file open as LOCKED
If another application has this file open as READONLY or UNLOCKED and has
WRITE access
If this request is allowed, another application cannot open this file as:
LOCKED
READONLY and request WRITE access
UNLOCKED and request WRITE access
UNLOCKED
Requests access to this file, which allows all other applications to have both READ and
WRITE access to this file. This is the least restrictive access type and you should use this
type whenever possible.
The request is not allowed:
If another application has this file open as LOCKED
If another application has this file open as READONLY and this request specifies
WRITE access
If this request is allowed, another application cannot open this file as:
LOCKED
READONLY if this request specified WRITE access
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.
2-22
An application is not allowed to lock more than five records for each keyed file at the same time.
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.
2-23
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.
2-24
The access rights for a subdirectory have a different meaning than they do for a file:
Access Right
Description
READ
Allows the use of SIZE and DIR commands for files in the subdirectory
WRITE
Allows the use of CREATE, DELETE, and RENAME commands for files in the
subdirectory
EXECUTE
DELETE
Allows the use of the FSET command in Command Mode for files in the subdirectory
The access rights and restrictions described for subdirectories do not apply to the root directory.
2-25
The reads of a sequential file normally 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 so
that you can use it to reread from that position in the file. You use the POINT statement to re-establish
the saved relative position. You cannot issue a WRITE# statement after a POINT.
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.
2-26
You can write keyed and direct file records only with the WRITE FORM# statement. The format string
items are necessary because there are no field or record delimiters recorded with the data.
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
Chapter 2. Managing Files
2-27
page 2-21 to prevent deadlocks. It should also minimize the time that records are being locked when
using the HOLD function.
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.
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.
2-28
When the system is writing or reading a record from a keyed file, it processes the record to find out to
which block in the file the record belongs. The system should need to access the file only once to find
the correct record. If many overflow chains are present, the system might need more than one read
from the file. By ensuring that the records are evenly distributed throughout a keyed file, you can
reduce the number of disk accesses needed to get to a particular record.
Keyed file performance improves when the file is placed on the disk in 10 or fewer contiguous
extensions. Use the CHKDSK command to determine the number of contiguous extensions of a file.
Refer to the IBM 4690 Store System: Users Guide for information on the CHKDSK command.
2-29
2-30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
3-6
3-6
3-6
3-7
3-7
3-7
3-7
3-7
3-7
3-8
3-8
3-8
3-9
3-10
3-10
3-10
3-10
3-10
3-10
3-11
3-11
3-11
3-11
3-11
3-12
3-13
3-13
3-14
3-15
3-16
3-16
3-16
3-16
3-17
3-17
3-17
3-18
3-18
3-18
3-18
3-18
3-19
3-19
3-19
3-20
3-24
3-25
3-25
3-26
3-27
3-1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Functions Your Application Performs . . . . . . . . . . . . . . . . . . . . . .
Accessing the Cash Drawer or Alarm
. . . . . . . . . . . . . . . . . . . . .
Controlling a Cash Drawer or Alarm . . . . . . . . . . . . . . . . . . . . . .
Obtaining Cash Drawer or Alarm Status . . . . . . . . . . . . . . . . . . . .
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Coin Dispenser Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Accessing the Coin Dispenser . . . . . . . . . . . . . . . . . . . . . . . . . .
Dispensing Coins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
I/O Processor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Input Devices on Your System
. . . . . . . . . . . . . . . . . . . . . . . . .
I/O Processor Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Input Sequence Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Definitions and Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . .
Input State Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Label Format Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Modulo Check Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Functions Your Application Performs . . . . . . . . . . . . . . . . . . . . . .
Loading the Input Sequence Tables . . . . . . . . . . . . . . . . . . . . .
Accessing the I/O Processor . . . . . . . . . . . . . . . . . . . . . . . . .
Preparing to Receive Data from the I/O Processor . . . . . . . . . . . .
Overview of Operator Input Flow . . . . . . . . . . . . . . . . . . . . . . .
Waiting for Received Data . . . . . . . . . . . . . . . . . . . . . . . . . .
Receiving Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Allowing and Disallowing Operator Input . . . . . . . . . . . . . . . . . .
Determining Status of the I/O Processor . . . . . . . . . . . . . . . . . .
Preloading Input Sequence Data . . . . . . . . . . . . . . . . . . . . . . .
Non-Full-Screen Example . . . . . . . . . . . . . . . . . . . . . . . . . . .
Additional I/O Processor Features
. . . . . . . . . . . . . . . . . . . . . . .
Data Editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Customization of Message Display ( Enhanced Full-Screen mode only )
Large Input Sequences (Enhanced Full-Screen mode only) . . . . . . .
Magnetic Stripe Reader Driver . . . . . . . . . . . . . . . . . . . . . . . . . . .
Characteristics of the Single-Track Magnetic Stripe Reader . . . . . . . . .
Characteristics of the Dual-Track Magnetic Stripe Reader
. . . . . . . . .
Characteristics of the Three-Track Magnetic Stripe Reader . . . . . . . . .
Data Formats and Error Reporting . . . . . . . . . . . . . . . . . . . . . . .
Restrictions of Single- and Multi-Track MSRs . . . . . . . . . . . . . . . . .
Functions Your Application Performs . . . . . . . . . . . . . . . . . . . . . .
Accessing the MSR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Preparing to Receive Data from the MSR . . . . . . . . . . . . . . . . . . .
Waiting for Received Data . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Receiving Data
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Data Characteristics Common to all MSRs . . . . . . . . . . . . . . . . . .
Disallowing MSR Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Determining Status of the MSR . . . . . . . . . . . . . . . . . . . . . . . . .
Integer Format for Single-Track MSR Driver . . . . . . . . . . . . . . . .
Integer Format for Dual-Track MSR Driver . . . . . . . . . . . . . . . . .
Integer Format for Three-Track MSR Driver . . . . . . . . . . . . . . . .
Single-Track MSR Example . . . . . . . . . . . . . . . . . . . . . . . . . . .
Dual-Track MSR Example . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-2
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
3-27
3-27
3-27
3-28
3-28
3-28
3-29
3-29
3-29
3-30
3-30
3-31
3-31
3-32
3-32
3-32
3-33
3-33
3-37
3-37
3-39
3-39
3-40
3-40
3-40
3-40
3-41
3-41
3-42
3-42
3-44
3-45
3-45
3-46
3-48
3-48
3-48
3-49
3-49
3-49
3-52
3-52
3-52
3-52
3-53
3-53
3-53
3-53
3-54
3-54
3-54
3-54
3-55
3-56
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
3-58
3-60
3-60
3-60
3-61
3-61
3-61
3-61
3-62
3-62
3-63
3-64
3-64
3-64
3-64
3-65
3-65
3-65
3-66
3-67
3-67
3-68
3-69
3-69
3-69
3-70
3-70
3-70
3-71
3-71
3-72
3-72
3-72
3-73
3-74
3-75
3-75
3-75
3-76
3-76
3-76
3-76
3-76
3-77
3-77
3-77
3-77
3-78
3-78
3-78
3-79
3-80
3-80
3-80
3-3
|
|
|
|
|
|
|
|
3-4
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
3-80
3-81
3-81
3-82
3-82
3-82
3-83
3-83
3-84
3-85
3-86
3-87
3-87
3-87
3-87
3-87
3-89
3-89
3-89
3-90
3-90
3-91
3-91
3-91
3-92
3-92
3-92
3-93
3-93
3-93
3-96
3-96
3-96
3-96
3-96
3-97
3-98
3-98
3-98
3-98
3-99
3-99
3-99
3-99
3-99
3-99
3-100
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This chapter shows how to program terminal I/O devices. It provides general information as well as
specific information about each device. Each device has a section containing information on:
Device characteristics
How to access the device
How to end access to the device
Specific programming information about the device
A code example for the device to perform a basic task, such as printing lines
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.
3-5
2x20 Displays
This section describes all the displays that fall into the 2x20 (2 rows x 20 columns) category and provides
guidelines for using these displays.
|
|
|
|
|
Alphanumeric
Operator
40-character Liquid Crystal Display (LCD)
40-character Vacuum Fluorescent Display II (VFD II)
Two-sided VFD II
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
|
|
|
|
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.
|
|
|
|
There are some differences in the character sets for each of the 2x20 displays.
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.
|
|
Your application can perform the following functions with the 2x20 displays:
If the 2x20 display is configured as the system display in the terminal device group for your terminal:
|
|
|
|
|
|
|
3-6
|
|
|
length of these display fields. Your application should be designed to coordinate its display data with
your input sequence table.
Other system functions use the 2x20 display but with a separate display buffer
If the 2x20 display is not configured as the system display, then the only system use of the 2x20 display is
to display progress indicators during IPL.
|
|
Use the CLOSE statement to end your applications use of the display. The CLOSE statement does not
clear the display.
Use the CLEARS statement to clear the display. The CLEARS statement writes a space character to
each character location and sets the current character location to (1,1).
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
3-7
|
|
|
|
|
character. You can redefine any character location except blank. Most of the default characters are
defined using 5 x 9 dots of the 5 x 12 matrix. You can define no more than 36 dots on the matrix for any
given character. The display has a blank space between character locations and between the two rows.
You should consider these blank spaces if you use multiple character locations to produce a graphic
display.
Refer to the 4690 Store System: Planning, Installation and Configuration Guide for more information on
customizing the alphanumeric display character set.
You use the GETLONG function to determine the following information about the 2x20 display:
Whether the driver handling your 2x20 display is the alphanumeric or the operator display
Use the READ statement to read the characters that have been written to your application's display buffer.
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.
|
|
|
An application written for a 2x20 display will run on any other display in the 2x20 family with the following
considerations:
Differences in display character sets
Refer to the IBM 4680 BASIC Language Reference for a description of each of the character sets.
3-8
Example
This example contains code for operating a 2x20 display. The program writes text to each line of the
display and clears the display.
%ENVIRON T
|
|
|
|
|
|
|
|
|
|
|
|
|
|
! 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.
"
3-9
|
|
|
END.PROG:
STOP
END
Shopper Display
This section describes characteristics of the shopper display and provides guidelines for using this display.
Characteristics
|
|
|
Your application can perform the following functions with the shopper display:
|
|
|
|
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 OPEN statement to gain access to the shopper display device driver.
|
|
Use the CLOSE statement to end your applications use of the shopper display driver. The CLOSE
statement does not clear the characters from the shopper display.
|
|
Use the CLEARS statement to clear the display. The CLEARS statement writes a space character to
each of the character locations.
|
|
|
|
The WRITE statement allows you to write to all or part of the shopper display and guidance lights. The
specified number of characters are written right-adjusted to the display, padded on the left with blanks.
Guidance lights data, established by the most recently issued PUTLONG statement, is simultaneously
displayed.
3-10
Shopper Display Character Set: The display character set determines what is displayed on the
display for each character written by your application. The shopper display character set includes the
numerals and a limited number of alphabetic and special characters.
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.
|
|
Use the PUTLONG statement to set up the guidance lights on the shopper display. The guidance lights
are arranged in two columns of three lights each. The six low-order bits of the byte control the guidance
lights. Bit 5 controls the upper-left light, bit 4 controls the middle-left light, bit 3 controls the lower-left light,
bit 2 controls the upper-right light, and so on.
Use the READ statement to read the characters that are specified in your application display buffer.
Use the GETLONG statement to get the current status of the guidance lights from the shopper display.
Example
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%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
|
|
|
3-11
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
! write data
WRITE FORM "C10"; #DISPLAY1;"22,222,222"
WAIT;500
! set pointer data
LIGHTS = 00000004h
PUTLONG DISPLAY1,LIGHTS
! Write data.
WRITE FORM C6"; #DISPLAY1;"333.33"
WAIT;500
! Set pointer data.
LIGHTS = 00000008h
PUTLONG DISPLAY1,LIGHTS
! Write data.
WRITE FORM "C6"; #DISPLAY1;"444.44"
WAIT;500
! Set pointer data.
LIGHTS = 00000010h
PUTLONG DISPLAY1,LIGHTS
! Write data.
WRITE FORM "C8"; #DISPLAY1;"5,555,55"
WAIT;500
! Set pointer data.
LIGHTS = 00000020h
PUTLONG DISPLAY1,LIGHTS
! Write data.
WRITE FORM "C12"; #DISPLAY1;"66.666.66"
! Clear displays.
CLEARS DISPLAY1
CLEARS DISPLAY2
WRITE FORM "C30"; #DISPLAY2;" SHOPPER CLEARED - END TEST "
STOP
ENDPROG:
! Display error messages and perform appropriate recovery
! and resume steps.
STOP
END
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.
|
|
|
3-12
Use ADXSERVE to determine whether your video display is a Feature A or VGA. See ADXSERVE
(Requesting an Application Service) on page 15-17 for more information. See the Example on
page 3-20 for an example of how to use this application service.
Characteristics
The video display has the following characteristics for each of the video display drivers:
|
|
|
|
|
|
The video display can have one of four video display formats.
You configure the default video display format in the Terminal Device Group for your terminal.
The following table shows the 4 video display formats that are available:
|
|
Video Display
Format
Number of
Rows
Number of
Columns
Restrictions
25 x 80
25
80
16 x 60
16
60
12 x 40
12
40
None
6 x 20
20
|
|
|
|
|
3-13
You can select any of eight attribute specifications for every character location on the display:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Reverse Video
Blink
Blank
Intensify
Underline
Red
Blue
Green
Note: If reverse video is selected the foreground color (the character) is black and the color and
intensify bits apply to the background color. If reverse video is not selected then the background color
is black, and the color and intensify bits apply to the foreground color.
Refer to the IBM 4680 BASIC Language Reference
the combinations of color bits and the intensify bit.
You configure this video display as either VDISPLAY or VDISPLAY2 in the Terminal Device Group for
your terminal.
You configure the default video display format in the Terminal Device Group for your terminal.
The following table shows the 4 video display formats that are available:
|
|
Video Display
Format
Number of
Rows
Number of
Columns
Restrictions
25 x 80
25
80
None
|
|
|
|
|
|
16 x 60
16
60
|
|
|
16 x 80
16
80
12 x 40
12
40
None
There are differences between the VGA and Feature A video character sets.
Refer to the IBM 4680 BASIC Language Reference for a description of the available video display
character sets.
|
|
|
A cursor in the form of a blinking line can appear at the bottom of any character location on the video
display.
3-14
Note: See restrictions for the 16x60 video display format in Table 3-2.
|
|
You can use the Feature A attribute or with VGA video extensions you can use the VGA attribute
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.
|
|
|
|
VGA attribute: If using the VGA attribute, the following attribute specifications are provided:
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.
Your application can perform the following functions with the video display:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
3-15
Other system functions use the video display but with a separate video display buffer
If the video display is not configured as the system display, then the only system use of the video display
is to display IPL progress indicators during IPL.
|
|
|
|
Use the OPEN statement to gain access to the video display device driver. OPEN sets the current
character location to row 1, column 1 (1,1).
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 applications use of the video display driver. The CLOSE
statement does not clear the video display.
Use the CLEARS statement to clear the video display. The CLEARS statement writes a space character
with the default attribute (Feature A 0xE0) to each character location and sets the current character
location to (1,1).
|
|
|
|
|
|
|
|
|
|
|
|
|
The video display format sets the size and number of character locations on the video display. For
example, a 12 x 40 video display format defines a video display that has 12 horizontal lines (rows) with 40
characters (columns) in each line.
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.
3-16
|
|
|
|
|
|
|
|
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.
3-17
Character Location Wrapping: If the number of characters or attributes you write is greater than
the number of character locations remaining on the current row of the video display, the characters or
attributes are written on the next row. If the current row is the last row, then the characters or attributes
are written to row 1. The characters or attributes continue to wrap around until all of the characters or
attributes are written.
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.
You use the GETLONG function to determine the following information about the video display:
|
|
|
|
|
|
|
|
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.
An application written for a 2x20 display runs on a video display with the following considerations:
|
|
|
|
|
|
The application must change the OPEN statement to access VDISPLAY or VDISPLAY2
|
|
|
|
|
|
On 2x20 displays wrapping occurs to the next row when 20 character locations are exceeded. On
video displays it is dependent on the current video display format.
For example, a write to the alphanumeric display of 40 characters starting at character location (1,1)
appears as two lines on the alphanumeric display. The same write to the video display appears as
one line.
Display character sets are different
Chapter 3. Programming Terminal I/O Devices
3-19
|
|
|
|
Refer to the IBM 4680 BASIC Language Reference for a description of the display character sets.
GETLONG returns different information
Only the CC (current column) and RR (current row) bytes of the GETLONG are consistent between
the video and 2x20 displays.
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3-20
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
! 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3-21
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
! 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
|
|
3-22
|
|
|
|
|
|
|
ENDIF
|
|
|
|
|
|
|
|
|
!*********************************************************************
! Save the screen for restoring later
!*********************************************************************
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
!*********************************************************************
! Restore the screen
!*********************************************************************
|
|
|
|
! Wait 3 seconds
WAIT; 3000
|
|
"
3-23
|
|
|
|
|
|
|
|
|
|
|
|
|
|
! 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
|
|
|
|
|
|
|
|
|
"
3-24
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
these statements into a single video adapter command. Using this packaging or stacking technique, you
can send a group of application statements to the video adapter with no more overhead than a single
command.
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
3-25
PUTLONG commands used to change the screen attributes. After all of the WRITE statements have been
issued, a final PUTLONG command clears the video buffer, thus sending the data to the screen.
|
|
|
|
|
|
|
|
!
!
!
!
!
!
!
!
%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"
|
|
|
|
|
|
|
|
|
|
|
3-26
|
|
|
|
|
|
|
28
29
30"
!******** 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"
PUTLONG 2, 000000E0H
|
|
CLOSE 2
STOP
|
|
|
|
|
|
|
|
27
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.
3-27
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"
3-28
WAIT;1000
! Get the status.
I4 = GETLONG(1)
!Shift status.
S4 = SHIFT(I4,8)
! Turn off all but status.
STAT% = S4 and 000000FFH
!Return until cash drawer is closed.
IF STAT% <> 0 THEN GOTO DRAWER.OPEN \
ELSE\
! End the execution.
CLEARS 2
WRITE #2; "end of sample"
WAIT;1000
CLOSE 1
CLOSE 2
STOP
ERR.HNDLR:
! Prevent recursion.
ON ERROR GOTO END.PROG
! Determine error type
! and perform appropriate
! recovery and resume steps.
END.PROG:
STOP
END
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.
3-29
Dispensing Coins
To dispense coins, issue a WRITE FORM statement. You can specify the number of monetary units to be
dispensed as a variable or a constant in the WRITE FORM statement. If an error occurs, control passes
to the ON ASYNC ERROR subprogram. Your application should allow the coin dispenser enough time
between writes to complete coin dispensing.
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
3-30
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.
3-31
The I/O processor is a driver that processes operator input according to the input sequence tables. You
must build the input sequence tables according to the requirements of your application. See Chapter 7 for
more information. You must load the input sequence tables into terminal memory before using the I/O
processor.
|
|
|
|
|
|
|
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.
The I/O processor and input sequence tables provide the following general capabilities:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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:
|
|
|
3-32
|
|
|
The input state table is always required to allow operator input from the keyboard, OCR, magnetic wand,
or scanner. The label format table and modulo check table are optional depending on your application
requirements.
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.
|
|
|
Data editing information to use when display-as-keyed is used for numeric data. Display-as-keyed
means the numeric keys appear on the display as they are entered. You can define the thousands
separator character, decimal point character, and the number of decimal digits to use to format the
3-33
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
field on the display after the complete field is entered. Use of display-as-keyed is specified in the
function code information. The position to use on the display is specified in the state information.
A function code (key) to clear a system busy condition and a message to display when a system busy
condition occurs. The system busy condition occurs when all buffers available to hold input
sequences are full and queued to the application. This condition can occur when the operator enters
information faster than the application can process it. If you define a function code to clear a system
busy condition, the operator must press this key before any other operator input is allowed. This is
useful if you want the operator to slow down the input and verify that all items entered were
processed.
Whether a double entry of the Clear key should return the terminal to the state that is defined as the
beginning of the current input sequence. Refer to the information for each state for the specification of
a beginning state.
Tone type and duration to sound for errors based on device source (keyboard, OCR reader, magnetic
wand, and scanner).
Function codes that are valid in all states. You can define a function code to be valid in all states and
also valid in one or more specific states. In this case, the definition of the function code in a specific
state takes precedence when in that state.
If you have an alphanumeric or ANPOS keyboard, a field passed to the application can be a function
code and zero or more numeric digits, or it can be a function code and zero or more alphanumeric
characters.
Double-Quote Substitution character ( Enhanced Full-Screen mode only ). Within an input sequence,
fields are enclosed in double quotes and delimited by commas. Alphanumeric and ANPOS keyboards
have a double-quote character that would conflict with the double-quote used to enclose data passed
from the I/O Processor to the application. To prevent such a conflict a character must be defined to
be used as a substitute for double-quotes within fields. This enables the application and the I/O
Processor to distinguish between the two classes of double-quotes. The substitution is in the input
sequence that is passed to or from the application; it is not apparent to the operator. Substitution
occurs for both the function code and the data within the field. The value selected for the substitution
byte should be different than any function code and any keyable value.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Additional Tab Keys Definition ( Enhanced Full-Screen mode only ) You may define any configurable
key as an additional tab forward or tab backward key. The definition is in effect for all states. This
technique also allows you to define tab keys on keyboards that don't have any tab keys, such as the
50-key keyboard.
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.
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.
3-34
Whether data should display-as-keyed and whether to edit the data (editing information is in the
common information section). Display-as-keyed is defined in both state and function code definitions.
If a function code has not yet been received in a state, the state definition determines the
display-as-keyed properties until a function code is received.
|
|
Whether to support automatic end-of-field in this state. If supported, you can also specify the number
of data keys defined to cause end-of-field and the function code to be associated with this field.
The action to take for function codes entered but not defined in this state.
Whether to allow data to be keyed and assigned to a function code that will be keyed following other
function codes. You can do this one of two ways. You can indicate Data not allowed or Data
follows function code for the function code key that will be pressed following the data. You can also
indicate Assign saved data for the function code to which the data is to be assigned.
|
|
|
|
|
|
|
|
|
Whether or not the state is a full-screen state. A non-full-screen is restricted to the top left 2x20 area
of the display for display-as-keyed data and messages defined in the state table. A full-screen state
does not have this restriction.
Where to display the data on the display, if the state is not a full-screen state. If the state is a
full-screen state, the locations for displaying data are specified in the function code definitions
(display-as-keyed locations) and in the common information section (message locations).
|
|
|
|
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:
|
|
Whether this function code is a motor function code. A motor function code causes the application to
be notified.
Whether to notify the application if an error is detected in the data associated with this function code.
|
|
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.
3-35
|
|
|
|
|
|
|
|
|
The relative variable position in the read buffer of the field occupied by this function code and
associated data. You can allow up to 10 function codes during an input sequence, if Enhanced
Full-Screen mode is not being used, or up to 127 if Enhanced Full-Screen mode is being used. The
relative position defines the order of placement for a function code and its associated data in the input
sequence buffer that will be queued to your application.
Which other positions are mutually exclusive with this function codes relative position in the buffer. If
any of the positions specified are already filled during this input sequence when the function code is
entered, an error is assumed. You also can define the action to take if the mutual exclusive check is
not met.
Whether the managers key must be turned on to enter this function code and the action to take if the
managers key requirement is not met.
|
|
|
|
|
|
|
|
|
Automatic Tab
This option specifies whether the cursor automatically moves to the next field when a field is full of
data. If this option is not selected, the cursor remains in the current field and can be moved
backward for reentry of previously keyed data.
|
|
|
|
An additional option in the function code definitions of full-screen states allows you to flag the field
as an upper-case-only field. For an input field thus defined, the I/O Processor will convert any
lower-case character keyed to upper-case. The data appears as upper-case on the video display
and in the input sequence passed to the application.
|
|
|
|
|
You may specify 3 attributes per input field. They are: The attribute in effect when the input field
is current; the attribute in effect when the input field is non-current and non-empty; and the
attribute in effect when the input field is non-current and empty. The reason for a 2nd non-current
field attribute is to enable highlighting of required fields via the non-current and empty attribute.
|
|
|
|
|
|
|
|
|
|
|
|
|
Note: When a full-screen state is entered, the displays cursor is placed in the position defined for the
states first data-entry field. The other data-entry fields of the state are accessed by the tab
forward and tab backward keys.
The values of function codes assigned to the data-entry fields can be assigned according to the
convenience of the applicationtheir purpose is to identify the field to the application; they are not
necessarily a value assigned to a key position. The non-data-entry function codes of the state (such
as an Enter key) provide a recommended and relatively simple means to control routing previously
entered fields to the application or transfer to another state, although you can define the function
codes assigned to the data-entry fields to accomplish this.
3-36
Label Format Table: The label format table defines the information required to process OCR labels,
|
|
magnetic ticket labels, and bar code labels (UPC, EAN, CODE39, Interleaved Two of Five [ITF]). This
table is divided into information common to all label formats and information about specific label types.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Format identifier
Number of subfields in the format
Length of each subfield (specific or variable)
Function code to assign to each subfield
Format identifier
Number of fields in this format
Length of each field
Function code to be assigned to each field
Whether each field is numeric or alphanumeric
Order in which fields are to be processed
Format identifier
Specific label type (UPC-A, UPC-E, UPC-A+2, UPC-A+5, UPC-E+2, UPC-E+5, UPC-D1, UPC-D2,
UPC-D3, UPC-D4, UPC-D5, EAN-13, EAN-8, EAN-13+2, EAN-13+5, EAN-8+2, EAN-8+5, CODE39,
CODE93, CODE128, ITF)
Number of fields in this format
Length of each field
Function code to assign to each field
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.
3-37
|
|
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.
|
|
|
|
1 2 3 4 5 4
where the last digit (4) is the check digit and the weights are:
4,3,6,6,2,2
and the modulus value is 5, the sum of the products becomes:
(1x4)+(2x3)+(3x6)+(4x6)+(5x2)+(4x2)
= 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.
|
|
|
|
|
|
|
|
1 2 3 4 5 2
where the last digit (2) is the check digit and the weights are:
4,3,6,6,2,2
and the modulus value is 5, the products resulting are:
1x4=4, 2x3=6, 3x6=18, 4x6=24, 5x2=10, 2x2=4
and the sum of the resulting products are:
=4+6+1+8+2+4+1+0+4
=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.
3-38
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 10s 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 units 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.
|
|
|
|
|
4 2 5 0 9 9
|
|
where the first digit (4) is the check digit, and the defined weights are:
+7,-2,2,+3,-6,+4
|
|
|
|
|
|
|
|
|
28
4
10
0
54
36
|
|
|
|
|
|
|
=
=
=
=
=
=
=
=
=
=
=
=
30
4
10
0
49
39
|
|
Then 22 divided by 11 equals 2, which has a zero remainder, and the field passes the modulo check.
An application program can perform the following functions with the I/O processor:
|
|
|
|
|
|
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.
3-39
Accessing the I/O Processor: Use the OPEN statement to gain access to the I/O processor
driver, specifying the parameters for the maximum buffer size and the maximum number of buffers the
driver can use to queue input sequences to the application. The buffer size must be large enough to
contain the largest input sequence that can be generated according to the input state table. See
Receiving Data on page 3-41 for the format of the input sequence data.
|
|
|
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.
3-40
Receiving Data: An input sequence buffer consists of a header field followed by up to 10 function
code/data fields. ASCII quotation marks enclose each field, and ASCII commas separate each field. The
header field is 14 bytes long if the Enhanced Full-Screen functions are not being used or 26 bytes long if
the Enhanced functions are being used. The header field contains the following information:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Note: If you specify the double CLEAR usage in the common information, the state ID that began the
input sequence is the last state specified as one that begins an input sequence for which the application
issued an UNLOCKDEV. Otherwise, the state ID that began the input sequence is the last state for which
the application issued an UNLOCKDEV. Thus, if you specify double CLEAR usage, the application can
issue UNLOCKDEVs (to states that do not begin an input sequence), following its initial UNLOCKDEV for
the sequence, and the state ID for the UNLOCKDEV is preserved.
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.
|
|
|
|
|
|
|
|
|
|
|
|
3-41
|
|
|
The LOCKDEV statement locks the I/O processor. When locked, the I/O processor rejects all keyboard,
reader, and scanner input. If you specify the PURGE parameter on an LOCKDEV statement, all data
queued to your application is discarded. The data is discarded from the currently active queue.
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
|
|
|
|
|
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 Processors recovery of data validation errors.
1.
2.
3.
4.
5.
6.
7.
(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 Processors 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.
3-42
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
WRITE Processing: Input sequences written to the I/O Processor must be of the same form as input
sequences read from the I/O Processor. A write to the I/O Processor always causes the I/O Processor to
lock and any residual data in the input sequence buffer to be cleared.
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$
3-43
Non-Full-Screen Example: The code shown here writes a message to the display, loads an input
sequence table, waits for scanner input, checks the input, and writes it in readable form to the display.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
WAIT;2000
CLEARS DISPLAY
WRITE #DISPLAY;"D=", D$
WAIT;2000
CLEARS DISPLAY
WRITE #DISPLAY; "END OF SAMPLE"
CLOSE DISPLAY, OPERIN
3-44
|
|
|
|
|
|
|
|
|
|
! STOP
ERR.HNDLR:
! Prevent recursion.
ON ERROR GOTO END.PROG
! Determine error type
! and perform appropriate
! recovery and resume steps.
END.PROG:
STOP
END
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 occurthe 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.
3-45
|
|
|
|
|
|
|
|
|
|
|
Insert key
The Insert key is a toggle. Data keys following the Insert key (until it is pressed again) are inserted
into the field at the cursor position, the cursor moves to the right, and data to the right of the cursors
previous position is moved to the right.
If the field is displayed in reverse order of entry, the Insert key has no effectdata to the left of the
cursor is moved to the left as data is inserted at the cursor position.
Delete key
The Delete key causes the data at the cursor position to be deleted. All data to the right of the cursor
is moved to the left to occupy the vacated position. The cursor remains in the same position.
If the field appears in reverse order of entry, data to the left of the cursor is moved to the right to
occupy the vacated position.
Note: The cursor up, cursor down, PgUp, PgDn, Home, and End keys are processed as any other
configurable function keys.
Processor writes data to the display in three general categories: state prompt messages, error messages,
and display-as-keyed data. If the enhanced full-screen support is not selected, this data is always written
to the top left 2x20 area of the video display. If the enhanced full-screen support is selected and the state
definition specifies that the display fields are defined in the function code definitions, the data written by
the I/O Processor may be customized in the following ways:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Location
You specify the row and column of the upper left character of the message area. In the case of a
bordered message, this would be the location of the top left corner character.
Width of display area
You may specify the width of the display area. If a border was specified (see below), this width
includes the 2 positions occupied by the left and right border characters. The specified display width
may be narrower or wider than the actual message. If it is narrower, then the message text is clipped
to the display width (if bordered, it is clipped to within the borders). If the display width is specified as
being wider than the message, then the unwritten area of the display width is written with blanks.
Border
You may specify that a border surrounds the message. You specify the border characters as eight
hex values for the eight parts of the border: top left corner, top, top right corner, left, right, bottom left
corner, bottom, bottom right corner.
Attributes (colors, blink, etc.)
You may specify a hex attribute byte to be used for the message area. This byte must be defined in
the Feature A attribute format of the video driver. See the video section in the 4680 Basic Language
Reference for a description of the Feature A attribute format.
Single or Double Line Formatting
You may specify whether the message text is to be displayed in a 2x20 format or a single line format.
Although messages are no longer necessarily displayed in a 2x20 format, the method of defining this
data remains unchanged. That is, the IST Build Utility presents you with a 2x20 box in which to specify
the message text.
If the single line format is selected, the I/O Processor concatenates the line-1 text and the line-2 text
such that there is exactly one blank between the last non-blank character preceding column 20 and
the first non-blank character at or after column 20. This is so that messages formatted for 2x20
display appear correctly without requiring redefinition.
3-46
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Centering
You may specify that the message text is to be centered within the defined display area. The
centering option is ignored for display-as-keyed messages and 2x20 formatted messages.
Note: Customization information is specified in the Common Information section of the State Table.
There is one specification for prompt messages, one specification for error messages, and one
specification for display-as- keyed data associated with non-full-screen states ( for full-screen states,
there are separate display-as-keyed specifications for each field in each full-screen state). The prompt
and error message specifications are in effect for all states. The display-as-keyed specification is in
effect for all non-full-screen states.
The I/O Processor does not save and restore the areas of the screen to which it writes data. It is the
applications responsibility to clear any undesirable residual data from the screen. The I/O Processor
writes to the display according to information in the State Table. The State Table part of the
application and the executable part of the application should be developed to work in harmony with
each other.
If the display-as-keyed area is a 2x20 box at the top left of the display with default attributes and with
no border, no change to this area occurs until the operator starts keying in a non-full-screen state (no
change from the behavior when enhanced full-screen support is not used). If the display-as-keyed
area is anything other than the default 2x20 box, it is initialized when an unlock to a non-full-screen
state occurs (the same behavior as fields of a full-screen state). This implementation allows you to
add full-screen function to an application that was previously non-full-screen and preserve the behavior
of parts of the application that were not changed, but improve the behavior of parts that are changed.
Of concern to the application programmer is the fact that all unwritten positions of the defined display
area are written with blanks in order for their attributes to be visible. If the display-as-keyed area and
the prompt area are both configured to occupy the same 2x20 area on the screen, the
display-as-keyed area will overlay the prompt.
As an example, consider implementing a 2x30 area to be used for both prompts and display-as-keyed
data. You could configure the prompt messages as single-line, 30 characters wide, originating at row
1 column 1, and the display-as-keyed messages as single line, 30 characters wide, originating at row
2 column 1. The display-as-keyed area no longer interferes with the prompt area. Note that for this
case, the asterisks defining the location of keyed data must not be placed beyond column 10 of the
2nd line, as this is offset 30 into the defined display area. Any data that spills out of the defined
display area is clipped (not displayed).
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:
|
|
|
|
|
|
|
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.
3-47
The application is free to write to the same message line. To prevent the I/O Processor from writing to the
message line at the same time as the application, the application should ensure that the I/O Processor is
locked. The application does a PUTLONG to the video display to set the color, then a LOCATE to row 16
column 1, then a WRITE to the video. Since the operator does not need to be aware of the source of the
message, the application and the I/O Processor form a more integrated solution than that which is
possible without using the enhanced full-screen support.
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).
3-48
The MSR can read data encoded on a card (credit card or badge) as the card is passed through a slot
in the reader. The single-track MSR reads track 2 data as specified in the following standards:
The American National Standards Institute (ANSI) Specifications for Magnetic-Stripe Encoding for
Credit Cards, ANSI X4.16-1983
The American National Standards Institute (ANSI) Specifications for Credit Cards, ANSI
X4.13-1983.
The data available to your application consists of the account number field, a separator character, and
a discretionary data field. The account number can be a maximum of 19 characters. The
discretionary data field can be up to 36 characters. The total number of characters occupied by the
account number field, the separator character, and the discretionary data field cannot exceed 37.
3-49
If an error occurs, the first byte of the returned buffer contains a X'00', followed by the separator
character X'0D'. The remainder of the buffer is padded with X'00'
Dual-track MSR
Dual-track MSRs read data from track 2 and either track 1 or track 3. The data is returned in a
single buffer. The return code of the READ statement provides the size of the buffer. See Format
02 in Figure 3-1 on page 3-51.
The dual-track MSR driver supports single-track emulation. The single-track MSR description
applies when operating in this mode.
The length field of each track contains the actual number of characters read from that track. If a
read error occurs on either track, but not both, the length field for the track on which the error
occurred has a value of X'FF', and the buffer is padded with X'00'. If a read error occurs on
both tracks, the return code from the READ statement is 80A5000B, and the entire buffer is
padded with X'00'. Refer to the IBM 4690 Store System: Messages Guide for a description of
the 80A5000B return code.
Three-track MSR
Three-track MSRs read data from all tracks.
If the device is configured for single-track emulation (track 2 only), or as a dual-track device (tracks 1
and 2 or tracks 2 and 3), the amount and format of the data is identical to that previously described.
The three-track device provides additional individual track capacities and capabilities. The various
formats are described in Figure 3-1 on page 3-51.
Error reporting is done the same as with the dual-track MSR. If one or more, but not all, configured
tracks report a read error, the length field for each track in error has a value of X'FF', and the buffer
for each track is padded with X'00'. If a read error occurs on all configured tracks, the return code
from the READ statement is 80A5000B, and the entire buffer is padded with X'00'. Refer to the IBM
4690 Store System: Messages Guide for a description of the 80A5000B return code.
3-50
T2 Len
Tn Len
Tn Data
37 bytes
1 byte
1 byte
n bytes
T1 Data
1 byte
98 bytes
T3 Data
1 byte
139 bytes
T1 Data
T3 Len
T3 Data
1 byte
98 bytes
1 byte
139 bytes
T1 Data
T2 Len
T2 Data
T3 Len
T3 Data
1 byte
98 bytes
1 byte
46 bytes
1 byte
139 bytes
Tn = track number
3-51
Table 3-3 shows the applicable formats of returned data as a function of MSR configuration.
Table 3-3. Applicable Formats of Returned Data
Device Type
Configuration
Format
Number of Tracks
Which Tracks
Dual-Track
01
Dual-Track
1 and 2
02
Dual-Track
2 and 3
02
Three-Track
04
Three-Track
01
Three-Track
08
Three-Track
1 and 2
02
Three-Track
2 and 3
02
Three-Track
1 and 3
10
Three-Track
1, 2, and 3
20
3-52
The MSR changes from unlocked to locked when one of the following occurs:
Valid data is read from a card.
Your application issues a LOCKDEV statement.
Your application ends communication with the MSR by a CLOSE statement.
Issue the UNLOCKDEV statement each time you prepare to read data from the MSR.
|
|
Your application should issue a WAIT statement to wait for data available from the MSR. The WAIT
statement allows the application to wait for input from multiple devices. These devices include a timer to
indicate that no input was received during a specific time. When valid data is available from the MSR, the
statement following the WAIT is executed. Following the WAIT, use the EVENT% function to determine if
data is available to be read from the MSR. If an error occurs during a WAIT, control is given to your ON
ERROR routine.
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.
After good data is received, the MSR is locked.
3-53
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.
The LL bytes represent the following state information:
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.
The LL byte represents the following state information:
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.
The LL byte represents the following state information:
0
1
2
3
4
5
6
7
3-54
=
=
=
=
=
=
=
=
0
0
1
1
1
1
0
0
RESERVED
RESERVED
Track 1 Enabled
Track 2 Enabled
Track 3 Enabled
EC Level Response
RESERVED
RESERVED
0
1
2
3
4
5
6
7
7
=
=
=
=
=
=
=
=
=
1
1
1
1
1
1
0
0
1
Format 01
Format 03
Format 04
Format 08
Format 10
Format 20
RESERVED
Dual-Track Device
Three-Track Device
3-55
3-56
MSRWAIT:
! Wait for 5 seconds.
WAIT MSR2.READER;5000
! You would normally test for a timeout condition.
! Read the available input data.
READ #MSR2.READER; LINE MSRDATA$
! Get the length of the track 2 data (255 indicates error).
L1=ASC(MID$(MSRDATA$,38,1))
! Get the length of the track 1 or 3 data (255 indicates error).
L2=ASC(MID$(MSRDATA$,39,1))
! Process track 2 data.
IF L1 = 255 THEN \
BEGIN
! Display error message.
CLEARS DISPLAY
WRITE #DISPLAY; "TRACK 2 ERROR"
WAIT;3000
ENDIF \
ELSE \
BEGIN \
MSR2.DATA.TRACK2 = MID$(MSRDATA$,1,L1)
! Here you would convert the input to
! characters and display it.
ENDIF
! Process track 1/3 data.
IF L2 = 255 THEN \
BEGIN
! Display error message.
CLEARS DISPLAY
WRITE #DISPLAY; "TRACK 1/3 ERROR"
WAIT;3000
ENDIF \
ELSE \
BEGIN \
MSR2.DATA.TRACK13 = MID$(MSRDATA$,40,L2)
! Here you would convert the input to
! characters and display it.
ENDIF
NEXT I%
CLEARS DISPLAY
WRITE #DISPLAY; "END OF SAMPLE"
CLOSE MSR2.READER,DISPLAY
STOP
ERR.HNDLR:
! Prevent recursion.
ON ERROR GOTO ERR.EXIT
! Determine error type and
! perform appropriate recovery
! and resume steps.
ERR.EXIT:
STOP
END
3-57
3-58
3-59
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.
3-60
Note: The colon is part of the name, and you must open each station before it will print.
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.
3-61
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. This 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 is done at the CR station.
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.
3-62
Check printing is useful because the customer does not have to write out the check. A blank check is
handed to the cashier by the customer. The cashier inserts the check into the document insert station,
and the printer types the date, amount, and payee. Then the customer signs the check.
3-63
Character Sets
Character sets are used to print the check data. Byte 381 contains the number of dots to advance the
paper after each line is printed. If the 5 x 8 dot character set is being used, the byte should be set to 6. If
the 8 x 8 dot character set is being used, the byte should be set to 9. Characters cannot be split across
print lines. You should move the print head to the home position after the check is printed to ensure that
the check printed correctly. There are two ways to code the application to move the print head:
Perform a TCLOSE after the last line of the check is printed.
On the last WRITE LOGO, set the high-order bit of byte 381 to ON. The driver looks at the high-order
bit of byte 381. On the last printed line of the WRITE LOGO, the driver commands the printer to
return the print head to the home position.
This procedure is faster than a TCLOSE because a TCLOSE forces the application to wait until all
queued prints have completed the procedure.
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.
3-64
Logo Printing
Logo printing can be done only at the CR/DI station. Use the WRITE LOGO statement for printing logos.
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.
3-65
Example
This example contains code for operating a printer. The program writes messages to the display, sets up
the synchronous and asynchronous error handlers, and prints lines at the CR and DI stations.
%ENVIRON T
! Declare integers.
INTEGER*2 DISPLAY.NUMA
INTEGER*4 REQ%,STAT%
! Async error handling subprogram.
SUB ASYNCSUB(RFLAG,OVER)
INTEGER*2 RFLAG
STRING
OVER
! Set up synchronous error handler
! for async subprogram.
ON ERROR GOTO SERROR
! See the error recovery example
! for the ON ASYNC ERROR CALL
! statement in the IBM 4680 BASIC
! Language Reference.
EXIT SUB
END SUB
Start execution.
! The alphanumeric display is opened for display of prompt.
DISPLAY = 4
OPEN "ANDISPLAY:" AS DISPLAY
CLEARS DISPLAY
WRITE #DISPLAY; "PRINTER SAMPLE"
WAIT;2000
! Branch around called routines.
GOTO START.OF.PRINTS
! Open the print station designated in the variables.
FUNCTION PRINTER
OPEN STATIONS$ AS NUMA
CLEARS DISPLAY
WRITE #DISPLAY; "OPEN PRINTER ", STATIONS$
EXIT FUNCTION
END FUNCTION
! TCLOSEs to clear all the print requests,
! then display and close the print station.
FUNCTION CLOSEA
TCLOSE NUMA
CLEARS DISPLAY
WRITE #4; "CLOSE = ", NUMA
CLOSE NUMA
EXIT FUNCTION
END FUNCTION
! Start printing.
START.OF.PRINTS:
! Set up the asynchronous error handler
! and the synchronous error handler.
ON ASYNC ERROR CALL ASYNCSUB
ON ERROR GOTO ERR.HNDLR
! Print and space at the customer receipt station.
3-66
CR.PRINTER:
NUMA = 3
STATION$ = "CR:"
CALL PRINTER
WRITE FORM "C38 A1";#NUMA; "PRINT CASH RECEIPT AND
WRITE FORM "C38 A2";#NUMA; "PRINT CASH RECEIPT AND
WRITE FORM "C38 A3";#NUMA; "PRINT CASH RECEIPT AND
WRITE FORM "C38 A4";#NUMA; "PRINT CASH RECEIPT AND
WRITE FORM "C38 A5";#NUMA; "PRINT CASH RECEIPT AND
CALL CLOSEA
! Print and space at the document insert station.
DI.PRINTER:
NUMA = 2
STATIONS$ = "DI:"
CALL PRINTER
REQ% = 00000H
! Set manual document insert.
! Requires operator to press Close button.
PUTLONG NUMA , REQ%
INSERT.DOC:
CLEARS DISPLAY
WRITE #DISPLAY; "INSERT DOCUMENT"
! Test for document present.
REQ% = GETLONG (NUMA)
STAT% = REQ% AND 00000030H
IF STAT% <> 00000010H THEN GO TO INSERT.DOC
WRITE FORM "C38 A1";#NUMA; "PRINT ON DOCUMENT
WRITE FORM "C38 A2";#NUMA; "PRINT ON DOCUMENT
WRITE FORM "C38 A3";#NUMA; "PRINT ON DOCUMENT
WRITE FORM "C38 A4";#NUMA; "PRINT ON DOCUMENT
CALL CLOSEA
CLEARS DISPLAY
WRITE #DISPLAY; "END OF PRINT SAMPLE"
CLOSE DISPLAY
GOTO END.PROG
ERR.HNDLR:
! Prevent recursion.
ON ERROR GOTO END.PROG
! Determine error type and perform appropriate
! recovery and resume steps.
END.PROG:
STOP
END
SPACE
SPACE
SPACE
SPACE
SPACE
AND
AND
AND
AND
1
2
3
4
5
SPACE
SPACE
SPACE
SPACE
AFTER
AFTER
AFTER
AFTER
AFTER
1
2
3
5
"
"
"
"
"
AFTER
AFTER
AFTER
AFTER
"
"
"
"
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
Chapter 3. Programming Terminal I/O Devices
3-67
insertion of a form, document, or check directly into the printer from the front or from the top. Use this
function to print a variety of forms such as store charge account forms, or to print or endorse checks. The
printer mechanism is a 9-wire dot matrix, bidirectional, all-points-addressable, high-speed device. The
number 9 print wire can be used for an underscore or descenders.
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.
3-68
Depending on how the application program has been designed to position documents, the following
changes might also be required:
The number of line spaces a document is advanced after being inserted in the document station might
need to be changed. See Manual or Automatic Document Insertion on page 3-72 for more
information.
A document eject command might be required to remove a document from the document station. See
Document Eject Command on page 3-75 for more information.
It is recommended that the print head be moved to the center home position before inserting a
document. If the application was not originally designed to do so, this change might be required. See
Positioning the Print Head on page 3-75 for more information.
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.
Note: The colon is part of the name, and you must open each station before it will print.
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.
3-69
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.
Table 3-4. Model 3 or 4 PrinterEmphasized Print Definition Characters
Description
Control Character
Designator
Comments
CHR$(27), CHR$(69)
Emphasized Printing Programming Example: The following example illustrates the method
used to print a line using emphasized printing:
OPEN "CR:" as 5
ESTART$ = CHR$(27) + CHR$(69)
3-70
Font Specification: The pitch of the default font for the Model 3 or 4 printer is 15 CPI. You can
specify a font change by imbedding a control character, followed by a character designating the font type
desired, in the data field sent to the printer by the WRITE statement. (For example, CHR$(27), CHR$(58)
results in a 12 CPI font.)
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.
Table 3-5. Model 3 or 4 Printer Font Definition Characters
Font Description
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
7.5 CPI
CHR$(27),CHR$(14)
19 CR, SJ; 43 DI
15 CPI Double
Wide Font
7.5 CPI
Double High
CHR$(27),CHR$(23)
19 CR, SJ; 43 DI
Double High,
Double Wide
Font Change Programming Example: The following example illustrates the method used to
change fonts with the Model 3 or 4 printer:
OPEN "CR:" as 5
FONT15$ = CHR$(27) + CHR$(59)
FONT75$ = CHR$(27) + CHR$(14)
LINE$ = " Welcome to " + FONT75$ + "BROOKS" + FONT15$ + " Dept. Store "
WRITE FORM "C36 A1"; #5; LINE$
! REM Print Welcome line on Receipt
Output of Example Program
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.
Chapter 3. Programming Terminal I/O Devices
3-71
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.
3-72
Documents inserted from the front will not block the CR or SJ stations until manually fed into the station
using the document ready button or automatically from a WRITE statement to the document station.
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
3-73
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.
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.
3-74
As a visual indicator that the buffer was exceeded, a line of asterisks with an error message number is
also printed on the journal station following the printed data. This message alerts store personnel that an
error occurred and that the journal buffer size must be increased using the configuration utility. Figure 3-2
is an example of how the journal station appears after the buffer has been exceeded.
1 LAYAWAY
0182 0001 110
LAYAWAY OPENED ON
2/05/95
ACCOUNT 5384
1
MDS 1
25.00
8
MDS 1
50.00
5
MDS 1
30.00
4
MDS 2
5.00
**************** W354 ****************
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.
3-75
Reversible Document Station Motor: The default document motor direction is the same as that
used to feed the receipt paper during printing (bottom-to-top). The direction of the document motor is
changed by the PUTLONG statement. The current setting of the document motor is found by using the
GETLONG function. Refer to the IBM 4680 BASIC: Language Reference to determine the appropriate bit
mapping.
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.
Refer to the IBM 4680 BASIC: Language Reference for additional information.
ERR = DO
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.
3-76
Table 3-6 shows the characters that have been defined to initiate a partial cut.
Table 3-6. Model 3 or 4 PrinterReceipt Paper Cutter Control Characters
Description
Control Characters
Comments
Partial Cut
CHR$(27), CHR$(80)
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.
3-77
Logo Printing
You can print logos only at the CR and DI stations. Use the WRITE LOGO statement for printing logos.
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.
3-78
For logo printing, the print head must travel across the print line either one or three times. Only one pass
is required if you compose the logo by using every other column of dots. To maximize performance, you
should use either all odd dot columns or all even dot columns.
3-79
ASCII
ASCII
ASCII
ASCII
ASCII
ASCII
ASCII
0-9
T
A
?
$
blank
(30H - 39H)
(54H)
(41H)
(2DH)
(3FH)
(24H)
(20H)
3-80
wait will be canceled and no data will be available for a READ LINE at that time. If a READ LINE is
issued when the DI event was canceled, the MICR read command will again be passed to the hardware.
The application will not regain control until it completes.
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.
Table 3-7. Common MICR Errors
4 Byte Return Code
Description
80900002H
No MICR present
80900528H
No document present in DI
80900521H
or
ADXMICRB.L86[S],
To use the MICR parsing function, your application must first initialize the parsing table. Use the following
functions to perform the initialization:
FUNCTION MICRINIT EXTERNAL
INTEGER*4 MICRINIT
END FUNCTION
The function reads the MICR parsing table from the ADXMICRF file using session number 64. The
function returns 0 if initialization was OK. If the initialization was not OK, it returns the ERRN value of any
error encountered.
3-81
After initialization you can parse MICR information read from a check using the following subprogram:
SUB MICRPARS(RC,MICRLine$,MICRTransit$,MICRAccount$, \
MICRSequence$) EXTERNAL
INTEGER*1 RC
!* MICR PARSING
OK = -1,
!*
NO MATCH = 0
STRING MICRLine$
!* MICR line read from check
STRING MICRTransit$
!* Transit number extracted
STRING MICRAccount$
!* Account number extracted
STRING MICRSequence$ !* Check Sequence number
!* extracted
END SUB
|
|
|
|
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 command used to print lines on both the customer receipt and summary journal stations is the IBM
4680 BASIC WRITE FORM command. This command remains unchanged for any existing print option
application. Application programs issue fiscal commands using the WRITE FORM command. These
commands provide the capability to release sales slips, daily closing vouchers, and fiscal documents.
Fiscal vouchers are printed on the customer receipt station and then duplicated on the summary journal
print station. The non-fiscal print command is used to provide a line feed or eject at the print stations.
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 (#).
3-82
Read Commands
The following two sections describe the extensions to the 4680 BASIC GETLONG and PUTLONG
statements for the Model 3 printer. See IBM 4680 BASIC: Language Reference, for more information on
the other statements used to communicate with the 4683 printer drivers.
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 (*).
bit 0
bit
bit
bit
bit
bit
bit
bit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1
2
3
4
5
6
7
(X'01') = Reserved This bit is used by the 4680 BASIC runtime subroutines and varies in value.
It should be ignored by all application programs.
= 0 Reserved
= 0 Reserved
= 0 Reserved
= 0 Reserved
= 0 Reserved
= 0 Reserved
= 0 Reserved
3-83
PUTLONG Function: Use the PUTLONG function to make changes to the customer receipt,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 (*).
|
|
3-84
* bit 2 =
=
bit 3 =
* bit 4 =
=
* bit 5 =
=
* bit 6 =
=
* bit 7 =
=
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.
bit 0
* bit 1
* bit 1
bit 2
* bit 3
bit 4
bit 4
bit 5
bit 5
bit 6
bit 6
bit 7
bit 7
Note: The functions provided by bits 4, 5, 6, and 7 are not supported by the Model 3A fiscal printer.
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(X'01') = 0 Reserved
= 0 Document line feed is in normal mode, bottom-to-top (default)
= 1 Document line feed is in reverse mode, top-to-bottom
= 0 Reserved
= 0 Reserved
= 0 Manual document insert
= 1 Automatic document insert
= 0 Document cannot be removed and replaced between print lines on the DI:
= 1 Document can be removed and replaced between print lines on the DI:
= 0 Document cannot be placed in DI: during printing on CR:
= 1 Document can be placed in DI: during printing on CR:
= 0 Document sensing not required by DI: for printing on CR:
= 1 Document sensing required by DI: for printing on CR:
0 = no error
1 = error on open
2 = error on read
3-85
|
|
|
|
|
|
|
|
|
|
|
Bytes 8 9 contain the length of the fiscal read response. These two bytes are in INTEGER*2 format.
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.
3. Call the FISREAD routine to retrieve the fiscal data into the application buffer.
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.
|
|
3-86
Scale Driver
This section describes the scale driver and provides guidelines for using it.
Characteristics
|
One scale can be attached to a terminal and can be one of the following:
|
|
|
|
|
|
|
|
|
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
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.
Chapter 3. Programming Terminal I/O Devices
3-87
3-88
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.
3-89
If the bits-per-character is less than eight, the significant bits are placed in the rightmost bits of each
byte in the application buffer on a READ, and taken from the rightmost bits on a WRITE.
Number of stop bits (1, 1.5, or 2).
Maximum application buffer size (1 through 247).
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.
3-90
If the driver buffer is empty and an error occurs, the application is notified of the error on the next wait or
read operation. Any data received before the application is notified of the error is discarded. Note that
data detected to be in error is never passed to the application; only the error status is passed.
3-91
The GETLONG statement returns the current settings of the control parameters that can be set with
PUTLONG. GETLONG also returns status information related to the device and the serial I/O port. The
status information contains the following information for a 4683 feature card serial port:
|
|
Data available
Data lost
DTR status (at the time GETLONG is executed)
RTS status (at the time GETLONG is executed)
Parity error
Framing error
Break received
Transmit buffer empty
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
3-92
For an I/O port not on a feature expansion card, CTS goes inactive for at least 30 seconds.
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&*:;'""@?,.$=!><()-%+#/ "
Make the following assumptions:
1. Port 2 = RS232 EIA INTERFACE
2. 9600 BPS Baud Rate
3. ASYNC DATA FORMAT
NO PARITY
8 BIT CODE WITH 1 STOP BIT.
%ENVIRON T
INTEGER*4 hx%,sx%
INTEGER*2 ANDSP%,EIAP%
ANDSP% = 1
EIAP% = 12
!! INDICATE TERMINAL
!! DECLARE VARIABLES
!! INIT I/O SESSIONS
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%
3-93
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"
ON ASYNC ERROR CALL ASYNC.ERR
!! SET "ON ASYNC ERROR"
OPEN "ANDISPLAY:" AS ANDSP%
!! OPEN AN DISPLAY
CLEARS ANDSP%
WRITE #ANDSP% ; "SERIAL I/O SAMPLE "
WAIT ; 5000
!! WAIT 5 SECONDS
! -------------! ENABLE PORT 2 (RS232 EIA INTERFACE) AS I/O SESSION 12
! -------------OPEN SERIAL 2,9600,"N",8,1 AS EIAP% BUFFSIZE 80
LOCATE #ANDSP% ; 2,1
!! LOCATE TO SEC LINE
WRITE #ANDSP% ; "SER I/O PORT 2 OPEN"
! -------------! CONSTANT FOR 59 CHAR. RIPPLE PATTERN CHARACTER SET
! -------------BUF1$="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789&*:;'""@?,.$=!><()-%+#/ "
BUF2$ = "ABCDEFGHIJKLMNOPQRST"
B1$ = BUF1$ + BUF1$ + BUF2$ !!! 59 + 59 + 20 FOR RIPPLE 80 CHARS
I% = 1
!!! VARIABLE FOR RIPPLE COUNTER
WRITE #ANDSP% ; "START RIPPLE PRINT"
EXERCISE:
FOR I% = 1 TO 20
C1$ = MID$(B1$,I%,80)
WRITE # EIAP%; C1$
NEXT I%
CLOSE EIAP%
WRITE #ANDSP% ; "END OF SAMPLE"
CLOSE ANDSP%
STOP
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
3-94
end
3-95
Tone Driver
This section describes the tone driver and provides guidelines for using it.
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: Users Guide explains how to set the tone volume.
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.
3-96
Example
This example writes a message to the display, runs a test of the tone device, and then writes another
message to the display.
%ENVIRON T
! Declare a two-byte integer.
INTEGER*2
DISPLAY
INTEGER*2
TONE
DISPLAY = 1
TONE = 2
ON ERROR GOTO ERR.HNDLR
! Open the display.
OPEN "ANDISPLAY:" AS DISPLAY
CLEARS DISPLAY
WRITE #DISPLAY; "START TONE TEST"
WAIT ; 2000
OPEN "TONE:" AS TONE
CLEARS DISPLAY
WRITE #DISPLAY; "TONE"
WAIT ;2000
WRITE FORM "C4,C3"; #TONE; "0750", "020"
WAIT; 250
WRITE FORM "C4,C3"; #TONE; "1000", "020"
WAIT; 250
WRITE FORM "C4,C3"; #TONE; "1800", "020"
WAIT; 250
CLOSE TONE
CLEARS DISPLAY
WRITE #DISPLAY; "END TONE SAMPLE"
CLOSE DISPLAY
STOP
ERR.HNDLR:
! Prevent recursion.
ON ERROR GOTO END.PROG
! Determine error type
! and perform appropriate
! recovery and resume steps.
END.PROG:
STOP
END
3-97
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.
Direct mode is specified when you use the READ FORM or WRITE FORM statement. You must always
specify the address (1 through 1020 for 4683, 1 through 16380 for 4693/4694) of the record to be read or
written. You cannot specify direct mode access to start at addresses greater than 1020 for the 4683
terminals or 16380 for the 4693 and 4694 terminals because of the overhead requirements. There is no
EOF marker added on a direct mode write.
3-98
To write a record in direct mode, issue a WRITE FORM statement specifying the starting address (1
through 1020 for 4683, 1 through 16380 for 4693/4694) of the record. The number of bytes in your record
must be 1 through 60 (4683 terminals), or 1 through 1020 (4693/4694 terminals). If an error is detected
on the WRITE FORM, control passes to your ON ERROR routine.
|
|
|
When you read or write records in sequential mode, the totals retention driver uses the next record pointer
to determine the starting address of the read or write. Following a successful read or write, the next
record pointer and last record pointer are updated. Issue a POINT statement when you want to prepare to
read or write a record other than the next sequential record. The address on the POINT statement must
be between 1 and 1020 (4683 terminals) or 1 and 16380 (4693/4694 terminals) for a READ LINE. The
address on the POINT statement must be between 1 and 1016 (4683 terminals) or 1 and 16376
(4693/4694 terminals) for a WRITE.
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.
3-99
Example
The following example contains code written to communicate with a totals retention driver. This example
writes a message to the display, runs a test of the totals retention driver by writing data to it and then
reading data from it. It then compares the data that it stored with the original data, writing messages
about the results of the comparison to the display.
%ENVIRON T
! Totals Retention sample.
! Define the variables.
INTEGER*2 HARDTOT, DISPLAY,I1,I2
INTEGER*2 J1,J2,OFFSET
INTEGER*4 I3,I4,J3,J4,TIME
REAL R1,R2
STRING DATA1$,DATA2$,RDMFMT$
! Set up the error handler.
ON ERROR GOTO ERROR1
! Open the totals retention driver and
! the AN display for messages.
HARDTOT = 1
DISPLAY = 2
TIME = 5000
OPEN "ANDISPLAY:" AS DISPLAY
OPEN "TOTRET:" AS HARDTOT BUFFSIZE 1020
CLEARS DISPLAY
WRITE #DISPLAY; "START OF TOTALS RETENTION SAMPLE"
WAIT ; TIME
! Initialize the variables.
OFFSET = 1
R1 = 100.3
I1 = 1
I2 = 2
DATA1$ = "ABCDEFGHIJKLMNOPQRSTUVWXYZ7890"
I3 = 35
I4 = 36
RDMFMT$ = "R 2I2 C30 2I4"
! Write the data in the totals retention area of storage.
WRITE FORM RDMFMT$;#HARDTOT,OFFSET;R1,I1,I2,DATA1$,I3,I4
CLEARS DISPLAY
WRITE #DISPLAY; "WRITE COMPLETE
WAIT ;TIME
! Then read the data back, and compare with the original
! data. This portion of the example could be executed
! after a power-down situation to demonstrate totals
! retention.
RDMREAD:
READ FORM RDMFMT$;#HARDTOT,OFFSET;R2,J1,J2,DATA2$,J3,J4
! Compare the data read with original data.
CLEARS DISPLAY
IF R1 = R2 THEN \
WRITE # DISPLAY; "REAL DATA COMPARES OK"\
ELSE \
WRITE # DISPLAY; "REAL DATA DOESN'T COMPARE OK "
WAIT ; TIME
CLEARS DISPLAY
IF I1 = J1 THEN \
3-100
"\
WAIT ; TIME
CLEARS DISPLAY
IF I2 = J2 THEN \
WRITE # DISPLAY; "INTEGER DATA COMPARES OK -2
" \
ELSE \
WRITE # DISPLAY ;"INTEGER DATA DOESN'T COMPARE OK -2"
WAIT ; TIME
CLEARS DISPLAY
IF I3 = J3 THEN \
WRITE # DISPLAY;"INTEGER DATA COMPARES OK -3
" \
ELSE\
WRITE # DISPLAY;"INTEGER DATA DOESN'T COMPARE OK -3"
WAIT ; TIME
CLEARS DISPLAY
IF I4 = J4 THEN \
WRITE # DISPLAY;"INTEGER DATA COMPARES OK -4
" \
ELSE \
WRITE # DISPLAY;"INTEGER DATA DOESN'T COMPARE OK -4"
WAIT ; TIME
CLEARS DISPLAY
IF DATA1$ = DATA2$ THEN \
WRITE # DISPLAY;"CHARACTER DATA COMPARES OK
" \
ELSE \
WRITE # DISPLAY:"CHARACTER DATA DOESN'T COMPARE OK "
WAIT ; TIME
CLEANUP:
CLOSE HARDTOT
CLEARS DISPLAY
WRITE # DISPLAY;"END OF TOTALS RETENTION SAMPLE
"
CLOSE DISPLAY
STOP
ERROR1:
! Prevent recursion.
ON ERROR GOTO ERROR2
! Determine error type and perform appropriate recovery
! and resume steps.
ERROR2:
STOP
END
3-101
3-102
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
4-1
4-2
4-2
4-3
4-3
4-3
4-4
4-4
4-4
4-4
4-4
4-4
4-4
4-4
4-4
4-5
4-5
4-6
4-6
4-6
4-7
4-7
4-7
4-8
4-8
4-9
4-9
4-9
4-9
4-10
4-10
4-10
4-10
4-10
4-13
4-13
4-1
The 4690 Operating System provides several means for recovering from errors:
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.
4-2
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.
4-3
RESUME: Execution of a RESUME statement causes the failing I/O statement to be bypassed. This
ignores a noncritical I/O instruction that caused an error and continues execution at the next sequential
instruction.
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.
4-4
This system log consists of six files in which the new entries replace the old entries. The six files in the
system log are:
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
Hardware Errors
Used for faults that can be corrected by hardware repair at the store controller.
Terminal Hardware
Errors
Used for faults that can be corrected by hardware repair at the terminal.
Terminal Events
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
cc
ttt
4-5
s
annn xxx...xxxxx
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 stores 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: Users
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: Users 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.
4-6
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.
4-7
the operator views the messages on the SYSTEM MESSAGE DISPLAY screen. You can also enter a
numeric value from 0 to 99 in this field. If a numeric value is entered, the alarm will sound for that number
of seconds.
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: Users Guide.
4-8
4-9
Storage Retention
The storage retention function provides battery power to the memory in the 4683 or 4693 Mod1 terminals.
The battery powers only the memory; it does not power the processor or any of the I/O devices.
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: Users 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.
4-10
operation of the disk or a problem with a particular file on the disk. Only those errors that are associated
with the disk and files are described in this section.
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.
Table 4-1. Errors on the store controller and terminal
Error Code
Description
Action
EF 0000001C
Type 12
EF 0000001C
Type 16
DW 00000018
Type 20
ME 0000003C
Type 20
xx 80xx4001
Type 10
NR 80xx4007
Bad FNUM
Type 24
xx 80xx4010
Type 14
xx 80xx400C
Type 11
xx 80xx400D
Type 17
xx 80xx4301
Type 15
OM 80F30000
Insufficient memory
Type 17
KF 80F306C6
Type 13
EF 80F306C8
Type 13
DW 80F306CE
Type 13
4-11
Description
Action
XS 0000042C
Type 22
XT 0000042E
Type 23
OM 80F10000
Insufficient memory
Type 18
TO 80F10681
Terminal offline
Type 21
TF 80F206A1
No files opened
Type 19
TF 80F206A2
Type 19
TF 80F206A3
Type 19
TF 80F206A4
Type 19
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
13
14
15
The user changed the diskette. Prompt the user to restore the original media and continue.
16
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.
4-12
24
The file is no longer able to be accessed because of a bad FNUM. The file should be closed and
then reopened again by the application. Caution should be taken so that the application only tries
to reopen the file a selected number of times so that a suspend condition does not occur due to
looping.
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.
4-13
4-14
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
5-1
5-1
5-2
5-3
5-3
5-3
5-3
5-3
5-4
5-4
5-5
5-6
5-7
5-8
5-1
5-2
5-3
Record Sizes
The maximum TCC Network buffer size for sending WRITE MATRIX data to the 4690 store controller from
the terminal application is 508 bytes. If the WRITE MATRIX data block is greater than 508 bytes, the
block is divided into as many buffers as needed to comply with the 508-byte limit.
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.
5-4
*/
*/
*/
*/
*/
*/
*/
#include <stdio.h>
main()
{
FILE *FP1, *FP2;
long length;
char buf[512];
/* Open the transaction log as a read-only, binary file at 4690
if ((FP1 = fopen("e:ealtrans.dat","rb")) == NULL) {
perror("open of ealtrans.dat failed");
abort();
}
*/
*/
*/
*/
*/
/* End */
5-5
5-6
*/
*/
*/
*/
*/
*/
#include <stdio.h>
#include <stdlib.h>
void main()
{
FILE *FP1, *FP2;
int length;
char buf[512];
/* Open the transaction log as a read-only, binary file
/* at the 4690 store controller.
if ((FP1 = fopen("e:ealtrans.dat", "rb")) == NULL) {
perror("open of ealtrans.dat failed");
abort();
}
*/
*/
*/
*/
*/
*/
/* END */
5-7
100
DOMAIN::CDISK:FILE1
ADXLXCCN::C:NEWFILE1
integer*4 fsize%,rnum%
on error goto 1000
CLEARS
print " ***** 4690 - OS/2 - DOS Connectivity Test Program ***** "
print " "
print "
TO EXIT THIS PROGRAM JUST PRESS THE ENTER KEY "
print " WHEN PROMPTED FOR THE SENDING OR RECEIVING CONTROLLERS"
print " "
input " ENTER THE SENDING CONTROLLER NAME AND PATH "; sender$
print " "
If sender$ = " " then goto 2000
! EXIT THE PROGRAM
input " ENTER THE RECEIVING CONTROLLER NAME AND PATH "; receiver$
print " "
print " "
If receiver$ = " " then goto 2000
! EXIT THE PROGRAM
print " "
ios1% = 1
! ESTABLISH I/O SESSION NUMBER FOR SENDER
ios2% = 2
! ESTABLISH I/O SESSION NUMBER FOR RECEIVER
rnum% = 1
fsize% = size(sender$)
! DETERMINE THE SIZE OF THE FILE
if fsize% >32767 then 1500 ! EXIT PROGRAM IF FILE IS GREATER THAN MAX
if fsize% > 0 then 250
! FILE IS VALID KEEP PROCESSING
print "THIS PROGRAM COPIES FILES WITH A SIZE RANGE OF 1 - 32767 BYTES "
print "THE FILE YOU SPECIFIED TO BE COPIED IS EMPTY "
goto 2000
! EXIT PROGRAM BECAUSE INPUT FILE IS EMPTY
250
print " THERE ARE"; fsize%; "BYTES IN THE INPUT FILE "
numchars$ = "c"+str$(fsize%) ! CONVERT SIZE TO CHARACTER FOR READ/WRITE
open sender$ recl fsize% as ios1%
! OPEN INPUT FILE
openin% = 1
! SUCCESSFUL OPEN INDICATOR
create receiver$ recl fsize% as ios2% ! CREATE A NEW OUTPUT FILE
openout% = 1
! SUCCESSFUL OPEN INDICATOR
read form numchars$; #ios1%,rnum%; data1$
! READ THE DATA FROM SENDER
5-8
1000
1200
1500
2000
5-9
5-10
Part 2: Utilities
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
6-2
6-2
6-3
6-4
6-4
6-4
6-4
6-4
6-4
6-5
6-6
6-7
6-8
6-9
6-9
6-10
6-10
6-10
6-10
6-11
6-12
6-12
6-12
6-14
6-14
6-16
6-17
6-18
6-21
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.
6-1
6-2
6-3
6-4
Function request:
1
2
3
4
5
6
7
Number of records to be allocated on disk. (This should be the maximum number of records
anticipated plus a minimum of 25%.)
Chaining threshold.
File attributes:
1
2
3
4
5
Local
Mirrored at
Mirrored at
Compound
Compound
update
close
at update
at close
Chapter 6. Using the Keyed File Utility
6-5
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.)
Maximum in memory table buffers. (This optional parameter can be used to limit the number of 32K
buffers that can be allocated to create a large file or report chaining statistics.)
Minimum in memory table buffers. (This optional parameter can be used to specify the minimum
number of 32K buffers to be allocated to create a file or report chaining statistics.)
Note: Parameters n, o, and p are optional. They are positional parameters. If one is specified, all of the
preceding parameters must be specified.
where:
Number of records to be allocated on disk. (This should be the maximum number of records
anticipated plus a minimum of 25%.)
Chaining threshold.
6-6
File attributes:
1
2
3
4
5
Local
Mirrored at
Mirrored at
Compound
Compound
update
close
at update
at close
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.)
Maximum in memory table buffers. (This optional parameter can be used to limit the number of 32K
buffers that can be allocated.)
Minimum in memory table buffers. (This optional parameter can be used to specify the minimum
number of 32K buffers to be allocated.)
Note: Parameters n, o, and p are optional. They are positional parameters. If one is specified, all of the
preceding parameters must be specified.
F1 is not accepted if the checkpoint file exists.
where:
File attributes:
1
2
3
4
5
Local
Mirrored at
Mirrored at
Compound
Compound
update
close
at update
at close
6-7
where:
Chaining threshold.
File attributes:
1
2
3
4
5
6-8
Local
Mirrored at
Mirrored at
Compound
Compound
update
close
at update
at close
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.)
where:
Y (not used)
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.
Maximum in memory table buffers. (This optional parameter can be used to limit the number of 32K
buffers that can be allocated.)
Minimum in memory table buffers. (This optional parameter can be used to specify the minimum
number of 32K buffers to be allocated.)
6-9
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.
6-10
Warning: The XOR rotation hashing algorithm and the polynomial hashing algorithm cannot be used on
the Item Movement File of the 4680 or 4680-4690 Supermarket Application.
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
1
2
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.
6-11
This function of the KFU produces a report that includes the hashing algorithm specified for the particular
file.
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.
6-12
Step 1:
Key:
Step 2:
6
Key:
LSB
MSB
Step 3:
Key:
LSB
Step 4:
6
Key:
LSB
MSB
Step 5:
Key:
LSB
Step 6:
6
Key:
LSB
MSB
LSB
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.
6-13
The XOR Rotation Hashing Algorithm: The XOR rotation hashing algorithm expands the
length of the folded key produced by the key folding step of the IBM folding algorithm. It also rotates the
bits in a random way to produce less record chaining. The algorithm performs the following operations:
1. Calculates the number of bit positions of rotation to be done after folding (a number from 0 to 15).
a. Adds each digit (or half-byte) to a sum as the key is scanned from right to left during folding. Prior
to this addition, the sum is multiplied by 10. This effectively reverses the digits of a packed
decimal key and converts to binary. To prevent a 32-bit overflow, the conversion is ended if the
sum reaches 214,748,364. During the scan, the summing process does not begin until a nonzero
byte is encountered. The sum does not include null bytes that are right-justified in the key.
b. Divides the resulting sum by 31 (a prime number). The remainder is halved to produce the bit
rotation count from 0 to 15.
2. Rotates the bits in the folded key the number of positions calculated in Step 1. The bits are rotated to
the left. Bits shifted out of the high-order position move to the low-order position.
3. Combines the rotated folded key with the original folded key to form a 32-bit number. The rotated
folded key becomes the high-order word of the 32-bit number. The original folded key becomes the
low-order word of the 32-bit number.
4. Rotates the bits in the 32-bit number to the left the number of positions calculated in Step 2.
5. Zeroes the high-order bit of the 32-bit number to prevent a negative result.
6. Divides the 32-bit number by the randomizing divisor. The remainder becomes the relative block
number of the record.
Example of the XOR Rotation Hashing Algorithm: Assume a 4-byte key of eight packed
decimal digits shown here.
10
6-14
53
02
37
0001
0000 0101
0011 0000
0010 0011
0111
FOLDED KEY
BCD
(XOR)
0001 0000 = 10
0000 0010 = 10
0101 0011 = 53
0011 0111 = 37
0001 0010
0110 0100
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:
Bit 1 Bit 2 Result
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.
6-15
0110 0100
0010 0110
0100 0001
0010 0110
0100 0001
0001 0010
0110 0100
0001 0010
0101 0011
0000 0010
0011 0111
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 algorithm performs the following steps:
1.
2.
3.
4.
6-16
Use the same 4-byte key used in the XOR rotation hashing algorithm example, 10530237. Assume the
randomizing divisor is 49997.
Key
16-Bit FCS
Number
Hexadecimal
Equivalent
Bit Notation
10530237
9588
2574
Reversed
Key
16-Bit FCS
Number
Hexadecimal
Equivalent
Bit Notation
37025310
48043
BBAB
6-17
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 blocks 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 records 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.
Block
Before
Rec 4
Added
Block
After
Rec 4
Added
44
84
124
512
44
84
124
free space
(binary zero)
164
512
free space
(binary zero)
6-18
Block
Before
Rec 2
Added
Block
After
Rec 2
Added
44
44
84
ovfl
rec1
84
124
512
ovfl
rec2
free space
(binary zero)
124
ovfl
rec1
164
512
free space
(binary zero)
ovfl
rec2
2
fdwd
(end)
124
244
364
484
512
free
space
Data set after overflow block allocated and record five added. Record five becomes the first overflow
chain for block 'a'.
0
block
'a'
2
fdwd
'z'
0
block
'z'
2
fdwd
(end)
124
244
364
484
124
244
512
free
space
364
ovfl
bkal
512
free
space
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.
6-19
2
fdwd
'b'
block
'a'
0
block
'c'
fdwd
'z'
124
244
124
244
2
fdwd
(end)
block
'd'
244
364
484
364
124
fdwd
'c'
block
'b'
124
244
free
space
484
ovfl
bka1
364
ovfl
bka2
512
512
free
space
484
ovfl
bka3
512
free
space
364
512
ovfl
bka4
free
space
2
fdwd
'd'
block
'c'
0
block
'd'
124
244
364
2
fdwd
(end)
124
244
364
ovfl
bka4
484
ovfl
bka2
484
ovfl
bka3
512
free
space
512
free
space
Notice that blocks 'a' and 'b' remain unchanged from their original positions.
6-20
Keyed File Control Record: The Keyed File Control Block (KFCB) is located in sector zero of a
keyed file. When creating a keyed file, initialize the entire sector (512 bytes) to zero and then initialize the
appropriate fields.
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').
Do not use any of the reserved fields.
Offset
Length
Description
*0
12
Reserved
12
18
Length
Description
* 30
* 32
* 33
* 34
* 38
Length
Description
* 40
* 42
* 46
* 48
Randomizing divisor
* 52
* 54
* 56
Chaining threshold
Length
Description
60
64
68
72
76
80
84
88
92
96
6-21
Offset
Length
Description
100
104
108
112
116
120
10
Time stamp when statistics were cleared (format the same as the create time stamp
above)
130
30
Reserved
Length
Description
* 160
169
10
Reserved
* 179
* 180
Chain pointer type used for the file (binary 0 or 1). If 0, chain pointers are absolute block
numbers. If 1, chain pointers are relative offsets from the home block. The range is + or
- 32767. A chain pointer to the home block is - 32768.
182
266
Reserved
448
60
* 508
User identification (This should be USER or another identification of how the file was
created. This field is binary zeros if created by IBM.)
6-22
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
7-1
7-1
7-1
7-2
7-2
7-2
7-3
7-3
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.
|
|
|
|
|
|
|
|
|
|
|
|
7-1
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.
7-2
Rename a table: This option changes the name of a table and associated symbol and working tables.
Before renaming a table, make sure that you will not execute any applications that refer to the table by its
old name.
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
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.
7-3
You should assign state IDs sequentially starting with 1. Allowing gaps in ID assignments causes
additional storage to be used.
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.
7-4
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8-2
8-3
8-3
8-4
8-4
8-5
8-5
8-6
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 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.
A LIB86 command line uses the following general format:
A:>LIB86 filespec=filespec {[options]} {,filespec}
LIB86 checks for errors and displays literal error messages. The error messages are described in LIB86
Error Messages on page B-1.
8-1
Abbr
Purpose
DELETE
Echo
EXTERNALS
INPUT
MAP
MA
MODULES
MO
NOALPHA
PUBLICS
REPLACE
SEGMENTS
SEG
SELECT
SEL
XREF
$O
$X
$M
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,
.
.
.
8-2
To use the command-line file and start LIB86, specify the INP file as follows:
A:>LIB86 LIBRARY1 [INPUT]
Note: LIB86 assumes an INP file extension if you are using the INPUT option.
The preceding example specifies the INPUT option, instructing LIB86 to read the remainder of the
command line from the LIBRARY1.INP disk file.
8-3
8-4
Selecting Modules
Use the SELECT option to select specific modules from an existing library to create a new library.
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.
8-5
You can combine the SELECT option with any of the options previously described to generate partial
library information maps, as shown in the following examples:
A:>LIB86 TESTLIB.L86 [XREF, [SELECT [ONE, + TWO, THREE]]]
A:>LIB86 MATHLIB.L86 [MAP, NOALPHA, SELECT [MULT, + DIVIDE]]
A:>LIB86 LIBRARY1.L86 [MODULES, SEGMENTS, SELECT + [ONE - FIVE]]
LIB86 assumes that all files specified on a command line (or INP file) are in the default directory. You can
access files in other directories in several ways. These options are listed in their order of precedence:
1. A fully specified path name can be included with each L86 or OBJ file name. The following example
shows how to specify locations of L86 or OBJ files that are not contained in the default directory:
A:>LIB86 C:\LIBA\NEW1=LIB1.L86,C:OBJ1\ONE,C:\OBJ2\TWO
In this case, a new library, NEW1.L86, will be created in the C:\LIBA directory. The components of
the new library will be LIB1.L86 (default directory), ONE.OBJ (C:\OBJ1 directory), and TWO.OBJ
(C:\OBJ2 directory).
2. Options $M, $O, and $X can be used on the command line (or in an INP file). These options override
the default directory. They must be specified as follows:
$Ofilespec specifies input OBJ or L86 file location.
$Xfilespec specifies output XRF file destination.
$Mfilespec specifies output MAP file destination.
The $O option remains in effect as the library utility processes a command line from left to right, until it
encounters another $O. This feature is useful when you create a library from groups of files in
different directories.
The following command causes a MAP file to be placed in C:\MAPS, an XRF file to be placed in
C:\XREFS, and looks for OBJ files only in the C:\OBJS subdirectory.
A:>LIB86 TEST.L86[X,MA,$XC:\MAPS,$MC:\XREFS,$OC:\OBJS]
Note: The $O option is selectively ignored if a fully specified file name is used for any OBJ, INP, or
L86 input file.
|
|
3. LIB86 recognizes 4690 logical file names, but does not supply the .OBJ file extension when an
extension is not specified.
4. A search path can be set up to look for OBJ, L86, or INP files if they are not found in the default
directory. Environment variable, LIB86PATH, should be set (or defined) in the current DOS, OS/2, or
4680 session before running the LIB86 utility.
If you want the library utility to search for OBJ, INP, or L86 components first in the C:\NEWCODE,
then in the C:\OLDCODE directories, establish that search path by issuing the following command:
OS/2 or DOS:
A:>SET LIB86PATH=C:\NEWCODE;C:\OLDCODE
4680:
A:>DEFINE LIB86PATH=C:\NEWCODE;C:\OLDCODE
When the library utility is subsequently run, OBJ, INP, and L86 files will be searched for along this
path if they are not found in the default directory.
Note: This option is selectively overridden if either option 1 or option 2 is specified for specific input
files.
8-6
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
9-2
9-3
9-4
9-4
9-5
9-5
9-6
9-6
9-7
9-7
9-7
9-7
9-8
9-8
9-8
9-9
9-9
9-9
9-10
9-10
9-10
9-10
9-10
9-11
9-11
9-11
9-11
9-12
9-12
9-12
9-13
9-15
9-15
9-15
9-1
When processing is complete, LINK86 displays the size of each section of the load module. See
Figure 9-1 on page 9-3.
9-2
LIN
(Line Number File)
LINK 86
SYM
(Symbol Table File)
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.
For example, the following command creates the file PARTA.286:
A:>LINK86 PARTA,PARTB,PARTC
Note: If you specify a library file in your link command, do not enter the library file as the first file in the
command line.
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.
Abbreviation
Meaning
CODE
DATA
EXTRA
9-4
Abbreviation
Meaning
STACK
ST
LIBSYMS
LI
NOLI
LOCALS **
LO
NOLOCALS
NOLO
NOSYMS
NOSY
LINES **
LIN
NOLINES
NOLIN
NOSEARCH
NOSE
MAP
SEARCH **
SHARED
SH
NOSHARED
NOSH
CODESHARED
CODESH
INPUT
ECHO
ECHO
DBI
DBI
NOLIBSYMS
**
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.
Table 9-2. Command-File Option Parameters
Parameter
Abbreviation
Meaning
GROUP
SEGMENT
ADDITIONAL
AD
MAXIMUM
9-5
NOSYMS
LOCALS
NOLOCALS
LIBSYMS
NOLIBSYMS
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.
9-6
LOCALS and NOLOCALS: The LOCALS option directs LINK86 to include local symbols in the
SYM file if they are in the object files being linked. The NOLOCALS option instructs LINK86 to ignore
local symbols in the object files. The default is LOCALS.
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 following example disables library symbol generation for ADXADMBL.L86:
A:>LINK86 TEST,ADXACRCL.L86,ADXADMBL.L86 [NOLI]
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
NOSEARCH
SHARED
NOSHARED
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.
The NOSHARE option must be specified for each module to be linked.
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 users
code file, and the loader does not have to perform a load-time resolution of external references.
9-8
As an example of the NOSHARED option, the following command format causes LINK86 to treat the
shareable runtime library as an unshared library:
A:>LINK86 MYPROG=MAIN,PART1,PART2[NOSHARED]
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 modules 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 Managers code is not shareable.
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]
If no file extension is specified for an input file, LINK86 assumes INP.
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.
9-9
|
|
|
|
|
|
|
|
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]
$Dpathname
|
|
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.
9-10
LINK86 normally creates the LIN file in the same subdirectory as the load module. The $L option directs
the linker to place the LIN file in the directory specified by the pathname that follows the $N option:
A:>LINK86 TEST [$NC:\LINS]
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 Users Guide for additional information about compiling
and linking an application to prepare it for debugging.
9-11
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 programs 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.
9-12
Function
3
30K
Function
1
Function
2
Function
2
Function
3
30K
30K
100K
40K
Function
1
30K
Menu
10K
10K
Menu
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
Function 1
Sub3
Function 2
Function 3
Menu
9-13
9-14
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.
9-15
9-16
10-1
10-2
10-3
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 jobs 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.
10-1
Character 2
Printer held. A hold command has been issued, and no jobs are currently being despooled from that
particular queue. When an activate command is issued, the job currently at the top of the queue will
start over.
Character 3
Printer error. The printer has detected an error in printing. This does not include errors such as
out-of-paper, powered-OFF, and so on.
Character 4
Out-of-Paper. The printer has run out of paper and is currently waiting.
Character 5
Printer timeout. The printer has taken too long to give the go ahead signal.
Character 6
Printer powered-OFF. The printer lost power. This event is serious because it involves a loss of data.
The last nine characters are used as follows:
Character 7
Indicates the printer the job was queued for. This value is a number 1 through 8. If the job is being
held (not the queue), this character is an asterisk.
Characters 8 through 10
Indicate the jobs current position for printing. 000 indicates the job is currently being despooled to
the printer.
Characters 11 through 13
Indicate the jobs current job ID.
Characters 14 and 15
Are carriage return and line feed characters, which indicate the end of the record.
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.
command(2),jobid(3),source(1),destination(1),node(8),
10-2
where:
command =
PJ =
TJ =
CJ =
HJ =
AJ =
HQ =
AQ =
LQ =
TQ =
RQ =
CQ =
jobid =
The three-character variable indicates the job to be affected (commands ending with a J).
Default job is the job corresponding to this OPEN.
source =
The one-character variable indicating the queue to be affected (commands ending with a
Q). Valid values are 1 to 8. Default queue is the one corresponding to this OPEN.
destination =
The queue to receive jobs (commands TJ and TQ). Valid values are 1 to 8. This
variable has no default.
node =
Eight-character variable used for commands TJ and TQ. If the destination printer is
across the network, this variable supplies the node name.
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,,,
10-3
PJ,001,1,,,
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 jobs 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)
10-4
This command is used only in the special instance where an IPL has occurred. If the spooler detects
unfinished jobs in a queue after an IPL, it enters recovery mode. In this mode, no affected queues are
restarted until a load queue command is given. However, a queue is automatically restarted after an
IPL if it is sent a new job to queue.
LQ,,1,,,
source
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 users 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
10-5
10-6
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
11-1
11-1
11-3
11-3
11-4
11-4
11-7
11-8
11-8
11-9
11-9
11-10
11-11
11-11
11-12
11-12
11-13
11-13
11-14
11-15
11-15
11-1
Description
Commands that the IPL Command Processor processes early in the IPL sequence occur before the
creation of the operator console facility (OCF) error logging process. Commands executed at this
point can gain exclusive access to the disk. LAN (MCF Network) and error logging (ADXERROR)
services are not available.
Commands that the IPL Command Processor processes in the middle of the IPL sequence occur
after the installation of the LAN drivers and before the installation of Data Distribution. Primitive
LAN services are available, but Data Distribution is not active to prevent operations on image files.
File updates are not distributed. Image versions of distributed files can be updated, renamed, and
erased. The operating system does not resolve discrepancies automatically. Prime versions of
distributed files can be updated, renamed, and erased, although these changes are not performed
on the corresponding image files. Disk repair procedures require changes to the image file, but the
changes can cause damage if not used carefully. The user is responsible for the results of all file
updates made during time frame 2. Only files that are defective and have been repaired by the
Disk Surface Analysis Utility should be modified during time frame 2. Error logging services
(ADXERROR) are not available during time frame 2.
Commands that the IPL Command Processor processes late in the IPL sequence occur after most
drivers and services have been initialized. However, ADXSERVE, ADXSTART, and ADXERROR
are not available.
At each of the three time frames, the IPL Command Processor executes the commands for that
phase in the order that they appear in the command file. The only control structure provided by the
IPL Command Processor is the Exit On Error option (-x). If a command that has been prefaced by
the Exit on Error option ends in an error, the IPL Command Processor executes no other
commands for the remainder of the IPL sequence. An error is a non-zero return code.
Each command appears on the screen as it is being executed. Output on the display for each
command is redirected to a temporary RAM disk work file. This allows the command to have
exclusive access to the disk. The work file is copied to the output file (ADXNSxxF.DAT) in
subdirectory ADX_SDT1. The xx represents the node ID. If the output file already exists, the work
file is appended to the existing output file. Each command name and return code is saved and
logged when the OCF logging function becomes active. After the last command in the command
file has been processed, the local output file is appended to ADXNSxxF.DAT in subdirectory
ADX_SDT1 on the Acting Master Controller. The local output file is deleted when the Master store
controller receives a copy of the output file.
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
DEFINE
ERASE
DVRLINK
DVRLOAD
DVRUNIT
DVRUNLK
MKDIR
RMDIR
SECURITY
For more information on these commands, refer to the 4690 Store System: Users Guide.
11-2
To allow Data Distribution to update the command file in place on the disk, the attributes must be a
compound, Distribute Per Update. Each command in the command file may be prefaced by a node
identifier which allows each store controller on a LAN (MCF Network) to be customized. Each command
must be on a separate line and ended by ASCII carriage return and line feed characters.
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.
ADXCSW0L
ADXCSW0L
ADXCSW0L
ADXCSW0L
drive:
drive:\filename.filetype
drive: -parameters
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:
Chapter 11. Using the Disk Surface Analysis Utility
11-3
You can invoke the Disk Surface Analysis Utility without the -F parameter to report the current defects and
changes that have been made.
Allows you to specify a defective sector on a fixed disk. It is referred to as the sector parameter.
This parameter must be followed by a decimal or hexadecimal (prefixed by 0X) number, which
represents a relative sector number. The first sector on a fixed disk is the relative sector number 0.
ADXCSW0L assumes that the disk sector that is specified by the -R parameter is defective. The
cluster corresponding to the specified sector is marked defective in the file allocation table. The data
is copied to a new area on the disk when the -F parameter is specified.
Note: If you do not know if the sector is defective, invoke the utility without the -F parameter. All
information about the sector is printed. The data remains in place.
-F
Allows you to make repairs. If you do not specify this parameter, the information is listed, but not
corrected. Unallocated areas with surface defects are marked defective in the file allocation table.
Each cluster that is allocated to a file that contains defective sectors is remapped to another cluster.
The former cluster is marked defective in the file allocation table. The data is read into the new
cluster, and the sectors that cannot be read are replaced with fill data. The default fill character is
0x2E.
Note: The file allocation table and the root directory cannot be remapped. Errors within these
areas can be reported, but cannot be corrected.
-C
Allows you to specify the fill character to replace the unreadable sectors in a file. The -C parameter
can override the default fill character.
11-4
Note: If the -F parameter is not specified, a message is displayed on the screen that indicates defects
are reported but not corrected.
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 ****
****************************
Cluster Number:
Status:
Cylinder:
Head:
Sector:
Relative Sector Number:
Error Code:
0032
Allocated
4
1
8
16c
86210004
***************************
****
Files Repaired
****
***************************
Cluster Number:
Replaces Cluster Number:
File Name:
Lost Data Offset:
3500
0033
0032
C:\TEST1.DAT
Lost Data Size:
0200
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.
Attempting to recover D:\TEST2.DAT
****************************
****
Surface Defects ****
****************************
Cluster Number:
Status:
Cylinder:
Head:
Sector:
Relative Sector Number:
Error Code:
0946
Allocated
071
03
06
25BD
86210004
11-5
***************************
****
Files Repaired
****
***************************
Cluster Number:
Replaces Cluster Number:
File Name:
Lost Data Offset:
3500
0033
0946
C:\TEST2.DAT
Lost Data Size
0200
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:
With specified sector number 25D1.
Information on specified bad sector:
Cluster Number:
094B
Status:
Allocated
Cylinder:
071
Head:
04
Sector:
09
Relative Sector Number:
25D1
Error Code:
86210004
***************************
****
Files Repaired
****
***************************
Cluster Number:
0950
Replaces Bad Customer:
094B
File Name:
TEST3.DAT
Lost Data Offset:
Lost Data Sizes
1800
200
ADXCSW0L drive:\filespec -parameters performs a surface analysis on a specified file name to be
specified along with the parameters. However, only the fill character and the fix parameters are allowed
with the file name. The sector parameter -R is not allowed. A message appears if the -R is included in
the command.
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
11-6
***************************
**** Surface Defects ****
***************************
Cluster Number:
Status:
Cylinder:
Head:
Sector:
Relative Sector Number:
Error Code:
0947
Allocated
071
03
09
25C0
86210004
***************************
****
Files Repaired
****
***************************
Cluster Number:
Replaces Cluster Number:
File Name:
Lost Data Offset:
2600
0046
0947
C:\TEST4.DAT
Lost Data Sizes
0200
11-7
The following steps explain how to use the Disk Surface Analysis Utility for disk recovery.
Note: You can omit steps 1 through 3which contain the initial disk analysis command, re-IPL, and
report sequenceif you know a particular file is damaged (for example, an error message has been
logged on a file).
1. Transfer the command file containing the ADXCSW0L command from the host. The command
requests that the Disk Surface Analysis Utility be started on the store controllers fixed disk.
2. IPL the store controller manually or by using the RCP re-IPL command. Refer to the IBM 4690 Store
System: Communications Programming Reference for more information.
3. The store controller generates the utilitys output report, and the host retrieves it. The report indicates
fixed disk areas that are defective.
4. Send a new command file to the store controller containing the following commands:
Disk Surface Analysis Utility command using the -F parameter.
ERASE or RENAME command of files containing surface defects. You can use the RENAME
command to save a copy of the file that contains unreadable data replaced by fill characters.
COPY command for each file with surface defects from any store controller on the LAN. If the
store controller is not on a LAN, the file can be transmitted from the host.
5. IPL the store controller and the repairs are performed.
6. The store controller generates a second output report at the store controller, and the host retrieves it
to verify the changes.
7. Send a default (empty) command file to the store.
Note: To ensure that a command file can be transmitted to the store after a surface defect appears, you
can send a default command file containing zeros or blanks equaling the maximum number of commands
that you need. Use the HCP LOAD FILE command or the RCMS SEND command to overwrite the
existing file with the new command file.
-1
ADXCSW0L
-1
RENAME
-2
COPY
-2
COMMAND -c ERASE -2
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.
11-8
11-9
2. Execute the following RCP command on the master store controller to re-IPL:
adxcs20l N 13
3. Retrieve ADX_SDT1:ADXNSCCF.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
-ncc -x -1 adxcsw0l c: -f
-ncc -2 copy adxlxddn::adx_spgm:adxcsL0L.286
gadx_sp m:adxcsL0L.286
5. Execute the following RCP command on the master store controller to re-IPL.
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:ADXNSCFF.DAT.
gadx_sp m:adxcsL0L.286
11-10
11-11
11-12
8. Delete ADX_SDT1:ADXNSCCF.DAT.
9. Use existing procedures to reload the item record file. Until this is done, attempts to access items that
were present in the damaged section of the item record file fails.
&d:\adx us.idt1\ealitemr.dat
11-13
-ndd -1 adxcsw0l d:
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
EALITEMR.DAT.
4. Create the following command file at the host site and transmit it to the store as
ADX_SDT1:ADXILI0F.DAT.
-1 -ndd -x adxcsw0l d: -f -c0
-2 -ndd command -c erase d:adx_idt1\ealitemr.dat
-2 -ndd copy adxlxccn::d:\adx_idt1\ealitemr.dat
&d:\adx us.idt1\ealitemr.dat
11-14
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.
The following errors were logged by the alternate file server:
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_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.
11-15
11-16
where:
nnn = the number of seconds between automatic refreshes. Specifying a zero-seconds interval disables
automatic refresh. The default interval is 30 seconds.
12-1
Format:
ADXLAS0L -p
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.
2.
3.
4.
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).
The following is an example of a LOOP STATUS screen:
L O O P
Controller/Loop:
CC/1
Select Terminal:
016
Last Beacon:
S T A T U S
Loop 3 of 4
Configured:
Status:
***************
****************
09/09 10:26 CC
F1 HELP
12-2
F2
F3 QUIT
F4
F5
F6
F7
F8
-OR-ORF9 Refresh
F10
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
13-1
13-2
13-2
13-2
13-2
13-3
13-3
13-3
13-4
13-5
13-5
13-5
13-5
13-5
13-6
13-6
13-6
13-7
13-7
13-8
13-8
13-8
13-10
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.
13-1
Capabilities
This section describes the capabilities of the Staged IPL Utility.
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.
13-2
Note: These steps are unnecessary for most maintenance; they are only precautions you should
follow when the software might be incompatible. Even then, it may not be necessary to follow all
these suggestions. Use those that provide the most safety with the least inconvenience.
Application Interface
This section describes the application interfaces that you can use with the Staged IPL Utility.
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:
Note: Normally, this indicator is N because it usually runs after ADXCST0L. Also, you would not
want to erase resulting messages from ADXCST0L.
= 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.
= 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
13-3
activated maintenance. The value must be between 10 and 35791 (about 24 days). The value must
not have a decimal point, comma, or minus sign.
= Node ID. The node IDs are sets of two-character designations for the controllers to be IPLed. The
controllers are IPLed in the order of the node IDs specified with this command. If the controller on
which this utility runs is on the list, it must be last. Otherwise, the IPL ends this utility and the
subsequent nodes are not be IPLed.
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.
13-4
Recommended Use
This section provides some recommendations for using the Staged IPL Utility.
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
13-5
This command causes the Staged IPL Utility, ADXCS50L, to run on the acting master. If DD is not the
acting master store controller, the utility ends with the message:
CONTROLLER DD MUST BE LAST IN THE LIST OF CONTROLLERS TO IPL
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.
13-6
Ideal System: The following summarizes the requirements presented in this chapter:
Run ADXCST0L first with the NI RCP parameter.
Put the controller on which this utility is running last on the list.
The following list summarizes the recommendations presented in this chapter:
IPL the controller acting as primary before the controller configured to support backup.
If the terminals need to be loaded, use the TL parameter of ADXCST0L.
Use a wait time of 300 seconds.
Use a timeout value of 120 minutes.
IPL the acting master last.
ADXCST0L should activate the software in test mode.
13-7
Messages
The following table explains the messages which can appear when you use this utility.
Table 13-1 (Page 1 of 3). Staged IPL Utility Messages
Message
Description
The wait time cannot contain periods, commas, minus signs, letters, or any
characters other than 0 through 9.
The timeout value cannot contain periods, commas, minus signs, letters, or
any characters other than 0 through 9.
The node name lists must be of the form CC DD. There should not be
commas separating the parameters.
13-8
Description
The controller that is running this utility must be last in the list. To run on
another controller, add the node ID to the front of the command, as in the
following example:
DD::ADXCS50L N 0 120 CC DD
The controller indicated is not able to receive commands using the Multiple
Controller Feature.
An ADXSERVE command issued to the remote node to test the ability of the
controller to communicate failed.
An attempt to IPL the remote node failed. Either the request returned a
negative return code, or the controller remained up after acknowledging the
request. If no failing return code was returned from the request, the
user-specified timeout value was used to prevent a long wait for the
controller to go down.
The remote controller IPLed, then came up to at least the point when
background applications are started. After the specified wait time, a query of
the node returned an error indicating that the controller is not active on the
LAN (MCF Network).
The remote controller has not come up within the number of minutes you
specified as the timeout parameter.
Refer to the 4690 Store System: Messages Guide for further information on
interpreting the error.
You must supply at least four parameters for this function to work. See the
section about the format of the command.
The node ID was the same as another node ID previously listed in the
parameter list. If it is not listed twice, it is the same as another logical drive
that points to the same controller.
Activation of maintenance on
controller %c%c failed.
The IPL portion of ASM that moves files failed. A W638 message should be
in the System Event Log. Maintenance will be canceled automatically if
possible.
The IPL portion of ASM that moves files failed. A W638 message should be
in the System Event Log. Maintenance will be canceled automatically if
possible.
13-9
Description
The timeout value must be at least long enough to allow time for the
controller to IPL and activate maintenance.
13-10
|
|
|
|
|
|
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
14-2
14-3
14-4
14-4
14-5
14-5
14-1
|
|
|
|
|
|
|
|
ADXNSXZL is a multiple file archiver with built-in compression and decompression. It provides a simple
and convenient means of copying large files onto a diskette as efficiently as possible. It is not compatible
with the 46x0 Compress/Decompress utility and is intended only for command line use.
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
14-2
This example adds a compressed version of the file C:\TEST.LOG to the existing combine file
MYFILES.DAT. If the combine file is missing, an error is reported and no action is taken.
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
To determine which files are contained within a given combine file, it is necessary to map the combine file,
using the M parameter.
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:
ADXNSSLG.DAT
468663
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.
14-3
To restore files to their original format from a combine file, you must use the split parameter.
|
|
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
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\
14-4
Format:
ADXNSXZL L TEST.DAT ADX_UPGM: FILES.LST
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.
0
1
2
3
4
5
6
7
8
9
10
11
99
|
|
|
|
|
|
|
|
|
|
|
|
Good
Incorrect parameters
File is not valid or is corrupted.
Combine file is corrupted.
Filename/directory is not valid.
Unable to allocate storage.
File already exists.
Combine file is not valid.
Out of disk space.
Temp file is not valid.
List file is not valid.
Log file is not valid.
New combine file is required.
14-5
14-6
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
15-2
15-2
15-2
15-3
15-3
15-3
15-4
15-5
15-5
15-5
15-6
15-6
15-7
15-8
15-8
15-9
15-10
15-10
15-10
15-11
15-11
15-12
15-17
15-17
15-17
15-29
15-30
15-30
15-31
15-31
15-31
15-31
15-32
15-32
15-32
15-33
15-34
15-37
15-38
15-39
15-39
15-39
15-41
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 applications 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.
15-1
Refer to the IBM 4680 BASIC: Language Reference for the character set, variable types, commands, and
syntax rules. You can use a text editor to write your IBM 4680 BASIC applications.
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: Users 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 stores 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: Users 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 stores 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.
15-2
You can determine the status of your background applications by displaying the BACKGROUND
APPLICATION CONTROL screen and specifying the application name. This screen gives you the status
of the executing background application, the parameters passed to it, and any message sent by the
background application to the operator. Refer to the IBM 4690 Store System: Users Guide for information
on BACKGROUND APPLICATION CONTROL.
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: Users 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.
Chapter 15. Designing Applications with IBM 4680 BASIC
15-3
Each code segment requires a code segment name. You can use a maximum of 200 code segment
names in a load module for the terminal. The IBM 4680 BASIC compiler uses up to five of these code
segment names for each load module. Each object module uses one code segment name. Therefore,
you can have up to 195 object modules per load module plus five code segment names used by the
compiler for a terminal application. There is no limit to the number of object modules in a load module for
an application in the store controller.
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
callers 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
15-4
load does not succeed. The loader obtains as much memory as possible for the stack, up to the
maximum size requested.
|
|
|
|
|
|
|
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:
Users 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.
15-5
This section describes functions that can start background applications. These functions are contained in
the runtime library ADXACRCL.L86.
ADXSTART
This function starts a background application using the 4690 Operating System.
This function is declared as follows:
FUNCTION ADXSTART (NAME$,PARM$,MESS$) EXTERNAL
INTEGER*2 ADXSTART
STRING NAME$,PARM$,MESS$
END FUNCTION
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)
The function is invoked as:
return.small=ADXSTART (pname$,iparm$,imess$)
This function returns a zero if a command was issued to start the application. Table 15-1 shows return
codes and their descriptions.
Table 15-1. ADXSTART Return Codes
Return Code
Description
-1000
-1001
-1170
-1171
-1172
-1175
Invalid parameter.
-1176
15-6
ADXPSTAR
This function starts a background application at a specified priority. To better understand ADXPSTAR and
its priority, you should become acquainted with how the 4690 Operating System schedules applications.
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.
The function is declared as follows:
FUNCTION ADXPSTAR (NAME$,PARM$,MESS$,PRIORITY) EXTERNAL
INTEGER*2 ADXPSTAR,PRIORITY
STRING NAME$,PARM$,MESS$
END FUNCTION
where:
NAME$
PARM$
MESS$
15-7
Description
-1001
-1170
-1171
-1172
-1175
Invalid parameter.
-1176
-1177
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:
Files in Subdirectories
User ID
Group ID
ADX_Ixxx
ADX_Uxxx
15-8
EXTERNAL
where:
FUNC
OPID$
OPPW$
OPID2$
FUNC Parameter for Operator Authorization: The FUNC parameter tells you what action can
be taken. The functions you can choose are:
1
2
3
8
9
=
=
=
=
=
15-9
The make function allows you to use an operator ID as a template for other IDs. You can create or
change other IDs without having to select each system function from the screens. The new or changed
IDs have the same authorization as the template ID. However, for FUNC 10, the new ID does not have
greater authorization than the ID whose authorization must not be exceeded.
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.
Table 15-3. FUNC Parameter for Operator Authorization Return Codes
Return Code
Description
-1000
-1001
-1002
-1003
-1004
No password specified.
-1005
-1010
-1011
Function handled as requested using default authorization because OPID2$ was not found.
-1020
OPID$ ParameterOperator 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.
OPPW$ ParameterOperator Password: This parameter is the password for functions 1, 2, 8,
9, and 10. The OPPW$ parameter should be a string containing up to eight ASCII alphanumeric
characters. This parameter should not contain leading blanks. Leading blanks and zeros are considered
part of the password. 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.
15-10
Password Encryption
The IBM 4690 Operating System uses one-way encrypted passwords. The system encrypts passwords
before storing them in the system authorization file. When an operator signs on, the password entered is
encrypted and the encryption code is compared to the encrypted password code in the operators
authorization record. If the two codes match, the operator is allowed to sign on. If your application files
contain passwords, your applications should encrypt the passwords. You can use the following
subprogram to encrypt an eight-character ASCII password:
SUB ADXCRYPT (RETCODE, PWIN$, PWOUT$) EXTERNAL
STRING
PWIN$,PWOUT$
INTEGER*2
RETCODE
END SUB
where:
RETCODE
PWIN$
PWOUT$
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.
15-11
Pipes have security restrictions similar to those used for files. The application creating the pipe owns it,
and the system saves the user and group ID of the creator. The system creates and opens the pipe in
read-write mode unless your application specifies otherwise.
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.
15-12
where:
IONUM
An I/O session number used for normal opens and creates. Use the same number for waits
and reads that follow.
SIZE
The number of bytes to allocate for the pipe size. Maximum pipe size for pipes created by
terminal applications is 240 bytes. If you inadvertently define a size larger than the maximum
allowed, the pipe size is limited but no error message appears. The maximum pipe size for
pipes created by a controller application is 65,536 bytes.
PIPEID
Table 15-4 shows the two-byte integers the PRSxCRT function returns.
Table 15-4. Function PRSxCRT Two-Byte Integers
Integer
Description
Good completion
-1000
Invalid pipe ID
-1001
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 controllers
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.
Chapter 15. Designing Applications with IBM 4680 BASIC
15-13
|
|
The following conditions can result in errors being returned to a terminal application for a READ FORM#
statement. Refer to the IBM 4690 Store System: Messages Guide for error information.
If a READ FORM# specifies more bytes for a message than are actually in the Pipe Routing Services
pipe, the system purges all of the data in the Pipe Routing Services pipe.
If the program issues a WAIT and is notified that data is in the Pipe Routing Services pipe, it is
possible for the data to become unavailable before the program can issue the READ FORM#. This
can occur if the program that wrote the data into the Pipe Routing Services pipe is ended before the
READ FORM# is issued.
If a program attempts to read a message of more than 120 bytes, an error is returned. Pipe Routing
Services pipe messages can contain a maximum of 120 bytes.
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
15-14
where:
PRSNUM
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 controllers 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 addresses.
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.
|
|
|
Table 15-5 shows the 4-byte integers that are returned by the PRSxWRT function.
Table 15-5. Function PRSxWRT Four-Byte Integers
Integer
Description
Good completion.
-1
Destination pipe is full or does not have enough space available to hold the data being written.
-1010
-1011
-1012
-1013
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:
|
|
15-15
|
|
|
|
|
where:
|
PRSNUM
BUFFER
|
|
|
DEST
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
Integer
Description
Good completion.
-1
The destination pipe is full or does not have enough space available to hold the data being
written.
-1010
-1011
-1012
-1013
15-16
RET
FUNC
PARM1
PARM2
= Is the return code. It is zero if the operation was successful, or negative if the operation
failed. Return code values are listed below.
= Specifies which ADXSERVE service is to be called.
= Varies according to the function. See the following function descriptions.
= 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.
15-17
Description
-1000
-1001
-1002
-1003
-1015
Cannot send power-OFF message to remote controller because of non-LAN system. (Returned
when FUNC=5)
-1016
-1017
-1018
Invalid controller ID specified in ADXSERVE call or not active controller. (Returned when
FUNC=5)
-1019
Request issued on LAN system controller that is not the master store controller.
-1020
-1021
ABIOS driver call failed either because of a system problem or invalid time. (Returned when
FUNC=5)
-1022
-1023
Programmable Power request is pending. Either Programmable Power has been disabled or an
application has set the 'No-IPL' flag in a MOD1 or MOD2. (Returned when FUNC=5)*
-1080
Command blocked by system control function from the screen and keyboard. (Returned when
FUNC=2 or 3)
-1081
-1100
-1101
-1212
Note:
You receive an incorrect FUNC message if a store controller-only function is called in the terminal application.
* When programmable power is subsequently enabled, the pending power-OFF command will be issued if the
power-ON time has not passed, or if the power-ON time is 999.
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.
The Dump System Storage function uses the following parameters:
FUNC = 1
PARM1 = Unused; the value is ignored.
PARM2 = Unused; the value is ignored.
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 terminals 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.
15-18
If the function is called in the terminal, the effect is temporary. The condition established in the controller
overrides the temporary terminal condition. Whenever the terminals receive updates from the controller,
terminal online updates occur when terminal-to-controller communications are interrupted or when system
functions are used that require sending new status to a terminal.
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 terminals 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-8 (Page 1 of 2). Store Controller Application Status
Offset
Length
Description
Store number
Date format:
1
2
3
4
|
|
|
|
|
|
|
|
m/d/y
d/m/y
m.d.y
d.m.y
Time format:
1 = h:m:s
2 = h.m.s
|
|
|
=
=
=
=
Monetary format:
1 = period convention (1,234,970.06)
2 = comma convention (1.234.970,06)
3 = French convention (1 234 970 06)
15-19
Offset
Length
Description
Display type
0 = unknown display (for example CMOS information is invalid)
1 = monochrome display
2 = color display
|
|
|
|
11
15
Reserved
17
19
22
23
24
Controller is on LAN = 1
Master = 16
Alternate master = 8
File server = 4
Alternate file server = 2
Or a combination of these (add the values) (for example, alternate master and
alternate file server = 11;
Master and file server = 21
Controller is not on LAN = 00
26
27
28
LAN Type:
0 = LAN not installed
1 = Token Ring
2 = Ethernet
|
|
|
|
29
51
Reserved
Table 15-9 shows the data for the terminal application status.
Table 15-9 (Page 1 of 3). Terminal Application Status
Offset
Length
Description
Store number
Date format:
1
2
3
4
=
=
=
=
m/d/y
d/m/y
m/d/y
d/m/y
Time format:
1 = h:m:s
2 = h:m:s
Monetary format:
1 = period convention (1,234,970.06)
2 = comma convention (1.234.970,06)
15-20
Length
Description
10
Terminal online/offline
0 = offline
1 = online
11
Storage Retention
0 = disabled
1 = enabled
12
24
36
37
39
Backup (loop)
1 = Loop in backup
0 = Not in backup
40
System Display
1
2
3
4
5
41
=
=
=
=
=
Display
Display
Display
Display
Display
named
named
named
named
named
0 = Mod1 1 = Mod2
42
45
47
48
Application Environment
0 = Running in a terminal
1 = Running in a controller/terminal
49
|
|
51
|
|
Terminal Type
1
2
3
4
|
|
|
|
|
52
(4693)
(4694)
(4683)
(4684)
15-21
Offset
Length
Description
53
27
Reserved
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.
This function uses the following parameters:
FUNC = 5
PARM1 = 1
PARM2 = DDHHMMCC
DD = is the day of month (01 - 31)
HH = The hours (00 - 24)
MM = The minutes (00 - 59)
CC = The controller ID (CC through ZZ)
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.
15-22
FUNC = 5
PARM1 = 2
PARM2 = DDHHMMTTT
DD = The day of month (01 - 31)
HH = The hours (00 - 24)
MM = The minutes (00 - 59)
TTT = The terminal number (001 - 999)
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.
This function uses the following variables:
FUNC = 5
PARM1 = 3
PARM2 = Unused; the value is ignored.
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.
This function uses the following parameters:
FUNC = 5
PARM1 = 4
PARM2 = Unused; the value is ignored.
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.
This function uses the following parameters:
FUNC = 5
PARM1 = 5
PARM2 = DDHHMM
DD = The day of month (01 - 31)
HH = The hours (00 - 24)
MM = The minutes (00 - 59)
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.
15-23
FUNC = 25
PARM1 = Unused; the value is ignored.
PARM2 = Specify a string containing the message. This should not be modified.
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.
This function uses the following parameters:
FUNC = 26
PARM1 = Unused; the value is ignored.
PARM2 = Specify a string containing the message; this should not be modified.
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.
This function uses the following parameters:
FUNC = 27
PARM1 = Unused; the value is ignored.
PARM2 = Use to pass a string containing the message; this should not be modified.
The message is displayed only if this function is requested by the current owner of the physical screen.
Get Disk Free Space: This function returns the amount of free space on the specified remote or local
drive.
This function uses the following parameters:
FUNC = 28
PARM1 = Unused; the value is ignored.
PARM2 = Specify a node name (if non-local) and the drive or a logical name for the node or 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.
This function uses the following parameters:
FUNC = 29
PARM1 = Unused; the value is ignored.
PARM2 = Specify a string variable.
15-24
Get the Controller ID for a Specified Terminal: This function returns the store controller ID for a
terminal you specify.
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.
This function uses the following parameters:
RET
FUNC
PARM1
PARM2
=
=
=
=
Always modified.
30
Number of the terminal for which the ID is requested.
Unused.
Convert ASCII Characters to EBCDIC Characters: This function converts ASCII characters in a string
to EBCDIC characters.
This function uses the following parameters:
FUNC = 31
PARM1 = Unused; the value is ignored.
PARM2 = Specify a string of ASCII characters to be converted to EBCDIC; this string is modified to
EBCDIC characters.
Convert EBCDIC Characters to ASCII Characters: This function converts EBCDIC characters in a
string to ASCII characters.
This function uses the following parameters:
FUNC = 32
PARM1 = Unused; the value is ignored.
PARM2 = Specify a string of EBCDIC characters to be converted to ASCII; this string is modified 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.
This function uses the following parameters:
FUNC = 33
PARM1 = Specify one of the following:
0 To turn off the terminal dump preservation flag
1 To turn on the terminal dump preservation flag
2 To query whether the terminal dump preservation flag is ON or OFF
PARM2 = Unused; the value is ignored.
15-25
Get Loop Message: This function gets the three most recent system messages for the store loop or
token-ring adapter specified in PARM2. PARM2 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 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.
This function uses the following parameters:
FUNC = 34
PARM1 = Unused; the value is ignored.
PARM2 = Specify a string containing node and TCC Network.
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
The configuration is defined as:
00
01
02
04
80
=
=
=
=
=
Not used
Primary
Secondary
2400 bps loop
Auto-resume of Primary Loop Control
FUNC = 35
PARM1 = Unused; the value is ignored.
PARM2 = Unused; the value is ignored.
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.
This function uses the following parameters:
FUNC = 36
PARM1 = Unused; the value is ignored.
PARM2 = Specify a string variable.
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.
15-26
Note: The RET is valid only if this function is issued at the master store controller.
This function uses the following parameters:
FUNC = 37
PARM1 = Terminal number.
PARM2 = Unused; a string variable.
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.
This function uses the following parameters:
RET
= INTEGER*4 with the 3 most-significant bytes containing the machine model and type. The
least-significant byte is always zero. Identical to the contents of PARM2.
FUNC = 38
PARM1 = Unused, the value is ignored.
PARM2 = 3 hexadecimal values left-justified machine model and type. For example, for a 4693-541, the
values returned are:
X'F8'
X'3E'
X'00'.
Check the Master or File Server Exception Log: This function returns whether or not there are any
entries in the exception log.
RET
|
|
|
|
|
|
|
|
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.
This function uses the following parameters:
FUNC = 41
PARM1 = Terminal Sleep Mode Timeout value. Valid values are 0 through 255. You can use a 0
value to disable the terminal sleep mode.
15-27
Load Specific Terminal: This function allows an application running in a store controller to load a
specific terminal.
FUNC = 42
PARM1 = Terminal Number
PARM2 = Unused; a string variable
|
|
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.
To enable terminal IPL, use the following parameters:
FUNC = 53
PARM1 = Unused; the value is ignored.
PARM2 = Unused; the value is ignored.
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
15-28
disabled, and the power-ON time had not yet passed, this function would cause the terminal to power
down.
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.
To disable terminal IPL, use the following parameters:
FUNC = 54
PARM1 = Unused; the value is ignored.
PARM2 = Unused; the value is ignored.
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
Invoke the routine using this request:
i%=ADXERROR(....)
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.
15-29
UNIQUE
A string of up to 10 bytes of data. This data is included in the log entry made as a result of
this request. If the data is longer than 10 bytes, the system uses the first 10 bytes. If it is
shorter, the system pads the entry with blanks.
Note: The system automatically includes the application name in the log entry.
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
XXX
_
sssssssss
=
=
=
=
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.
15-30
512 bytes
512 bytes
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.
15-31
disk. For information on how to copy files from the RAM disk, refer to the section on ADXCOPYF
(Copying RAM Disk Files) on page 15-32.
Your terminal application can access the controller RAM disk with the same IBM 4680 BASIC statements
that it uses to access hard disks and diskettes on the controller. Terminal applications cannot use BASIC
statements to access controller RAM disks U:, V:, and W:. Your application can call ADXCOPYF to copy
files between the controller and terminal, regardless of which disk contains the files.
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
The function is invoked as follows:
CALL ADXCOPYF (retc,infile,outfile,opt0,opt1)
Where:
retc
infile
outfile
opt0
15-32
0
1
opt1
= A 2-byte integer used to indicate distribution on a LAN (MCF Network) system (only for 4680
Version 2):
0
1
2
= Keep the distribution on the output file the same as on the input file.
= If the output file exists, keep the same distribution.
= Make the output file local.
Table 15-10 shows the ADXCOPYF defined return codes and their descriptions:
Table 15-10. ADXCOPYF Return Codes
Return Code
Description
Successful copy
-2002
-2003
-2004
Ownership differences
-2005
-2007
-2008
-2009
-2017
-2018
Rename error
This section contains routines that are available only to applications on the store controller. These
routines are in runtime library ADXACRCL.L86.
15-33
ADXFILES (Canceling the Shared Use of a File): ADXFILES cancel the shared use of a file
such as the transaction log. Without the use of ADXFILES, 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. 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)
15-34
where:
RET
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
80 F3 06 F5
80 F3 06 F6
8x xx xx xx
-1201
-1202
-1203
-1204
-1205
FUNC
=
=
=
=
=
=
=
=
=
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.
Chapter 15. Designing Applications with IBM 4680 BASIC
15-35
Prerequisites:
The application executing the unrestrict ADXFILES must have executed the restrict ADXFILES.
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.
Calling sequence:
CALL ADXFILES (RET,FUNC,PARM1,PARM2)
RET
hi
lo
00 00 00 00
80 F3 06 F2
80 F3 06 F3
8x xx xx xx
-1201
-1202
-1203
-1204
-1205
=
=
=
=
=
=
=
=
=
Unrestrict is successful.
Application attempted to do an unrestrict without doing a restrict.
Application attempted to unrestrict a file that it did not have restricted.
Any other OS error return code.
Invalid function code.
PARM1 is not defined.
PARM2 is not defined.
PARM2 is not a valid file name.
Force Close support is not installed.
When an unsuccessful unrestrict is executed because of a LAN failure (80 60 xx xx), the
application should wait 30 seconds and retry the unrestrict. This should be repeated for a
total of 7 executions of unrestrict.
FUNC
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.
15-36
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.
Calling sequence:
CALL ADXFILES (RET,FUNC,PARM1,PARM2)
RET
hi
lo
0w xx yy yy
= where:
w
xx
FUNC
00 00 00 00
8x xx xx xx
-1201
-1202
-1205
15-37
store is open, the return code is a negative one (-1). The return value is defined as INTEGER*4.
ADXCSEOL returns the code to the operating system.
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
To call ADXEXIT, your code should be similar to the following:
ERRORLEVEL = 20
CALL ADXEXIT (ERRORLEVEL)
The allowed values for the 2-byte integer are 0 to 32,767.
In addition, the BASIC program calling ADXEXIT must be linked with the ADXACRCL.L86 file containing
ADXEXIT.
15-38
To test the value of errorlevel in a BAT file, test in descending order as in the following example:
IF
IF
IF
IF
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.
15-39
The 4680 BASIC terminal application must contain a routine similar to the following:
SUB ADXDIR (RETC,DISKID,OUTINFO,FILEINDX) EXTERNAL
INTEGER*4 RETC
STRING DISKID,OUTINFO
INTEGER*2 OPTION
END SUB
The SUBPROGRAM is called as follows:
CALL ADXDIR (retcode,disk,direntry,opt)
where:
retcode
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
Table 15-12. ADXDIR Error Return Codes that imply error conditions.
Return Code
Description
3001
3002
15-40
8
1
3
1
7
1
8
1
6
characters
character
characters
character
characters
character
characters
character
characters
blank
number of files
blank
number of free bytes
blank
1
3
1
7
1
character
characters
character
characters
character
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.
Subroutine
Description
GETMEM
ADXMEM0L.L86
ADXMEL0L.L86
OPENMEM
ADXMEM0L.L86
ADXMEL0L.L86
MEMSYN
ADXMEM0L.L86
ADXMEL0L.L86
MEMUNSYN
ADXMEM0L.L86
ADXMEL0L.L86
FREEMEM
ADXMEM0L.L86
ADXMEL0L.L86
AVAILMEM
ADXMEM0L.L86
ADXMEL0L.L86
MEMWRITE
ADXMEM0L.L86
ADXMEL0L.L86
15-41
ADXMEM0L.L86
ADXMEL0L.L86
MEMSRCHB
ADXMEM0L.L86
ADXMEL0L.L86
MEMSRCHS
ADXMEM0L.L86
ADXMEL0L.L86
MEMWRKEY
ADXMEM1L.L86
ADXMEL1L.L86
MEMDLKEY
ADXMEM1L.L86
ADXMEL1L.L86
MEMCLEAR
ADXMEM1L.L86
ADXMEL1L.L86
Subroutine
Description
MEMREAD
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.
15-42
If the applications are not using MEMSYN and MEMUNSYN, the following happens: application A
finishes a transaction. It reads in the counter using MEMREAD. Application A is preempted by
application B, which is also finish a transaction and read in the counter. Application B increments the
counter and writes it back using MEMWRITE. Application A runs again. It increments its copy of the
counter and write it back. At that point, the counter is less than it should be because the applications
are not guaranteed exclusive access. However, if each of the applications had called MEMSYN
before calling MEMREAD; and called MEMUNSYN after calling MEMWRITE, this problem would not
have happened.
If an application calls MEMSYN and then another application calls MEMSYN using the same
in-memory file number, execution of the second application is suspended until the first application calls
MEMUNSYN.
Note: When a shared in-memory file is created, the GETMEM subroutine performs a MEMSYN.
Until the application that performed the GETMEM calls MEMUNSYN, the execution of any application
performing a MEMSYN is suspended.
4. The fourth category is the subroutine AVAILMEM. AVAILMEM is called to find out how much free
memory is in the system.
Each of the calls (excluding AVAILMEM) provides an in-memory file number. When the GETMEM or
the OPENMEM is performed, the subroutines associate that in-memory file number with a section of
memory until the FREEMEM is done.
One application may not have more than one in-memory file with the same in-memory file number. If
two applications use the same in-memory file number for non-shared in-memory files, the in-memory
file number refers to a different section of memory for each application.
If an application allocates a shared in-memory file, the other application accesses that shared
in-memory file by issuing an OPENMEM with the same in-memory file number as was used by the
application that called GETMEM.
5. The fifth category contains the subroutines, MEMWRKEY and MEMDLKEY. MEMWRKEY and
MEMDLKEY are used to insert and delete keyed records in an in-memory file. MEMWRKEY and
MEMDLKEY do not work if the in-memory file is not sorted in ascending order by key. Creating a file
using MEMWRKEY automatically sorts the in-memory file in ascending order by key.
Using MEMWRKEY, the in-memory file is searched for a record. If a record with the same key is
found, MEMWRKEY overlays the old record. If the record that was found does not have the same
key, then the MEMWRKEY creates space for the new record by moving up each record with a greater
key. An argument is passed to MEMWRKEY that indicates the length of the key, and the size of the
data including the key.
Using MEMDLKEY, the in-memory file is searched for a record. If the record is found the keyed
record is deleted and all records with a greater key are shifted down by one record. If MEMDLKEY
does not find the specified record, an error message indicating the record was not found is returned to
the application.
MEMCLEAR can be used to delete all records from the in-memory file. The entire memory space is
filled with X'0xFF' and the internal record counter is reset to zero.
Note: When using MEMWRKEY and MEMDLKEY, the key must start with the first byte of the record.
If MEMWRKEY, MEMDLKEY, or MEMCLEAR are being used on a shared in-memory file, the
application should call MEMSYN before calling MEMWRKEY, MEMDLKEY, or MEMCLEAR followed
by calling MEMUNSYN.
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:
15-43
INTEGER*4
INTEGER*4
INTEGER*2
INTEGER*4
INTEGER*2
INTEGER*2
0 = not shared
1 = shared
Return Value:
Zero if file is successfully created
Negative return code on error
Notes:
1. GETMEM performs a MEMSYN when creating a shared in-memory file. MEMUNSYN
should be called after GETMEM to allow the next function which issues a MEMSYN to
obtain exclusive access to the in-memory file. If MEMUNSYN is not called after
GETMEM, the next function to issue a MEMSYN is suspended until a MEMUNSYN is
issued.
2. The memory file number is set by the 4680 BASIC program. The size of the in-memory
file that is allocated is obtained by multiplying the record count by the record size.
Shared in-memory files are limited in size to 64 Kb minus 12 bytes. A record count is
returned to the caller to indicate the number of records that were allocated. Non-shared
files can be as large as the available memory in the terminal.
OPENMEM Gains access to a shared memory file
Call Parameters:
(O)
(O)
(I)
(I)
INTEGER*4
INTEGER*4
INTEGER*2
INTEGER*2
Return Value:
Zero if file is successfully created
Negative return code on error
Note: The record size specified on the OPENMEM should be the same as the record size
specified on the GETMEM. However, no automatic checking is done for this. A record count
that is returned to the caller indicates the size of the in-memory file.
15-44
INTEGER*4
INTEGER*4
INTEGER*2
STRING
INTEGER*4
INTEGER*2
INTEGER*2
Return Value:
15-45
Zero if successful
Negative on error
MEMREAD Reads data from a memory file
Call Parameters:
(O)
(O)
(I)
(O)
(I)
(I)
(I)
INTEGER*4
INTEGER*4
INTEGER*2
STRING
INTEGER*4
INTEGER*2
INTEGER*2
Return Value:
Zero if successful
Negative on error
Note: Before calling MEMREAD, allocate a string that is large enough to receive the data.
MEMSRCHB Conducts binary search for matching field
Call Parameters:
(O)
(O)
(I)
(I/O)
(I)
(I)
(I)
INTEGER*4
INTEGER*4
INTEGER*2
STRING
INTEGER*2
INTEGER*2
INTEGER*2
(I)
Return Value:
Zero if successful
Negative on error
Note: The file must be sorted in ascending order to use the binary search. If the file is
partially filled with records, it should be initialized with records of hexadecimal X'FF' to ensure
ascending order. If data is to be returned, allocate the argument string large enough to receive
the data.
MEMSRCHS Performs sequential search for matching field
Call Parameters:
15-46
(O)
(O)
(I)
(I/O)
(I)
(I)
(I)
INTEGER*4
INTEGER*4
INTEGER*2
STRING
INTEGER*2
INTEGER*2
INTEGER*2
(I)
Return Value:
Zero if successful
Negative on error
Note: If data is to be returned, allocate the argument string large enough to receive the data.
MEMWRKEY Inserts data to a memory file in ascending order by key
Call Parameters:
(O)
(O)
(I)
(I)
(I)
(I)
INTEGER*4
INTEGER*4
INTEGER*2
STRING
INTEGER*2
INTEGER*2
Return Value:
Zero if successful
Negative on error
Notes:
1. When using MEMWRKEY, the key must start with the first byte of the record.
2. If MEMWRKEY is being used on a shared in-memory file, the application should call
MEMSYN before calling MEMWRKEY followed by calling MEMUNSYN.
MEMDLKEY Deletes data from a memory file sequenced in ascending order by key
Call Parameters:
(O)
(O)
(I)
(I)
(I)
INTEGER*4
INTEGER*4
INTEGER*2
STRING
INTEGER*2
Return Value:
Zero if successful
Negative on error
Notes:
1. When using MEMDLKEY, the key must start with the first byte of the record.
2. If MEMDLKEY is being used on a shared in-memory file, the application should call
MEMSYN before calling MEMDLKEY followed by calling MEMUNSYN.
MEMCLEAR Clears a memory file
Call Parameters:
(O)
(O)
(I)
Note: If MEMCLEAR is being used on a shared in-memory file, the application should call
MEMSYN before calling MEMCLEAR followed by calling MEMUNSYN.
Example Subroutine Declarations using IBM 4680 BASIC: The following examples explain how to
format an IBM 4680 BASIC declaration.
15-47
15-48
Return Code
Description
-1009
-1011
-1013
-1014
-1015
-1016
-1017
Data length not valid (greater than 512 bytes), negative length, or empty string passed as
parameter to subroutine
-1019
-1020
-1021
15-49
15-50
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
16-2
16-3
16-3
16-4
16-4
16-4
16-5
16-5
16-5
16-5
16-7
16-7
16-11
16-11
16-12
16-13
16-14
16-14
16-16
16-17
16-18
16-19
16-20
16-21
16-22
16-22
16-23
16-24
16-24
16-28
16-28
16-28
16-29
16-30
16-30
16-32
16-32
16-32
16-34
16-35
16-35
16-40
16-42
16-43
16-43
16-44
16-44
16-45
16-46
16-46
16-1
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
16-48
16-48
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.
BIT NUMBERING
msb
Bits
15
14
13
12
11
10
16-2
lsb
6
/NOIBMCOMP
/LITLINK
/VSC2
/OS(FLEXOS)**
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.
The convention for byte length of COBOL numeric variables is:
PIC 9(2) = 1 byte
PIC 9(4) = 2 bytes
PIC 9(8) = 4 bytes
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:
16-3
01
KFBUFF.
03 KF-KEY
PIC 9(8)
USAGE IS COMP-5.
03 KF-DAT
PIC X(46)
USAGE IS DISPLAY.
77 BUFFADR
USAGE IS POINTER.
PROCEDURE DIVISION.
SET BUFFADR TO ADDRESS OF KFBUFF.
CALL ... ... USING BY VALUE BUFFADR.
Every file created on a disk must have a name to identify the file. The 4690 Operating
System forces all file names to uppercase on the media.
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.
16-4
File Pointers: The IBM 4690 Operating System supports both sequential and random access to disk
files by using the file pointer. Sequential file access is supported by a file pointer which is incremented
with each read or write to maintain the position within the file. Random file access is supported by an
offset specified with each read or write call. The offset can be specified by the file pointer, the beginning
of the file, or the end of the file.
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 pointers 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.
16-5
A shared OPEN prevents other exclusive access requests but allows other shared requests to the
same end.
A shared file pointer request restricts pipe access to processes with the same FID. All processes
sharing the pipe must select the shared file pointer mode. A process that requests a different mode is
denied access. For processes outside the family, the request functions as an exclusive request.
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
16-6
identified by a pipe ID, which is a letter between A and Z. Each store controller or terminal can have up to
26 IDs (A through Z). Each ID in a store controller or a terminal must be unique. For example, if several
applications are running in a store controller at once, each must use a different pipe ID.
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
77
77
*
77
77
77
FNUM
PIC S9(8)
USAGE IS
FLAGS
PIC 9(4)
USAGE IS
FILENAME
PIC X(n)
USAGE IS
n = length of FILE-NAME including
terminating NULL or blank.
FILESIZE
PIC 9(8)
USAGE IS
BUFFADR
USAGE IS
BUFFSIZE
PIC 9(8)
USAGE IS
COMP-5.
COMP-5.
DISPLAY.
COMP-5.
POINTER.
COMP-5.
flags
bit 0:
1 = Delete file
0 = No delete
bit 1:
Reserved (must be 0)
bit 2:
1 = Write
0 = No write
16-7
bit 3:
1 = Read
0 = No read
bit 4:
1 = Shared
0 = Exclusive
bit 5:
bit 67:
bit 8:
bit 9:
bit 10:
filename
Address of a 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
The size must be derived from the following algorithm and rounded up to the nearest
512-byte multiple. The maximum size for a keyed file record is 508.
T = Total number of records
L = Logical keyed record size
NL = 508/L (integer division)
If (T divided by NL has a remainder)
size = 512 + (512 ( 1 + T/ NL ))
Else (no remainder)
size = 512 + (512 (
T/ NL ))
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
16-8
BUF14
Byte
0
pflags
numblocks
randivsr
keyrecl
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
numblocks
randivsr
10
keyrecl
12
keylen
14
cthresh
16
Reserved
pflags
bit 0:
bit 1 to 3:
16-9
bit 4:
bit 5:
bit 6:
bit 7:
bit 8:
bit 9:
bit 10:
bit 11:
bit 12:
bits 13 to 15:
0 Reserved
Notes:
1. Bits 4, 5, and 7 are mutually exclusive (only one of
the three types can be chosen).
2. Bits 8 and 9 are mutually exclusive (only one of the
two types can be chosen).
numblocks
randivsr
keyrecl
keylen
cthresh
fnum
Return code. It contains the file number if no error occurred. The file is
automatically opened. The calling process must close the file if no
access is needed. If an error occurred the error code will be returned
and a file will not be created.
Refer to the IBM 4690 Store System: Messages Guide for system errors.
16-10
C Interface:
void ADX_COPEN_KFILE(long *fnum, unsigned int flags, char *filename, unsigned int *parmbuff, long
pbuffsize);
COBOL Interface
77
77
77
*
77
77
FNUM
PIC S9(8)
USAGE IS COMP-5.
FLAGS
PIC 9(4)
USAGE IS COMP-5.
FILENAME
PIC X(n)
USAGE IS DISPLAY.
n=length of FILE-NAME including terminating NULL or blank.
PARMBUFF
USAGE IS POINTER.
PBUFSIZE
PIC 9(8)
USAGE IS COMP-5.
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:
bits 6 to 15:
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
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.
16-11
C Interface:
void ADX_CCLOSE_KFILE(long *ret, unsigned int option, unsigned int flags, long fnum)
COBOL Interface
77
77
77
77
RET
OPTION
FLAGS
FNUM
PIC
PIC
PIC
PIC
S9(8)
9(4)
9(4)
S9(8)
USAGE
USAGE
USAGE
USAGE
IS
IS
IS
IS
COMP-5.
COMP-5.
COMP-5.
COMP-5.
option
0 = close file
1 = zero and close file (only valid for keyed files)
flags
0 = full close
1 = partial close (flush only)
fnum
ret
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
77
77
77
77
77
NBYTES
OPTION
FNUM
BUFFADR
BUFFSIZE
KEYLEN
PIC S9(8)
PIC 9(4)
PIC S9(8)
PIC 9(8)
PIC 9(8)
USAGE
USAGE
USAGE
USAGE
USAGE
USAGE
IS
IS
IS
IS
IS
IS
COMP-5.
COMP-5.
COMP-5.
POINTER.
COMP-5.
COMP-5.
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
16-12
File number of file from which to read data. The file must be activated by a CREATE or
OPEN before requesting a READ.
buffadr
Address of buffer in which to put data that is read. The key for the record to read must
begin at offset zero in this buffer.
buffsize
Number of bytes to read. The size must equal the record length specified when the file
was created.
keylen
Length of the key string passed in the read buffer. This value must equal the key length
specified when the keyed file was created.
nbytes
Return code. It will contain the number of bytes read if no error occurred. An error code
is returned if an error occurred.
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
77
77
77
77
77
NBYTES
OPTION
FLAGS
FNUM
BUFFADR
BUFFSIZE
PIC
PIC
PIC
PIC
S9(8)
9(4)
9(4)
S9(8)
USAGE
USAGE
USAGE
USAGE
USAGE
USAGE
PIC 9(8)
IS
IS
IS
IS
IS
IS
COMP-5.
COMP-5.
COMP-5.
COMP-5.
POINTER.
COMP-5.
option
bit 0:
0 = Unlock = no
1 = Unlock = yes
The record is unlocked after being written.
bit 1:
flags
Not used
fnum
buffadr
Address of buffer containing data to write. The buffer must contain the desired records
key at offset 0.
buffsize
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.
Chapter 16. Designing Applications with Other Languages
16-13
Refer to the IBM 4690 Store System: Messages Guide for system errors.
Delete Keyed Record: This operation deletes a specified record from a keyed file.
|
C Interface:
COBOL Interface
77
77
77
77
FNUM
BUFFADR
BUFFSIZE
RET
PIC S9(8)
PIC 9(8)
PIC S9(8)
USAGE
USAGE
USAGE
USAGE
IS
IS
IS
IS
COMP-5.
POINTER.
COMP-5.
COMP-5.
fnum
buffadr
buffsize
ret
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);
16-14
COBOL Interface
77
77
*
77
77
77
77
77
FLAGS
PIC 9(4)
USAGE IS COMP-5.
FILENAME
PIC X(n)
USAGE IS DISPLAY.
n = length of FILE-NAME including terminating
NULL or blank.
FILESIZE
PIC 9(8)
USAGE IS COMP-5.
RECSIZE
PIC 9(4)
USAGE IS COMP-5.
FTYPE
PIC 9(4)
USAGE IS COMP-5.
FDISTRIB
PIC 9(4)
USAGE IS COMP-5.
FNUM
PIC S9(8)
USAGE IS COMP-5.
flags
bit 0:
1 = Delete file
0 = No delete
bit 1:
bit 2:
1 = Write
0 = No write
bit 3:
1 = Read
0 = No read
bit 4:
1 = Shared
0 = Exclusive
bit 5:
bit 6:
bit 7:
bit 8:
bit 9:
bit 10:
bit 11 to 15:
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
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.
16-15
ftype
fdistrib
fnum
Return code. It contains the file number if no error occurred. The file is automatically
opened; therefore, the calling process must close the file if no access is needed. If an
error occurs, the file is closed and the error code is returned.
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
77
*
77
77
77
FLAGS
PIC 9(4)
FILENAME
PIC X(n)
n = length of FILE-NAME including
terminating NULL or blank.
RECSIZE
PIC 9(4)
FILESIZE
PIC 9(8)
FNUM
PIC S9(8)
USAGE IS COMP-5.
USAGE IS DISPLAY.
USAGE IS COMP-5.
USAGE IS COMP-5.
USAGE IS COMP-5.
flags
16-16
bit 0:
1 = Delete file
0 = No delete
bit 1:
bit 2:
1 = Write
0 = No write
bit 3:
1 = Read
0 = No read
bit 4:
1 = Shared
0 = Exclusive
bit 5:
bit 6:
bit 7:
bit 8:
bit 9:
bit 10:
bit 13:
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.
recsize
The READ, WRITE, and LOCK operations use this value to make sure that the requested
action falls on record boundaries. Use a record size of zero or one for files if no
boundary checks are desired, or for pipes if the WAIT function will be used.
filesize
fnum
Return code. It contains the file number if no error occurred. The file is automatically
opened and the calling process must close the file if no access is needed. If an error
occurred, the file is closed and the error code is returned.
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
77
77
*
FNUM
PIC S9(8)
USAGE IS COMP-5.
FLAGS
PIC 9(4)
USAGE IS COMP-5.
FILENAME
PIC X(n)
USAGE IS DISPLAY.
n = length of FILE-NAME including terminating NULL or blank
16-17
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:
bit 6:
bits 7 to 12:
bit 13:
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.
fnum
Return code. It contains the file number if no error occurred. If an error occurred, the file
is closed and the error code is returned.
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
77
77
RET
FLAGS
FNUM
PIC S9(8)
PIC 9(4)
PIC S9(8)
16-18
USAGE IS COMP-5.
USAGE IS COMP-5.
USAGE IS COMP-5.
Parameters:
flags
0 = Full close
1 = Partial close
fnum
ret
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
77
77
77
77
77
NBYTES
FLAGS
FNUM
BUFFADR
BUFFSIZE
BOFFSET
PIC S9(8)
PIC 9(4)
PIC S9(8)
PIC 9(8)
PIC S9(8)
USAGE
USAGE
USAGE
USAGE
USAGE
USAGE
IS
IS
IS
IS
IS
IS
COMP-5.
COMP-5.
COMP-5.
POINTER.
COMP-5.
COMP-5.
flags
bit 0:
bit 1:
bit 2:
1 = Nondestructive read
0 = Normal read
bits 3 to 7:
bits 8 and 9:
bits 10 to 15
fnum
File number from which to read data, as returned from OPEN or CREATE.
buffadr
buffsize
16-19
boffset
Byte offset to begin reading, relative to the position indicated by flag bits 8 and 9.
Negative offsets are allowed. Offset used for disk files only; set = 0 for pipes.
nbytes
Return code. It will contain the number of bytes read if no error occurred. Where nbytes
is positive and not equal to buffsize, an end-of-file was encountered. An error code is
returned if an error occurred. For pipes, if the buffer is empty, this operation waits for
enough data to be written in the buffer to satisfy the read request.
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
77
77
77
77
77
77
NBYTES
OPTION
FLAGS
FNUM
BUFFADR
BUFFSIZE
BOFFSET
PIC
PIC
PIC
PIC
S9(8)
9(4)
9(4)
S9(8)
PIC 9(8)
PIC S9(8)
USAGE
USAGE
USAGE
USAGE
USAGE
USAGE
USAGE
IS
IS
IS
IS
IS
IS
IS
COMP-5.
COMP-5.
COMP-5.
COMP-5.
POINTER.
COMP-5.
COMP-5.
option
flags
bit 0:
16-20
fnum
buffadr
buffsize
boffset
Offset into file to start writing, depending on bits 8 and 9 of flags. Offset is used for disk files
only; set = 0 for pipes.
nbytes
Return code. It will contain the number of bytes transferred if no error occurred. Note that a
zero (0) return value is a special case for the WRITE with HOLD and is considered a correct
value. Where nbytes is positive and not equal to buffsize, an end-of-media (disk or diskette
full) condition exists. For pipes, if the buffer is full this operation will wait until enough is read
from the other end to allow the WRITE to complete. An error code is returned if an error
occurred.
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
77
77
77
77
FLAGS
FNUM
BOFFSET
NBYTES
RET
PIC
PIC
PIC
PIC
PIC
9(4)
S9(8)
S9(8)
S9(8)
S9(8)
USAGE
USAGE
USAGE
USAGE
USAGE
IS
IS
IS
IS
IS
COMP-5.
COMP-5.
COMP-5.
COMP-5.
COMP-5.
flags
bits 0 and 1:
Lock Mode
00 = Unlockrelease the indicated area
01 = Exclusive lockprevents other processes from locking, reading
from, or writing to the locked area
10 = Exclusive write lockallows other processes to read the area
but not to write to it or lock it
11 = Shared write lockallows other processes to read the area and
establish shared write lock but not to write to the area
bits 2 and 3:
bit 4:
bits 5 to 7:
16-21
bits 8 and 9:
bits 10 to 15:
fnum
boffset
nbytes
ret
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
77
*
77
FLAGS
PIC 9(4)
USAGE IS COMP-5.
FILENAME
PIC X(n)
USAGE IS DISPLAY.
n = length of FILE-NAME including terminating NULL or blank.
RET
PIC S9(8)
USAGE IS COMP-5.
flags
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
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
16-22
77
*
77
*
77
FILENAME
PIC X(n)
USAGE IS DISPLAY.
n = length of FILE-NAME including terminating NULL or blank.
NEWNAME
PIC X(m)
USAGE IS DISPLAY.
m = length of NEW-NAME including terminating NULL or blank.
RET
PIC S9(8)
USAGE IS COMP-5.
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
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
77
77
77
PPOSIT
FLAGS
FNUM
BOFFSET
PIC
PIC
PIC
PIC
S9(8)
9(4)
S9(8)
S9(8)
USAGE
USAGE
USAGE
USAGE
IS
IS
IS
IS
COMP-5.
COMP-5.
COMP-5.
COMP-5.
flags
bits 0 to 7:
bits 8 and 9:
bits 10 to 15:
fnum
boffset
16-23
pposit
Return code. It contains the current position of the file pointer after the call or an error
code if an error occurred.
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
77
77
77
77
FNUM
FTYPE
FDISTRIB
RECSIZE
RET
PIC
PIC
PIC
PIC
PIC
S9(8)
9(4)
9(4)
9(8)
S9(8)
USAGE
USAGE
USAGE
USAGE
USAGE
IS
IS
IS
IS
IS
COMP-5.
COMP-5.
COMP-5.
COMP-5.
COMP-5.
fnum
ftype
fdistrib
0 = Distribute at close
1 = Distribute Per Update
recsize
ret
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
16-24
|
|
|
|
|
|
|
|
|
|
|
ADX_CFILES Restrict: ADX_CFILES 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.
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:
|
|
|
|
|
|
|
|
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
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.
16-25
8x xx xx xx
-1201
-1203
-1204
-1205
func
filename
= String containing the file name of the file to be restricted. The name may be a logical
name or a fully-qualified file name. To reference a mirrored or compound file use the
generic node names for the file server and the master:
for file server use ADXLXACN::
for master use ADXLXAAN::
Note: When an application attempts to use a file that has been restricted, you receive either an
80F306F0 or an 80004007. The error recovery should provide a delay and retry mechanism because the
file remains restricted until it is unrestricted by the application.
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:
void ADX_CFILES(long *ret, unsigned int func, char *filename);
COBOL Interface
This function is currently not supported for COBOL.
Parameters:
ret
hi
lo
00 00 00 00
16-26
= Unrestrict is successful.
80 F3 06 F2
80 F3 06 F3
8x xx xx xx
-1201
-1203
-1204
-1205
=
=
=
=
=
=
=
When an unsuccessful unrestrict is executed because of a LAN failure (80 60 xx xx), the
application should wait 30 seconds and retry the unrestrict. This should be repeated for a
total of 7 executions of unrestrict.
func
filename
= String containing the file name of the file to be restricted. The name can be a logical
name or a fully qualified file name. To reference a mirrored or compound file use the
generic node names for the file server and the master store controller:
For file server use ADXLXACN::
For master use ADXLXAAN::
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
hi
lo
0w xx yy yy
= where:
Chapter 16. Designing Applications with Other Languages
16-27
|
|
|
|
xx
00 00 00 00
8x xx xx xx
-1201
-1205
|
|
FUNC
FILENAME
C Interface:
COBOL Interface
77
77
77
PNUM
PSIZE
PIPEID
PIC S9(8)
PIC 9(8)
PIC X
USAGE IS COMP-5.
USAGE IS COMP-5.
USAGE IS DISPLAY.
psize
pipeid
pnum
Pipe size, in bytes. The maximum size for store controller pipe is 65,536 bytes.
One alphabetic character (A to Z) to identify the pipe.
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.
C Interface:
COBOL Interface
16-28
77
77
77
77
NBYTES
PNUM
BUFFADR
BUFFSIZE
PIC S9(8)
PIC S9(8)
PIC 9(8)
USAGE
USAGE
USAGE
USAGE
IS
IS
IS
IS
COMP-5.
COMP-5.
POINTER.
COMP-5.
pnum
buffadr
buffsize
nbytes
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.
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.
16-29
C Interface:
void ADX_CPRS_WRITE(long *ret, long prsnum, char *buffadr, long buffsize, char *dest);
COBOL Interface
77
77
77
77
77
RET
PRSNUM
BUFFADR
BUFFSIZE
DEST
PIC S9(8)
PIC S9(8)
PIC 9(8)
PIC X(4)
USAGE
USAGE
USAGE
USAGE
USAGE
IS
IS
IS
IS
IS
COMP-5.
COMP-5.
POINTER.
COMP-5.
DISPLAY.
prsnum
buffadr
buffsize
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.
Description
Good completion.
-1010
-1011
-1012
-1013
C Interface:
void ADX_CPRS_CWRITE(long *ret, long prsnum, char *buffadr, long buffsize, char *dest);
16-30
COBOL Interface
77
77
77
77
77
RET
PRSNUM
BUFFADR
BUFFSIZE
DEST
PIC S9(8)
PIC S9(8)
USAGE
USAGE
USAGE
USAGE
USAGE
PIC 9(8)
PIC X(4)
IS
IS
IS
IS
IS
COMP-5.
COMP-5.
POINTER.
COMP-5.
DISPLAY.
prsnum
buffadr
buffsize
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
-1
Destination pipe is full or does not have enough space available in the pipe to hold the data
written.
-1010
-1011
-1012
-1013
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.
16-31
Communications Services
The following application interfaces are described in the IBM 4690 Store System: Communications
Programming Reference:
ADX_COPEN_LINK
ADX_COPEN_SESS
ADX_CCLOSE_LS
ADX_CREAD_HOST
ADX_CWRITE_HOST
ADX_CGET_STAT
ADX_CSEND_REQ
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
77
77
77
77
RET
FUNC
OPID
PASSWORD
OPID2
PIC
PIC
PIC
PIC
PIC
S9(8)
9(4)
X(9)
X(8)
X(19)
USAGE
USAGE
USAGE
USAGE
USAGE
IS
IS
IS
IS
IS
COMP-5.
COMP-5.
DISPLAY.
DISPLAY.
DISPLAY.
func
Action to be taken:
1
2
3
8
9
16-32
=
=
=
=
=
opid
password Password for ID. The password is an ASCII string of up to eight characters. If the string is
less than eight characters it must be terminated with a blank or NULL. This parameter should
have no leading blanks. Leading zeros are counted as part of the password.
opid2
Current operator ID for functions 1, 2, 3, and 8 or template ID for functions 9 and 10,
depending on action requested. This ID may be up to nine ASCII characters and it must be
terminated with a blank or NULL if it is less than nine characters. However, if the action to be
taken is MAKE WITH CHECK, opid2 must have the template ID of up to nine characters, then
a colon, and then the current operator ID of up to nine characters terminated with a blank or
NULL if either ID is less than nine characters. There should be no leading or imbedded blanks.
Leading blanks and zeros are counted as part of the ID.
ret
Return code. It will contain a negative integer if an error occurred. Refer to Table 16-3 on
page 16-34 for a list of error codes.
Note: At least one ID on every system should be authorized for all system functions. The default
authorization allows the operator to sign on and select only primary or secondary applications. The
current operator ID making a change to a record cannot be the same as the operator ID being changed.
If the action to be taken is ADD or CHANGE, the system displays several screens to select the system
functions that can be used. The current operator (opid2) can select only those functions for which the
current operator ID is authorized.
If the action to be taken is a CHANGE for an ID that does not exist, the ID is added using default
authorization and error code -1010 is returned.
If the action to be taken is an ADD for an ID that already exists, the action is handled as a CHANGE
and error code -1010 is returned.
If the action to be taken is MAKE or MAKE WITH CHECK, an ID can be added using a template in
opid2 without having to select each system function from the various screens. The authorization
allowed will be the same as the template. For a MAKE WITH CHECK, the authorization will only
include functions for which both the template ID and the current operator ID have authorization. If
opid2 is missing, or for MAKE WITH CHECK if either part is missing, error code -1011 is returned and
the default authorization is used as the template.
Table 16-3 on page 16-34 shows the return codes returned by this function.
16-33
Description
-1000
-1001
-1002
-1003
-1004
-1005
-1010
-1011
Function handled as requested using default authorization because OPID2 not found.
-1020
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
77
77
RET
PWIN
PWOUT
PIC S9(8)
PIC X(8)
PIC X(8)
USAGE IS COMP-5.
USAGE IS DISPLAY.
USAGE IS DISPLAY.
pwin
pwout
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.
16-34
Common Application Services (ADX_CSERVE): This function can be called from a store
controller application to request one of the application services.
The parameters here are slightly different from those described for ADXSERVE.
|
C Interface:
COBOL Interface
77
77
77
77
RET
FUNCNUM
DATABUFF
DBUFFSIZE
PIC S9(8)
PIC 9(4)
PIC 9(4)
USAGE
USAGE
USAGE
USAGE
IS
IS
IS
IS
COMP-5.
COMP-5.
POINTER.
COMP-5.
funcnum
databuff
dbuffsize
ret
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.
This function uses the following parameters:
FUNC-NUM = 1
DATA-BUFF = Unused
DBUFF-SIZE = Unused
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:
16-35
FUNC-NUM = 3
DATA-BUFF = Unused
DBUFF-SIZE = Unused
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.
This function uses the following parameters:
FUNC-NUM = 4
DATA-BUFF = Address of buffer to receive status information
DBUFF-SIZE = 80 bytes
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.
This function uses the following parameters:
FUNC-NUM 5
DATA-BUFF Eight-byte buffer containing:
Two-byte integer set to 5 (for function 5)
Two-byte integer specifying subfunction. Valid values are 1, 2, 3, 4, or 5. These values
correspond to PARM5 values on ADXSERVE.
Four-byte pointer to a character string. The character string pointed to by this pointer
can have these valid formats:
DDHHMM where:
DD
HH
MM
TTT
=
=
=
=
The
The
The
The
DDHHMMCC where:
DD
HH
MM
CC
=
=
=
=
The
The
The
The
FUNC-NUM = 25
DATA-BUFF = Address of buffer containing message to display
DBUFF-SIZE = Size (bytes) of message, (maximum = 79 bytes.)
16-36
Display Background Application Status Message: The Display Background Application Status
Message function displays the specified message on the BACKGROUND APPLICATION CONTROL
screen in the message field of the requesting background application. The message is displayed until the
message is changed or the application ends.
This function uses the following parameters:
FUNC-NUM = 26
DATA-BUFF = Address of buffer containing message to display
DBUFF-SIZE = Size (bytes) of message, (maximum = 46 bytes).
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.
This function uses the following parameters:
FUNC-NUM = 27
DATA-BUFF = Address of buffer containing message to display
DBUFF-SIZE = Size (bytes) of message. Maximum = 79 bytes.
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.
This function uses the following parameters:
FUNC-NUM = 28
DATA-BUFF = Address of buffer containing the node name (if non-local) and the drive, or a logical name
for the node &/or the drive
DBUFF-SIZE = Number of characters in name. Maximum = 127 bytes.
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.
This function uses the following parameters:
FUNC-NUM = 29
DATA-BUFF = Address of buffer to receive the list of store controllers.
DBUFF-SIZE = 40 bytes
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.
16-37
FUNC-NUM = 30
DATA-BUFF = Unused
DBUFF-SIZE = Terminal number for which the ID is requested
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.
This function uses the following parameters:
FUNC-NUM = 31
DATA-BUFF = Address of buffer containing ASCII characters to convert
DBUFF-SIZE = Number of characters to convert
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.
The function uses the following parameters:
FUNC-NUM = 32
DATA-BUFF = Address of buffer containing EBCDIC characters to convert
DBUFF-SIZE = Number of characters to convert
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.
This function uses the following parameters:
FUNC-NUM = 33
DATA-BUFF = Unused
DBUFF-SIZE = Specify one of the following:
0 To turn off the terminal dump preservation flag
1 To Turn on the terminal dump preservation flag
2 To query whether the terminal dump preservation flag is ON or OFF
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.
The function uses the following parameters:
16-38
FUNC
= 34
DATA-BUFF = Address of the buffer
DBUFF-SIZE = 402 bytes
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
YY
XX
WW
=
=
=
=
=
=
=
=
=
Not used
Primary
Secondary
2400 bps loop
Auto resume of primary loop control
= Standby
= Controlling
= Prevented
FUNC-NUM = 35
DATA-BUFF = Unused; the value is ignored.
DBUFF-SIZE = Unused; the value is ignored.
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.
The function uses the following parameters:
FUNC-NUM = 36
DATA-BUFF = Address of buffer to receive IDs
DBUFF-SIZE = 40 bytes
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.
The function uses the following parameters:
FUNC-NUM = 37
DATA-BUFF = Address of buffer containing terminal number
DBUFF-SIZE = 2 bytes
16-39
Get the Controller Machine Model and Type: This function returns the store controller model number
and type. The function uses the following parameters:
FUNC-NUM = 38
DATA-BUFF = Eight-byte integer containing:
2-byte integer set to 38 (for function 38)
2-byte integer specifying subfunction 1. The valid value is 1.
4-byte pointer to a 4-byte buffer. The buffer pointed to by this pointer should have a
length of four bytes. It contains the machine model and type. For example, for a
4693-541, the values returned are X'F8' X'3E' X'00' X'00'.
DBUFF-SIZE Size of the DATA-BUFF (8 bytes).
Check the Master or File Server Exception Log: This function returns whether or not there are any
entries in the exception log.
RET
|
|
|
|
|
|
|
|
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.
This function uses the following parameters:
FUNC-NUM = 41
DATA-BUFF = 2-byte buffer containing a two-byte integer specifying the terminal sleep mode
inactive timeout. Valid values are 0 through 255. You can use a 0 value to disable
the terminal sleep mode.
DBUFF-SIZE = Size of the DATA-BUFF (2 bytes).
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);
16-40
COBOL Interface
77
77
77
77
77
77
77
BACAPPL
PARMS
PARMLEN
INITMSG
IMSGLEN
CPRIORITY
PID
PIC
PIC
PIC
PIC
PIC
PIC
PIC
X(22)
X(46)
9(4)
X(46)
9(4)
9(4)
S9(8)
USAGE
USAGE
USAGE
USAGE
USAGE
USAGE
USAGE
IS
IS
IS
IS
IS
IS
IS
DISPLAY.
DISPLAY.
COMP-5.
DISPLAY.
COMP-5.
COMP-5.
COMP-5.
16-41
Parameters:
bacappl Background application name. The name must be terminated with a NULL or a blank.
Maximum length = 22 characters including the ending blank or NULL.
parms
Parameter list to be passed to background application. Note the system automatically passes
BACKGRND as the first parameter and appends the parameters in PARMS.
imsglen
cpriority Value for setting priority. May be from 1 to 9. This value is added to 195 to give the priority
196 to 204. The recommended value is 5 to yield priority 200. A lower value will affect other
applications that may be running with a different priority.
pid
Table 16-4 shows unique error codes that you may receive:
Table 16-4. Error Codes
Error Code
Description
-1170
-1171
-1172
-1175
Invalid parameter.
-1176
Internal error.
-1177
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.
There is no return code for this function.
16-42
C Interface:
void ADX_CERROR(int msggrp, int msgnum, int severity, int event, char *unique, int ulen);
COBOL Interface
77
77
77
77
77
77
MSGGRP
MSGNUM
SEVERITY
EVENT
UNIQUE
ULEN
PIC
PIC
PIC
PIC
PIC
PIC
9(4)
9(4)
9(4)
9(4)
X(10)
9(4)
USAGE
USAGE
USAGE
USAGE
USAGE
USAGE
IS
IS
IS
IS
IS
IS
COMP-5.
COMP-5.
COMP-5.
COMP-5.
DISPLAY.
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
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
16-43
77
77
PID
RET
PIC S9(8)
PIC S9(8)
USAGE IS COMP-5.
USAGE IS COMP-5.
pid
ret
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 014 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.
There is no return code for this function.
|
C Interface:
COBOL Interface
77
ESTAT
PIC S9(8)
USAGE IS COMP-5.
BY VALUE ESTAT.
Parameters:
estat
A 32-bit value. The low order word is the completion status. The high order word is reserved.
Bits 014 may be used to indicate completion status.
Bits 1531 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 Blocks 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 heaps base address and contents remain unchanged.
16-44
When option 1 is selected, the new heap may or may not be contiguous with any previously allocated
heap. ADX_CMEM_GET modifies the Memory Parameter Blocks start and min values to indicate the new
heaps base address and actual allocation. The new heap may be allocated such that an existing heap is
no longer expandable.
|
C Interface:
option
start
min
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:
ret
Refer to the IBM 4690 Store System: Messages Guide for information on the error codes returned by this
function.
16-45
Suspended Processing for Indicated Duration: This operation delays the calling process
until the specified time or until the specified period of time expires.
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
77
77
FLAGS
STIME
RET
PIC 9(4)
PIC 9(8)
PIC S9(8)
USAGE IS COMP-5.
USAGE IS COMP-5.
USAGE IS COMP-5.
flags
1absolute
0relative
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
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.
16-46
C Interface:
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
*
*
77
77
77
77
the
COMP-5.
COMP-5.
COMP-5.
COMP-5.
COMP-5.
POINTER.
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.
16-47
Description
-1000
wtime < 0
-1001
-1002
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
77
ANUM
HNUM
PIC X(8)
PIC S9(8)
USAGE IS DISPLAY.
USAGE IS COMP-5.
anum
hnum
16-48
Non-reentrant subroutines must be addressed by call mechanisms linked with the application that is
using the subroutines to ensure a unique copy of the subroutines for each application.
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 following differences may impact an application:
Most instructions take fewer clock cycles in the 80286 or 80386 than in the 8088 or 8086.
PUSH SP in the 80286 puts the value of SP before the instruction was executed onto the stack. POP
SP works accordingly.
The 80286 masks all shift and rotate counts to the low 5 bits (maximum of 31 bits).
Do not duplicate prefixes. The 80286 sets an instruction length limit to 10 bytes.
Do not rely on IDIV exceptions for quotients of 80h or 8000h.
Instructions or data items may not wrap around a segment.
Do not attempt to change the sense of any reserved or unused bits in the flag word by IRET.
16-49
16-50
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
17-1
17-2
17-3
17-3
17-3
17-3
17-4
17-4
17-4
17-4
17-4
17-5
17-6
17-6
13H
16H
17H
17-1
17-2
Report aErrors
Report a records all errors encountered by the emulator. An example of this output is:
17-3
E M U L A T I O N
Environment:
Program name:
Input data:
Machine size:
Display Type:
286 installed?:
# of floppies:
# of hardfiles:
h0:/edit.exe
''
128 KB
Color
Yes
1
1
(y/n):
Service
INT 11h
INT 11h
INT 21h
INT 21h
AX
16490000
00230000
19230000
19020000
BX
CX
00001000
00001000
00001000
00001000
DX
DS
16490000
16490000
16490000
16490000
SI
ES
16490000
16490000
16490000
16490000
DI
SS
10100289
10100289
10100289
10100289
SP
0000
0000
0000
0000
BP
FL
0293
0293
0293
0292
Service
OUT EEh
OUT EEh
AX BX
CX DX
DS SI
ES DI
SS SP
BP
FL
00070304 07070305 16491020 08000000 10100271 0000 0206
00000305 07070304 16491020 08000000 10100271 0000 0202
BIOS Calls
Note: Only BIOS calls and subfunctions documented in this section are supported. All others are
unsupported.
17-4
01H:
Supported. Sets no cursor if no cursor or a bad cursor value is specified else sets blinking
line cursor.
02H:
03H:
06H:
Supported.
07H:
Supported.
08H:
09H:
0AH:
0FH:
Int 11H:
Supported. It returns 287 presence and initial video mode plus the following static values:
IPL present.
One floppy drive.
High byte always 0.
Int 12H:
Supported.
01H:
Supported.
02H:
Supported.
03H:
04H:
Supported.
Supported.
01H:
Supported.
02H:
Returns zero.
Int 17H:
Supported.
Software Interrupts
Int 20H:
Supported.
Int 22H:
Supported.
Int 23H:
Supported.
Int 24H:
Supported.
Int 25H:
Supported.
Int 26H:
17-5
Supported.
0EH-15H:
Supported.
16H:
17H:
Supported.
18H:
Returns zero.
19H-1CH:
Supported.
1DH-1EH:
Returns zero.
20H:
Returns zero.
21H:
Supported.
23H-2AH:
Supported.
2CH-2DH:
Supported.
2FH-30H:
Supported.
33H:
35H-36H:
Supported.
37H:
39H-3AH:
Supported.
3BH:
3CH:
3DH-43H:
Supported.
44H:
45H-47H:
Supported.
48H:
Effective if function 7AH is first called to shrink memory allocation by the size desired.
49H-4AH:
Supported.
4CH:
Supported.
4DH:
4EH-51H:
Supported.
54H:
Returns zero.
55H-57H:
Supported.
Emulator Messages
Potential emulator messages follow:
Informational
17-6
Warning: Greater than 640 KB request has been reduced to 640 KB.
Warning
Fatal
Note: zzzzzzzzif negative is described in the IBM 4690 Store System: Messages Guide. Positive
numbers indicate the internal (to the emulator) error number. The code should be reported if an emulation
error is suspected.
17-7
17-8
Appendixes
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
A-1
A-2
A-3
A-3
A-5
A-7
A-8
A-9
A-10
A-11
A-13
A-14
A-15
A-16
A-18
A-20
A-23
A-25
A-26
A-27
A-28
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.
A-1
Group
ID
World
RWED*
Group
RWED*
Owner
RWED*
ADX_SPGM
1010
1010
1111
ADX_SMNT
1000
1000
1000
ADX_SBUL
1000
1000
1000
ADX_SDT1
1010
1010
1111
ADX_IPGM
1010
1010
1111
ADX_IMNT
1000
1000
0000
ADX_IBUL
1000
1000
1000
ADX_IDT1
1010
1010
1111
ADX_IDT4
1010
1010
1111
ADX_UPGM
1010
1010
1111
ADX_UMNT
1000
1000
1000
ADX_UBUL
1000
1000
1000
ADX_UDT1
1010
1010
1111
Subdirectory
* Access privileges:
R
W
E
D
=
=
=
=
Read
Write
Execute
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.
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.
A-2
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
ADX_IDT1
root
ADX_IDT4
root
ADX_IMNT
root
ADX_IOSS
root
ADX_IPGM
root
ADX_KBUL
root
ADX_KDT1
root
ADX_KMNT
root
ADX_KPGM
root
ADX_SBUL
root
ADX_SDT1
root
ADX_SMNT
root
ADX_SPGM
root
ADX_UBUL
root
ADX_UDT1
root
A-3
Table A-1 (Page 2 of 2). Dictionary of Predefined Subdirectories and Their Contents
Subdir.
Directory
Contents
ADX_UMNT
root
ADX_UPGM
root
A-4
The following tables include a complete directory of file names, extensions and directories where files are
located.
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
ADXACRBW
SRL
ADX_SPGM
ADXACRCL
L86
ADX_IPGM
ADXACRMF
DAT
ADX_SPGM
ADXACROS
DAT
ADX_SPGM
ADXADMAL
L86
ADX_UPGM
ADXADMBL
L86
ADX_UPGM
ADXADMHL
L86
ADX_UPGM
ADXAPABL
L86
ADX_UPGM
ADXAPACL
L86
ADX_UPGM
ADXASMSF
DAT
ADX_SMNT
ADXASTCF
DAT
ADX_SDT1
ADXCxxxF.DAT
DAT
ADX_SPGM
Display character sets for 16x60 and 16x80 terminal VGA video
display formats.
ADXCOP0L
286
ADX_SPGM
ADXCPxxx
DAT
ADX_SPGM
Display character sets for controller VGA consoles, and 12x40 and
25x80 terminal VGA video display formats.
ADXCS1AF
DAT
ADX_SDT1
ADXCS1AS
DAT
ADX_SPGM
ADXCS1DF
DAT
ADX_SPGM
ADXCS1MF
DAT
ADX_SPGM
ADXCS1RF
DAT
ADX_SDT1
ADXCS1WF
DAT
root
ADXCS10L
286
ADX_SPGM
ADXCS2MF
DAT
ADX_SPGM
ADXCS20L
286
ADX_SPGM
ADXCS3AS
DAT
ADX_SPGM
Compression/decompression screens
ADXCS3MF
DAT
ADX_SPGM
Compression/decompression messages
ADXCS30L
286
ADX_SPGM
ADXCS3PF
DAT
ADX_SDT1
ADXCS5MF
DAT
ADX_SPGM
ADXCS50L
286
ADX_SPGM
ADXCS60L
286
ADX_SPGM
ADXCS6AS
DAT
ADX_SPGM
ADXCS6BF
DAT
ADX_SDT1
A-5
Table A-2 (Page 2 of 2). Dictionary of File Names, Extensions, and Directories Where Files are Located
File Name
Ext.
Directory
Description
ADXCS6DF
DAT
ADX_SDT1
ADXCS6MF
DAT
ADX_SPGM
ADXCS6TF
DAT
N/A
ADXCS6WF
DAT
ADX_SDT1
ADXCS70F
DAT
ADX_SPGM
ADXCS71L
286
ADX_SPGM
ADXCS70L
286
ADX_SPGM
ADXCSB0L
286
ADX_SPGM
ADXCSBCS
DAT
ADX_SPGM
ADXCSBMF
DAT
ADX_SPGM
ADXCSC0F
DAT
ADX_SPGM
ADXCSC1F
DAT
ADX_SPGM
ADXCSC2F
DAT
ADX_SPGM
ADXCSC3F
DAT
ADX_SPGM
ADXCSC4F
DAT
ADX_SPGM
ADXCSC0L
286
ADX_SPGM
ADXCSC1L
286
ADX_SPGM
ADXCSC2L
286
ADX_SPGM
ADXCSC3L
286
ADX_SPGM
ADXCSC4L
286
ADX_SPGM
ADXCSCAF
DAT
ADX_SPGM
ADXCSCBF
DAT
ADX_SPGM
ADXCSCCF
DAT
ADX_SPGM
A-6
ADXCSCCS to ADXCSCRF
Table A-3. Dictionary of File Names, Extensions, and Directories Where Files are Located
File Name
Ext.
Directory
Description
ADXCSCCS
DAT
ADX_SPGM
ADXCSCDF
DAT
ADX_SPGM
ADXCSCEF
DAT
ADX_SPGM
ADXCSCFF
DAT
ADX_SPGM
ADXCSCDS
DAT
ADX_SPGM
ADXCSCGF
DAT
ADX_SPGM
ADXCSCHF
DAT
ADX_SPGM
ADXCSCHS
DAT
ADX_SPGM
Host screens
ADXCSCIF
DAT
ADX_SPGM
ADXCSCIS
DAT
ADX_SPGM
ADXCSCJF
DAT
ADX_SPGM
ADXCSCKF
DAT
ADX_SPGM
ADXCSCKS
DAT
ADX_SPGM
ADXCSCLF
DAT
ADX_SPGM
ADXCSCMF
DAT
ADX_SPGM
ADXCSCMS
DAT
ADX_SPGM
ADXCSCNF
DAT
ADX_SPGM
ADXCSCOF
DAT
ADX_SPGM
ADXCSCPF
DAT
ADX_SPGM
ADXCSCQF
DAT
ADX_SPGM
ADXCSCRF
DAT
ADX_SPGM
A-7
ADXCSCSF to ADXCSHSF
Table A-4. Dictionary of File Names, Extensions, and Directories Where Files are Located
File Name
Ext.
Directory
Description
ADXCSCSF
DAT
ADX_SPGM
ADXCSCTF
DAT
ADX_SPGM
ADXCSCTS
DAT
ADX_SPGM
ADXCSCUF
DAT
ADX_SPGM
ADXCSCUS
DAT
ADX_SPGM
ADXCSCVF
DAT
ADX_SPGM
ADXCSCWF
DAT
ADX_SPGM
ADXCSCXF
DAT
ADX_SPGM
ADXCSCXS
DAT
ADX_SPGM
ADXCSCYF
DAT
ADX_SPGM
ADXCSCZF
DAT
ADX_SPGM
ADXCSC0L
286
ADX_SPGM
System configuration
ADXCSD0L
286
ADX_SPGM
ADXCSDAS
DAT
ADX_SPGM
ADXCSDCS
DAT
ADX_SPGM
ADXCSDHS
DAT
ADX_SPGM
ADXCSDIS
DAT
ADX_SPGM
ADXCSDMF
DAT
ADX_SPGM
ADXCSDTF
DAT
ADX_SDT1
ADXCSDWF
DAT
ADX_SDT1
ADXCSE0L
286
ADX_SPGM
ADXCSEAB
B86
ADX_UPGM
ADXCSEDF
J86
ADX_UPGM
ADXCSEGX
B86
ADX_UPGM
ADXSEUR
B86
ADX_UPGM
ADXCSH0L
286
ADX_SPGM
ADXCSHAF
DAT
ADX_SDT1
ADXCSHCF
DAT
ADX_IDT1
ADXCSHDF
DAT
ADX_IDT1
ADXCSHMF
DAT
ADX_SPGM
RCP messages
ADXCSHOF
DAT
ADX_SPGM
ADXCSHSF
DAT
ADX_SDT1
A-8
ADXCSHUF to ADXCSKWF
Table A-5. Dictionary of File Names, Extensions, and Directories Where Files are Located
File Name
Ext.
Directory
Description
ADXCSHUF
DAT
ADX_SDT1
ADXCSI0L
286
ADX_SPGM
ADXCSIAS
DAT
ADX_SPGM
ADXCSIIS
DAT
ADX_SPGM
ADXCSILS
DAT
ADX_SPGM
ADXCSIMF
DAT
ADX_SPGM
ADXCSIMS
DAT
ADX_SPGM
ADXCSJ0L
286
ADX_SPGM
Display/alter program
ACXCSJMF
DAT
ADX_SPGM
Display/alter messages
ADXCSJMS
DAT
ADX_SPGM
Display/alter screens
ADXCSK0F
DAT
root
ADXCSK0L
286
ADX_SPGM
KFU program
ADXCSK0S
DAT
ADX_SPGM
KFU screens
ADXCSKAF
DAT
ADX_SDT1
ADXCSKCF
DAT
ADX_SDT1
ADXCSKCP
DAT
ADX_SDT1
ADXCSKCK
DAT
ADX_SDT1
ADXCSKDF
DAT
ADX_SDT1
ADXCSKOF
DAT
ADX_SDT1
ADXCSKPF
DAT
ADX_SDT1
ADXCSKSS
DAT
ADX_SDT1
ADXCSKST
DAT
ADX_SDT1
ADXCSKTF
DAT
ADX_SDT1
ADXCSKWF
DAT
ADX_SDT1
A-9
ADXCSL0F to ADXCSORL
Table A-6. Dictionary of File Names, Extensions, and Directories Where Files are Located
File Name
Ext.
Directory
Description
ADXCSL0F
DAT
ADX_SDT1
ADXCSL1F
DAT
ADX_SDT1
ADXCSL0L
286
ADX_SPGM
Dump formatter
ADXCSLAF
DAT
ADX_SDT1
Dump file for ARTIC adapter card (previous file which is replaced
by ADXCSL0F.DAT and ADXCSL1F.DAT)
ADXCSLAS
DAT
ADX_SPGM
ADXCSLCF
DAT
root
ADXCSLMF
DAT
ADX_SPGM
ADXCSLRF
DAT
ADX_SDT1
ADXCSLTF
DAT
ADX_SDT1
ADXCSM0L
286
ADX_SPGM
Format trace
ADXCSMMF
DAT
ADX_SPGM
ADXCSMnF
DAT
ADX_SPGM
ADXCSMAS
DAT
ADX_SPGM
ADXCSMTF
DAT
ADX_SDT1
ADXCSMWF
DAT
ADX_SDT1
ADXCSN0L
286
ADX_SPGM
ADXCSNAS
DAT
ADX_SPGM
ADXCSNDF
DAT
ADX_SPGM
ADXCSNMF
DAT
ADX_SPGM
ADXCSNRF
DAT
ADX_SDT1
ADXCSNUF
DAT
ADX_SDT1
ADXCSOAF
DAT
ADX_SDT1
ADXCSOBF
DAT
ADX_SDT1
ADXCSOCF
DAT
ADX_SDT1
ADXCSODF
DAT
ADX_SDT1
ADXCSOEF
DAT
ADX_SDT1
ADXCSOFF
DAT
ADX_SDT1
ADXCSOHF
DAT
ADX_SDT1
ADXCSOIF
DAT
ADX_SDT1
ADXCSOJF
DAT
ADX_SDT1
ADXCSOKL
286
ADX_SPGM
ADXCSOMF
DAT
ADX_SPGM
System messages
ADXCSONF
DAT
ADX_SDT1
ADXCSOXF
DAT
ADX_SPGM
Keyboard table
ADXCSO0L
286
ADX_SPGM
ADXCSORL
286
ADX_SPGM
A-10
ADXCSOSF to ADXCST-D
Table A-7 (Page 1 of 2). Dictionary of File Names, Extensions, and Directories Where Files are Located
File Name
Ext.
Directory
Description
ADXCSOSF
DAT
ADX_SPGM
OCF screens
ADXCSOTF
DAT
ADX_SPGM
ADXCSOUF
DAT
ADX_IDT1
ADXCSOVL
286
ADX_SPGM
ADXCSOXF
DAT
ADX_SPGM
ADXCSOYF
DAT
ADX_SPGM
ADXCSOZF
DAT
ADX_IPGM
ADXCSOZL
286
ADX_SPGM
ADXCSP0L
286
ADX_SPGM
ADXCSPAS
DAT
ADX_SPGM
ADXCSPDF
DAT
ADX_SPGM
ADXCSPRF
DAT
ADX_SDT1
ADXCSQ0L
286
ADX_SPGM
ADXCSQAS
DAT
ADX_SPGM
ADXCSQMF
DAT
ADX_SPGM
ADXCSR0L
286
ADX_SPGM
ADXCSRAS
DAT
ADX_SPGM
|
|
ADXCSRCF
DAT
ADX_SDT1
|
|
ADXCSRxF
DAT
ADX_SDT1
ADXCSS0L
286
ADX_SPGM
ADXCSSAS
DAT
ADX_SPGM
ADXCSSDF
DAT
ADX_SDT1
ADXCSSWF
DAT
ADX_SDT1
ADXCST0L
286
ADX_SPGM
ADXCSTAS
DAT
ADX_SPGM
ADXCSTAD
DAT
ADX_IPGM
ADXCSTBD
DAT
ADX_UPGM
ADXCSTDD
DAT
ADX_UPGM
C Basic Compiler
ADXCSTFD
DAT
ACX_IPGM
ADXCSTGD
DAT
ADX_IPGM
ADXCSTHD
DAT
ADX_UPGM
ADXCSTID
DAT
ADX_IPGM
ADXCSTJD
DAT
ADX_IPGM
ADXCSTLD
DAT
ADX_IPGM
ADXCSTQD
DAT
ADX_SPGM
A-11
Table A-7 (Page 2 of 2). Dictionary of File Names, Extensions, and Directories Where Files are Located
File Name
Ext.
Directory
Description
ADXCSTTD
DAT
ADX_UPGM
ADXCST7D
DAT
ADX_IPGM
ADXCST8D
DAT
ADX_SPGM
ADXCST9D
DAT
ADX_SPGM
ADXCST@D
DAT
ADX_SPGM
ADXCST-D
DAT
ADX_UPGM
A-12
ADXCSTJI to ADXCSW0L
Table A-8. Dictionary of File Names, Extensions, and Directories Where Files are Located
File Name
Ext.
Directory
Description
ADXCSTJI
DAT
ADX_IPGM
ADXCSTMF
DAT
ADX_SPGM
ADXCSTPD
DAT
ADX_IPGM
ADXCSTRD
DAT
ADX_SPGM
ADXCSTSD
DAT
ADX_SPGM
ADXCxTxD
DAT
ADX_xPGM
ADXCSU0L
286
ADX_SPGM
ADXCSUAS
DAT
ADX_SPGM
ADXCSUMF
DAT
ADX_SPGM
root
ADXCSURF
ADXCSV0L
286
ADX_SPGM
ADXCSVAS
DAT
ADX_SPGM
ADXCSVDF
DAT
ADX_SDT1
ADXCSVMF
DAT
ADX_SPGM
ADXCSVTF
DAT
ADXCSVWF
DAT
ADX_SDT1
ADXCSW0L
286
ADX_SPGM
A-13
ADXCSZ0L to ADXCT6SL
Table A-9. Dictionary of File Names, Extensions, and Directories Where Files are Located
File Name
Ext.
Directory
Description
ADXCSZ0L
286
ADX_SPGM
ADXCSZIL
286
ADX_SPGM
ADXCSZOS
DAT
ADX_SPGM
ADXCSZPS
DAT
ADX_SPGM
ADXCT1SL
286
root
ADXCT4SL
286
ADX_SPGM
ADXCT6SL
286
ADX_SPGM
ADXCT8SL
286
ADX_SPGM
A-14
ADXDAiiF to ADXEMBGF
Table A-10. Dictionary of File Names, Extensions, and Directories Where Files are Located. The ADXDxiiF files are
configuration files. ii is the store controllers LAN node ID.
File Name
Ext.
Directory
Description
ADXDAiiF
DAT
ADX_SPGM
ADXDBiiF
DAT
ADX_SPGM
ADXDCiiF
DAT
ADX_SPGM
ADXDDiiF
DAT
ADX_SPGM
ADXDEiiF
DAT
ADX_SPGM
ADXDFiiF
DAT
ADX_SPGM
ADXDGiiF
DAT
ADX_SPGM
ADXDHiiF
DAT
ADX_SPGM
ADXDIiiF
DAT
ADX_SPGM
ADXDJiiF
DAT
ADX_SPGM
ADXDKiiF
DAT
ADX_SPGM
ADXDLiiF
DAT
ADX_SPGM
ADXDMiiF
DAT
ADX_SPGM
ADXDNiiF
DAT
ADX_SPGM
ADXDPiiF
DAT
ADX_SPGM
ADXDQiiF
DAT
ADX_SPGM
ADXDRiiF
DAT
ADX_SPGM
ADXDSiiF
DAT
ADX_SPGM
ADXDTiiF
DAT
ADX_SPGM
ADXExxyF
DAT
ADX_SDT1
ADXEMBxF
DAT
ADX_IPGM
ADXEMBAF
DAT
ADX_IPGM
ADXEMBBF
DAT
ADX_UPGM
ADXEMBDF
DAT
ADX_UPGM
C Basic Compiler
ADXEMBFF
DAT
ADX_IPGM
ADXEMBGF
DAT
ADX_IPGM
A-15
ADXEMBHF to ADXHSNLL
Table A-11 (Page 1 of 2). Dictionary of File Names, Extensions, and Directories Where Files are Located
File Name
Ext.
Directory
Description
ADXEMBHF
DAT
ADX_UPGM
ADXEMBIF
DAT
ADX_IPGM
ADXEMBJF
DAT
ADX_IPGM
ADXEMBLF
DAT
ADX_IPGM
ADXEMBPF
DAT
ADX_IPGM
ADXEMBQF
DAT
ADX_SPGM
ADXEMBRF
DAT
ADX_SPGM
ADXEMBSF
DAT
ADX_IPGM
ADXEMBTF
DAT
ADX_UPGM
ADXEMB7F
DAT
ADX_IPGM
ADXEMB8F
DAT
ADX_SPGM
ADXEMB9F
DAT
ADX_SPGM
ADXEMB@F
DAT
ADX_SPGM
ADXEMB-F
DAT
ADX_UPGM
ADXEMExF
DAT
ADX_xPGM
ADXESS0L
286
ADX_SPGM
ADXESSAD
DAT
ADX_SDT1
ADXESSBD
DAT
ADX_SDT1
ADXESSMF
DAT
ADX_SPGM
ADXESSNF
DAT
ADX_SPGM
ADXETBSL
286
ADX_SPGM
ADXETH0L
286
ADX_SPGM
ADXETH1F
DAT
ADX_SPGM
ADXETHIL
286
ADX_SPGM
ADXETHLL
286
ADX_SPGM
ADXETHXL
286
ADX_SPGM
ADXE2BSL
286
ADX_SPGM
4694 bootstrap
|
|
ADXFISBL
286
ADX_SPGM
|
|
ADXFISRL
286
ADX_SPGM
|
|
ADXFONTF
DAT
ADX_SPGM
Active display character set for 16x60 and 16x80 terminal VGA
video display formats.
|
|
ADXFNT0F
DAT
ADX_SPGM
Active display character set for 12x40 and 25x80 terminal VGA
video display formats.
ADXFSF4F
DAT
root
ADXFSM0L
286
ADX_SPGM
ADXFSP0L
286
ADX_SPGM
A-16
Table A-11 (Page 2 of 2). Dictionary of File Names, Extensions, and Directories Where Files are Located
File Name
Ext.
Directory
Description
ADXFSS0L
286
ADX_SPGM
ADXFSSRL
286
ADX_SPGM
ADXFSSSF
SPL
root
ADXGLU0L
286
ADX_SPGM
ADXHS10L
286
ADX_SPGM
SNA driver
ADXHS1FF
DAT
ADX_SPGM
APPC
ADXHS20L
286
ADX_SPGM
ADXHS30L
286
ADX_SPGM
ADXHS30F
DAT
ADX_SPGM
ADXHS50E
EXE
ADX_SPGM
ADXHSA0L
286
ADX_SPGM
ADXHSB0L
286
ADX_SPGM
ADXHSCAF
DAT
ADX_SPGM
ADXHSD0L
286
ADX_SPGM
ADXHSDMG
DAT
ADX_SPGM
ADXHSDRL
286
ADX_SPGM
ADXHSH0L
286
ADX_SPGM
ADXHSHDF
DAT
ADX_SPGM
ADXHSHFF
DAT
ADX_SPGM
ADXHSK0L
286
ADX_SPGM
3270 Emulation
ADXHSL0L
286
ADX_SPGM
Host support for SDLC driver for MCA and SDLC cards
ADXHSM0E
EXE
ADX_SPGM
ADXHSN0L
286
ADX_SPGM
ADXHSNDF
DAT
ADX_SPGM
ADXHSNLL
286
ADX_SPGM
A-17
ADXHSNPL to ADXLNDAF
Table A-12 (Page 1 of 2). Dictionary of File Names, Extensions, and Directories Where Files are Located
File Name
Ext.
Directory
Description
ADXHSNPL
286
ADX_SPGM
ADXHSNSL
286
ADX_SPGM
ADXHSO0L
286
ADX_SPGM
ADXHSP0L
286
ADX_SPGM
ADXHSR0F
DAT
ADX_SDT1
ADXHSR0L
286
ADX_SPGM
ADXHSR1L
286
ADX_SPGM
ADXHSRnF
DAT
ADX_SDT1
ADXHSRNF
DAT
ADX_SPGM
ADXHSROF
DAT
ADX_SDT1
ADXHSS0L
286
ADX_SPGM
ADXHSS2L
286
ADX_SPGM
ADXHST0L
286
ADX_SPGM
3270 Emulation
ADXHSV0L
L86
ADX_UPGM
ADXHSV1L
L86
ADX_UPGM
ADXHSV2L
L86
ADX_UPGM
ADXHSX0L
286
ADX_SPGM
ADXHSX2L
286
ADX_SPGM
ADXHSXPE
EXE
ADX_SPGM
ADXHSY0L
286
ADX_SPGM
ADXHSY1L
EXE
ADX_SPGM
ADXHSZ0L
286
ADX_SPGM
ADXHSZ1L
EXE
ADX_SPGM
ADXHSZ2L
EXE
ADX_SPGM
ADXHSZ3L
286
ADX_SPGM
ADXHSZ5L
286
ADX_SPGM
ADXILnnF
DAT
ADX_SPGM
ADXILIOL
286
ADX_SPGM
Controller IPL
ADXILI0F
DAT
ADX_SDT1
ADXILI3F
DAT
ADX_SPGM
ADXILI4L
286
ADX_SPGM
ADXILIPF
DAT
ADX_SDT1
ADXILIPL
286
ADX_SPGM
ADXILT0L
286
ADX_SPGM
ADXIOP0L
286
ADX_SPGM
ADXIOP1L
286
ADX_SPGM
ADXIOP2L
286
ADX_SPGM
A-18
Table A-12 (Page 2 of 2). Dictionary of File Names, Extensions, and Directories Where Files are Located
File Name
Ext.
Directory
Description
ADXIOS0L
286
ADX_SPGM
Print spooler/despooler
ADXIOSPD
nnn
ADX_IOSS
ADXIOSPF
DAT
ADX_SPGM
ADXIOSQn
DAT
ADX_IOSS
ADXIOSQ9
DAT
ADX_IOSS
ADXIPL0L
286
ADX_SPGM
ADXLAS0L
286
ADX_SPGM
ADXLExxF
DAT
ADX_SDT1
ADXLND0L
286
ADX_SPGM
ADXLNDAF
DAT
ADX_SPGM
A-19
ADXLNDCF to ADXPI5AF
Table A-13 (Page 1 of 3). Dictionary of File Names, Extensions, and Directories Where Files are Located
File Name
Ext.
Directory
Description
ADXLNDCF
DAT
ADX_SPGM
|
|
ADXLNDEF
DAT
ADX_SDT1
Master LAN (MCF Network) exception log (old style) for 4690
Operating System
|
|
ADXLNDGF
DAT
ADX_SDT1
File server LAN (MCF Network) exception log (old style) for 4690
Operating System
ADXLNDIF
DAT
ADX_SPGM
ADXLNDMF
CK1
ADX_SDT1
ADXLNDMF
CKP
ADX_SDT1
ADXLNDMF
CKR
ADX_SDT1
ADXLNDMF
DAT
ADX_SDT1
ADXLNDNF
DAT
ADX_SDT1
ADXLNDSF
CK1
ADX_SDT1
ADXLNDSF
CKP
ADX_SDT1
ADXLNDSF
CKR
ADX_SDT1
ADXLNDSF
DAT
ADX_SDT1
ADXLNDTF
DAT
ADX_SPGM
ADXLNDXF
DAT
ADX_SDT1
ADXLNDXX
BAD
ADXLNM0L
286
ADX_SPGM
ADXLNR0L
286
ADX_SPGM
LAN requestor
ADXLNS0L
286
ADX_SPGM
ADXLPBSL
286
ADX_SPGM
ADXLSD0L
286
ADX_SPGM
Store loop
ADXLTDAL
286
ADX_SPGM
ADXLTDBL
286
ADX_SPGM
ADXLTDCL
286
ADX_SPGM
ADXLTDDL
286
ADX_SPGM
ADXLTD0F
DAT
ADX_SPGM
ADXLTD0L
286
ADX_SPGM
ADXLTD1L
286
ADX_SPGM
ADXLHFxF
DAT
ADX_SDT1
ADXLVLxF
DAT
ADX_SDT1
A-20
Table A-13 (Page 2 of 3). Dictionary of File Names, Extensions, and Directories Where Files are Located
File Name
Ext.
Directory
Description
ADXMC50F
DAT
ADX_SPGM
ADXMEL0L
L86
ADX_UPGM
ADXMEL1L
L86
ADX_UPGM
ADXMEM0L
L86
ADX_UPGM
ADXMEM1L
L86
ADX_UPGM
ADXMICRF
DAT
ADX_IDT1
ADXN?30F
DAT
ADX_SPGM
ADXNxxxZ
BAT
ADXNRK00
nnn
root
ADXNLSAF
DAT
ADX_SPGM
ADXNLSAL
286
ADX_SPGM
ADXNSAxF
DAT
ADX_SPGM
ADXNSK00
nnn
root
ADXNSK0L
286
ADX_SPGM
ADXNSL0L
286
ADX_SPGM
ADXNSL0S
DAT
ADX_SPGM
ADXNSLMF
DAT
ADX_SPGM
ADXNSL1F
DAT
ADX_SDT1
ADXNSiiF
DAT
ADX_SDT1
ADXNSS3F
DAT
ADX_SPGM
ADXNSSAF
DAT
root
root
ADXNSSLG
ADXNSxxL
286
root
ADXNST0L
286
ADX_SPGM
ADXNSXxF
DAT
ADX_SPGM
|
|
ADXNSX0L
286
root
ADXNSXZL
286
ADX_SPGM
ADXNSZxF
DAT
ADX_SPGM
ADXNT3xF
DAT
ADX_SPGM
ADXNT5xF
DAT
ADX_SPGM
ADXNTKxF
DAT
ADX_SPGM
ADXOPT0L
286
ADX_SPGM
ADXPI10L
286
ADX_SPGM
ADXPI20L
286
ADX_SPGM
ADXPI21L
286
ADX_SPGM
ADXPI30L
286
ADX_SPGM
|
|
|
A-21
Table A-13 (Page 3 of 3). Dictionary of File Names, Extensions, and Directories Where Files are Located
File Name
Ext.
Directory
Description
ADXPI50L
286
ADX_SPGM
ADXPI3AF
DAT
ADX_SPGM
ADXPI5AF
DAT
ADX_SPGM
ADXPIA0L
286
ADX_SPGM
ADXPIAxF
DAT
ADX_SPGM
ADXPIB0L
286
ADX_SPGM
ADXPIBSF
DAT
ADX_SPGM
ADXPIC0L
286
ADX_SPGM
ADXPID0L
286
ADX_SPGM
ADXPIE0L
286
ADX_SPGM
ADXPIETF
DAT
ADX_SPGM
ADXPIExF
DAT
ADX_SPGM
ADXPIF0L
286
ADX_SPGM
|
|
ADXPIFTF
DAT
ADX_SPGM
|
|
ADXPIFxF
DAT
ADX_SPGM
ADXPIG0L
286
ADX_SPGM
ADXPII0L
286
ADX_SPGM
|
|
A-22
ADXPIK0L to ADXTSDDL
Table A-14 (Page 1 of 2). Dictionary of File Names, Extensions, and Directories Where Files are Located
File Name
Ext.
Directory
Description
ADXPIK0L
286
ADX_SPGM
ADXPIKAF
DAT
ADX_SPGM
ADXPIL0L
286
ADX_SPGM
ADXPIM0L
286
ADX_SPGM
ADXPIP0L
286
ADX_SPGM
ADXPIR0L
286
ADX_SPGM
ADXPIR1L
286
ADX_SPGM
ADXPIS0L
286
ADX_SPGM
ADXPIT0L
286
ADX_SPGM
ADXPIU0L
286
ADX_SPGM
ADXPIV0L
286
ADX_SPGM
ADXPIV1L
286
ADX_SPGM
|
|
ADXPIVTF
DAT
ADX_SPGM
ADXPIVxF
DAT
ADX_SPGM
ADXPIW0L
286
ADX_SPGM
ADXPIZ0L
286
ADX_SPGM
ADXPIZ1F
DAT
ADX_SPGM
ADXPIZ1L
286
ADX_SPGM
ADXPLB0L
286
ADX_SPGM
ADXPLZ0L
286
ADX_SPGM
ADXPPC0L
286
ADX_SPGM
Programmable Power
ADXRCPii
DAT
ADX_IDT1
ADXRDISK
DAT
root
ADXRFSHF
DAT
ADX_SPGM
Refresh file
ADXRPL0L
286
ADX_SPGM
ADXRPL1L
286
ADX_SPGM
ADXRPLCF
DAT
ADX_SPGM
ADXRSL0L
286
ADX_SPGM
ADXRSM0L
286
ADX_SPGM
ADXRT1SL
286
ADX_SPGM
ADXRT8EL
286
ADX_SPGM
ADXRT8IL
286
ADX_SPGM
ADXRT8LL
286
ADX_SPGM
ADXRT8SL
286
ADX_SPGM
ADXRT8TL
286
ADX_SPGM
ADXRT8XL
286
ADX_SPGM
A-23
Table A-14 (Page 2 of 2). Dictionary of File Names, Extensions, and Directories Where Files are Located
File Name
Ext.
Directory
Description
ADXRTXSL
286
ADX_SPGM
ADXSCI0L
286
ADX_SPGM
ADXSCSDF
DAT
ADX_SDT1
ADXSCS0L
286
ADX_SPGM
ADXSSD0L
286
ADX_SPGM
ADXTRBSL
286
ADX_SPGM
ADXTSAAL
286
ADX_SPGM
On Line Exercisers
ADXTSAML
286
ADX_SPGM
ADXTSARL
286
ADX_SPGM
ADXTSDAL
286
ADX_SPGM
Exerciser: Display*
ADXTSDBL
286
ADX_SPGM
Exerciser:
ADXTSDCL
286
ADX_SPGM
ADXTSDDL
286
ADX_SPGM
A-24
ADXTSDFL to ADXZE30L
Table A-15. Dictionary of File Names, Extensions, and Directories Where Files are Located
|
|
File Name
Ext.
Directory
Description
ADXTSDFL
286
ADX_SPGM
Exerciser:
ADXTSDHL
286
ADX_SPGM
ADXTSDIL
286
ADX_SPGM
Exerciser: RS232
ADXTSDKL
286
ADX_SPGM
Exerciser: Keyboard
ADXTSDMF
DAT
ADX_SPGM
ADXTSDML
286
ADX_SPGM
Exerciser:
ADXTSDOL
286
ADX_SPGM
ADXTSDPL
286
ADX_SPGM
Exerciser: Printer
ADXTSDRL
286
ADX_SPGM
Exerciser: MSR
ADXTSDSL
286
ADX_SPGM
Exerciser: Scanner
ADXTSDTL
286
ADX_SPGM
ADXTSDVL
286
ADX_SPGM
Exerciser: Video
ADXTSDXL
286
ADX_SPGM
ADXTSDYL
286
ADX_SPGM
Exerciser:
ADXTSMAL
286
ADX_SPGM
ADXTSMBL
286
ADX_SPGM
ADXTSMCL
286
ADX_SPGM
ADXTSMDL
286
ADX_SPGM
ADXTSMEL
286
ADX_SPGM
ADXTST0L
286
ADX_SPGM
ADXTSTWF
DAT
ADX_SPGM
Terminal messages
ADXUCRTL
L86
ADX_IPGM
ADXxxXXF
DAT
ADX_SPGM
ADXXPT1L
286
ADX_SPGM
ADXXPTCF
DAT
ADX_SPGM
ADXXPTCL
286
ADX_SPGM
ADXXZiiF
DAT
ADX_SPGM
ADXZE30L
286
ADX_SPGM
A-25
ASMBUNDL to DMED
Table A-16. Dictionary of File Names, Extensions, and Directories Where Files are Located
File Name
Ext.
Directory
Description
ASMBUNDL
BAT
ADX_SMNT
ATHD
286
ADX_SPGM
BASIC
286
ADX_UPGM
BASICCG
286
ADX_UPGM
BASICDBL
L86
ADX_UPGM
BASICDBM
L86
ADX_UPGM
BASICLST
SRL
ADX_UPGM
BACKUP
286
ADX_SPGM
CBLINK
BAT
COBOL link
CBLAPI
SRL
CBLAPI
L86
CBL4680
L86
FLEXOS**
SYS
root
BOOTLOAD
IMG
root
CHKDSK
286
ADX_SPGM
COMMAND
286
ADX_SPGM
Command shell
COMP
286
ADX_SPGM
CONFIG
286
ADX_SPGM
COPY
286
ADX_SPGM
CPIC_BAS
DEF
ADX_UPGM
CPIC_BAS
EQU
ADX_UPGM
CPIC_BAS
SUB
ADX_UPGM
CPIC_CBL
ADX_UPGM
CPIC_C
ADX_UPGM
CPREP
BAT
ADX_SPGM
DDACMOS
CK1
root
DDACMOS
CKP
root
DDACMOS
OLD
root
DESPOOL
286
ADX_SPGM
DISKCOMP
286
ADX_SPGM
DISKCOPY
286
ADX_SPGM
O:
DSKINFO
DISKSET
286
ADX_SPGM
DMED
286
ADX_UPGM
A-26
DMEDCOL to TAPESTRM
Table A-17. Dictionary of File Names, Extensions, and Directories Where Files are Located
|
|
|
File Name
Ext.
Directory
Description
DMEDCOL
286
ADX_UPGM
DMEDHLP
OVR
ADX_UPGM
DMEDOVR
OVR
ADX_UPGM
Display Manager
DMEXTR
J86
ADX_UPGM
DMORDERS
DAT
ADX_UPGM
DPREP
BAT
ADX_SPGM
DREDIX
286
ADX_SPGM
DR Editor
FD
286
ADX_SPGM
Diskette driver
FIND
286
ADX_SPGM
FORMAT
286
ADX_SPGM
FSET
286
ADX_SPGM
HELP
EDX
ADX_SPGM
ICAAIM
COM
ADX_SPGM
IXSI0
OBJ
Kxxx
BIN
LIB86
286
ADX_UPGM
Library utility
LINK86
286
ADX_UPGM
LSN
EDX
ADX_SPGM
MORE
286
ADX_SPGM
NETDEV
286
ADX_SPGM
NSD
286
ADX_SPGM
POSTLINK
286
ADX_UPGM
PREBASIC
286
ADX_UPGM
Debug pre-processor
286
ADX_SPGM
Print command
PRINTER
286
ROOT
(installation
disk)
TAPESTRM
BAT
ADX_SPGM
A-27
RENAME to DUMMY
Table A-18. Dictionary of File Names, Extensions, and Directories Where Files are Located
File Name
Ext.
Directory
Description
RENAME
286
ADX_SPGM
REST4680
286
ADX_SPGM
RESTORE
286
ADX_SPGM
SB286L
L86
ADX_IPGM
SB286M
L86
ADX_IPGM
SB286TVL
L86
ADX_IPGM
SB286TVM
L86
ADX_IPGM
SHELLSRL
SRL
ADX_SPGM
SORT
286
ADX_SPGM
TPR
ADX_UPGM
TPS
ADX_UPGM
TPRSBAS
BAS
ADX_UPGM
TPRCBAS
BAS
ADX_UPGM
TPRCOBOL
CBL
ADX_UPGM
TPRCOBOL
CBL
ADX_UPGM
TREE
286
ADX_SPGM
TRDLC
286
ADX_SPGM
TRXPORT
286
ADX_SPGM
TYPE
286
ADX_SPGM
UTILMSG
SRL
ADX_SPGM
UTOOL_SB
SRL
ADX_SPGM
VER
286
ADX_SPGM
Version display
VOL
286
ADX_SPGM
XFERLAN
DOC
ADX_SMNT
XFEROS
DOC
ADX_SMNT
O:
VOLINFO
%Cxxxxxx
%CC
$$$
TYP
DUMMY
A-28
ADX_SDT1
root
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
B-1
B-4
B-8
B-14
This appendix contains error messages that occur while using the library utility (LIB86), the POSTLINK
utility (POSTLINK), and the linker utility (Link86).
B-1
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.
MODULE NOT FOUND:
Explanation: The indicated module name, which appeared in a REPLACE, SELECT,
or DELETE command line option, could not be found.
Library Action: LIB86 terminates and displays this message, followed by the name of
the module.
User Response: Retype the command line, or edit the INP file.
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.
OBJECT FILE ERROR:
Explanation: LIB86 detected an error in the object file. This is caused by a compiler
error, or a bad disk file.
Library Action: LIB86 terminates and displays this message, followed by the name of
the file.
User Response: Regenerate the object file and try again. If the error still occurs, copy
the source file and the object file on 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.
B-2
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.
SYMBOL TABLE OVERFLOW:
Explanation: There is not enough memory for the symbol table.
Library Action: LIB86 terminates and displays this message.
User Response: Reduce the number of command line options in the command line
(MAP and XREF both use symbol table space), or use a system with more memory.
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.
B-3
B-4
COULD NOT READ HEADER: COULD NOT WRITE HEADER TO OUTPUT FILE:
B-5
B-6
B-7
B-8
B-9
B-10
B-11
B-12
B-13
Checksum error.
10
11
12
13
14
15
16
20
21
22
23
Frame field in FIXDAT (frame > 3 when thread fixup) is not valid.
24
25
Frame field in FIXDAT (frame > 6 when explicit fixup) is not valid.
26
27
28
29
B-14
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
C-1
C-2
C-3
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
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
04,00,0C,00,04,00,04,00,04,00,04,00,04,00,0E,00
0E,00,11,00,02,00,04,00,08,00,10,00,10,00,1F,00
1E,00,01,00,01,00,07,00,01,00,01,00,01,00,1E,00
11,00,11,00,11,00,11,00,1F,00,01,00,01,00,01,00
1F,00,10,00,10,00,1E,00,01,00,01,00,01,00,1E,00
0E,00,11,00,10,00,1E,00,11,00,11,00,11,00,0E,00
1F,00,01,00,02,00,04,00,08,00,10,00,10,00,10,00
SP
!
"
#
$
%
&
'
(
)
*
,
.
/
0
1
2
3
4
5
6
7
C-1
0E,00,11,00,11,00,0E,00,11,00,11,00,11,00,0E,00
0E,00,11,00,11,00,0F,00,01,00,01,00,01,00,1E,00
02,00,04,00,08,00,10,00,10,00,08,00,04,00,02,00
08,00,04,00,02,00,01,00,01,00,02,00,04,00,08,00
04,00,0A,00,11,00,11,00,1F,00,11,00,11,00,11,00
1E,00,11,00,11,00,1E,00,11,00,11,00,11,00,1E,00
0E,00,11,00,10,00,10,00,10,00,10,00,11,00,0E,00
1C,02,11,00,11,00,11,00,11,00,11,00,11,02,1C,00
1F,00,10,00,10,00,1C,00,10,00,10,00,10,00,1F,00
1F,00,10,00,10,00,1C,00,10,00,10,00,10,00,10,00
0E,00,11,00,10,00,10,00,17,00,11,00,11,00,0E,00
11,00,11,00,11,00,1F,00,11,00,11,00,11,00,11,00
0E,00,04,00,04,00,04,00,04,00,04,00,04,00,0E,00
02,00,02,00,02,00,02,00,02,00,02,00,12,00,0C,00
11,00,12,00,14,00,18,00,18,00,14,00,12,00,11,00
10,00,10,00,10,00,10,00,10,00,10,00,10,00,1F,00
11,00,1B,00,15,00,15,00,11,00,11,00,11,00,11,00
11,00,19,00,19,00,15,00,13,00,13,00,11,00,11,00
0E,00,11,00,11,00,11,00,11,00,11,00,11,00,0E,00
1E,00,11,00,11,00,1E,00,10,00,10,00,10,00,10,00
0E,00,11,00,11,00,11,00,11,00,15,00,13,00,0F,00
1E,00,11,00,11,00,1E,00,18,00,14,00,12,00,11,00
0E,00,11,00,10,00,0E,00,01,00,01,00,11,00,0E,00
1F,00,04,00,04,00,04,00,04,00,04,00,04,00,04,00
11,00,11,00,11,00,11,00,11,00,11,00,11,00,0E,00
11,00,11,00,11,00,11,00,11,00,11,00,0A,00,04,00
11,00,11,00,11,00,11,00,15,00,15,00,1B,00,11,00
11,00,11,00,0A,00,04,00,04,00,0A,00,11,00,11,00
11,00,11,00,0A,00,04,00,04,00,04,00,04,00,04,00
1F,00,00,01,00,02,00,04,00,08,00,10,00,00,1F,00
8
9
<
>
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
7E,00,83,00,85,00,89,00,91,00,A1,00,C1,00,7E,00
18,00,28,00,08,00,08,00,08,00,08,00,08,00,3E,00
7E,00,81,00,01,02,04,08,10,20,40,00,80,00,FF,00
FC,02,01,00,01,02,0C,02,01,00,01,00,01,02,FC,00
41,00,41,00,41,00,41,00,7F,00,01,00,01,00,01,00
FE,00,80,00,80,00,FC,02,01,00,01,00,01,02,7C,00
6E,40,80,00,80,00,FC,02,81,00,81,00,81,42,3C,00
FF,00,01,02,00,04,00,08,00,10,20,00,20,00,00,20
3C,42,81,00,81,42,3C,42,81,00,81,00,81,42,3C,00
3C,42,81,00,81,00,7F,00,01,00,01,00,01,02,7C,00
7E,00,54,00,2A,00,54,00,2A,00,54,00,2A,00,7E,00
C-2
0
1
2
3
4
5
6
7
8
9
Box
%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
C-3
C-4
!
!
!
!
!
!
!
!
Print the rest of the check. This part of the check consists
of normal sized characters (5x8 font). The paper should be
advanced 6 steps after printing each pass. On the last print
pass, turn on the high order bit of byte 381. This tells the
driver to return the print head to home position after printing
the last line of the WRITE LOGO. A TCLOSE can also return
the print head to home position, but it forces the application
to wait until all queued prints are done.
TEMP%(381) = 6
FOR J%=1 to 7
FOR I%=4 to 363
! 72 bytes per print pass, 5 print passes per write
READ TEMP%(I%)
NEXT I%
WRITE LOGO #5; TEMP%(1)
NEXT J%
! Do only one pass this time.
TEMP%(3) = 1
! High order bit of line feed byte to home head set to ON.
TEMP%(381) = 86H
FOR I%=4 to 75
READ TEMP%(I%)
NEXT I%
WRITE LOGO #5; TEMP%(1)
! Allow keyboard input
UNLOCKDEV 11, 1
! Reposition the data statement pointer to the beginning
RESTORE
WEND
ERR.HNDLR
! Display the error.
WAIT; 10000
CLEARS 10
WRITE #10; "SYNC ERROR = ",ERR
RESUME
! Passes 1-10 are for the double printing sections of the check.
! Pass 1 - blank
DATA
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
DATA
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
DATA
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
DATA
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
DATA
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
DATA
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
DATA
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
DATA
0,
0
! Pass 2 - "box" character
DATA
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
DATA
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
DATA
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
DATA
0,
0, 126,
0, 84,
0, 42,
0, 84,
0
DATA
42,
0, 84,
0, 42,
0, 126,
0,
0,
0
DATA
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
DATA
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
DATA
0,
0
C-5
! Pass 3 DATA
0,
DATA
0,
DATA
0,
DATA
0,
DATA 127,
DATA
0,
DATA
0,
DATA
0,
! Pass 4 DATA
0,
DATA
0,
DATA
0,
DATA
0,
DATA
16,
DATA
0,
DATA
0,
DATA
0,
! Pass 5 DATA
0,
DATA
0,
DATA
0,
DATA
0,
DATA
0,
DATA
0,
DATA
0,
DATA
0,
! Pass 6 DATA
0,
DATA
0,
DATA
0,
DATA
0,
DATA -127,
DATA
0,
DATA
0,
DATA
0,
! Pass 7 DATA
0,
DATA
0,
DATA
0,
DATA
0,
DATA
0,
DATA
0,
DATA
0,
DATA
0,
C-6
"4"
0,
0,
0,
0,
0,
0,
0, 65,
0,
1,
0,
0,
0,
0,
0
"2"
0,
0,
0,
0,
0,
0,
0, 126,
32, 64,
0,
0,
0,
0,
0
"-"
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
"8"
0,
0,
0,
0,
0,
0,
0, 60,
0,-127,
0,
0,
0,
0,
0
"7"
0,
0,
0,
0,
0,
0,
0, -1,
16, 32,
0,
0,
0,
0,
0
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
65,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
65,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
65,
0,
0,
0,
0
0
0
0
0
0
0
0,
0,
0,
0,
0,
0,
0,-127,
0,-128,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
-1,
0,
0,
0,
0,
0,
2,
0,
0,
0,
0,
0,
0,
4,
0,
0,
0,
0
0
0
8
0
0
0
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
31,
0,
0,
0,
0
0
0
0
0
0
0
0,
0,
0,
0,
0,
0,
0,-127,
66, 60,
0,
0,
0,
0,
0,
0,
0,
66,
0,
0,
0,
0,
0,
0,
60,
0,
0,
0,
0
0
0
66
0
0
0
0,
0,
0,
4,
32,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
0
0
8
0
0
0
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
66,-127,
0,-127,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
32,
0,
0,
0,
0,
0,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
! Pass
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
! Pass
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
! Pass
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
! This
! Pass
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
! Pass
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
- "3"
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0, -4,
2,
1,
0,
1,
2,
0,
1,
0,
1,
2, -4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
9 - "box" character
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0, 126,
0, 84,
0, 42,
0,
42,
0, 84,
0, 42,
0, 126,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
10 - blank
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
is the normal width part of the check.
11
14,
0, 17,
0, 17,
0, 14,
0,
17,
0, 17,
0, 14,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
12
14,
0, 17,
0, 17,
0, 14,
0,
17,
0, 17,
0, 14,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
12,
0,
0,
0,
0
0
0
2
0
0
0
0,
0,
0,
84,
0,
0,
0,
0
0
0
0
0
0
0
0,
0,
0,
0,
0,
0,
0,
0
0
0
0
0
0
0
17,
0,
0,
0,
0,
0,
0,
0
0
0
0
0
0
0
17,
0,
0,
0,
0,
0,
0,
0
0
0
0
0
0
0
C-7
! Pass
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
! Pass
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
! Pass
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
! Pass
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
! Pass
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
C-8
13
30,
20,
0,
0,
0,
0,
0,
0,
14
4,
17,
0,
0,
0,
0,
0,
0,
15
17,
17,
0,
0,
0,
0,
0,
0,
16
14,
17,
0,
0,
0,
0,
0,
0,
17
4,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
17,
18,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
17,
17,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
24,
0,
0,
0,
0,
0,
0,
0
0
0
0
0
0
0
0,
0,
0,
0,
0,
0,
0,
0
10,
17,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
17,
17,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
17,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
31,
0,
0,
0,
0,
0,
0,
0
0
0
0
0
0
0
0,
0,
0,
0,
0,
0,
0,
0
27,
17,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
21,
17,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
21,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
17,
0,
0,
0,
0,
0,
0,
0
0
0
0
0
0
0
0,
0,
0,
0,
0,
0,
0,
0
17,
17,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
16,
14,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
17,
0,
0,
0,
0,
0,
0,
0
0
0
0
0
0
0
0,
0,
0,
0,
0,
0,
0,
0
12,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
4,
14,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
4,
0,
0,
0,
0,
0,
0,
0
0
0
0
0
0
0
! Pass
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
! Pass
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
! Pass
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
! Pass
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
! Pass
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
18
0,
0,
0,
0,
10,
0,
0,
0,
19
0,
0,
0,
0,
10,
0,
0,
0,
20
0,
0,
0,
0,
4,
0,
0,
0,
21
30,
20,
0,
0,
17,
0,
0,
0,
22
31,
16,
0,
0,
23,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
0,
0,
0,
0,
17,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
17,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
10,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
31,
0,
0,
0,
0
0
0
0
0
0
0
0,
0,
0,
0,
0,
0,
0,
0
0,
0,
0,
0,
17,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
17,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
10,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
31,
0,
0,
0,
0
0
0
0
0
0
0
0,
0,
0,
0,
0,
0,
0,
0
0,
0,
0,
31,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
4,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
4,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
4,
0,
0,
0,
0
0
0
0
0
0
0
0,
0,
0,
0,
0,
0,
0,
0
17,
18,
0,
17,
17,
0,
0,
0,
0,
0,
0,
0,
0,
0,
17,
17,
0,
17,
17,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30,
0,
0,
17,
17,
0,
0,
0,
0,
0,
0,
0,
0,
0,
24,
0,
0,
31,
0,
0,
0,
0
0
0
0
0
0
0
0,
0,
0,
0,
0,
0,
0,
0
16,
16,
0,
14,
17,
0,
0,
0,
0,
0,
0,
0,
0,
0,
16,
31,
0,
17,
17,
0,
0,
0,
0,
0,
0,
0,
0,
0,
28,
0,
0,
16,
14,
0,
0,
0,
0,
0,
0,
0,
0,
0,
16,
0,
0,
16,
0,
0,
0,
0
0
0
0
0
0
0
C-9
! Pass
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
! Pass
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
! Pass
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
! Pass
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
! Pass
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
23
14,
1,
0,
0,
4,
0,
0,
0,
24
17,
17,
0,
0,
16,
0,
0,
0,
25
0,
0,
0,
0,
4,
0,
0,
0,
26
17,
17,
0,
0,
4,
0,
0,
0,
27
31,
16,
0,
0,
19,
0,
0,
0,
C-10
0,
0,
0,
0,
0,
0,
0,
0
17,
17,
0,
14,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
16,
14,
0,
4,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
14,
0,
0,
4,
14,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
4,
0,
0,
0,
0
0
0
0
0
0
0
0,
0,
0,
0,
0,
0,
0,
0
17,
17,
0,
31,
16,
0,
0,
0,
0,
0,
0,
0,
0,
0,
17,
14,
0,
16,
16,
0,
0,
0,
0,
0,
0,
0,
0,
0,
17,
0,
0,
16,
31,
0,
0,
0,
0,
0,
0,
0,
0,
0,
17,
0,
0,
28,
0,
0,
0,
0
0
0
0
0
0
0
0,
0,
0,
0,
0,
0,
0,
0
0,
0,
0,
17,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
17,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
10,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
4,
0,
0,
0,
0
0
0
0
0
0
0
0,
0,
0,
0,
0,
0,
0,
0
27,
17,
0,
31,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
21,
17,
0,
4,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
21,
0,
0,
4,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
17,
0,
0,
4,
0,
0,
0,
0
0
0
0
0
0
0
0,
0,
0,
0,
0,
0,
0,
0
16,
16,
0,
17,
19,
0,
0,
0,
0,
0,
0,
0,
0,
0,
16,
31,
0,
25,
17,
0,
0,
0,
0,
0,
0,
0,
0,
0,
28,
0,
0,
25,
17,
0,
0,
0,
0,
0,
0,
0,
0,
0,
16,
0,
0,
21,
0,
0,
0,
0
0
0
0
0
0
0
! Pass
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
! Pass
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
! Pass
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
! Pass
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
28
31,
4,
0,
0,
16,
0,
0,
0,
29
14,
1,
0,
0,
17,
0,
0,
0,
30
17,
4,
0,
0,
16,
0,
0,
0,
31
14,
1,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
4,
4,
0,
31,
16,
0,
0,
0,
0,
0,
0,
0,
0,
0,
4,
4,
0,
16,
16,
0,
0,
0,
0,
0,
0,
0,
0,
0,
4,
0,
0,
16,
31,
0,
0,
0,
0,
0,
0,
0,
0,
0,
4,
0,
0,
28,
0,
0,
0,
0
0
0
0
0
0
0
0,
0,
0,
0,
0,
0,
0,
0
17,
17,
0,
17,
17,
0,
0,
0,
0,
0,
0,
0,
0,
0,
16,
14,
0,
17,
10,
0,
0,
0,
0,
0,
0,
0,
0,
0,
14,
0,
0,
17,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
17,
0,
0,
0,
0
0
0
0
0
0
0
0,
0,
0,
0,
0,
0,
0,
0
17,
4,
0,
31,
16,
0,
0,
0,
0,
0,
0,
0,
0,
0,
10,
4,
0,
16,
16,
0,
0,
0,
0,
0,
0,
0,
0,
0,
4,
0,
0,
16,
31,
0,
0,
0,
0,
0,
0,
0,
0,
0,
4,
0,
0,
28,
0,
0,
0,
0
0
0
0
0
0
0
0,
0,
0,
0,
0,
0,
0,
0
17,
17,
0,
14,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
16,
14,
0,
17,
17,
0,
0,
0,
0,
0,
0,
0,
0,
0,
14,
0,
0,
16,
14,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
14,
0,
0,
0,
0
0
0
0
0
0
0
C-11
! Pass
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
! Pass
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
! Pass
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
! Pass
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
! Pass
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
32
0,
0,
0,
0,
8,
0,
0,
0,
33
31,
16,
0,
0,
17,
0,
0,
0,
34
30,
20,
0,
0,
16,
0,
10,
0,
35
14,
17,
0,
0,
24,
0,
10,
0,
36
31,
4,
0,
0,
17,
0,
17,
16,
C-12
0,
0,
0,
0,
0,
0,
0,
0
0,
0,
0,
4,
21,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
10,
18,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
13,
0,
0,
0,
0,
0,
10,
0,
0,
0,
0,
0,
0,
4,
0,
0,
0,
0
0
0
0
0
0
0
0,
0,
0,
0,
0,
0,
0,
0
16,
16,
0,
28,
17,
0,
0,
0,
0,
0,
2,
0,
0,
0,
16,
31,
0,
17,
17,
0,
0,
0,
0,
0,
0,
2,
0,
0,
28,
0,
0,
17,
28,
0,
0,
0,
0,
0,
0,
0,
0,
0,
16,
0,
0,
17,
0,
0,
0,
0
0
0
0
0
0
0
0,
0,
0,
0,
0,
0,
0,
0
17,
18,
0,
31,
16,
0,
31,
0,
0,
0,
0,
0,
0,
0,
17,
17,
0,
16,
16,
0,
10,
0,
0,
0,
0,
0,
0,
0,
30,
0,
0,
16,
31,
0,
17,
0,
0,
0,
0,
0,
0,
0,
24,
0,
0,
28,
0,
17,
0,
0
0
0
0
0
0
0
0,
0,
0,
0,
0,
0,
0,
0
17,
17,
0,
30,
20,
0,
31,
0,
0,
0,
0,
0,
0,
0,
17,
14,
0,
17,
18,
0,
10,
0,
0,
0,
0,
0,
0,
0,
17,
0,
0,
17,
17,
0,
17,
0,
0,
0,
0,
0,
0,
0,
17,
0,
0,
30,
0,
17,
0,
0
0
0
0
0
0
0
0,
0,
0,
0,
0,
0,
0,
0
4,
4,
0,
28,
17,
0,
30,
0,
0,
0,
2,
0,
0,
0,
4,
4,
0,
17,
17,
0,
16,
0,
0,
0,
0,
2,
0,
0,
4,
0,
0,
17,
28,
30,
16,
0,
0,
0,
0,
0,
0,
0,
4,
0,
0,
17,
0,
17,
16,
0
0
0
0
0
0
0
! Pass
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
! Pass
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
! Pass
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
! Pass
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
! Pass
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
37
14,
1,
0,
0,
19,
0,
17,
1,
38
0,
0,
0,
0,
17,
0,
2,
31,
39
14,
17,
0,
0,
17,
0,
16,
14,
40
14,
17,
0,
0,
16,
0,
17,
28,
41
14,
17,
0,
0,
16,
0,
25,
17,
0,
0,
0,
0,
0,
0,
0,
0
17,
17,
0,
17,
17,
0,
17,
0,
0,
0,
0,
0,
0,
0,
16,
14,
0,
25,
17,
0,
31,
0,
0,
0,
0,
0,
0,
0,
14,
0,
0,
25,
17,
17,
1,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
21,
0,
17,
1,
0
0
0
0
0
0
0
0,
0,
0,
0,
0,
0,
0,
0
0,
0,
0,
17,
17,
0,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
17,
17,
0,
8,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
17,
14,
14,
16,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
17,
0,
17,
16,
0
0
0
0
0
0
0
0,
0,
0,
0,
0,
0,
0,
0
17,
17,
0,
17,
17,
0,
14,
0,
0,
0,
0,
0,
0,
0,
17,
14,
0,
17,
17,
0,
1,
2,
0,
0,
0,
0,
0,
0,
17,
0,
0,
17,
17,
14,
1,
4,
0,
0,
0,
0,
0,
0,
17,
0,
0,
31,
0,
17,
17,
8
0
0
0
0
0
0
0,
0,
0,
0,
0,
0,
0,
0
17,
17,
0,
31,
16,
0,
17,
0,
0,
0,
0,
0,
0,
0,
17,
14,
0,
16,
16,
0,
17,
0,
0,
0,
0,
0,
0,
0,
14,
0,
0,
16,
31,
28,
17,
0,
0,
0,
0,
0,
2,
0,
17,
0,
0,
28,
0,
17,
17,
0
0
0
0
0
0
2
0,
0,
0,
0,
0,
0,
0,
0
17,
17,
0,
31,
16,
0,
21,
0,
0,
0,
0,
0,
0,
0,
16,
14,
0,
16,
16,
0,
19,
0,
0,
0,
0,
0,
0,
0,
30,
0,
0,
16,
31,
17,
19,
0,
0,
0,
0,
0,
0,
0,
17,
0,
0,
28,
0,
25,
17,
0
0
0
0
0
0
0
C-13
! Pass
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
! Pass
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
! Pass
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
! Pass
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
! Pass
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
42
17,
1,
0,
0,
24,
0,
17,
14,
43
0,
0,
0,
0,
17,
0,
17,
14,
44
17,
17,
0,
0,
4,
0,
17,
16,
45
30,
17,
0,
0,
10,
0,
10,
0,
46
14,
4,
0,
0,
10,
0,
10,
0,
C-14
0,
0,
0,
0,
0,
0,
0,
0
17,
1,
0,
30,
20,
0,
17,
0,
0,
0,
0,
0,
0,
0,
17,
1,
0,
17,
18,
0,
17,
0,
0,
0,
0,
0,
0,
0,
17,
0,
0,
17,
17,
17,
17,
0,
0,
0,
0,
0,
0,
0,
31,
0,
0,
30,
0,
17,
17,
0
0
0
0
0
0
0
0,
0,
0,
0,
0,
0,
0,
0
0,
0,
0,
17,
17,
0,
17,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
17,
17,
0,
17,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
17,
17,
14,
17,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
31,
0,
17,
17,
0
0
0
0
0
0
0
0,
0,
0,
0,
0,
0,
0,
0
27,
17,
0,
31,
4,
0,
30,
0,
0,
0,
0,
0,
0,
0,
21,
17,
0,
4,
4,
0,
16,
0,
0,
0,
0,
0,
0,
0,
21,
0,
0,
4,
4,
30,
16,
0,
0,
0,
0,
0,
0,
0,
17,
0,
0,
4,
0,
17,
16,
0
0
0
0
0
0
0
0,
0,
0,
0,
0,
0,
0,
0
17,
17,
0,
0,
17,
0,
31,
0,
0,
0,
0,
0,
0,
0,
17,
30,
0,
17,
0,
0,
10,
0,
0,
0,
0,
0,
0,
0,
30,
0,
0,
10,
0,
0,
17,
0,
0,
0,
0,
0,
0,
0,
17,
0,
0,
31,
0,
17,
0,
0
0
0
0
0
0
0
0,
0,
0,
0,
0,
0,
0,
0
4,
4,
0,
0,
17,
0,
31,
0,
0,
0,
0,
0,
0,
0,
4,
14,
0,
17,
0,
0,
10,
0,
0,
0,
0,
0,
0,
0,
4,
0,
0,
10,
0,
0,
17,
0,
0,
0,
0,
0,
0,
0,
4,
0,
0,
31,
0,
17,
0,
0
0
0
0
0
0
0
Glossary
This glossary defines terms and abbreviations used in
this book. Consult the IBM Dictionary of Computing,
SC20-1699, and the index of this book for terms that
you do not find in this glossary.
A
absolute value. Magnitude of a number, independent
of its sign.
active. (1) Able to communicate on the network. A
token-ring network adapter is active if it is able to
transmit and receive on the network. (2) Operational.
(3) Pertaining to a node or device that is connected or
is available for connection to another node or device.
(4) Currently transmitting or receiving.
adapter. (1) In the point-of-sale terminal, a circuit card
that, with its associated software, enables the terminal
to use a function or feature. (2) In a LAN, within a
communicating device, a circuit card that, with its
associated software and/or microcode, enables the
device to communicate over the network.
ADCS. Advanced Data Communications for Stores.
address. (1) In data communication, the
IEEE-assigned unique code or the unique locally
administered code assigned to each device or
workstation connected to a network. (2) A character,
group of characters, or a value that identifies a register,
a particular part of storage, a data source, or a data
link. The value is represented by one or more
characters. (3) To refer to a device or an item of data
by its address. (4) The location in the storage of a
computer where data is stored.
address space. The complete range of addresses that
is available to a programmer.
addressing. (1) The assignment of addresses to the
instructions of a program. (2) In data communication,
the way in which a station selects the station to which it
is to send data.
X-1
B
background. On a color display, the part of the
display screen that surrounds a character.
background application. A non-interactive program
that can be selected from the background application
screen or that can start automatically when the system
is IPLed or when the controller is activated as the
master or file server. Contrast with foreground
application.
backup. Pertaining to a system, device, file, or facility
that can be used in the event of a malfunction or the
loss of data.
bar code. A code representing characters by sets of
parallel bars of varying thickness and separation that
are read optically by transverse scanning.
base address. A numeric value that is used as a
reference in the calculation of addresses in the
execution of a computer program, to or through which,
the input/output devices are connected.
baseband. (1) A frequency band that uses the
complete bandwidth of a transmission medium.
Contrast with broadband, carrierband. (2) A method of
data transmission that encodes, modulates, and
impresses information on the transmission medium
without shifting or altering the frequency of the
information signal.
base unit. The part of the IBM 4683 Point of Sale
terminal that contains the power supply and the
interfaces.
BASIC. Beginners All-purpose Symbolic Instruction
Code. A programming language that uses common
English words.
Basic Input/Output System (BIOS). In IBM Personal
Computers with PC I/O channel architecture, microcode
that controls basic hardware operations such as
interactions with diskette drives, fixed disk drives, and
the keyboard.
batch. Smaller subdivisions of price change records
within an event. Each batch has a 12-character ID and
a 30-character description field.
batch file. A file that contains a series of commands
to be processed sequentially.
baud. The rate at which signal conditions are
transmitted per second. Contrast with bits per second
(bps).
BCD. Binary-coded decimal notation.
X-2
C
C. A high-level programming language designed to
optimize run time, size, and efficiency.
CMOS. Complementary metal-oxide semiconductor.
code page. A particular assignment of hexadecimal
identifiers to graphic characters.
complementary metal-oxide semiconductor
(CMOS). A technology that combines the electrical
properties of n-type semiconductors and p-type
semiconductors.
cable loss (optical). The loss in an optical cable
equals the attenuation coefficient for the cables fiber
times the cable length.
cable segment. A section of cable between
components or devices on a network. A segment may
consist of a single patch cable, multiple patch cables
connected together, or a combination of building cable
and patch cables connected together. See LAN
segment, ring segment.
call. The action of bringing a function or subprogram
into effect, usually by specifying the entry conditions
and jumping to an entry point.
carrierband. A frequency band in which the modulated
signal is superimposed on a carrier signal (as
differentiated from baseband), but only one channel is
present on the medium. Contrast with baseband,
broadband.
Glossary
X-3
X-4
D
data. (1) A representation of facts, concepts, or
instructions in a formalized manner suitable for
communication, interpretation, or processing by human
or automatic means. (2) Any representations such as
characters or analog quantities to which meaning is or
might be assigned.
data circuit-terminating equipment (DCE). In a data
station, the equipment that provides the signal
conversion and coding between the data terminal
equipment (DTE) and the line.
data file. A collection of related data records
organized in a specific manner; for example, a payroll
file (one record for each employee, showing such
information as rate of pay and deductions) or an
inventory file (one record for each inventory item,
showing such information as cost, selling price, and
number in stock.) See also data set, file.
data integrity. (1) The condition that exists as long as
accidental or intentional destruction, alteration, or loss
of data does not occur. (2) Preservation of data for its
intended use.
data link. (1) Any physical link, such as a wire or a
telephone circuit, that connects one or more remote
terminals to a communication control unit, or connects
one communication control unit with another. (2) The
assembly of parts of two data terminal equipment (DTE)
devices that are controlled by a link protocol, and the
interconnecting data circuit, that enable data to be
transferred from a data source to a data link. (3) In
SNA, see also link. Note: A telecommunication line is
only the physical medium of transmission. A data link
includes the physical medium of transmission, the
protocol, and associated devices and programs; it is
both physical and logical.
data processing system. A network, including
computer systems and associated personnel, that
accepts information, processes it according to a plan,
and produces the desired results.
data set. Logically related records treated as a single
unit. See also file.
data terminal equipment (DTE). (1) That part of a
data station that serves as a data source, data receiver,
or both. (2) Equipment that sends or receives data, or
both.
Glossary
X-5
X-6
E
EAN. European article number.
EBCDIC. Extended binary-coded decimal interchange
code.
EIA. Electronic Industries Association. See EIA
interface.
EIA interface. An industry-accepted interface for
connecting devices having voltage-related limits.
element. (1) In a set, an object, entity, or concept
having the properties that define a set. (2) A parameter
value in a list of parameter values.
emulation. (1) The imitation of all or part of one
computer system by another, primarily by hardware, so
that the imitating system accepts the same data,
executes the same programs, and achieves the same
results as the imitated computer system. (2) The use
of programming techniques and special machine
features to permit a computing system to execute
programs written for another system.
enabled. (1) On a LAN, pertaining to an adapter or
device that is active, operational, and able to receive
frames from the network. (2) Pertaining to a state of a
processing unit that allows the occurrence of certain
types of interruptions. (3) Pertaining to the state in
which a transmission control unit or an audio response
unit can accept incoming calls on a line.
FIFO. First-infirst-out.
file. A named set of records stored or processed as a
unit. For example, an invoice may form a record and
the complete set of such records may form a file. See
also data file and data set.
Glossary
X-7
X-8
H
half-duplex. In data communication, pertaining to
transmission in only one direction at a time. Contrast
with duplex.
hardware. Physical equipment as opposed to
programs, procedures, rules, and associated
documentation.
hashing. In an indexed data set, using an algorithm to
convert the key of a record to an address for that
record, for storing and retrieving data. Synonymous
with randomizing.
I
IBM Disk Operating System (DOS). A disk operating
system based on MS-DOS**.
identifier. String of characters used to name elements
of a program, such as variable names, reserved words,
and user-defined function names.
IEEE. Institute of Electrical and Electronics Engineers.
Glossary
X-9
X-10
K
K. When referring to storage capacity, a symbol that
represents two to the tenth power, or 1024.
keyboard. A group of numeric keys, alphabetic keys,
special character keys, or function keys used for
entering information into the terminal and into the
system.
keyed file. Type of file composed of keyed records.
Each keyed record has two parts: a key and data. A
key is used to identify and access each record in the
file.
L
label. Constant, either numeric or literal, that
references a statement or function.
LAN. Local area network.
LAN segment. (1) Any portion of a LAN (for example,
a single bus or ring) that can operate independently but
is connected to other parts of the establishment network
by bridges. (2) An entire ring or bus network without
bridges. See cable segment, ring segment.
LCD. Liquid Crystal display.
LDSN. Logical drive and subdirectory name.
LED. Light-emitting diode.
LFN. Logical file name.
light-emitting diode (LED). A semiconductor chip that
gives off visible or infrared light when activated.
link. (1) In the IBM Store System, the logical
connection between nodes including the end-to-end link
control procedures. (2) The combination of physical
media, protocols, and programming that connects
devices on a network. (3) In computer programming,
the part of a program, in some cases a single
instruction or an address, that passes control and
parameters between separate portions of the computer
program. (4) To interconnect items of data or portions
of one or more computer programs. (5) In SNA, the
combination of the link connection and link stations
joining network nodes. See also link connection. Note:
A link connection is the physical medium of
transmission; for example, a telephone wire or a
microwave beam. A link includes the physical medium
Glossary
X-11
Mb. Megabit.
MB. Megabyte.
MCF Network. Multiple store controllers
communicating on a network using DDA. This provides
data redundancy among the store controllers.
media. Plural form of medium.
medialess. Not fitted with a direct access storage
device, such as a diskette drive or fixed disk drive, as in
some models of IBM Point of Sale Terminals.
medium. (1) A physical carrier of electrical or optical
energy. (2) A physical material in or on which data
may be represented.
megabit (Mb). A unit of measure for throughput. 1
megabit = 1,048,576 bits.
megabyte (MB). A unit of measure for data.
1 megabyte = 1,048,576 bytes.
memory. Program-addressable storage from which
instructions and other data can be loaded directly into
registers for subsequent execution or processing.
memory mapped I/O (MMIO). In an IBM Personal
Computer, a method of accessing an input or output
port as if it were a memory location.
memory model. Predetermined format for program
structure. A memory model determines the sizes of the
different program areas (code, data, and stack), and the
initial values for segment registers. IBM 4680 BASIC
supports three memory models: medium, big, and large.
message. (1) An arbitrary amount of information
whose beginning and end are defined or implied. (2) A
group of characters and control bit sequences
transferred as an entity. (3) In telecommunication, a
combination of characters and symbols transmitted from
one point to another. (4) A logical partition of the user
devices data stream to and from the adapter. See also
error message, operator message.
Micro Channel. The architecture used by IBM
Personal System/2 computers, Models 50 and above.
This term is used to distinguish these computers from
personal computers using a PC I/O channel, such as an
IBM PC, XT, or an IBM Personal System/2 computer,
Model 25 or 30.
microcode. (1) One or more microinstructions. (2) A
code, representing the instructions of an instruction set,
that is implemented in a part of storage that is not
program-addressable. (3) To design, write, and also
test one or more microinstructions.
X-12
N
name. An alphanumeric term that identifies a data set,
statement, program, or cataloged procedure.
O
object code. Output of an assembler or compiler that
executes on the target processor.
OCF. Operator console facility.
OCR. Optical character recognition.
OCR reader. A device that reads hand-written or
machine-printed symbols into a computing system.
offline. Operation of a functional unit without the
control of a computer or control unit.
online. Operation of a functional unit that is under the
continual control of a computer or control unit. The
term also describes a users access to a computer
using a terminal.
open. (1) To make an adapter ready for use. (2) A
break in an electrical circuit. (3) To make a file ready
for use.
Open Systems Interconnect (OSI). (1) The
interconnection of open systems in accordance with
specific ISO standards. (2) The use of standardized
procedures to enable the interconnection of data
processing systems. Note: OSI architecture
establishes a framework for coordinating the
development of current and future standards for the
interconnection of computer systems. Network
functions are divided into seven layers. Each layer
represents a group of related data processing and
communication functions that can be carried out in a
standard way to support different applications.
Open Systems Interconnect (OSI) architecture.
Network architecture that adheres to a particular set of
ISO standards that relates to Open Systems
Interconnect (OSI).
Open Systems Interconnect (OSI) Reference Model.
A model that represents the hierarchical arrangement of
the seven layers described by the Open Systems
Interconnect (OSI) architecture.
Glossary
X-13
P
pacing. A technique by which a receiving component
controls the rate of transmission by a sending
component to prevent overrun or congestion.
X-14
X-15
X-16
Glossary
X-17
S
SAA. Systems Application Architecture.
sales transaction. See transaction.
scan. To pass an item over or through the scanner so
that the encoded information is read. See also
wanding.
scanner. A device that examines the bar code on
merchandise tickets, credit cards, and employee badges
and generates analog or digital signals corresponding to
the bar code.
scroll. To move all or part of the display image
vertically or horizontally to display data that cannot be
observed within a single display image. See also page
(2).
SCSI. Small computer system interface.
SDLC. Synchronous Data Link Control.
secondary application. A user-written program that is
designed to operate with operator intervention.
sector. A 512-byte area of the control unit diskette, the
amount of data that is transferred at one time to or from
the diskette.
segment. See cable segment, LAN segment, ring
segment.
sequential access. Type of file structure in which
records are obtained from or placed into a file in such a
way that each successive access to the file refers to the
next record in the file.
sequential file. A disk file in which records are read
from or placed into the file according to the order they
are processed.
serial port. On personal computers, a port used to
attach devices such as display devices, letter-quality
printers, modems, plotters, and pointing devices such
as light pens and mice; it transmits data one bit at a
time. Contrast with parallel port.
server. (1) A device, program, or code module on a
network dedicated to providing a specific service to a
X-18
static data. Data that does not vary in size during the
execution of a program, such as integers and real
numbers.
station. (1) A point-of-sale terminal that consists of a
processing unit, a keyboard, and a display. It can also
have input/output devices, such as a printer, a magnetic
stripe reader or cash drawers. (2) A communication
device attached to a network. The term used most
often in LANs is an attaching device or workstation.
(3) An input or output point of a system that uses
telecommunication facilities; for example, one or more
systems, computers, terminals, devices, and associated
programs at a particular location that can send or
receive data over a telecommunication line. See also
attaching device, workstation.
Glossary
X-19
T
task. A basic unit of work.
TCC. Terminal Controller Communications
TCC Network. A system in which the terminals and
controllers communicate using either a store loop or
token ring.
terminal. In data communication, a device, usually
equipped with a keyboard and a display, capable of
sending and receiving information over a
communication channel.
terminal number. A number assigned to a terminal to
identify it for addressing purposes.
text editor. A program used to create, modify, and
print or display text files.
threshold. (1) A level, point, or value above which
something is true or will take place and below which it
is not true or will not take place. (2) In IBM bridge
programs, a value set for the maximum number of
frames that are not forwarded across a bridge due to
errors, before a threshold exceeded occurrence is
counted and indicated to network management
programs. (3) An initial value from which a counter is
decremented from an initial value. When the counter
reaches zero or the threshold value, a decision is made
and/or an event occurs.
till. A tray in the cash drawer of the point-of-sale
terminal, used to keep the different denominations of
bills and coins separated and easily accessible.
X-20
W
wand. A commercially available device used to read
information encoded on merchandise tickets, credit
cards, and employee badges.
wanding. Passing the tip of the wand reader over
information encoded on a merchandise ticket, credit
card, or employee badge.
wideband. Synonym for broadband.
Glossary
X-21
X
X.25. A CCITT Recommendation that defines the
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
X-22
Index
Special Characters
/* */ 5-5
$ option, LINK86 9-9
$C (command) option, LINK86 9-10
$D option, LINK86 9-10
$L (library) option, LINK86 9-10
$M 8-6
$M (map) option, LINK86 9-10
$N (line number) option, LINK86 9-10
$O 8-6
$O (object) option, LINK86 9-11
$S (symbol) option, LINK86 9-11
$X 8-6
Numerics
286 executable load module 9-2
286 file type 9-2
2x20 displays
accessing 3-7
characteristics of 3-6
clearing 3-7
current character location 3-7
customizing alphanumeric display character set
determining information 3-8
display character sets 3-7
example application of 3-9
programming hints 3-8
programming tips for 3-6
reading from 3-8
writing characters to 3-7
4680 library ix
4683-xx1 ix
4683-xx1 terminal storage retention 4-10
4683-xx2 ix
4683-xx2 terminal storage retention 4-10
4683/4684 library ix
4684 ix
4690 library ix
4693-xx1 ix
4693-xx2 ix
4693/4694 library ix
A
abbreviations for LIB86 command-line options
access
modes 16-4
random 16-5
sequential 16-5
accessing
2x20 displays 3-7
8-2
3-7
accessing (continued)
cash drawer driver 3-27
coin dispenser driver 3-29
distributed files in terminal applications 2-14
files 2-20
files in other directories 8-6
files on LAN system 2-18
files using node name 2-18
I/O processor 3-40
key file utility 6-2
magnetic stripe reader 3-52
pipe 16-5
printer 3-61
printer model 3 3-69
printer model 4 3-69
RAM disk files from controller applications 15-31
RAM disk files from terminal applications 15-32
scale driver 3-87
serial I/O communications driver 3-90
shopper display 3-10
tone driver 3-96
totals retention driver 3-98
totals retention driver in direct mode 3-98
video display 3-16
active controllers on network, get all 15-26, 16-39
adding
a table using input sequence table utility 7-3
operator record to authorization file 15-9
ADDITIONAL parameter for LINK86 9-6
additional products 1-4
ADX files
ADXCSW0L, command formats for 11-4
ADXCSW0L, parameters for 11-4
ADX_CABORT_PROS 16-43
ADX_CAUTH 16-32
ADX_CCHANGE_ATTRIB 16-24
ADX_CCLOSE_FILE 16-18
ADX_CCLOSE_LS 16-32
ADX_CCREATE_FILE 16-16
ADX_CCREATE_KFILE 16-7
ADX_CCREATE_POSFILE 16-14
ADX_CCRYPT 16-34
ADX_CDELETE_FILE 16-22
ADX_CDELETE_KREC 16-14
ADX_CERROR 16-42
ADX_CEXIT_PROS 16-44
ADX_CFILES 16-24, 16-25, 16-26, 16-27
ADX_CGET_STAT 16-32
ADX_CLOCK_REC 16-21
ADX_CMEM_FREE 16-45
ADX_CMEM_GET 16-44
X-23
ADX_COPEN_FILE 16-17
ADX_COPEN_KFILE 16-11
ADX_COPEN_LINK 16-32
ADX_COPEN_SESS 16-32
ADX_CPRS_CREATE 16-28
ADX_CPRS_CWRITE 16-30
ADX_CPRS_INIT 16-29
ADX_CPRS_READ 16-28
ADX_CPRS_WRITE 16-30
ADX_CPRTHEX 16-48
ADX_CREAD_HOST 16-32
ADX_CREAD_KREC 16-11, 16-12
ADX_CREAD_REC 16-19
ADX_CRENAME_FILE 16-22
ADX_CSEEK_PTR 16-23
ADX_CSEND_REQ 16-32
ADX_CSERVE 16-35
ADX_CSTARTP 16-40
ADX_CTIMER_SET 16-46
ADX_CWAIT 16-46
ADX_CWRITE_HOST 16-32
ADX_CWRITE_KREC 16-13
ADX_CWRITE_REC 16-20
ADXAUTH function 15-8
adding operator record 15-9
changing authorization record 15-8
changing password 15-9
deleting operator record 15-9
example of 15-9
ADXCOPYF 15-32
ADXCRYPT 15-11
ADXCSEOL 15-37
ADXCSEUR 15-38
ADXDIR 15-39
ADXERROR 15-29
ADXEXIT 15-38
ADXFILES 15-34, 15-35, 15-36
ADXPSTAR 15-7
ADXSERCL 15-39
ADXSERVE 15-17
ADXSTART 15-6
ADXSTART function 15-6
AJ command (print spooler) 10-4
alarm for cash drawer
controlling 3-28
obtaining status 3-28
alerts, audible alarm 4-6
algorithm
alternate hashing 6-10
IBM folding 6-10
IBM modulo check 3-38
polynomial hashing 6-16
specifying for files 6-11
UPC/EAN modulo check 3-39
user-defined modulo-check 3-38
X-24
B
BACKGRND parameter 15-3, 16-40, 16-42
background applications
definition of 15-2
displaying status 15-3, 15-24, 16-37
permanent 15-2
C
C applications, terminal 16-2
C language interfaces 16-3
canceling the shared use of a file using
ADX_CFILES 16-24
canceling the shared use of a file using
ADXFILES 15-34
cash drawer 3-27
cash drawer driver
accessing 3-27
characteristics of 3-27
controlling alarm for 3-28
example of code for 3-28
obtaining alarm status 3-28
programming tips for 3-27
CHAIN statement
CREATE 2-17
OPEN 2-17
RENAME 2-17
SIZE 2-17
chaining
applications 15-30
directly executable modules 15-31
overlays 15-30, 15-31
stats from a direct file 6-4
terminal applications 15-31
threshold 6-18
changing
authorization using ADXAUTH function 15-8
file distribution attributes 16-24
file pointer 16-23
fonts 3-71
logical names table 2-14
password in operator record 15-9
tables using input sequence table utility 7-3
to exit a program 16-44
changing the signon screen 1-2
Index
X-25
character sets
ASCII 15-1
check printing C-1
double width C-2
model 1 printer 3-64
model 2 printer 3-64
normal width C-1
characteristics
model 3 printer 3-67
model 4 printer 3-67
check printing
character sets C-1
characteristics of, model 1 or 2 printer 3-62
example of C-3
formatting the data for, model 1 or 2 printer 3-63
problem determination for, model 1 or 2
printer 3-64
programming considerations, model 1 or 2
printer 3-64
warning 3-64
CJ command (print spooler) 10-4
CLEAR key use in Input Sequence Table 3-34
clearing
2x20 displays 3-7
shopper display 3-10
video display 3-16
close file or pipe 16-18
close keyed file 16-11
close, partial 16-11, 16-18
closing ADXSERVE using ADXSERCL 15-39
COBOL interfaces 16-3
COBOL/2, IBM 16-3
CODE section 9-5
code size, when exceeds available memory 15-3
CODESHARED option 9-9
coding tips for writing non-4680 BASIC programs 16-2
coin dispenser driver
accessing 3-29
characteristics of 3-29
dispensing coins 3-30
example of code for 3-30
programming tips for 3-29
command
read 3-83
command file, example of 11-3
command formats for ADXCSW0L 11-4
command line syntax 9-13
command options, LINK86 9-4
command stacking
example of 3-25
restrictions using 3-25
using 3-24
command-line files for LIB86 8-2
command-line options 8-2
commands
AJ 10-4
X-26
commands (continued)
AQ 10-4
CJ 10-4
CQ 10-5
HQ 10-4
LQ 10-4
PJ 10-3
TJ 10-4
TQ 10-5
commands, print spooler
AJ 10-4
AQ 10-4
CJ 10-4, 10-5
HJ 10-4
HQ 10-4
LJ 10-4
PJ 10-3
RJ 10-5
TJ 10-4, 10-5
common information for input sequence table 3-33
communicating between applications
in store controller applications 15-11
communications, system 1-2
compatibility, printer 3-68
compound file
creating 16-10
parameters 16-16, 16-24
compressing files using the loop status application
utility 12-1
concurrent operations on the system 1-1
conditional write to PRS pipe 16-30
configuration considerations, RAM disks 15-31
configured controllers, getting 16-37
controller applications
accessing RAM disk files from 15-32, 15-41
copying RAM disk files from 15-32
listing directories RAM disk file from 15-32
controller, store configured on network 15-24
controllers, get all active on network 15-26, 16-39
converting
ASCII to EBCDIC 15-25, 16-38
EBCDIC to ASCII 15-25, 16-38
HEX to ASCII 16-48
copying
files 2-23
files using ADXCOPYF 15-32
RAM disk files from controller applications 15-32
table, input sequence table utility 7-2
CQ command (print spooler) 10-5
creating
an empty file (batch method) 6-8
compound files 16-10
creating files 16-5
files 2-19, 16-16
input file 9-2
keyed file 16-7
creating (continued)
keyed file from a direct file 6-6
library files 8-5
non-POS file or pipe 16-7, 16-16
pipes 16-5, 16-16
POS non-keyed file 16-14
PRS pipe 16-28
creating a library file 8-3
cutter control characters 3-77
D
data
backup 1-4
DATA section 9-5
formatting for check printing, model 1 or 2
printer 3-63
heap 15-4
integrity for PLDs 2-27
receiving from the I/O processor 3-40
recovering using Desk Surface Analysis Utility 11-7
size, terminal default 15-4
stack 15-4
static 15-4
waiting for from I/O processor 3-40
DBINFO option, LINK86 9-11
Debug (DBG) file 9-2
default
data size for terminals 15-4
values 9-6
defining
input sequence 3-33
logical names 2-12
defining logical file names 2-12
DELETE option, LIB86 8-4
deleting
files 2-20
files or pipes 16-22
functions of 16-4
keyed record 16-14
modules from library files 8-4
operator record to authorization file 15-9
pipes 16-5
despooling
effects of activating alternate file server on 5-3
determining printer status, model 3 or 4 3-76
device programming
40-character Liquid Crystal Display (LCD) 3-6
40-character Vacuum Florescent Display II (VFD
II) 3-6
alphanumeric display 3-6
cash drawer driver 3-27
coin dispenser driver 3-29
Dual-Track Magnetic Stripe Reader 3-48
I/O processor 3-31
operator display 3-6
Index
X-27
E
EBCDIC to ASCII, converting 15-25, 16-38
ECHO option 9-9
emphasized printing 3-70
emulator messages 17-6
emulator report, optional 17-3
X-28
enable
security for files and subdirectories 2-25
terminal IPL 15-28
terminal storage retention 15-18, 16-35
enable/disable IPL
disable terminal IPL 15-29
enable IPL function 15-28
using 15-28
encrypting password 15-11, 16-34
ending
a program 16-43
access to files 2-21
environment, operating system 1-1
erasing
a table using input sequence table utility 7-2
spool file 5-3
ERR function 4-4
ERRF% function 4-4
ERRL function 4-4
ERRN function 4-4
error
handling 3-82
recovery 3-82
error codes
application action 4-11
description 4-11
print spooler 10-5
error functions 4-2
error logging
ADXERROR 15-29
error log 4-4
system log 4-4
error recovery 4-1
error statements 4-2
ERRORLEVEL test 9-12, 9-15
errors
application 4-5
application responses 4-13
hardware, store controller 4-5
hardware, terminal 4-5
I/O devices 4-13
LINK86 messages B-8
logging 4-4
POSTLINK, messages B-4
recovery from 4-1
setting error level value files 15-38
store controller 4-5
system 4-5
terminal 4-5
event completion, waiting for 16-46
event logging, ADXERROR 15-29
example of 4680 BASIC program 5-8
example of a command file 11-3
example of C/2 C-language program 5-5
example of DOS C-language program 5-7
examples
exclusion and synchronization 16-6
executable load module
(286) 9-2
CODE section 9-5
DATA section 9-5
EXTRA section 9-5
STACK section 9-5
exiting a program 16-44
extended memory management
accessing RAM disk files from terminal
applications 15-41
warning 15-44
extensions, naming 2-8
external name symbols 8-5
EXTERNALS option, LIB86 8-5
EXTRA section 9-5
F
FAT (file allocation table) 4-9
file
access 16-4
access rights 2-19
allocation space 2-19
allocation table (FAT) 4-9
attributes, changing 16-24
performance 2-28
pointer 16-5
pointer, shared 16-4, 16-6, 16-15, 16-17
services 16-7
services, general 16-14, 16-22
size 15-5
space allocation 2-19
type 286 9-2
use table 2-10
file access priorities, terminal applications 15-5
file functions
accessing files 2-20
copying files 2-23
creating files 2-19
deleting files 2-20
disabling file security 2-25
disabling subdirectory security 2-25
enabling file security 2-25
enabling subdirectory security 2-25
ending access to files 2-21
ensuring data integrity across PLDs 2-27
performing 2-18
protecting files 2-23
protecting subdirectories 2-24
reading a file record 2-25
renaming files 2-23
sharing files 2-21
writing a file record 2-26
file names
for disk media 16-4
on LAN system 2-7
store application 2-17
using in terminal applications 2-17
file options
INPUT 9-9
L86 9-8
file record
reading 2-26
writing 2-26
file security 2-23
files
access rights for 2-19
accessing 2-20
accessing on a LAN system 2-18
application logical names 2-12
command-line 8-2
compound 16-16
compound, creating 16-10
compressing 12-1
copying 2-23
copying RAM disk from controller
applications 15-32
creating 2-19, 16-16
creating on LAN system 2-19
creating POS 16-14
defining logical names 2-12
defining user logical names 2-12
deleting 2-20, 16-22
dictionary of 4690 OS A-3
direct 2-3
distributed, in terminal applications, accessing
enable/disable security 2-25
ending access to 2-21
error recovery, disk 4-10
handling on system 1-3
keyed 2-4
keyed, creating 16-7
library 8-1
listing files on disk 15-3
listing using cross-reference map 8-5
listing using library module map 8-5
managing 2-1
naming 2-7, 2-8
non-POS, creating 16-7
OBJ 9-7
object 9-2
open 16-17, 16-18
POS non-keyed, creating 16-14
printing 10-1
protecting 2-23
RAM disk 15-31
random 2-2
read a record 16-19
renaming 2-23, 16-22
Index
2-14
X-29
files (continued)
selecting file types 2-2
sequential 2-5
sharing 2-21
space allocation for 2-19
system logical names 2-12
using logical names 2-11
write a record 16-20
write with hold 16-20
filetype for overlays (OVRs) 9-10
filing a report using Input Sequence Table utility 7-2
FISDATA 3-86
font change programming example 3-71
font specification 3-71
formatting data for check printing, model 1 or 2
printer 3-63
free space, disk 15-24, 16-37
freeing storage 16-45
front or top loaded documents 3-72
function code
defined 3-33
information 3-35
functions
ADX_CFILES 16-24
ADXEXIT 15-38
ADXFILES 15-34
ADXPSTAR 15-7
ADXSTART 15-6
ASCII to EBCDIC, converting 15-25, 16-38
deleting 16-4
disable controller programmable power 15-23
displaying application status 15-23
displaying background application status 15-24
EBCDIC to ASCII, converting 15-25, 16-38
enable controller programmable power 15-23
ERR 4-4
ERRF% 4-4
ERRL 4-4
ERRN 4-4
getting configured controllers on the network 15-24
getting controller ID for a terminal 15-25
getting disk free space 15-24
HEX to ASCII, converting 16-48
power off a local machine (controller or
terminal) 15-23
power off a remote controller 15-22
power off a remote terminal 15-22
PRSxCRT 15-13
PRSxINT 15-14
PRSxWRT 15-14
query preservation flag 16-38
reset preservation flag 16-38
set preservation flag 16-38
set terminal sleep mode inactive timeout 15-27,
16-40
stop application with message 15-24
X-30
functions (continued)
storage retention 4-10
terminal dump preservation
15-25
G
general file services 16-14, 16-22
generating tone 3-96
get all active controllers on network 15-26, 16-39
get controller machine model and type 16-40
get loop message 15-26, 16-38
get loop status 15-26, 16-39
GETLONG 3-83
getting
application status 16-36
application status information 15-19
configured controllers 16-37
configured controllers on the network 15-24
controller ID 16-37
controller ID for a specified terminal 15-25
controller ID for a terminal 15-25
disk free space 15-24, 16-37
file pointer 16-23
storage 16-44
group ID 2-23
GROUP parameters 9-6
guidance lights
setting on shopper display 3-11
guidelines for assembly language applications 16-48
guidelines for writing non-4680 BASIC programs 16-2
H
hardware errors
store controller 4-5
terminal 4-5
heap 16-44, 16-45
heap data 15-4
HEX to ASCII, converting 16-48
HOLD option 2-27, 16-13
home block 6-18
home sensors, printer 3-77
HQ command (hold queue) 10-4
I
I/O device errors 4-13
I/O options
$M 8-6
$O 8-6
$X 8-6
I/O processor
accessing 3-40
allowing operator input 3-41
characteristics of 3-31
determining status of 3-42
J
3-34
journal buffering
3-74
K
keyboard
keyed file utility, services 16-7
keyed files
create 16-7
creating direct file from 6-6
creating empty file using batch method
delete keyed record 16-14
description of 2-4
internal processes of 6-12
key folding 6-12
key transformation 6-12
open file 16-11
performance 2-28
randomizing 6-12
read record 16-11, 16-12
write keyed record 16-13
6-8
L
L86 file options 9-8
label format
bar code 3-37
magnetic ticket 3-37
OCR 3-37
LAN considerations for input sequence table utility
LAN system
accessing files on 2-18
building logical names table 2-14
changing logical names table 2-14
Index
7-2
X-31
X-32
M
magnetic ink character recognition
data format 3-80
determining if installed 3-80
errors, understanding 3-81
parsing routines 3-81
reader, using 3-80
reading from 3-80
support 3-79
magnetic ink character recognition support, model 3 and
4 printers 3-79
magnetic stripe reader
accessing 3-52
common data characteristics 3-53
determining status of 3-54
disallowing data 3-53
dual-track characteristics 3-49
example of code for dual-track 3-56
example of code for single-track 3-55
example of code for three-track 3-58
preparing to receive data from 3-52
receiving data from 3-53
single-track characteristics 3-48
three-track characteristics 3-49
magnetic ticket label format 3-37
managing
files 2-1
files, disk 16-4
pipes 16-5
manual or automatic document insertion 3-72
Map (MAP) file 9-2, 9-4
MAP file options 9-7
MAP option, LIB86 8-5
maps, module 8-5
MAXIMUM parameter for LINK86 9-6
media, disk 16-4
medium memory model, defined 15-3
memory
allocating 16-44
allocating using ADDMEM 17-3
parameter block 16-45
when code size exceeds available 15-3
memory management 15-42
memory models
big 15-3
large 15-3
medium 15-3
menu-driven programs 9-12
message list, audible alarm 4-7
message size, pipes 15-14
message types used with pipes 15-13
message, get loop 15-26, 16-38
mirrored file, using 16-9, 16-16, 16-24
model 2 printer driver 3-60
N
naming
conventions for 4690 OS files A-2
extensions 2-8
files and subdirectories 2-7
subdirectories, files 2-8
tables for input sequence table 7-3
nested overlays 9-13
NOALPHA option 8-5
NOALPHA option, LIB86 8-5
node name use in accessing files 2-18
nodename, using to access files 2-17
NOLIBSYMS option 9-7
NOLINES option 9-7
NOLOCALS option 9-4, 9-7
non-4680 BASIC programs, writing 16-2
non-POS file or pipe, creating 16-7
nondestructive read 16-6, 16-19
NOSHARED options 9-8
NOSYMS option 9-6
O
OBJ files 9-7
object file 9-2
object file error codes B-14
object module format, Intel 8086/80286
OCR
label format 3-37
label format, magnetic ticket 3-37
ON ASYNC ERROR CALL 4-3
ON ERROR 4-2
OPEN 16-11
open file or pipe 16-17
9-2
Index
X-33
P
parameters
ADXCSW0L 11-4
BACKGRND 15-3
GROUP 9-6
parsing routines for model 3 or 4 printer driver
partial close 16-11, 16-18
password
authorization of 16-32
changing in operator record 15-9
definition of 16-33
encryption 15-11, 16-34
ID 15-8
performance
design considerations for files 2-28
file 2-28
keyed files 2-28
X-34
3-81
printer (continued)
removing and replacing a document 3-73
reversible document station motor 3-76
top or front loaded documents 3-72
printer determination, model 3 or 4 3-76
printer driver
compatibility with Model 1 and 2 3-68
model 2 3-60
model 3 3-67, 3-79
MICR support 3-79
model 4 3-67, 3-79
MICR support 3-79
programming tips for 3-60, 3-67
printing
checks, model 1 or 2 printer 3-62
checks, model 3 or 4 printer 3-77
files using print spooler 10-1
logo, model 1 or 2 printer 3-65
logo, model 3 or 4 3-78
table using Input Sequence Table utility 7-2
printing programming example 3-70
priorities for searching 9-12
priority 16-42
problem determination aids 1-3
problem determination for check printing, model 1 or 2
printer 3-64
PROCESS table 16-44
processing, suspended 16-46
programmable power
disable controller programmable power 15-23
enable controller programmable power 15-23
power off a local machine (controller or
terminal) 15-23
power off a remote controller 15-22
power off a remote terminal 15-22
programming, application 3-82
programs
ending 16-43
menu-driven 9-12
writing non-4680 16-2
protecting
files 2-23
IBM-provided subdirectories A-1
subdirectories 2-24
system operator authorization file 15-8
PRS driver, initializing 16-29
PRS pipe, conditional write to 16-30
PRS pipe, write to 16-30
PRS, read from a PRS pipe 16-28
PRSxCRT function 15-13
PRSxINT function 15-14
PRSxWRT function 15-14
public name symbols 8-5
public names in library files 8-5
public symbols 8-1
Index
X-35
publications, related ix
PUBLICS option, LIB86 8-5
PUTLONG 3-84
PWIN$ parameter for password encryption 15-11
PWOUT$ parameter for password encryption 15-11
Q
query terminal dump preservation flag
16-38
R
RAM disk files
accessing from controller applications 15-31
accessing from terminal applications 15-32
copying from terminal applications 15-32
in-memory 15-31
listing directories of terminal applications 15-32
RAM disks
configuration considerations 15-31
copying files from controller applications 15-32
random file access 16-5
random files 2-2
RCP command 13-3
reactivating configured file server 5-3
read
attributes from the video display 3-19
characters from a 2x20 display 3-8
characters from the shopper display 3-11
characters from the video display 3-19
commands
GETLONG 3-83
PUTLONG 3-84
file record 16-19
keyed record 16-12
nondestructive 16-6, 16-19
pipe record 16-19
PRS pipe 16-28
READ MATRIX 2-25
reading totals retention driver data in direct mode 3-99
receive paper cutter
control characters 3-76
example 3-77
receiving data from the I/O processor 3-40
receiving data from the serial I/O communications
driver 3-90
record, unlocking a 16-21
recovering from errors 4-1
recovery from PLD
enable/disable IPL 15-28
on store controller 4-9
on terminal 4-9
reinserting documents for printing 3-75
related publications ix
removing and replacing a document 3-73
X-36
renaming
files 2-23, 16-22
library files 8-3
table using input sequence table utility 7-3
REPLACE option 8-4
replacing library modules 8-4
reporting keyed file statistics 6-4
requesting an application service 15-17
reset terminal dump preservation flag 16-38
restrictions for assembly language applications 16-48
restrictions for writing non-4680 BASIC programs 16-2
RESUME 4-3
RESUME label 4-4
RESUME RETRY 4-4
retention, storage 4-10
return codes 16-2
reversible document station motor 3-76
root module 9-14
routing services, pipes 15-12, 16-28
running input sequence table on LAN system 7-2
runtime library 15-12
S
scale driver
accessing 3-87
characteristics of 3-87
example of code for 3-87
programming tips for 3-87
receiving data 3-87
scanner driver
example of code for 3-44
SEARCH option 9-8
search priorities 9-12
searching libraries 9-11
secondary applications 15-2
section, DATA 9-5
security 15-1, 16-32
security for files and subdirectories,
enable/disable 2-25
seek file pointer 16-23
segment name symbols 8-5
SEGMENT parameters 9-6
SEGMENTS option, LIB86 8-5
selecting file types 2-2
selecting modules from library file 8-5
semaphore 16-6
sequential access 16-5
sequential files
description of 2-5
example of 2-6
open 2-5
using file pointers 16-5
write record to 2-5
serial I/O communications driver
accessing 3-90
Index
X-37
X-38
T
table, erasing using the input sequence table utility
table, logical names
building 2-13
changing 2-13
displaying 2-13
TCLOSE 5-1
temporary background applications 15-2
terminal
disable IPL 15-29
enable IPL 15-28
errors 4-5
getting controller ID for 15-25
power OFF 4-10
power OFF for Mod1 4-10
power OFF for Mod2 4-10
power ON 4-10
power ON for Mod1 4-10
power ON for Mod2 4-10
set terminal sleep mode inactive timeout
function 15-27, 16-40
system messages at the 4-6
terminal application
accessing RAM disk files from 15-32
chaining 15-31
distributed files in 2-14
WRITE MATRIX record size for 5-4
terminal application services 15-17, 15-39
terminal C applications 16-2
terminal default data size 15-4
terminal dump preservation function 15-25
terminal models
4683-xx1 ix
4683-xx2 ix
4684 ix
4693-xx1 ix
4693-xx2 ix
Mod1 ix
Mod2 ix
terminal PLD recovery 4-9
Terminal Services program 4-6
terminal storage retention
at the 4683-xx1 4-10
at the 4683-xx2 4-10
disable function 15-19
enable function 15-18
test, ERRORLEVEL 9-12, 9-15
three-track MSR
accessing 3-52
characteristics 3-49
common data characteristics 3-53
7-2
U
unlocking a record 16-21
unresolved symbols 9-2
UPC/EAN modulo-check algorithm 3-39
use factor 8-1
user defined modulo-check algorithm 3-38
user ID 2-23
user logical file names 2-12
using
application services 15-17
D drive for spool file 5-3
file names in store controllers 2-17
file names in terminal applications 2-17
logical names 2-11
node names to access files 2-17
utilities
keyed file utility 6-1
LIB86 8-1
loop status application utility 12-1
POSTLINK 9-15
print spooler utility 10-1
staged IPL 13-1
utility options for input sequence table
7-2
V
vacuum fluorescent display
variables 15-1
variables, link path 9-11
verifying definitions 6-12
video display
accessing 3-16
attributes
Feature A video driver attribute 3-14
I/O Processor considerations when using VGA
attribute 3-17
reading 3-19
VGA video driver Feature A attribute
emulation 3-15
VGA video driver VGA attribute 3-15
writing 3-18
changing the video display format 3-16
character location wrapping 3-18
characteristics of Feature A video driver 3-13
characteristics of VGA video driver 3-14
current character attribute 3-17
current character location 3-17
determining display information 3-18
display character set 3-18
example of code for 3-20
example of command stacking 3-25
Feature A video driver 3-12
Feature A video driver video display formats 3-13
programming tips for 3-12
reading attributes from the video display 3-19
reading characters from the video display 3-19
reading from the video display 3-19
restrictions using command stacking 3-25
running a 2x20 display application 3-19
using Feature A video driver command
stacking 3-24
VGA video driver 3-12
VGA video driver video display formats 3-14
writing attributes without changing characters 3-18
writing characters without changing attributes 3-18
writing to 3-17
W
waiting for
data from I/O processor
3-40
Index
X-39
X
XOR rotation hashing algorithm
X-40
6-14
SC30-3602-02