| 00010 | Program Name | |
| 00100 | 00199 | Open Files, allocate work files |
| 00210 | 00299 | IOLISTS, print lists |
| 00300 | 00399 | Standard Function Definitions |
| 00400 | 00999 | |
| 01000 | 07999 | Application processing |
| 08000 | 08999 | Standard Routines. |
| 09000 | 09999 | Return to Q0A0, error processing. |
Entry Routines
1000-1099 record identification and initialization
1800 OK / Change/ DELete
1840 Delete Logic
1860 Add record
Print Routines
500-999 sort logic
1700-1799 top of forms and page headings
1800 1899 trailer information.
Update Routines
B1$=$3FF3$ - where 2EVC erases batch at end of routine, this return code must be used.
System Common Variables
| A0$ | Temporary |
| A1$ | Temporary |
| A2$ | Range/Selected in reports |
| A3$ | Range/Selected in reports |
| A4$ | Record Maintenance mode with A9 in maintenance routines/ |
A5$ Date of transactions - MM-DD-YY
AD5$ Display date of transactions, MM-DD-YY for US, DD-MM-YY for UK.
A6$ System Config - see below
AD6$ System date entry mask, mmddyy for US, ddmmyy for UK
A7$ Program Description for report headings - identical to menu Description
A8$ Batch ID spelled out of C3$ fileset - obsolete under UNIX 2122-7F7F suffixes
A9$ Program Name that was run from Base - e.g. RUN A9$
B0$ Operator long name from OESA
B1$ Exit mode - for secure execution result codes - $3ff3$ - $3fff$
B2$ Company Name
B6$ Function Name - four letter D1VC Key.
B8$ Company Code
B9$ Company Name
C0$,C1$,...C9$, E0$,E1$,...E9$ - Suffixes for twenty filesets.
D0$,D1$,...D9$, F0$,F1$,...F9$ - Batch Descriptions Corresponding.
A$,A,D$,D,I,J Watch for conflict with For loops and Functions
C$ Exit Indicator
C5,C6 Maximum Display/Print Columns, Rows
A2 Error Retry count
A5 Julian Age
B2 error line number
B3 error number
B4 error 0 branch level indicator
B5 Timeout Delay (Usually 3600 60 minutes of 60 seconds)
EUC0$ European / US Date Delimiter - -=US MMDDYY, .=EUROPE DDMMYY
EUD1 Position 1,2
EUD3 Position 3,2
DXA0$ MM/DD/YY Date Format for internal Representations - Real Calendar
AD5$ MM-DD-YY Date Format for External Display Representations. Batch.
VE0$ Version Identification
VE1 Version Sequence Number
Data entry from a terminal
P0IC Unpadded Ascii entry.
P0ID Date entry and verification, 30 day window limitation
P0IE Editor unpadded entry.
P0IH Hexadecimal entry.
P0II Integer input with mask.
P0I$ - Numeric entry with mask.
P0IET Edit Text window item notes, customer notes, etc.
P0IFL Basic search engine.
P0IRF Record OK/CH/DEL call routine
P0IRS Key range, selected call routine for reports.
Data Entry Call Routines
CALL "P0IX",C$,A1$,C2,C3,C4,"PROMPT",B1
CALL "P0IX",C$,A1$,C2,C3,C4,E$,B1
C$ and B1 are system variables which are not defined or referenced by the programmer.
A1$ is the variable into which the inputted data is to be stored.
C2 is the length of the screen input area represented by the following screen symbol >____<.
C3 is the Horizontal coordinate for the input symbol.
C4 is the vertical coordinate for the input symbol.
E$ represents the input prompt found at the lower left hand corner of the screen, (usually line 22).
P0IC and P0IB are used whenever character data is to be entered. The range of characters accepted by these routines is 20(hex) to 7E(hex). This prevents unprintable characters from entering the database.
P0ID is used when current dates are to be entered. The variable C2 is omitted from the call Statement, because by definition, all dates in Support Series II are 6 digits, expanded to 8 with dashes for display, and limited to the range of 01/01/1980 to 12/31/2079. More restrictively, this call routine limits date entry to 11 months and 28 days of the current date. This helps operators prevent data for the wrong year from entering the system.
P0IH will restrict the data to only hexadecimal numbers, 0-9, A-F.
P0I$ will accept only numeric values. The Input variable C2 is replaced with a Business Basic Mask, making manipulation of decimal numbers convenient, e.g. "P0I$",C$,"#####0.00-",C3,C4,"PROMPT",B1. Note that the variable A1 is used instead of A1$, as a numeric variable is the data variable instead of a string variable.
P0IW12 is a window subset truncated for data screens of 12 lines with prompts on line 10.
P0IE is an editing version which allows arrow keys, delete and insert, and includes the system variable B5 at the end of the Enter Parameters.
File allocation, management routines.
P1FE expand files
P1FZ file sizes
P1FC clear data from file.
P1FWRK Allocate Work File Usually for report sorts.
Note that this call routine is linked to the SSII Base in that the work file is automatically erased upon returning to Q0A0 from the program. The programmer need not worry about erasing the file. The file is usually allocated to the lowest directory number for large files and the highest directory number for small files.
CALL "P1FWRK",A6$,C$,"DLDZ"+FID(0),"DIRECT",10,128,1000,0
A6$ System Variable. Do not use in application programs
File "DLDZ"+FID(0) example of a multi-user file name. DLD is the Sales Order System
Database files prefix in the storage hierarchy, and Z is always reserved for workfiles. The
FID(0) is not mandatory, but should be required.
Type DIRECT, SORT, INDEXED, - type of Business Basic file.
Key
Data
# of records
Disk number (no longer in use always 0)
Printer and reports Call routines.
P1SPG top of page, form feed logic
P1SPC / P1PC open printer, set xon/xoff dev args
P1SPB slave printing.
Operator Levels
0 - Inquiry Terminals. Checks for auto log out every 5 minutes
1 - Data Entry Operator - Timeout per 5 minutes
2 - Priveleged Operator - Timeout per 25 Minutes
3 - Programmer, escapes allowed, error trappnig off.
********Error Handling
B6 current file device number of write allows auto expansion of full files.
P1FIE error handling subroutine
MERRI merge file for error handling subroutine and escape trapping
P1FEI file expansion subroutine
MER20 Y2K Date compatibility merge file