Digital PDFs
Documents
Guest
Register
Log In
AA-D647A-TA
December 1978
260 pages
Original
7.8MB
view
download
Document:
aa-d647a-ta
Order Number:
AA-D647A-TA
Revision:
Pages:
260
Original Filename:
https://svn.so-much-stuff.com/svn/trunk/pdp8/src/dec/qf310/aa-d647a-ta.pdf
OCR Text
‘ decitusystem . ? system w * , ~ reFerence manual Eflaflflfifl , J COS 310 - System Reference Manual Order No. AA-D647A—TA October 1978 This the is a reference manual for user COS-310 who system wants to use the DIBOL in developing appli— language cation programs. SUPERSESSION/UPDATE INFORMATION: This is a new OPERATING SYSTEM AND VERSION: COS-310 V 8.00 SOFTWARE COS—310 V 8.00 To the VERSION: manual. contact additional copies of this document, Distribution Software Center, Digital Equipment order Corporation, Maynard, Massachusetts 01754. digital equipment corporation magnard. mossochusetts - First The and October 1978 information in this document is subject to change without notice should not be construed as a commitment by Digital Equipment Digital Equipment Corporation Corporation. for Printing, any errors that may appear in this assumes no responsibility document. The software described in this document is furnished under a license and may only be used or copied in accordance with the terms of such license. responsibility equipment that is No is assumed not Copyright C) following are the supplied by 1978 use DIGITAL or or reliability of its affiliated trademarks COMMENTS critical on companies. of form on the last page of this evaluation to assist us in pre- Digital Equipment Corporation: DIGITAL DECsystem-lo MASSBUS DEC DECtape OMNIBUS PDP DIBOL OS/8 DECUS EDUSYSTEM PHA UNIBUS COMPUTER LABS COMTEX FLIP CHIP FOCAL RSTS INDAC TYPESET-B DDT LAB-8 DECCOMM DECSYSTEM-ZO RTS-8 TYPESET—ll TMS-ll ITPS—lO ASSIST-ll software by Digital Equipment Corporation The postage-prepaid READER'S document requests the user's paring future documentation. The for u/79-1u RSX CONTENTS Page xi PREFACE INTRODUCTION CHAPTER 1 1.1 1.2 1.2.1 1.2.2 1.2.3 1.2.4 1.2.4.1 1.2.4.2 1.2.4.3 1.2.4.4 1.2.4.5 1.2.4.6 1.2.4.7 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.2.9.1 1.2.9.2 1.2.10 1.2.11 1.2.12 1.2.13 1.2.14 1.2.15 1.2.16 1.2.17 1.2.18 1.2.19 1.2.20 1.2.21 xii DIBOL LANGUAGE 1-1 SOURCE PROGRAM 1-1 1-3 1—4 1-6 1—7 1-9 1-11 1-11 1-13 1—14 1-14 1-15 1—16 STATEMENTS ACCEPT CALL CHAIN Input/Output Statement Control Statement Control Statement — - - Data Manipulation Data Conversion Statements Arithmetic Expressions Clearing Fields and Records Moving Alphanumeric Data Moving Numeric Data Moving Records Data Formatting DISPLAY Input/Output Statement END Compiler Statement FINI Input/Output Statement FORMS Input/Output Statement 1-18 1—20 1-21 1-22 1-23 1-23 1—23 — - — — GO TO Control Statement GO TO Computed GO To IF Control Statement INCR — Unconditional 1—24 — INIT ON Input/Output - ERROR PROC READ RECORD — RETURN STOP — — Statement Statement Definition Statement Control Control TRACE Control TRACE/NO TRAP Data Compiler - — Control Compiler Statement Input/Output Statement - - START — Statement Statement Statement - Debugging Statement iii Statement . 1—24 1—26 1—28 1—29 1-30 1-31 1-33 1—34 1-35 1-36 1-37 (Cont.) CONTENTS Page 1.2.22 1.2.23 CHAPTER CHAPTER XMIT 2 THE 2.1 2.1.1 2.1.2 2.2 2.2.1 2.2.2 2.2.3 MASTER 2.2.4 2.2.5 2.2.6 2.2.7 2.3 2.3.1 2.3.2 2.3.3 2.3.4 2.3.5 2.3.6 2.3.7 CHAPTER WRITE — — 2-1 CONTROL MOUNT Procedures COMMANDS DATE DELETE 2-7 DIRECTORY PLEASE 2-8 2—10 RUN 2—11 2-13 2-14 2—15 2—16 2-17 2—18 2-20 2-21 2-22 SAVE EDITOR COMMANDS ERASE FETCH LIST Line Number Number Commands RESEQUENCE WRITE 3.1 3.2 SYSGEN/B OPERATING SYSGEN/C OPERATING 3.3 SYSGEN 4 DATA 4.1 DFU OPERATING 4.2.1 4.2.2 4.3 4.4 2—4 2-5 2-6 BATCH SYSTEM GENERATION 4.2 2-3 2-4 Operating MONITOR 3 4.1.6 4.1.7 2—1 PROGRAM Messages MONITOR 4.1.4 4.1.5 1—40 MONITOR 2.4 2.5 4.1.1 4.1.2 4.1.3 1-39 Input/Output Statement Input/Output Statement ERROR RUN-TIME 2-23 2-24 MESSAGES ERROR MESSAGES ERROR FILE PROGRAM 3-1 (SYSGEN) 3—1 3-3 3-5 PROCEDURES PROCEDURES MESSAGES UTILITY PROGRAM 4-1 (DFU) PROCEDURES 4-1 DFU,filnam Operating Procedures DFU/B Operating Procedures 4—2 4-2 4—3 4—3 4—4 4—5 4-6 DFU/K Operating Procedures DFU/D Operating Procedures DFU/DL Operating Procedures DFU/E Operating Procedures DFU/EL Operating Procedures LOGICAL UNIT COS-310 SYSTEM ASSIGNMENTS ON THE 4-7 4-7 Unit Size Determining Logical How Logical Units are Assigned by DISK DFU USERS ERROR MESSAGES iv DFU 4—8 4-9 4-10 CONTENTS DIBOL COMPILER COMP OPERATING (Cont.) (COMP) PROCEDURES Program Compilation Listing Storage Map Listing CONDITIONAL COMPILATION PROCEDURE (CCP) Source OF SIZE THE COMPILER DIBOL DEBUGGING TECHNIQUE CHAPTER on OPERATING COMMANDS DDT ERROR a>m<ncna>m hdwrahukaH U'lnwaH oooooo NEHFJPJFJH 0-0340me O I I REFERENCE CREF OPERATING ERROR I . I n o OPERATING C PIP ERROR SORT \DkOkaOKDKOKOKDkO bmwWNNl—J I g c Nl—l WNH (PIP) PROCEDURES I (OPT- I) MESSAGES (SORT) OPERATING Record PROCEDURES FILE Descriptor Division INPUT/OUTPUT Division MERGE I PROGRAM Perform a Read/Check (OPT- R) Transfer Source Files (OPT- S) Transfer System Program (OPT- V) Return to Monitor (OPT— X) SORT COMMAND o PROCEDURES INTERCHANGE SORT PROGRAM o (CREF) MESSAGES (OPT- E) Copy and Verify 0 o PROGRAM Transfer Binary File (OPT— B) Copy Device (OPT— C) Transfer Data Files (OPT— D) Consolidate Space in Directory (OPT- E) Allocate Space to Binary Scratch Area I \D PROCEDURES CREF PIP I (DDT) MESSAGES PERIPHERAL I CHAPTER DDT DDT CROSS CHAPTER CHAPTER PROGRAM BINARY ERROR MESSAGES OPERATING PROCEDURE Merge Using SORT and the /A Option Merge Using SORT and the /M Option Merge Using SORT and the /n Option SORT ERROR MESSAGES ooooo LJ'IDWH II ooooooo \OkomWNflO‘ ‘0 H \DkDSDkOKDkowKDKOlllll\JanU1brom)N+a CHAPTER 10 FILE 10.1 10.2 10.3 10.3.1 UNIVERSAL CONTENTS (Cont.) PROGRAM (FILEX) EXCHANGE FILEX DISKETTE OPERATING PROCEDURES COPY (OPT:C) os/8 ASCII Input (Mode A) COS-310 Data Input (Mode D) Universal Input (Mode U) Output Modes (A, D, S, U) COS/8 ASCII Output (Mode Data File Output A) (Mode D) Source File Output (Mode S) Universal Diskette Output (Mode U) DELETE (OPTzD) LIST (OPTzL) EXIT (OPT:X) COS-310 COS-310 CHAPTER ZERO (OPT:Z) FILEX ERROR PATCH PROGRAM 10-13 MESSAGES 11-1 (PATCH) PATCH ERROR MESSAGES 11-1 11-3 11-4 11-4 11-4 11-5 BOOT PROGRAM (BOOT) 12-1 BOOT BOOT OPERATING PROCEDURES ERROR MESSAGES 12-1 12-1 LINE CHANGE (LINCHG) 13-1 13-1 13-2 PATCH OPERATING PROCEDURES ERROR CORRECTION CTRL/U (Restart) R or Wrong 01d Value Bad CHAPTER CHAPTER CHAPTER Checksum PROGRAM LINCHG OPERATING PROCEDURES LINCHG ERROR MESSAGES FORMAT PROGRAMS RK05 FORMATTING RX02 FORMATTING CHAPTER 10-11 10-11 (DKFMT, DISKS DISKETTES DUMP AND FIX TECHNIQUE DAFT COMPILING DYFMT) (DAFT) PROCEDURE OPERATING PROCEDURES DAFT COMMAND FILE DAFT COMMANDS DAFT vi 14-1 14-1 14-2 15-1 15-1 15-1 15-2 15-2 CONTENTS (Cont.) Page 15.4.1 15.4.2 15.5 15.6 in Used DAFT Commands OUTPUT 15—3 15-5 DAFT ERROR MESSAGES 15—7 Summary PROGRAM GENERATOR (PRINT) PROCEDURE PROCEDURES Creation of Source PRINT 17 FLOWCHART GENERATOR PROGRAM 17.1 17.2 17.3 17.3.1 17.3.2 17.3.3 17.3.4 17.3.5 17.3.6 17.3.7 17.3.8 17.3.9 17.3.10 17.3.11 17.3.12 17.4 17.5 FLOW COMPILING FLOW OPERATING PRINT PRINT FILEX - File Compilation Program Execution COMMAND PRINT FILE Section HEADl and HEAD2 INPUT Section 16-3 IDENT Section Section Section END Section COMPUTE 16-6 16-8 16-8 PRINT ERROR MESSAGES PROCEDURE PROCEDURES COMMANDS PROC Command Command Command GOTO Command CGOTO Command I/O Command TITLE Command SBTTL Command PAGE Command START STOP FLOW EXAMPLE FLOW ERROR MESSAGES MENU (MENU) OPERATING PROCEDURES COMMAND FILE Display Section Command Section Accept Section MENU 17-1 17-1 17-1 17-3 17-3 Command IF Command CALL Command DISK MENU (FLOW) 17-2 FLOW MENU PROGRAM 18.1 18.2 18.2.1 18.2.2 18.2.3 18.3 16~1 16-1 COMPILING OPERATING 16.1 16.2 16.2.1 16.2.2 16.2.3 16.3 16.3.1 16.3.2 16.3.3 16.3.4 16.3.5 16.3.6 16.4 CHAPTER 15-2 DAFT Command REPORT CHAPTER CHAPTER Symbols DAFT ERROR MESSAGES vii CONTENTS (Cont.) Page A-l APPENDIX A COS-310 APPENDIX B COS-310 FILES B-l COS-310 SOURCE FILES COS-310 DATA FILES COS-310 BINARY FILES COS-310 SYSTEM FILES B-l B.l B.2 B.3 B.4 B.5 APPENDIX C APPENDIX SYSTEM CHARACTER SET DEVICE ERROR MESSAGE INDEX C-l PROGRAMMING TECHNIQUES D ADVANCED D.l D.l.l D.l.2 D.l.3 D.l.4 D.l.4.l D.l.4.2 D.l.4.3 D.l.4.4 D.2 D.2.l D.2.2 D.2.3 ACCEPT AND D.2.4 D.2.5 D.2.6 D.2.7 D.2.8 D.2.9 D.3 D.3.l D.3.1.l D.3.l.2 D.3.l.3 FORMAT B-l B-2 B—2 B-2 DISPLAY Background Information Interaction of ACCEPT and DISPLAY Example Using ACCEPT and DISPLAY Generalized ACCEPT Subroutines Hardware Display Clear Feature Clear Incorrect Data by Displaying Spaces Other Desired Features Escape Code Sequences as Terminators DIRECT ACCESS TECHNIQUES Background Information The for Direct Access the Direct Access Technique Works in DIBOL Unsorted File Sorted File Rough Table, No Index File Rough Table Plus Index File Reason D-l D-l D-l D-l D-2 D—2 D-2 D-4 D-6 D-8 D-8 D-8 D-9 How D-9 D-10 D—ll Summary D-12 D—l3 D-l4 Record D-l4 Count ACCESS NOTES DIRECT XMIT D-15 Statements (Extending Truncating a File Appending to a File Rewriting D.4 NUMERIC D.5 CHAIN a FIELD a File VERIFICATION STATEMENT D-l7 NOTES INIT Interaction of CHAIN and D.5.2 D.5.3 D.6 D.6.l D.6.2 D.6.3 Transferring Variable Values Multiple CHAIN Entry Points DIBOL SYS) PROGRAMMING OPERATING OF SOURCE PROCEDURES Division Procedure Division Data viii D—15 D—l5 D—15 D—l6 D-16 D.5.l (channel, File) FILES D—l7 D—l7 D-18 D-l9 D-l9 D-19 D-20 CONTENTS (Cont .) Page D.7 D.8 CHECKDIGIT VT50/VT52 D-21 D-22 FORMULA ESCAPE SEQUENCES Glossary-l GLOSSARY Index-1 INDEX FIGURES 1-1 Sample 10-1 10-2 B-l Universal Diskette Flowchart of FILEX OPT:C Monitor Source Program Organization 1-1 10—3 10'10 B-3 TABLES l l 1 1 2 3 2—1 5 l A 1 A 2 Source Program Limitations Terminating Characters Special Characters Monitor Keyboard Commands DIBOL Statement Words of Code Requirements Characters Representing Negative Numbers COS—310 Character Set 1 3 1 5 1 1 2—2 5 7 A l A 2 PREFACE This is a the in document for those interested applying Readers of this manuCOS—310 system environment. the possess a basic knowledge of programming and of Additional background may be obtained, however, by the COS-310 New User's Guide (AA—D758A-TA). reference DIBOL language in al are assumed to DIBOL language. consulting a not intended is constructed in a usable order, yet it is Each chapter and major section is conread sequentially. as sections be as informationally independent from other This method was followed to allow reference to specific in— possible. formation without the need for frequent cross—referencing. This manual it be that structed to In addition to the information in the material and summaries are provided the Glossary. reference additional chapters, in Appendices A through D and in INTRODUCTION THE DIBOL LANGUAGE DIGITAL's Business Oriented Language (DIBOL) is a COBOL-like language used to write business application programs. The DIBOL language consists of data definition and procedure statements. OVERVIEW OF THE COS-310 SYSTEM The COS-310 system is designed for the small system disk—based data processing system that is adaptable of business—related processing tasks. The COS—310 terminals, has been system is enhanced with use and other included to act as part of COS-310 diskettes, of It user. to a wide video is a variety display hardware. Specially developed software tools for both application programmers and DIGITAL as system operators. Programs provided the include but are not limited to following: o MONITOR/EDITOR controls the 0 SYSGEN 0 DFU 0 and of all calling operating other programs in the COS—310 system; provides the I/O control for the peripheral devices; and contains editing capabilities for This program is recorrecting user programs. ferred to throughout the manual as the Monitor. builds and changes the system hardware configuration. assigns logical units unit table. COMP translates ry program which DIBOL can and language be run xiii on displays source the or prints statements Datasystem 308 a logical into a bina310. or between de- two PIP transfers vices. data, o SORT sequences Records may be records according to key characters or fields. sorted into ascending (0—9 or A—Z) or descend- ing THE files binary o (Z-A 9—0) or or source, sequence. COS-310 FILE STRUCTURE and source, data, types of files are used in COS-310: binary, be can Source and files files, files, compiled binary system. system Four saved in COS—310 directories. 0 Data be 0 0 directories. files Source files Binary files programs 0 are processed by Data files contain control programs The following manual. Symbols DIBOL or in saved of COS-310 data etc.) supplied as to programs. the compiler and contain are the output of translated into COS-310 interpretive code. SORT, MANUAL NOTATION be completely devoted to the storage DIBOL or system programs. System files include programs COMP, cannot DIBOL (MONITOR, SYSGEN, PIP, DFU, part of the COS—310 package. CONVENTIONS symbols, characters, and terms are used this throughout 7 Example Explanation $ 1‘ Lowercase PROC n characters Uppercase be NO TRACE characters RU ... CHAINO+...CHAIN7 determined User information Words entered in red ~RU SYSGEN/C to be exactly Optional continuation Your input to i r characters as shown. or i 2 supplied. of ments. Characters to the system. argu- Symbols Example L4 RUaJPIP PROC 1 A /T /N /L START [ Explanation or space Braces make blank. indicate choice enclosed. a items that of Brackets indicate that whether or not decide optional feature. [n][/x] Information RETURN board must TURN. The that a (input) is input via must you of one must you to use the an key— followed by a RERETURN code indicates of information line be complete. No symbol will be used in assumed It will be text. its use is understood. for the RETURN this that COS-310 CHARACTERS COS-310 characters include letters A-Z; numbers 0-9; and characters: :— V-U'Juo +F—A A=¢\ . *(E 'U‘—‘ % |__1 the special -/v _. TERMS Alphanumeric Refers to the alphanumeric entire COS—310 character set. Initialized fields must be enclosed by single quotes. values in base ten Decimal, Octal Refer to (decimal) the numeric values associated and base eight (octal). XV specifically with dev Refers a three—character designation for the device located. The first two characters indicate the third character indicates drive the the on. The types of devices are listed below. to is data device; mounted DY indicates indicates DK indicates RX RXOl RX02 RK05 which upon the type of device is diskettes. diskettes. disks. Expressions Refer to variables, constants, or arithmetic expressions made up variables, constants, and the operators #, +, -, *, /. Filnam,pronam,1abe1,cmndfl Identify names assigned lines. These characters are Label can begin with /I +1 It is These be may of and input programs, statements, first six the but any length only significant. an alphabetic cmndfl —Il—.ll -I files, to only contain alphabetic and numeric characters, and Pronam names of @, contain can and but must character. any COS~310 character except ,. advisable not to use -, /, @,L4, tab, and , in a data filnam. characters may complicate or inhibit some program execution. Logical Units Refer to data logical unit file table storage which via These units are accessed referenced by logical unit numbers. areas. is Numeric Refers to the characters 0—9 and combinations thereof. xvi a CHAPTER 1 DIBOL LANGUAGE as chapter provides reference information on the DIBOL language in the COS-310 system. If other basic information is desired, This used refer 1.1 to the SOURCE COS-310 New User's Guide. PROGRAM consists of statements ar— program (see Figure 1—1) in two Data and Procedure. Comments following a divisions, the document and of statement. semicolon contents each purpose lines that Statement begin with a semicolon contain only comments. of and ease Tab settings are used in the program to improve clarity A DIBOL source ranged reading. The Data of the Division contains information to be labels which identify Initial referenced. this division. size and which define the type in the program, and optionally contain where information can be the memory location for these statements can be included in values statements used The Procedure Division consists of statements control which program An alphanumeric label can be assigned to a statement with— execution. in the Procedure Division. A label must begin with a letter and can have a maximum of six significant characters. Labels precede and are separated from the in other statement by a comma. These labels are referenced statements. statement within a DIBOL program begins on a numbered line. Line numbers are or manually assigned automatically when the program is error DIBOL does not use these numbers, but messages, being typed. Each editing functions, and debugging aids refer to them. 0100 0110 0120 RECORD 0130 0140 0150 0160 0170 0180 INBUF STOCKN, D4 DESC, A25 ;Record named INBUF. ;Numeric field named STOCKN. UCOST, D5 QORDER, D4 ;Five—character numeric field. ;Four-character numeric field. ;Unreferenceable unnamed field. ;Record named OUTBUF. ;Unnamed numeric field. , RECORD 0190 0200 0210 0220 0230 RECORD 0240 0250 0260 PROC 0270 0280 0290 LOOP, 0300 0310 0320 0330 0340 0350 0360 0370 EOF, 0380 0390 0400 END D9 OUTBUF D4 , , , , field ;Alphanumeric named DESC. field. A25 ;Twenty—five D5 D4 ;Unnamed field. ;Temporary storage field. ;Numeric field named ECOST. ;Unnamed record-temporary storage ECOST, D9 TITLE, A6, 'OVRHED' INIT(1,I,TITLE) INIT(2,0,'OUTPUT') XMIT(1,INBUF,EOF) character ;cannot be directly referenced. initialized to 'OVRHED'. ;Beginning of Procedure Division. ;Input 'OVRHED' yon channel 1. ;Field ;‘OUTPUT' on channel 2—output. ;Transfers INBUF to EOF. OUTBUF=INBUF ;INBUF moved to OUTBUF. ;Conditional statement. IF(STOCKN.LT.1000) GO TO LOOP ;UCOST times QORDER moved to ECOST=UCOST*QORDER ;ECOST. ;Transfer OUTBUF onto channel 2. XMIT(2,0UTBUF) ;Blank line. GO TO LOOP ;Branch control to LOOP. ;Identifies end of logical unit. ;Writes record and closes file. ;Stops program execution. (2) (l) FINI FINI STOP Figure 1-1 1-2 statement. ;Optional compiler START DIBOL LANGUAGE Sample end ;Marks the Source Program of the program. Table 1-1 Program Limitations Source Maximum characters Maximum number of files per program about 8,000 per file source 7 Maximum number of symbols 16K byte system/24K byte system Line or numbers Maximum per 1.2 There 365/511 larger available 0-4095 characters line 120 STATEMENTS are 1. six kinds of in statements DIBOL: Compiler statements (START, PROC, and END) and end of the program. division, ning, are non—executable. PROC marks the end of the the Procedure Division. ments size definition statements of data to be stored. Data manipulation data within memory. Data Control STOP, Input/Output (CALL, effect END are the describe include field the three begin— state— and optional beginning of and (RECORD) the Must information. and INCR type the movement control of GO TO, IF, ON ERROR, RETURN, of program statement execution. CHAIN, order the and Division and Data statements statements TRAP) START label These statements and (ACCEPT, DISPLAY, READ, WRITE, data movement within memory or between memory and peripheral devices. INIT and FINI associate and disasso— ciate channel numbers used by the program. The FORMS statement controls line spacing and paging on the printer. XMIT) 6. control Debugging statements statement following (TRACE, of These statements are discussed kind or by order of use. NO program in TRACE) permit statement-by— execution. alphabetical order rather than DIBOL LANGUAGE by 1-3 ACCEPT 1.2.1 ACCEPT Input/Output - Statement The ACCEPT stores statement takes input from the keyboard; it in a specified alphanumeric field, and stores the decimal value of the ter— Table minating character (the last key typed) in a decimal field (see 1-2 The Terminating Characters). terminating value can be used in ACCEPT is in later statements primarily ACCEPT the DIBOL used with (dfield, afield) program. the DISPLAY statement and has the form: where: dfield afield the name the terminating character is the name input is When from full the a numeric alphanumeric field of an be stored. where the value keyboard waits for is encountered, the system input Program execution continues either after afield is is typed. When ACCEPT is the character full, positions remaining It is desirable to clear the afield unchanged. statement is executed. before remain ACCEPT to of statement keyboard. after or nated afield an ACCEPT an field where the decimal is to be stored. is of a terminating afield character is termi— in the before Example: ACCEPT (A,B) in B and ;Stores input from the keyboard the charof the value ;stores terminating ;acter in A. ACCEPT (A(3),B(4,5)) ;Stores input from the keyboard in the of B, and stores 5th characters ;and ;terminating value in ;array A. 1-4 EIBOL LANGUAGE the 3rd element 4th the of Table Terminating 1-2 Characters Decimal Value 00 01 02 04 05 06 07 08 09 10 Last Null or BACKSPACE TAB LINE FEED CTRL/K CTRL/L 14 CTRL/N CTRL/P CTRL/R 26 27 63 end-of-field CTRL/A CTRL/B CTRL/D CTRL/E CTRL/F CTRL/G ll 12 l3 l6 18 20 21 22 23 24 25 Key Typed RETURN or or CTRL/H ENTER CTRL/T CTRL/U CTRL/V CTRL/W CTRL/X CTRL/Y CTRL/Z ESC DELETE DIBOL LANGUAGE 1-5 CALL 1.2.2 CALL The CALL CALL has - Control branches statement the form: CALL Statement program control to an internal subroutine. label where: label is the'label of the first Procedure Division of the statement the of a subroutine in program. so stack The CALL statement saves the return location in a pushdown that program control will return to that location when the subroutine has been executed. Additional subroutine CALL statements may be nested within a subroutine to a depth of 50. Example: CALL .<— SET —————————————— STOP SET, PROFIT=PRICE-COST CALL CTAX -->A=... STOP CTAX, TAX=PROFIT/2 IF (TAX.GT.MAX)CALL ERROR --RETURN This example shows how execution control branches to and returns from one subroutine to the next. The solid lines show the result of CALL statements while the broken lines show the of result RETURN statements. 1-6 DIBOL LANGUAGE CHAIN 1.2.3 CHAIN The CHAIN available programs compiled form Statement which has exceeded the allows a DIBOL program memory to be separated into two or more smaller DIBOL Each program is written and which are executed sequentially. CHAIN programs are executed beginning with the separately. statement user immediately following statement The Control - the of CHAIN CHAIN statement the PROC statement. is: n where: is n a numeric variable number of command. DIBOL A the sequence representing as specified in the RUN (0-7) binary programs maximum of seven programs be can chained together. execution When the CHAIN statement is encountered in a DIBOL program, the current program is stopped, and the indicated CHAIN program is of loaded. All CHAIN programs must be'properly declared in a RUN com— The program loaded by CHAIN will not return to the place where mand. A return to a the initial program was stopped. a program requires CHAIN statement to that program. Example: .RUN START+HELP+TRY+ACCT HELP START Data Div. Data Div. Data . . Data PROC —>- . - . . STOP . . PROC CHAIN . CHAIN 2——-—r——>. l———— . CHAIN this example is START chain 2, and ACCT is chain In program sequentially, program could chain Div. y——>c o PROC o A Div. . PROC o ACCT TRY chain 3. 0, 3———J HELP is the programs could back into itself. be TRY is executes the chain Although this example chained DIBOL 1, in any order. LANGUAGE 1-7 All file is information status Therefore, all statement before output and executing a between chained destroyed programs. be files should closed with a FINI update CHAIN to prevent the loss of information. features are turned off when a CHAIN statement be turned on again in the CHAIN program by They may If DDT is used being using an appropriate TRACE or TRAP statement. when a CHAIN statement is executed, control returns to DDT. Both the TRACE is executed. and TRAP is automatiprogram loaded by the RUN command a loaded if the record is in However, by the cally program in CHAIN statement, the record retains whatever contents it had the unless the clear option (,C) is specified for the previous program Any DIBOL record in a cleared. record. Executing to a error 1-8 a CHAIN valid message statement DIBOL binary ILLEGAL CHAIN. DIBOL LANGUAGE with an program argument which does in the RUN command not correspond results in the DATA MANIPULATION 1.2.4 Data Manipulation Statements statements convert data from numeric to alphanumeric calculate arithmetic fields and versa, expressions, clear format data. The records, move data between fields or records, and stored in a destination area. of source area are contents a Record names are used in data manipulation statements only when data is moved or The form of the statement is: cleared. Data and manipulation vice destination = source where: is source a variable, which destination data destination is the area is literal, to be or an identifying expression and manipulated then copied into a area. where the manipulated data is stored. The source destination area must be defined in the Data Division. and converted always justified to the data type defined for the destination area. Data in the source remains unchanged; the destination area is always altered. The is Variables: quantity that following three A can be formats assigned are used any of with given a of set values. The variables: name name name (subscript) (position m, position n) where: name is a label (maximum a record or field. of six characters) used to identify name(subscript) represents a subscripted array; the subscript must be or numeric an arithmetic expression whose value is in between 1 and the dimension specified for the array If name does not identify an array, the Data Division. of or the value of the subscript exceeds the dimension that other locations in memory are referenced. array, are No error message is unless locations generated referenced outside of the Data Division. a DIBOL LANGUAGE 1-9 position n) those characters of subscripting references Position n to position n inclusive. position m must be greater than or equal to position m; position n should be less than or equal to the dimension of the (position name m, This from form be Positions m and n must array associated with name. If with l or greater. characters a value of numeric the variable name is subscripted, the successive array elements should be considered strung out left to right. Example: Data Division defines A A(3,9) ;Wants ;A(2), as 4D4 from 7 digits, 2 and 1 from A(3). A(l), all of Literals: Numeric literals consist of a of sequence from Alphanumeric literals consist of a sequence of cept single quotes) enclosed in single quotes. 1 to 15 COS—310 digits. characters (ex- literal is used anywhere in the Procedure Division where a for XMIT (on channels opened for O, T, or L by an allowed INIT statement), for WRITE, or as the source in a data manipulation statement. It is similar to an alphanumeric literal except it begins with a double quote (") and ends with a single quote ('). A RECORD record is Example: PROC XMIT (8,"HELLO') ;HELLO is a RECORD literal. Example: RECORD REC , A5 Al FLD2, A5 FLDl, PROC FLDl = 'HELLO' FLDZ XMIT = 'THERE' ;HELLO ;THERE is an alphanumeric literal. is an alphanumeric literal. (8,REC) Expressions: An one ordered set of characters idea or value. 1-10 DIBOL LANGUAGE treated in its totality as a symbol for Data Conversion 1.2.4.1 Numeric values can be converted of purposes input, output, data. This is done with the destination Alphanumeric are to replaced = data and manipulation and vice versa for the verification of numeric statement: source numeric by alphanumeric to calculations, conversions Numeric zeros. are to and spaces right-justified, alphanumeric conversions are If the numeric ex— right-justified, and zeros are replaced by spaces. pression equals zero, the alphanumeric field will contain only a zero. alphanumeric destination alphanumeric destination numeric destination numeric destination alphanumeric = = = numeric numeric source source source alphanumeric source ;1eft-justified ;right-justified ;right-justified ;right—justified be 15 or values to be converted to numeric must fewer in If the alphanumeric field contains characters length. digits, spaces, and the signs + or -, the message BAD DIGIT run time. The data conversion statement should be preceded the source by an ON ERROR statement if the contents of alphanumeric may contain bad digits. Alphanumeric characters other than results at Data conversion is used to edit ACCEPT statement. Data is typed converted to a numeric field by and verify numeric data an following into an alphanumeric field and is then a data manipulation statement preceded ON ERROR statement. an by Spaces and signs are not counted as char— acters that are moved. Spaces in the alphanumeric field are ignored. If the ON Signs may be imbedded anywhere in the alphanumeric field. ERROR statement is executed, the data entered was not numeric. Arithmetic Expressions 1.2.4.2 Arithmetic pulation scripted expressions statement. data are The elements, allowed expression constants, as the source in a data mani— contain numeric elements, suband arithmetic variables, opera— only can tors. There are five of priority. binary arithmetic operators which are executed in order with the same priority are executed left to Operators right. # / (rounding) (division) * (multiplication) + (addition) (subtraction) - Order of priority: 1. rounding 2. multiplication and division 3. addition and subtraction DIBOL LANGUAGE l-ll These The operators signs are # used with numeric be used in values. COS-310 indicate binary or as unary operamathematical operation to tors. binary operators they no efAs unary operators, the + has be performed in an expression. the unary fect; negates the numeric value to which it is affixed. +, —, can As as the - The operator # be can used convert to decimal code. This code equivalent In this application, # appears before A = #B ;A is the field numeric a alphanumeric an can character then be used by For character. and B is an the to its program. example: alphanumeric If B contains the characters XYZ, X is ;field. the decimal and ;converted to its internal code, is in stored A. ;equivalent, 57, D, H 3 #B + ;A is numeric a ;containing ;equivalent ;added Since expressions in 100*A/2+3-l Fl= 100* 3 with = and After of the first and stored in parentheses altered ority can be expressions, A=10. Fl= to field the is B field decimal is 57, alphanumeric an conversion, XYZ. character the of B, A. first, the parentheses. In are executed use of order the of prifollowing 502 700 (A/2+3—l) Rounding: increments Rounding sets variables to specified character formats and by l the least significant digit if the digit to the right before forThe sign # after matting was 5 or more (sign is unchanged). appears The format for rounding is: the character being rounded. destination = is rounded by B is and treated character that is A A#B B is not greater than 7 (becomes modulo places; as a positive The sign # appears after integer. being rounded. TEMP=MONEY#2 If MONEY was 123456, TEMP becomes 1235. If MONEY was 123446, TEMP becomes 1234. If MONEY was —l473, Typically, this 1-12 LANGUAGE DIBOL feature is TEMP used for becomes -15. rounding to the dollar. 8) the Division: The result numbers. of a division operation is The result of 5/3 is l and -l4/5 division by zero is attempted. is in expressed —2. An error whole unrounded message when occurs Multiplication, Addition, Subtraction: These arithmetic basic are the resulting value the destination field, If error message will an result) the leftmost that intermediate digits execute requested. as the size without exceeds dropped are of an being displayed. Clearing Fields and Records 1.2.4.3 Data manipulation form: destination destination The operations (or statements fields clear and records used when in the = can be a name designating single field, a a record, or are cleared to all spaces; array. Alphanumeric destinations of a field numeric destinations are cleared to all zeros. Any part can be accessed in a program statement by subscripting the beginning An array name without and ending positions of the character string. any subscripts clears only the first element in the array. an When to a record is cleared, all numeric and fields alphanumeric are set areas as spaces. Examples: and 7 in an Fl(5,7)= ;Clears characters Al(5)= ;Clears Al(A)= ;Clears element Fl(l,l)= ;Clears the first character Al= ;Clears the first element RECNAM= ;Clears Record names though they follow one can be were another the fifth RECNAM A to subscripted in and an be array. of the 5, 6, element in field Fl. array. array Al. all to in in in F1. array Al. spaces. allow reference All records same length. to to be record so DIBOL referenced must LANGUAGE 1-13 Example: RECORD CUSNAM ,A3 RECORD BYRNAM ,A3 PROC RECORD(2)= Mdving Alphanumeric Data 1.2.4.4 the Use ;Clears RECORD BYRNAM. data manipulation field (source) phanumeric destination = statement to another to move the of contents alphanumeric field one al— (destination). source is shorter data from is than source destination, and the characters of destination are undis— left—justified, rightmost If source is longer than the charturbed. destination, rightmost in source are not moved into destination. The source remains acters If source unchanged. Example: RECORD ALPHA A,A5,'ABCDE' B,A3,'FGH' RECORD NAMES NAME,A4,'FRED' NAME1,A7,'JOHNSON' PROC 1.2.4.5 Use ic ;Field NAME=NAME1 ;NAME would Moving Numeric source source is is = DIBOL contain FGHDE. contain JOHN. to move the contents of one numer- source shorter longer, tination. 1-14 A Data the data manipulation statement field to another numeric field. destination If If would A=B LANGUAGE than destination, zeros are the most significant digits inserted are not on the left. moved to des- Example: RECORD A 123 45678 D3, FIGR1,D5, FIGR, RECORD B 45678 123 NUMBl,D5, NUMB2,D3, PROC 1.2.4.6 FIGRl FIGR NUMBZ NUMBl Moving Records ;FIGRl would ;NUMB2 would contain contain 00123. 678. can be accomplished with data manipulation within a record are treated collectively as The record manipulation alphanumeric fields during manipulation. statement has the form: of Movement entire records fields All statements. destination = source where: destination is is source record a a record label or a record label, literal. a record subscripted subscripted record label. label, or a statement moves the contents of the source into reserved in the destination. If the source is shorter than the destination, the rightmost characters of destination are undis— If source is longer, the rightmost characters of source will turbed. not be moved into the destination. This data the space manipulation Example: RECORD PRTREC RECORD DATA ,A92 NAME , A25 , A5 ADDR , A20 , A5 CITY , A20 , A5 A2 A5 , A5 , STATE, ZIP PROC PRTREC=DATA XMIT ;Move DATA into PRTREC. (8,PRTREC) DIBOL LANGUAGE l—15 1.2.4.7 Data Formatting to formatted into an alphanumeric field marks which are not stored with the calcu— records on disk, and which cannot be present during arithmetic lations. This is done with the following data manipulation statement: Any numeric data field contain and spaces can be punctuation Alphanumeric variable = numeric specifies special characters expression. Format expression, to be format inserted with the numeric Example: A = D, '—XXX,XXX.ZZ' The eight-digit numeric at D is converted to alphanumeric code, reformatted with specified punctuation, and stored in alphanumeric field A. The on format the the l-3 string printer or must the Most characters alphanumeric expression. be can used in a format keyboard string, but use be an following special characters with explains the special use of these care: X, Z, characters. *, —, ., '. Table Examples: AMT mat Each must is an alphanumeric field the string: as associated the ;AMT contains 123 AMT=123,'ZZZZZZ' ;AMT contains 123 AMT=123,'*XXXXX' ;AMT contains ***123 AMT=-1123,'—XXX,XXX' ;AMT AMT=123,'$*XXX.XX-' ;AMT contains $***l.23— AMT=123456,'—XX.XX' ;AMT contains —12.34 period, counted as slash, a minus DIBOL LANGUAGE contains for- 1,123 — notation, sign, or any other special In the AMT=123,'$*XXX.XX—' position. character example, AMT must be defined in alphanumeric field. 1-16 size AMT=123,'XXXXXX' comma, be same a RECORD statement as a nine—character Table 1-3 Special Characters Character X Explanation in Used a printout. zeros Z Used are to format Each X to numeric a arrange represents digit a field for and leading automatically suppressed. leading suppress when zeros formatting out- put. * - Used in a eliminate format and string to replace leading zeros If the * is trailing spaces on printout. the in anyplace except the first character string, also be digits may replaced. arithmetic sign in number to be printed. or after the number. If the number is positive, a space is substituted for If the minus sign is placed in a po— the minus sign. sition following the first significant digit but preto the last position of a format string, vious it is printed like any other insertion character. Inserts The an sign be placed can a before point in of the decimal comma in significant digits to a format the left. Inserts a to zeros decimal the right a format string and forces point to be signi— ficant. Used , are All tion other COS—310 characters. to insert characters a are treated as string if unconditional there inser— DIBOL LANGUAGE 1-17 DISPLAY 1.2.5 DISPLAY is DISPLAY cursor used The to only form Input/Output - used Statement show messages on the screen and specified line and character position. for special effects. to to a of DISPLAY the DISPLAY statement literal afield dfield (y,x, move Numeric the screen fields are is: ) where: Y is a numeric number. If the the A number of last line the screen line number is greater than the cursor is moved to expression representing the specified line lines on a screen, on the screen. with y equal to 0 outputs a message the present location of the cursor. positioning is done and x is ignored. statement ning at zero, no beginIf y is is a numeric expression representing the character position. If the specified character position is greater than the width of the screen, the results are unpredictable. literal is an or numeric a character alphanumeric string An must be enclosed in string. alphanumeric string single quotes (') and is displayed at the character position There is no carriage return/line specified. feed after the message; character position at the afield dfield the an alphanumeric field containing displayed. is a special numeric to code DIBOL LANGUAGE causes the at message. a message to a particular as special be op— occur. The following numerics by the COS—310 system. \INI—‘O that remains cursor of is eration 1-18 the end are recognized Position cursor. Clear to end-of-screen. Clear to end—of—line. Sound terminal alarm. codes number is to be displayed, the numeric field must converted to an alphanumeric field before it can be displayed on the screen. If a be Examples: terminal DISPLAY(0,0,7) ;Sound DISPLAY(10,1,1) ;Clear DISPLAY(2,20,DAY) ;Beginning alarm. from line 10, ;to end-of—screen. line on ;display the 2, contents character character of DAY. DISPLAY(1,10,0) ;Position cursor at first line, 710th character position. DISPLAY(11,37,2) ;Clears line ll ;of the line. DISPLAY(0,0,'DATE') ;Starting at ;display the DISPLAY(11,12,7) DISPLAY(Y,X,ALARM) the current DATE. ;Position cursor 12 the Data character word ;position ;If from and cursor 1 position position 37 to the 2 end position, line 11, character sound terminal alarm. at Division contains: RECORD Y,D2,20 X,D2,36 ALARM, Dl,7 ;the cursor is set at line 20, ;character position 36 and an ;audible alarm is sounded. DISPLAY(1,1,'HELLO') ;Display ;(line 1, in the upper left—hand character 1) of the screen. corner DIBOL LANGUAGE 1-19 HELLO END 1.2.6 END This optional statement - has Compiler Statement statement the is the last statement of a program. The form: END[/x] where: is /x one of the following option switches. compiler the a printed. DIBOL source program storage map source program storage map LANGUAGE screen. compiler statement option switch or switch (/N, /G, /T) in the option map listing is printed, the label 1-20 pro— displays a listing on END not source /T no options are specified, listing is printed as usual. are compiler suppresses the printing of gram storage map listing. If An a /N lack of it compiler count and can be overridden command. If number of free RUN no with an storage locations FINI 1.2.7 A FINI FINI - Input/Output disassociates statement in specified The file records may be statement has FINI FINI the number FINI is only If opened. from channel statement. update files, but INIT an storage output and to close each data closed, Statement it an the necessary mode for as mass is good programming practice output or an update file is not lost. the form: (channel) where: is channel a nel numeric number chan— (1—15) which specifies a associated with a mode by an INIT expression which was statement. The FINI following information is statement on files useful associated in for the determining various effect of a uses. INIT mode Effect of FINI Reading I of from read number. 0 file the the stops. beginning. end-of-file (EOF) mark and the length of Disassociates directory. An closed, Reading/writing U channel of the Statement File may be reopened and Disassociates channel is written, the file the file is written in channel number. file is the Disassociates stops. number. K,T,L Disassociates S Reading of channel file stops. channel number. the Disassociates number. Cannot be reopened. Examples: FINI (l) ;Disassociates channel 1 FINI (A+B) ;Uses the sum of A+B from as ;disassociates that channel a a device and file. channel and number, from a device and file. DIBOL LANGUAGE 1-21 FORMS 1.2.8 The FORMS FORMS " Input/Output Statement is statement FORMS used to format printer output and has the form: (channel,skip-code) where: channel is a numeric associated with the (1-15) expression in a previous INIT statement. If the channel printer statespecified is not associated with a printer, the ment is ignored. skip-code is numeric expression which causes the of the page (0) or to top lines specified (1 to 4095). a to Negative If the numbers cause the printer skip the to number go of unpredictable results. the code exceeds 4095, then 4096 is subtracted from code and the remainder is used as the skip-code. Example: INIT(l,L) FORMS(1,3) is the channel number ;INIT statement and 3 is ;left blank. ;1 specified in the number of a previous lines to be Example: INIT(5,L) FORMS(5,0) ;5 ;to 1-22 DIBOL LANGUAGE is the channel number and 0 sends the top of the printer page. the listing GO TO 1.2.9 GO TO Control - Statement The GO TO statement branches program control to a line in label. GO TO has The statement the identified by unconditional form of GO two program forms: computed. Unconditional GO To 1.2.9.1 The and the TO unconditional the GO T0 is: label where: is the label assigned to a statement dure Division where control is to be label line in the Proce— transferred. Example: GO 1.2.9.2 The Computed computed GO ;Transfers control TO SET TO GO to SET. GO To TO has the form: (labell...,labeln),variable where: label]...,labeln are bels (120 variable statement up to labels. There can be any number the limit that can be stored on of la~ one line characters). is a decimal This value. is to branch. or variable a expression representing value identifies the label where control number is branched to the label corresponding to the sequence If indicated the variable. the variable is negative, zero, or by Control greater than statement in the number the program. of labels, control passes to the next Example: GO TO (LOOP,LIST,TOT),KEY LOOP if KEY=l, ;Transfer control to KEY=3. if or if TOT ;LIST KEY=2, DIBOL LANGUAGE 1-23 IF 1.2.10 An IF Control Statement - conditionally statement IF of the form of of result the a statement executes relational is: certain comparison statements between on the basis expressions. The (expressionl.rel.expressionZ)statement IF where: and expressionl are expression2 literals, variables, the same is .rel. one of the Equal .NE. Not .LT. than than or Greater than Greater than one of if GO label label or equal ex— STOP TRACE RETURN ON equal following control statements which is relationship is true. the the TO CALL equal Less .GE. is of Less .GT. ecuted expressions following relational operators: .EQ. .LE. statement arithmetic or type. NO TRACE label ERROR both numof the same data type: numeric comparison, the shorter field comis internally filled to the length of the longer field, then the is made between the longer field and the zero-filled field. parison In an alphanumeric comparison, the comparison is made on the number of characters in the shorter field. and Expressionl eric If or the program both result expression2 alphanumeric. of sequence be must In the comparison is executed. a is not the true, next statement in Examples: IF IF (A.EQ.B) GO (SLOT.NE.2) TO LABEL3 CALL ;If ;is A is equal transferred to to control B, LABEL3. to ;If SLOT is not equal is transferred ;control BAD 2, to ;BAD. IF(SALES.LT.PROFIT+TAX-RENT) NO TRACE ;If SALES is less than PROFIT TAX minus the RENT, ;plus ;TRACE command will terminate. 1-24 DIBOL LANGUAGE INCR 1.2.11 The INCR able and INCR (increment) has the statement form: 1 adds to the numeric specified vari- INCR variable where: variable INCR to is a numeric variable to should only be used with positive Its use is add one to a counter. be incremented numbers and faster than is a by l. used typically manipulation data statement. Example: INCR A2 :Add 1 to A2. This is identical in meaning to ;the data manipulation statement A2=A2+l. DIBOL LANGUAGE 1-25 INIT 1.2.12 INIT - Input/Output Statement on associates a channel number with a logical unit or a character-oriented input/output device and initializes the device. The form of the INIT statement is: The a INIT mass statement storage device INIT (channe1,mode[,fi1nam][,logical unit #]) where: channel is a channel numeric a specifies expression which number to be associated with a logical unit or (1-15) character-oriented device. This channel number is used in the program to refer to the associated device. If the modulo and is specified exceeds 15, it interpreted 16 is subtracted from the number specified remainder is used by the system. number 16; the with initially associated following channels are These asat program startup. specified devices signments can be changed with an INIT statement. The the 6 7 8 A channel the the the channel channel channel that is number number number associated for the the the with a for for logical unit prior to a FINI on a statement of file an another INIT. Opening output the previous contents of the file to be deleted. is the one—character mode designation of a device to be The mode designaassociated with the channel number. tions are: Mode Meaning I IN 0 Explanation OUT U UPDATE storage device Mass be Mass to (logical input. unit) storage device (logical used for output. unit) storage device unit) be Mass to used be input for LANGUAGE (logical used for direct and output. (Continued DIBOL screen. storage device must be closed by to 1-26 printer. keyboard. mass causes mode is is is on next access page) both Mode Meaning K KBD Input T TTY Output to L LPT Output S SYS Input from a source file located on This file name the system device. Explanation from to screen. printer. been have command. must filnam keyboard. specified in RUN a identifies is an alphanumeric literal or variable that A data file name is the data file on the logical unit. is and illegal necessary with the I, O, and U modes, with other modes. If file the name message is already located REPLACE? A is REPLACE? this file not present for on On the an if output, designated another MOUNT file is logical unit, input, a displayed. temporary file be $ may with is displayed. name such as file a name beginning When this file name is used, no is generated because the recognizes program name as temporary and replaces it. used. logical unit # is an optional numeric expression which the specifies logical unit (1-15) where the data file is stored or is to be stored. If the number tracted from specified it and exceeds the 15, remainder 16 then is used by is sub— the sys- tem. is good programming practice to specify the data file name. Data file names should be are avoided. messages It the logical unit number and unique so that REPLACE? Example: INIT (15,I,'RENEW',6) ;Initializes channel number 15 for ;RENEW is ;on the name of logical unit 6. input. input file found DIBOL LANGUAGE 1-27 the 0N ERROR 1.2.13 The ON ERROR ON ERROR when ment the ON - nonfatal form The ERROR ON executed ON statement. immediately occur. prior of Statement branches statement a ERROR gram Control this ERROR to a control to a specified statein the statement following be written into the source pro— program error occurs can statement where possible a error might is: statement label where: is a label assigned to Division where control label a statement is to in the Procedure transferred. be Example: DEC = would if DEC which ;Statement TRAP to ;control ;nonfatal error. ERROR TRAP ON branch =ALPHA program creates a ALPHA The ON ERROR statement prevents lowing run-time errors. a return to Monitor the for the fol— in an an XMIT Explanation Message BAD DIGIT END OF is used non—numeric digit alphanumeric-to-numeric conversion. A An FILE end—of—file label not was specified in statement. RECORD ILLEGAL LINE TOO LONG Record number is too large in the record header fied length of the XMIT record. Input line overflowed the or or length does not 0, word record speci- match the it was which into read. NO No FILE file (SYS) NUMBER TOO LONG ZERO DIVISOR 1-28 DIBOL LANGUAGE specified in RUN command to satisfy INIT statement. field lation. A Division of by more zero than 15 digits attempted. is used in a calcu- PROC 1.2.14 The PROC PROC DIBOL — statement It program. PROC Statement Compiler separates the is form: the of Data and Divisions Procedure of a [n][/x][;comment] where: is n 0-7 (not an expression), indicating of logical units which the program If no number is simultaneously. speci— single digit, a the maximum will have number open the compiler assumes 7. The available memory is divided into buffers to handle the number of logical The more buffers the units specified. specified, smaller they must be. Smaller buffers generally result in slower data file processing and faster sequential random data file processing. fied, If program opens more logical units in the PROC statement, a run-time the ified /x is one suppresses /L lists /T displays The PROC or switch is in /N the source is of source errors on and errors active until program spec- occurs. program. the printer. the on screen. disabled by a If no option option switch. compiler listing is printed. statement specified, the and program source END program; is an which compiler listing option switch START were following option switches: the /N A comment of than error COMP RUN all a command overrides printout except /L's errors is in /T's suppressed. or of text preceded by a semicolon for output as a heading for the Procedure the compiler listing. When the comencounters the PROC statement, the printer moves piler to the top of the next page and outputs the comment as a header line. optional string is stored Division of Examples: ;Printer will go PROC PROC 4/L; TEST PROG. ;Four mass to storage top—of—the-page. logical units will source open, program listing and the ;errors will be listed on printer, ;be ;the page heading will be TEST PROG. DIBOL LANGUAGE 1-29 READ 1.2.15 READ direct The Input/Output access from moved form: - READ READ named a Statement statement allows file specified to a data record to in memory. It has specified a area be the (channel,record,rec#) where: channel is a numeric expression with a value of 1-15 specifying links the READ statement to the The INIT statement must specithe mode. channel number which related INIT statement. a fy Input is record the or name Update as of record the into which data is to be read. is a numeric or arithmetic number of the record to be rec# If the program dictable (see expression specifying the read. reads past the end—of—file mark, the for Section 1.2.22 restrictions results READ on are and unpreWRITE usage.) Examples: READ (5,REX,88) device linked ;Reads the 88th record of the channel the which was opened with the ;to the ;INIT (5,...) statement and places it in ;memory READ (6,BLT,EXPR) ;Reads area the ;expression ;area 1-30 DIBOL LANGUAGE labeled labeled record and EXPR BLT. REX. specified stores it in by the the memory RECORD 1.2.16 RECORD - Definition Statement Data where data is stored memory without field statement infor— mation is of no use in the program. The total size of the data fields An unnamed record within a named record cannot exceed 510 characters. be can contain no more than 4094 characters. can Only named records used in an I/O operation. Without a name, the record can act only as The RECORD statement has the form: a temporary storage area. The RECORD during statement processing. RECORD reserves A I X I C RECORD areas of statement ] [name][ where: the record, begins with an letter, alphabetic a contains maximum of six significant characters, and The name is optional un* is unique within the program. less the record is to be referenced for data transfer. name names ,X allows one record to be overlayed into the same area as another. The X must be preceded by a comma. More than one define the same record, but the overoverlay may laying record must be equal to or smaller than the record being overlayed. A series of records overlaying must be preceded by a record without a ,X. Overlaying is useful in reformatting a data previously defined record area. ,C clears the contents of record a loaded by a CHAIN com— numeric fields are set to zeros and all alphanumeric fields are set to blanks if no initial value been Do not use ,X and ,C in the same has specified. no error will occur, but the program will record; igall mand; nore the ,C. Accompanying field information is of the form: ,D [fldnam], [m]xn[,initial value][ ,P ,S ] where: fldnam, is an optional name that used without the reference the individual can be A identifies the file. comma if the program does not fldnam field. DIBOL LANGUAGE 1-31 count character used to indi— values that can be referenced with a The values must be of the same type single field name. and size and can be initially entered as a continuous size string separated by commas following the type and to be invalues of an need Not all array designation. serted at the program's inception. is optional repetition an cate an array of indicates the numeric D. field type indicates number in of 510 the alphanumeric) the as either characters field. alphanumeric A or (maximum 15 numeric, ,initial value in an optional value the field. inserted initially Must agree in type and size with the xn designation. ,D optional switch which an Monitor and by the data field same field as ,P. the ,P current date from calls the inserts it at the location designated in the information. Cannot be used asks for Cannot keyboard. the Enter ,D. ,8 when the program is ready for the insertion of information via be used in the same field as a optional switch which, an execution, all information as alphanumeric. optional character used to assign equal to the options used at an variable the run value time. of a Example: RECORD ;Record named INVENT. with five numeric ;Field named THINKO ;characters. four named THINKl with ;Array ;7—character values. named STKOPT initialized to 'OPTION';Field INVENT THINKO, D5 THINKl, 4D7 STKOPT, A6, ;OPTION. BNKBAL, D7,1234567 TRNSDT, D6, D INPUT, A10, P ;Numeric field initialized to 1234567. ;Field to enter date from the Monitor. characters ;Field to allow entry to ten A2, allow of values ;Field to /xx entry ;from R PROG /xx. ;Clears record loaded by CHAIN command. ;from RUNSW, RECORD, C NAME, RECORD, X LNAME, FNAME, 1-32 A20 S keyboard. ;Alphanumeric field ;Unnamed ;record. A10 A10 DIBOL LANGUAGE record to ;Alphanumeric field ;Alphanumeric field with 20 characters. overlay preceding with 10 characters. named FNAME. RETURN 1.2.17 The RETURN Control Statement - is statement RETURN subroutine. It has the at placed the logical of end an internal form: RETURN statement returns control the last CALL statement or statement transfered control. The RETURN lowing to to the the RETURN WITHOUT CALL error message results when no CALL or TRAP has been executed. A immediately statement location if a from which RETURN is a fol— TRAP attempted Example: CALL 4 I SET I I I I I I I I I I I I I STOP PROFIT=PRICE-COST SET, STOP CALL CTAX —->A=... RETURN ——————————— TAX=PROFIT/2 CTAX, IF (TAX.GT.MAX) CALL ERROR —-RETURN This example one subroutine statements shows and to the execution control next. The solid broken lines show the how the branches to and returns from lines show the result of CALL result of RETURN statements. DIBOL LANGUAGE 1-33 START 1.2.18 START - Compiler Statement This optional statement can be used any number of times and can be inEach time a START statement is serted anywhere in the source program. encountered during compilation, a top-of-page command occurs and a new is START is frequently used to segment major page heading printed. sections of has It programs. the form: STARTI/x][;comment] where: is /x /N /L one of the following option switches: suppresses resumes compiler listing listing source of source program. and program errors on printer. /T resumes display of source program and on errors the screen. switch is until disabled active by switch. If no option switch is specion the fied, a compiler listing is produced printer. The switches can be overridden with an option switch in the RUN COMP command. The START option another option ;comment If optional method to stipulate a line of output as a heading on the compiler listing. an text to the RUN COMP command, it overrides /L or /T and stops output of everything except errors. program will still determine to what device errors are output. /N is specified in the /L is source and /T be in The Example: START;WAREHOUSE INFORMATION ;The printer will begin list WAREHOUSE ;will at the top INFORMATION of as the page the title of and the ;page. START/T ;Resumes ;screen. 1-34 DIBOL LANGUAGE display of source program and errors on the STOP 1.2.19 STOP It the STOP - Control Statement terminates program execution and be inserted anywhere in the statement is: can returns control to the Monitor. Procedure Division. The form of STOP There close close can be more files; files a than FINI one STOP previously opened by The STOP statement has the used as the last statement an be must INIT same effect in program. a in statement statement as a program. STOP does not inserted before the STOP to statement. END, but END DIBOL can only LANGUAGE be 1-35 TRACE/N0 TRACE 1.2.20 These TRACE/NO TRACE - Debugging Statement are debugging tools used to follow the order of execution. TRACE/NO TRACE can be written any place in the Procedure Division of a program. The appearance of TRACE statements in a does not cause any TRACE output to be generated unless program the /T option is specified when the RUN command is given. The form of statements statement the is: statement TRACE TRACE NO the Between TRACE and When program tracing ments are executed. on the printer AT If NO TRACE statements are program statements which being debugged. are the which lowing LINE (xxxx is enabled, TRACE is the TRACE causes line the lists the following order in message which stateto be output number): xxxx number identifies a data manipulation statement, the value is produced and stored by the statement is printed on the folline. encounTracing continues until a NO TRACE statement is line tered. Example: AT LINE 0200 000006 excessive output placement of TRACE statements causes To statement to best use the TRACE advantage, use IE printer. statements to isolate the problem to a certain part of the program and Indiscriminate to the then use 1-36 DIBOL TRACE on that part LANGUAGE of the program. TRAP 1.2.21 The TRAP TRAP time — Control allows statement that output TRAP label Statement is DIBOL a being printed. same the program to be executed at The format of the statement is: where: is the label of a printer Division of the program. label Because the printer (CPU), the TRAP to execute buffer rather holds the is much execution resumes. gram or XMIT statement. following information in the Procedure unit central processing allow the CPU to continue A for material to be printed. can use them. printer than the implemented than having to wait characters until the Whenever the print buffer and a call is ily halts statement executed. When The slower is statement subroutine to DIBOL statement execution temporarthe label specified in the last TRAP RETURN is made from this call, normal pro- empties, made a The is to TRAP statement necessary to a FORMS use the TRAP of an INIT, 1/0 is normally precedes effectively statement. 1. If printer buffer empties during execution the XMIT, READ, progress, statement 2. WRITE, DISPLAY, or the TRAP is delayed is complete. FINI while of execution statement until the in I/O buffer empties during execution of an ACCEPT the ACCEPT is statement while the interrupted A noticeable delay occurs only if printer buffer is loaded. the buffer is filled during the time that the TRAP keyboard If the printer statement, subroutine is several 3. being executed. 18 seconds. approximately characters Since the keyboard buffer is this filling usually takes long, Always construct a TRAP subroutine printer is immediately followed by so a that RETURN output to the statement. DIBOL LANGUAGE 1-37 4. Printers length lines ing are limited to using the when results output lines TRAP of' 126 statement. characters in Outputting longer in the program spending all of its time servicprinter TRAPs, thus cancelling the advantage of the TRAP statement. 5. A DIBOL TRAP program is slowed down approximately 5 to 10% by the processor. Example: The following-example while some other task N, program outputs numbers is being performed: RECORD A D3 PROC TRAP LOOP, SUB FORMS(6,0) :Start LPT. . ;Perform task. IF (N.LT.500) GO TO STOP SUB, N=N+l IF (N.GT.500) XMIT(6,A) RETURN 1-38 DIBOL LANGUAGE RETURN LOOP 1—500 on the printer WRITE 1.2.22 A WRITE direct memory Input/Output - WRITE access to specified a WRITE Statement statement moves file. has It a the data record form: from an in area (channel,record,rec#) where: is a numeric value relates the WRITE channel statement INIT must of specifying 1-15, statement have to which The device channel a INIT an statement. specified Update as the mode. record rec# is the is an which record from which expression specifying data is be to is data the output. number of record the on written. Example: WRITE ;Returns the 88th record from the memory to the device associated with ;REX (5,REX,88) specified by ;channel Several r estrictions have been placed upon the INIT use area the (5,...). of and READ WRITE statement s. 1. The channel involved must refer to a logical unit on a mass operations must storage device. 2. The file to be accessed with READ contain records of uniform size. Only one mounted) The the record which same size as an WRITE volume of a‘ multivolume file can be accessed by a READ/WRITE Attempting in or error to READ Writing or in error one currently is specified from the Data Division must the records of the file being accessed. or WRITE and message Reading (the statement. a over program record the end-of—file mark termination. after end-of-file results usually results Certain unpredictable conditions message. not crash the COS-310 system but will cause garbled data or a READ) the loss of the output record (on a WRITE). an Unless is used before terminating has Update files, the data from the statements will not be output properly. program WRITE a FINI which statement be will (on a DIBOL last few DIBOL LANGUAGE 1-39 XMIT 1.2.23 The XMIT XMIT — Input/Output Statement statement transfers XMIT a data record and is of the form: (channel,record[,eof label]) where: channel is a numeric expression number which associates lated INIT statement. record (1-15) the XMIT specifying statement a with channel the re— is a name previously used in a RECORD statement which in memory to which or from which identifies the area sub— It may be a simple or data is to be transmitted. or a record literal. variable, scripted A with care. used should only be used The consecutive records. equal length must have a name but the others may be un— Subscripted record single subseript, if there are first record named. names such must as be REC(3), Examples: RECORD REC ;REC(1) ,D6 ,AlO ;REC(2) RECORD ,D6 ,AlO RECORD ;REC(3) ,D6 ,AlO If a double subscript form is used, REC (n,m), e.g., n must then be less than m—l, n must be odd and m must be even (or the last character in the This record). double subscript form refers to characters n—2 through m—2 inclusive in the record. If it refers to n=1, characters referring to n in acter COS-310 word n=l. 1-40 DIBOL LANGUAGE 1 m-2. Whenever an XMIT occurs through the record, two characters before char— the record are this is the destroyed; Do not be concerned about this if count. eof label to which the is the label of a statement program It is used with branches if an end—of-file is read. closed automati— The input file is input files only. an end—of—file is read. If a label is not cally when is when an error an output specified, message end—of—file occurs. The same effect of an end—of-file label can be achieved by an ON ERROR ing the XMIT without an end—of—file. statement preced- Examples: XMIT (3,INV,EOF) ;Transfers a record with ;associated ;(3,IN,..), to the INV. ;labeled control ;reached, from the file input INIT the statement record area in memory If is end-of-file the branches to Division statement labeled of the the record length read is greater than the defined is output at run an error message If the size of the record being ;Procedure If ;EOF. ;being ;size, ;time. ;read is smaller than the defined size, ;the record is left—justified and padded This ;with spaces on the right. the ;is just opposite of which format the data does an ;manipulation statement ;alphanumeric-to—alphanumeric operation. XMIT (l,CUST,NEXT) file ;Transfers a record from the input with the ;associated INIT(1,I,...) At ;statement to the RECORD area CUST. it branches labeled NEXT. to the ;Takes a record it ;and puts from RECORD in the file area BUFF ;with INIT(2,...) ;end-of—file, ;statement XMIT (2,BUFF) the associated statement for channel 2 is initialized ;(assuming ;output, printer, etc.). XMIT (8, "HI THERE') ;Would output the message terminal ;the operator's ;was XMIT (8,CUST(1,7),EOF) INITed ;Accesses to the ;the record the first area HI if THERE channel on 8 TTY. five characters of CUST. DIBOL LANGUAGE 1-41 CHAPTER THE 2.1 MASTER CONTROL 2 MONITOR PROGRAM Monitor is the master control program contains all the system I/O handlers: The The 0 Terminal 0 Mass 0 Printer Monitor enables COS—310 It system. edit, save, and execute all programs stored on close files as needed. programs. the system program execution, the Monitor produces the messages the user to mount files. It also provides the means which infor batch— also maintains device and lets you struct the Storage It During for ing commands for you a to directory label, open, compile, of and sequential execution. The editing feature of the Monitor can be used to create DFU File tables and source files on the system device. Utility) tables and files may be stored for later use. Table 2-1 lists the on—line operations. Monitor Keyboard Commands that are (Data These available in Table 2—1 Keyboard Commands Monitor Keyboard Function Command CTRL/C control Returns a the to awaits and dot a Monitor. The If command. ready in control, CTRL/C has the CTRL/U. CTRL/O Monitor the same displays Monitor effect If Suppresses terminal echo of typed output. is al- as a echo is the terminal restores CTRL/O suppressed, echo. CTRL/O is also used to halt and resume output The echo always from an LI command or the compiler. the dot is printed. All resumes the next time sup— pressed output is lost. already CTRL/Q Resumes it was output halted to the screen CTRL/S No Halts output to screen. CTRL/Q will resume output. CTRL/U Deletes the Signals the CTRL/Z Monitor. from the point at which data is lost. by CTRL/S. current output input line. end of input Halts output and of returns line to the control from an LN numbers _command. DELETE Erases to RETURN 2-2 THE that the last character typed character's position. Indicates MONITOR that a line of and moves the input is complete. cursor 2.1.1 The MOUNT Messages Monitor displays messages on the screen whenever an must be specified. These messages MOUNT output logical unit number input have or the form: MOUNT filnam #nn FOR INPUT: MOUNT filnam #nn FOR OUTPUT: is the name where: filnam of the data file desired the by program currently executing. is #nn Respond the volume number this message with the location of the data to the cates the type CTRL/U and reply, the (1 to logical 63) unit storage unit. correct of the file. data number(l-15) If an error which indiis made in reply. The MOUNT message is displayed and the volume number is incremented whenever the reaches the end of the mass storage device yet program more information remains to be read or written. logical unit numbers specified in control programs able, a question mark precedes the MOUNT message: When filnam #01 ?MOUNT Respond The the to FOR a different logical unit following message is displayed when a file logical unit specified in a MOUNT message: filnam #nn not avail— INPUT: this message with REPLACE are is number. already stored on ? REPLACE with a Y to replace the old answer with file; any File labels beginning with any other character to keep the old file. character other than A—Z, ], ", or [, are considered to be temporary files, and no REPLACE message is displayed. Answer If output is to a name previously unused logical unit, a garbled file in is the REPLACE This bedisplayed message. volume number may be cause random characters be. Answer the REPLACE or are on message the storage unit where the label with YES to replace the garbled THE should file. MONITOR 2-3 2.1.2 Procedures Operating routine each it is loaded The Monitor is loaded via a bootstrap started. The Monitor signals that the message: playing COS MONITOR V is time the system into memory by dis- (or current version number) 8.00 DATE? proceed, type DATE (or DA), a space, the current date in The date must be entered before proceeding. dd-mmm—yy. is used during program execution to date files, reports, To the DA This date created and form newly programs. Monitor other commands indicates that it is ready to by accept file START. dot or the batch either a (.) by executing displaying SYSGEN START is executed if you selected the batch file option in the operation (see Section 3.1 for SYSGEN operation). The 2.2 The MONITOR COMMANDS following commands apply to BATCH sequentially DATE stores a DELETE erases programs DIRECTORY prints the PLEASE displays RUN loads SAVE stores and Monitor executes a functions. string of monitor commands date names text on from of device directory files stored screen executes binary a during program execution programs programs on a storage device suftwo characters of the command must be typed (R is RUN for the ficient command). Any additional characters up to the RETURN All commands must be followed by the first blank are ignored. key before execution will begin. Only the first 2-4 THE MONITOR BATCH 2.2.1 BATCH sequentially executes a string of Monitor commands. command file associated with a Monitor command is comCertain system pleted, another Monitor command is executed. programs started by the RUN command may either terminate BATCH or will not acthese require operator interaction. cept input from the batch stream; A BATCH As soon The form BA command as of a the BATCH command is: cmndfl where: is cmndfl the name taining Following is an of example assigned to a list of Monitor a 0090 0100 RUN 0110 0120 0130 0140 0150 0160 RUN DFU, SYSTAB RUN JOBl JOBZ command a previously stored file file: COMP,JOB1 SAVE RUN JOBl SORT, SRCL DFU,OLDTAB RUN RUN JOBl/B DE All batch command files must be on the system device. A batch file should contain a BATCH command only as its last line. A Monitor con— commands. command and executed. batch can then read Type be from a CTRL/C restarted file is terminate batch to only at the command on the screen batch command file; the of the file. beginning displayed a turns the necessary programs and data files must be available during If execution. an error occurs, BATCH terminates, control re— to the Monitor, and a dot is displayed on the screen. After the All of BATCH restarted When tor is corrected, the entire batch command each remaining command can be individually error or the batch command file is finished, control and a dot is displayed on the screen. returns file can be typed. to the THE MONITOR Moni- 2-5 DATE 2.2.2 The DATE command DATE are created same until The a of form DA stores a date or to reports new DATE command the DATE command which is assigned to all programs that that are printed. This date remains the is issued or the system is rebooted. is: dd-mmm-yy where: dd is mmm is a three—character alphabetic string the first three letters of the month. yy is a system is booted, COS MONITOR V DATE? If number two—digit decimal digits of the year. the After number two-digit decimal a anything 8.00 (or the Monitor current is typed before the date is entered representing version which representing displays the the the day. must be last two message: number) is entered, the Monitor the Monitor repeats: DATE? If the date BAD Enter the date whenever Examples: 25-SEP-76 'DA 'DATE THE displays: DATE change the system date. 2-6 incorrectly, 5-JUL-77 MONITOR the Monitor is booted. It is also used to DELETE 2.2.3 DELETE The DELETE command erases from the specified device The form of DE the the command DELETE named source, binary, or system program directory. is: pronam[,dev1/x where: pronam is the name of the program to be removed from di— the rectory. is the device dev three—character for the designation where the If no program is stored. specified, the system device is assumed. /x physical device is two—character be deleted is code that the indicating either a source (S), binary This code is necessary to (B), or system (SV) program. differentiate between three programs with the same name but of different types. The code SV is used rather than V to make it more difficult to mistakenly delete a Is one- a program or to system program. Data files are not deleted, they can only be replaced. Examples: RX3/B .DE JOBl, .DE PROGA,DK3/S .DE INV/S .DE FILEX/SV ;Delete binary program named JOBl from device ;RX3. from source named PROGA ;Delete program ;device DK3. ;Delete source program named INV from system *;device. FILEX named from ;Delete system program ;system device. THE MONITOR 2-7 DI RECTO RY 2.2.§ DIRECTORY The DIRECTORY command prints a list of programs stored on a device or the name of the data file stored on a logical unit. the printer is on-line before issuing the DI command. The form of the DIRECTORY command physical Be sure is: [ deVJI/T] DI /logical unit # where: dev is a three-character designation on which device the directory is an optional switch which the screen. on displayed directory will be listed on is If preceded by a comma or space. system device is assumed. /T for causes the mass stored, and storage must be not specified, the the directory to specified, be the If /T is not the printer. /logical unit # is with number (1-15) of the logical unit assigned A logical unit # must be pre— (Data File Utility). ceded by /. Specifying a logical unit # causes a label the DFU to be repeated directory contains The length programs, was stored. (LN) on listed each time the in current the a The DI command must be printer. logical unit # is to be printed. date, of of programs, types and the date each program names 512-byte blocks, A logical unit label contains the file name, number a (if sequence multivolume file), the date the file was created, file length in segfile stored was ments, and the number of the logical unit where the when the label was requested. are sixteen blocks Segments 512—byte long. The the curonly directory entry dates that are valid are those for year and seven years preceding the current date. Any dates prior this time will be printed incorrectly. rent to 2-8 THE MONITOR Examples: The command: .DI causes DKO ;Directory directory a from similar to physical device DKO. the to following be on the MONITOR 2-9 output printer: l5-FEB-72 DIRECTORY NAME TYPE LN DATE COMP V 14 19-JAN-78 MORE (0006 TSTZ <0007 TST4 GLOP <0579 The 10 lS-FEB-78 FREE BLOCKS) S 07 lZ-FEB-78 FREE BLOCKS> lS-FEB-78 S 07 10 l5-FEB-78 S FREE BLOCKS) S command: .DI/3 outputs a ;Directory file label from similar to logical unit 3. the one below. **************************** * * * NAME * SEQ. DATE #01 18—Nov—75 * * * DEP * * * * * LENGTH: 0046 UNIT: 3 * * * ************************** * THE PLEASE 2.2.5 PLEASE The PLEASE command displays batch command file. The The form of the PLEASE text text is sounded. To AND make a and operator command PLEASE displayed exactly Do ing CTRL/C) text as to on the during execution screen of a is: as requested by the continue the batch entered and PLEASE text terminal the and type any key alarm is (includ- program. two—line PLEASE command, the first the second line begun with another know more text is to follow. line is PLEASE. terminated with The AND lets the Example: 0020 0030 0040 0050 0060 RUN JOBl PLEASE PUT PLEASE TYPE RUN INVOICES IN PRINTER AND 3 TO THE NEXT MOUNT MESSAGE JOB3 PLEASE PUT REGULAR PAPER IN PRINTER file is executed, JOBl will be the run, be displayed, and the terminal alarm will to The system waits for a key to be typed in be sounded. reply When the PLEASE text, then it displays the next PLEASE command. the is executed and a key is typed in reply to the text, JOB3 Control returns to the Monitor text is displayed. last PLEASE when a key is typed in reply to the last PLEASE text. this When first If a PLEASE sounds 2-10 and THE batch PLEASE command text will command is given in the system waits for MONITOR a non-BATCH a RETURN key mode, to be the terminal typed. alarm RUN 2.2.6 The RUN RUN command loads and executes file. using the named system programs, such gram This a system program command provides or a access binary to proother all as: RUN SYSGEN To build a RUN SORT To sort data RUN PIP To move information RUN COMP To compile new a system or change system handlers. files. user between source physical devices. program into a binary program. The RUN command the has form: pronam RUN I ][,filnaml...,filnam7][/xx] chain0+chainl...+chain7 where: pronam is the name If the loads and program name is omitted, the Monitor the DIBOL program in the binary scratch area. of the program to be run. executes chain0+chainl... are binary files which For has been which are part of one large program divided into several chained programs. example: .RUN CHAINO+CHAIN1+CHAIN2+CHAIN3 would execute program CHAINO. CHAINO would then deter— mine whether program CHAINl, CHAINZ, or CHAIN3 would be run next. THE MONITOR 2-11 filnaml...,fi1nam7 files which must be on the device. system of the system programs is executed via the RUN command and no source files are specified as input, the file in the edit buffer is used as input (system proare source If one grams The only). maximum number of binary and source files per pro— is eight (including pronam or chainO). Multiple are concatenated and passed to system programs as large file. gram files one is one or a combination of option with the program being run. /xx If the sage file program is specified is not found, the aSSOCiated switches following error mes- displayed. FILE NOT FOUND is stores editing scratch area are returned on the loaded into memory by a RUN command, contents of the the edit buffer in the the system device. The contents of the edit memory when program execution is complete. Monitor temporarily compiled DIBOL When a program to buffer Examples: most 7Executes .RU recently ;program. .RU .RUN .RUN 2-12 THE ;Runs program called JOBl. JOBl COMP, CHECK ,BINl,BIN2 MONITOR ;Compiles the source program CHECK. from the program BINl and BIN2 as ;Runs the ;area using scratch binary input files. SAVE 2.2.7 SAVE This command and stores type B. The form of copies it on the SAVE the binary program from the binary scratch the named device. The saved binary will area be of is: command pronam[,dev][/Y] SA where: pronam is the name stored. dev is the three-character designation for has a directory. If no device which the system device is assumed. is /Y used cate If the Monitor program to name to be bypass is mode to name specified assigned the to REPLACE? ‘encountered. bypass operator is a name the binary being program any mass device message when storage is given, dupli- a Normally used in a batch response. already in the directory, the displays: REPLACE? Type Y or any other YES to replace the old leave the character to file with the new file. N or Type file and return to the Monitor. old THE MONITOR 2-13 EDITOR COMMANDS 2.3 COS-310 Monitor contains a line number editor. input to the Monitor is assigned a line number. The Every line of text Example: 0100 START 0110 0120 0130 0140 0150 0160 0170 0180 0190 0200 RECORD A LOOP, EOF, PROC 2 INIT XMIT (2,IN,'MINT') (2,A,EOF) (8,A) GO LOOP XMIT TO FINI(2) STOP END Insertions, The A64 A1, changes, following and commands deletions are done are functions of the clears FETCH loads LIST outputs text outputs incremented Line Number Number Commands edits text a file source text to the within RESEQUENCE renumbers program WRITE stores source these line numbers. editor. edit the from ERASE with buffer into memory screen line the or printer numbers edit buffer lines files for later editing commands can be entered in response to the Monitor dot. Only The exceptions to the first two characters of the command are needed. this first-two-letter convention are in the line number and number commands. All commands must be followed by the RETURN key. These 2-14 THE MONITOR ERASE 2.3.1 ERASE The ERASE The form command of the erases ERASE (clears) text from the edit buffer. is: command ER [nl][,n2] where: n1 is the number of the line to be erased or the first of line numbers which delimit the lines to be erased. two If omitted, erasing starts at the beginning of the edit buffer. is ,n2 the second of the two delimiting line indicates where If n2 erasing ends. is included, erasing continues comma edit buffer. If omitted but it the to the of the numbers; end line numbers are specified, the ERASE command clears the buffer. Use this command to erase the edit buffer before any material to be edited. no edit ing is entire enter- Examples: :Clears the entire edit buffer. .ER .ER 5 ;Clears line 5. .ER ,5 ;Clears .ER 5,10 :Clears from line .ER 5, ;Clears from from the line start of the buffer 5 through line 10. 5 through the end through line 5. of the buffer. THE MONITOR 2-15 FETCH 2.3.2 FETCH The FETCH command erases the edit buffer and file from the specified device into memory. The of form the FETCH command the named source file loads source is: filnam[,dev] FE where: filnam is the name of a previously be brought into memory. to If the source FILE NOT file is not found, the is designation is stored. Monitor displays the message: FOUND Retype the command with the correct nation. which for the mass storage If the device desigsystem device is assumed. is the three-character where the file device nation-is omitted, the dev stored Consult the directory to file source find the name proper or device desig- name. Examples: .FE RICH ;Moves ;edit 2-16 file RICH buffer. from the .FE PAYROL,DK2 ;Moves file PAYROL from ;the edit buffer. THE MONITOR an system device RK05 disk on to the drive 2 to LIST 2.3.3 LIST The the LIST The form command outputs the specified lines or the edit buffer to the printer or to the screen. of the LIST command entire contents of is: [n1][.n2][/L] LI where: is the number of the line to be output or the first of line numbers which delimit the lines to be output. If omitted, output starts at the beginning of the edit buffer. n1 two is the second of two line numbers; it indicates where If n2 is omitted but the comma is includoutput ends. ed, output continues to the end of the edit buffer. ,n2 ' is the one-letter switch which will output the If /L is not indicated, the printer. played on the screen. /L the list to list is dis- If no line numbers are specified, the entire contents of the edit buffer is CTRL/O output. CTRL/S stops output from an LI command; halts display on the screen; CTRL/Q resumes display halted by CTRL/S. Examples: .LI/L ;List entire edit buffer .LI 5 ;Display line 5 .LI ,5 ;Display from beginning .LI 5,10 ;Display line 5-10, .LI 5, ;Display from on line the on printer. screen. of buffer inclusive, 5 on through line the through the end 5. screen. of the THE buffer. MONITOR 2—17 LINE NUMBER Line Number 2.3.4 Line Number command automatically outputs incremented line numbers lines can be entered without manually typing each line number. The so new .The form of LN the Line Number is: command [n][,inc] where: is the number of the starting line number is specified, 100 n line. is If assumed. starting no increincre— the the comma after the starting number and number are omitted, the starting number and ment number are the same. If ment If is and last LN to 10. the command is LN 100, the start line number the increment remains unchanged from the Once in memory, the increment returns command. is is inc the increment 10 specified, between is line numbers. If no 100 increment assumed. been Line Number command is terminated and some editing has done, Line the Number command (LN) with no arguments to display the type If next The are by number in sequence. Line Numbers command does not clear the edit buffer. available. Under the default conditions (start at 100, 10), the program can be approximately 400 lines long. LN The maximum number of number and space, two characters. No terminal the the screens 2-18 are Monitor executes next line number. a 120 THE MONITOR input line, number characters wide. carriage return/line If the Monitor gives input line is lost. ceeded, tire characters on an is 120. The line the the lZO—character error message and including space are to 4095 increment 0 the line counted as When the screen is full, feed but does not display is ex— input line length LINE TOO LONG and the en— If is RETURN line number blank line line, RETURN key. Tabs key after blank a the used most to goes five an automatic line the number, To obtain a line is not generated. To obtain a blank type the SPACE bar and the RETURN key. you manually enter a line number, type two spaces and the key typed after but to increase terminals is set be can on the first increments column 13 because to the readability of produce up to 8 line number and TAB The program. The first tab spaces. take the first space a spaces. Type CTRL/Z line to indicate end the of input and to the halt automatic numbering. Examples: ;Requests line numbers starting ;of 10. .LN at 100 with increments with increments .LN 10,5 ;Requests ;of 5. line numbers starting at 10 .LN ,100 ;Requests line numbers starting at 100 ;Requests line numbers starting ;of 50. at 50 (default) with ;increments of 100. .LN 50 with increments DELETE using automatic line numbers, use the The DELETE erases the RETURN CTRL/U prior key typing key. key the Monitor the last character typed. CTRL/U erases the entire line; redisplays the line number. If error an is made If the pears, when to or edit buffer is full, the error message and the last line entered is lost. The edit buffer can be separated into is done with the following procedure: WRITE the edit buffer ERASE the last half WRITE the edit buffer FETCH file B. ERASE the first half WRITE the edit buffer as of file the as of as the more source FULL ap- files. This MONITOR 2-19 buffer. A. edit file or BUFFER B. edit file two EDIT buffer. B. THE NUMBER COMMANDS 2 3 . . Number Commands 5 Any line beginning with Lines are edited nnnn [text] a number can using the following edited be in the to work edit buffer. form: where: nnnn text is the is data number to arated If text is Lines are number and line. already at RETURN that in stored right line a you want be from becomes TAB of on. The data input on the line. the line number by one SPACE the first character of text. line must be or TAB. a the new text replaces line number order. increasing Type the after the line number to clear data from input line is limited to line number (a total of 120 An 116 number, characters plus the before editing: .LI 0035 PROC 0040 INIT(I,V,IN) 0047 XMIT(6,B) ooéo END Editing commands: .35 .40 .47 Text after PROC l INIT(1,IN,'LABEL',2) editing: .LI 2-20 THE 0035 PROC 0040 INIT(l,IN,'LABEL',2) 0060 END MONITOR l A it. line that four-character characters). Examples: Text sep- ;Inserts PROCl at line 35. ;Inserts new text at line 40. ;Erases text and line number. RESEQUENCE 2.3.6 RESEQUENCE The RESEQUENCE command renumbers tion and deletion of lines. The form RE of the RESEQUENCE the command program lines to for addi- starting line adjust is: [n][,inc] where: is the number n line starting is specified, number. If 100 is assumed. no the comma after the starting number and the increnumber are omitted, the starting number and increIf the is ment number are the same. comma included, the starting number is as designated and the increment remains unchanged unless the Monitor is read back into in memory, the increment returns to 10. once memory; If ment is is inc If the error line number message mand with the LINE smaller increment 10 between is specified, exceeds 4095 # TOO LARGE increments. only partially resequenced and line numbers. If no increment assumed. the command, following a RESEQUENCE results. Enter another RESEQUENCE comIf this is not done, the text will be duplicate line numbers may result. Examples: in a the edit ;Resequences line numbers of program 100 as the line number and 10 ;buffer using starting .RE ;as the increment. .RE 10,5 a in the ;Resequences line numbers of program 10 as the starting line number and ;buffer using ;the increment. .RE ,100 in the edit ;Resequences line numbers of the program ;buffer using 100 or the last specified line number as ;the starting line and 100 as the increment. .RE 50, ;Resequences line numbers of the increment. ;using ;the 50 as a starting line edit 5 as edit buffer program in number without changing THE MONITOR 2-21 WRITE 2.3.7 WRITE The WRITE can later The form WR command stores be compiled or of the WRITE a source fetched file for on the specified device so it editing. is: command filnam[,dev][/Y] where: filnam is the name to be stored. (up six characters) of the source file ,dev is the three—character designation for the mass storage device where the program is to be stored. If no device is specified, the system device is assumed. /Y bypasses the message when a duplicate name is used in a batch file to bypass Normally REPLACE? encountered. operator If to the filnam specified response. is a duplicate name, the Monitor displays: REPLACE? Type Y or YES to replace the old file with any other character 2-22 MONITOR THE to leave the old file N the new file. or Type and return to the Monitor. 2.4 MONITOR ERROR MESSAGES Explanation Message BAD COMPILATION Attempted had to errors. SAVE a compiled binary that Correct errors before com— piling. BAD DATE Typed BAD DIRECTORY Attempted FULL than 8,150 characters 2.3.4 Line Number). Greater tion IN ERROR ON to device a COMMAND deV, RETRY? Miscellaneous. Check for form and accuracy. The wrong for no The file device was NOT FOUND command previous designated. Type retry. directory specified that file name or existence. ILLEGAL PROGRAM was not found specified. review directory was Sec- (see Any other input the device handler to retry. FILE is No BUFFER ERROR Retype. data file label, or label's form Check for correct label. incorrect. LABEL EDIT date. unrecognizable file reference or store a with a damaged or nonexistent directory. diwith Only devices rectories can be used. If the directory is damaged, call your Software Specialist. on BAD an N causes on the Re-enter for file that to run a system program different version number than the be the Monitor. Version numbers must Attempted has a same. ILLEGAL UNIT Either the specified logical unit number is (not 1—15) or the specified illegal device is not currently part of the sys— tem. Replace the illegal number with a a corcorrect unit number. Stipulate device designation. rect IN USE The specified logical open. Select another is unit already logical unit. THE MONITOR 2-23 Explanation Message More LONG TOO LINE than 120 input line. Line # TOO LARGE LINE on characters entered Line must be shortened. number greater line numbers number of lines. Resequence total ?NO FILE TO SAVE Nothing command tered. NO in is an than 4095. reduce the or edit buffer when issued. New data must the WRITE be en- to read or write on a that was not opened by the system Device must be opened with an program. INIT Program attempted device INIT NO LP statement. enough memory to support the selectprinter (e.g., LQP printer requires 24K bytes of memory). Add more memory or select another type of printer. Not BUFFER ed 2.5 RUN-TIME ERROR MESSAGES All errors are fatal unless the error is trapable and the statement in it occurs is immediately preceded by an ON ERROR statement with which a valid label (see Section 1.2.13 ON ERROR). AT LINE the COMP/O was asterisk If (*) displayed 2-24 CHAIN CHAIN mand. argument does not match .RUN chained programs must the RUN command. be com— stip- character other than +, -, or space, the digits 0-9 was encountered in an alCheck phanumeric-to-numeric conversion. and delete bad digits. DIGIT THE is Explanation All ulated in BAD cannot source Message *BAD with nnnn under all run-time error messages; line number where the error occurred. program specified for a program, nnnn is meaningless. is an be checked 0N nnnn DIBOL with an messages marked ERROR statement. The A MONITOR Explanation Message run a binary program which Check compilation error. for errors. Correct compilation listing errors and recompile. *BAD PROGRAM *DIBOL FILE NUMBER IN USE Attempted to contains a channel *DIBOL FILE NUMBER NOT INITED number is already Enter new device. number/device combination. In INIT, the channel with associated a was made to or READ, XMIT, with a channel number that was not associated with a device. Either INIT or the channel number use a channel number already opened. An attempt WRITE END OF file has The last record of an input been and the end—of-file mark en— read was countered, but no EOF label speci— in the XMIT statement or in the ON fied ERROR XMIT statement the preceding FILE Rewrite statement. *ILLEGAL DEVICE XMIT Attempted to WRITE on a for not UPDATE opened statement. file that was attempted to READ from a file that was not opened for INPUT or UPDATE. INIT file properly. ILLEGAL RECORD # *ILLEGAL SUBSTRING Either the record number is 0, past the of the logical unit, or the records end are not all the same length when you are using UPDATE mode. A Procedure DIBOL tempted to field, Redefine LINE TOO LONG LEFT Attempted for long Not Division access m<l XMIT a record that in the area defined Redefine the area in to enough buffers statement subscripted a Fl but (m,n), data field. Division. Division. *NO BUFFERS or (e. memory ., available DIBOL program or is the the for is at— data m>n. too Data Data I/O too buffer of some multiple of 512 characters is set up for each active Another possibility: mass storage file. too few files were specified in the PROC statement. Specify more files. big). An 1/ THE MONITOR 2-25 Message NO Explanation FILE file No in specified satisfy INIT (SYS) command RUN to Specify statement file. NUMBER TOO LONG A numeric was used within *PROGRAM TOO BIG field longer than in a calculation. 15 digits Reduce to lS-digit limitation. program does not fit in available Reduce memory. program size, or chain Binary program. *PUSHDOWN OVERFLOW is too complex and/or subrou— tines are nested to a depth greater than 50. Simplify statement, reduce nesting, or both. *RETURN WITHOUT The CALL Statement but *SUBSCRIPT TOO BIG program tried to execute there was no place to go. CALL or TURN statement. TRAP statement Program attempted to RETURN, a Implement or delete use a the RE- subscript that defined in the Data than Note that the run—time system Division. does not detect all illegal subscripts, which would cause the program those only or the system to be destroyed. Redefine larger subscript. ZERO DIVISOR The program attempted division by Eliminate 2-26 THE MONITOR to divide zero. by zero. CHAPTER SYSTEM GENERATION 3 PROGRAM (SYSGEN) is a conversational System Generation Program (SYSGEN) program on or to create a a new device to change the system system followThe SYSGEN statement has the handlers in the current system. The used form: ing /B RUN SYSGEN /C where: builds /B /C SYSGEN/B 3.1 SYSGEN/B Use system in a handlers changes OPERATING to build a drives must system be least to perform this operation. RUN After command, IS THE you then to appears build on SYSGEN SYSTEM NEW Respond by typing want device. current system. a new running and To on device. loaded on SYSGEN/B, execute the system in order type: SYSGEN/B this WHAT new the PROCEDURES At two a on the a the displays the DEVICE? three-character new system screen. following question: on. A designation the message to for similar that device the following ENTER NUMBER CORRESPONDING RK05 CARTRIDGE 2 RX RXOl FLOPPY DISK DRIVES 3 DY RX02 FLOPPY DISK 4 DK & RX RK05 AND RXOl DISK DRIVES 5 DK & DY RK05 AND RX02 DISK TYPE NUMBER OF PRINTER DRIVES DRIVES kind MODEL ON DECPRINTER I 2 LA35 DECWRITER II 3 LA36RO DECWRITER II 4 LQP LETTER-QUALITY PRINTER 5 LP05 300 6 LA8 DECPRINTER I 7 LA120 DECWRITER III 8 NONE NO the LPM lines. After DO WANT YOU YES if every time you PER DKC8-AA the SYSTEM GENERATION INTERFACE If you want. SYSGEN asks: you select PAGE? START-UP use want. PRINTER want lines-per-page you want you SYSTEM number corresponding to the printer that does not have forms hardware, LINES that PRINTER Type the number of lines you Answer USING drive(s) of LA8A HOW MANY 3-2 the to DRIVES DISK 1 printer 66 CONFIGURATION DK PLEASE Type DESIRED 1 Type the number corresponding SYSGEN responds with: a TO BATCH on has is each page. The default value been specified, the system asks: FILE? the Monitor to execute Monitor DATE command. PROGRAM (SYSGEN) the file batch Answer NO if you START do not not This execute the batch file. option does additional memory for the COS-310 Monitor or space on the START You the file. system device except for the space needed for create START by writing a batch file and naming it START. automatically to want require After any enter YES YOU WANT TO you DO Answer YES files onto previously to TRANSFER new stored YOUR responds by asking: FILES? and the and source, binary system, This transfer destroys anything system device. the the new system device. Answer NO to empty the Monitor copy the SYSGEN NO, or on and to copy device's directory no files are transferred. device; new SYSGEN then if YES Type your The new system last question. If you make chose area unit cal not transfer SYSGEN/B does new is displayed. the Monitor onto the new CORRECT? not are answers questions starting ately COS-310 asks: EVERYTHING IS the at the built correct. request only for after you Type the NO new give a and SYSGEN repeats the system device. YES response to SYSGEN's transfer files, the COS MONITOR message is immediIf you chose to transfer files, the time needed to delays the COS MONITOR message. to the logical the system on reset occupied by assignments. unit assignments a disk. Use DFU to to the reflect make new logi- will fail if you attempt to transfer your files device that does not have enough room for both the system and the files. The operation can be done by rebooting the system and running without SYSGEN/B transferring files onto one device and then running SYSGEN/B without transferring files a second time onto another device. Then use PIP OPT- E to put source files on one device and binary files on the other device. The to 3.2 SYSGEN/B operation a SYSGEN/C OPERATING PROCEDURES Use SYSGEN/C to change handlers within the SYSGEN/C, type: RUN current system. To execute SYSGEN/C SYSTEM GENERATION PROGRAM (SYSGEN) 3-3 SYSGEN ENTER Type NUMBER 66 CONFIGURATION DESIRED TO CORRESPONDING RK05 CARTRIDGE 2 RX RXOl FLOPPY DISK DRIVES 3 DY RXOZ FLOPPY DISK DRIVES 4 DK & RX RK05 AND RXOl DISK DRIVES 5 DK & DY RK05 AND RX02 DISK DRIVES the number corresponding responds with: TYPE NUMBER OF to DISK the PRINTER DRIVES kind MODEL of ON 1 LA8A DECPRINTER I 2 LA35 DECWRITER II 3 LA36RO DECWRITER II 4 LQP LETTER-QUALITY PRINTER 5 LP05 300 6 LA8 DECPRINTER I 7 LAlZO DECWRITER III 8 NONE NO the printer Type statement: DK PLEASE Type following 1 SYSGEN a the displays LPM USING that you want. SYSTEM DKC8-AA INTERFACE PRINTER PRINTER number corresponding to the printer that does not have forms hardware, you If asks: want. SYSGEN you select PAGE? HOW MANY the number of lines you want on each page. The default value is After lines-per~page has been specified, the system asks: lines. DO YOU LINES drive(s) WANT PER START-UP BATCH FILE? Monitor to execute the START batch file DATE Monitor command. Answer NO if do not every you you want to automatically execute the batch file. This not does option require any additional memory for the COS-310 Monitor or space on the the START You file. system device except for the space needed for create START by writing a batch file and naming it START. Answer YES time 3-4 if you want use the the SYSTEM GENERATION PROGRAM (SYSGEN) After Type and you enter IS EVERYTHING NO and SYSGEN are 3.3 the or NO, SYSGEN asks: CORRECT? entire sequence of questions begins again. COMPLETE--PLEASE RE-INITIALIZE SYSTEM system automatically halts and must be rebooted. in the system and SYSGEN/C is completed. SYSGEN The new handlers ERROR MESSAGES Explanation SWITCH Attempted to /B /C. Use dev MUST BE INCLUDED IN or FULL use switch other a than B or to operate SYSGEN/C without device designation where handler. needed. of files Ran out room for Enter on new desig- the device device. SYSGEN/B twice without transferring files use PIP ‘device most Answer common the C. CONFIGURATION Attempted a nating The YES now Message BAD Type responds: SYSGEN The YES indication of OPT- and error E to put binary files is the the files other of the source on repeat on Run and one device. question. question again. SYSTEM GENERATION PROGRAM (SYSGEN) 3-5 4 CHAPTER DATA FILE UTILITY PROGRAM (DFU) unit assignUtility Program (DFU) to make logical The a table of these assignments for reference. print COS—310 system is shipped with logical units unassigned. Use the ments Data File to or 4.1 DFU To execute OPERATING DFU, PROCEDURES type ,filnam RUN DFU /xx where: ,filnam /xx is the name of a previously created table of logical unit assignments. on the system device. is an option switch tion of /B /K /D /DL /E which determines the containing file is a stored specific func- table creat— DFU. makes ed file This in logical unit assignments the edit from a buffer. makes new logical the keyboard. unit assignments displays the table ments on the screen. lists the ments on table of current the printer. of current directly from logical unit assign— logical unit assign- displays an expanded table of current logical unit Similar to /D with the addition of assignments. file name, volume number, sequence date, and length of the data file. the /EL If neither to /B. 4.1.1 the on name nor file expanded table the of logical unit assign— DFU defaults printer. option switch is specified, DFU,filnam Operating Procedures DFU,filnam file lists ments creation the takes the on logical unit assignments from a table To execute DFU,filnam type: stored as a system device. DFU,filnam RUN is created with editor commands and contains the device deand the number of segments in each logical unit. The selogi— quence of the entries determines the number associated with the cal is created in the edit buffer and stored as a unit. The table named file. The table is similar to the following: The table signation ' Rxl, RKl, RK3, 41 41 41 21 A maximum of RXO, The DFU/B To entries program makes DFU produces 4.1.2 15 no output on can the the be made in the table. assignments on the appropriate or printer. devices but screen DFU/B Operating Procedures makes execute RUN logical unit assignments DFU/B, type: from a table in the edit buffer. DFU/B The table be in the is the same as the one used by DFU,filnam. The table must edit buffer. The processor makes the assignments on the ap— propriate devices 4-2 DATA FILE but produces UTILITY PROGRAM no output (DFU) on the screen or printer. 4.1.3 DFU/K Operating Procedures DFU/K makes new logical unit assignments cute DFU/K, type: For the keyboard. TO exe- DFU/K RUN DFU from responds by prompting example: you to enter the unit logical assignments. ,RUN DFU/K 1 2 3 = = = 4 = 5 = 4.1.4 8.00 V DFU RXO,4l RXl,4l RX2,41 RX3,41 END DFU/D Operating Procedures DFU/D displays To screen. table table of DFU/D, current logical unit assignments on the type: DFU/D RUN A the execute similar UNIT to the DEV. SEGS. RXO RXl RXZ RX3 4l 41 41 41 following is displayed on the screen. -UNDEFINED-UNDEFINED-UNDEFINED- -UNDEFINED-UNDEFINED-UNDEFINED- -UNDEFINED-UNDEFINED-UNDEFINED-UNDEFINED-UNDEFINED- DATA FILE UTILITY PROGRAM (DFU) 4-3 where: UNIT is DEV. is the three-character designation of device where the unit is located. the mass storage SEGS. is the unit. to each logical number of assigned segments DFU/DL Operating Procedures 4.1.5 DFU/DL lists table same execute table table of in DFU/D a as DFU/DL, current This logical unit assignments. except the table is listed on the is the printer. TO type: DFU/DL RUN A logical unit number. the similar UNIT to the DEV. SEGS. RXO 41 41 41 41 RXl RXZ RX3 following is listed on the printer. -UNDEFINED-UNDEFINED-UNDEFINED- -UNDEFINED-UNDEFINED- -UNDEFINED-UNDEFINED-UNDEFINED-UNDEFINED- -UNDEFINED-UNDEFINED- where: 4-4 UNIT is DEV. is the three-character designation of device where the unit is located. the mass storage SEGS. is the unit. number to each logical UTILITY PROGRAM DATA FILE the unit logical of number. segments (DFU) assigned DFU/E Operating Procedures 4.1.6 DFU/E displays the expanded table of current logical unit assignments. with the addition of the file name, the to This is similar DFU/D volume sequence number (1-63), the creation date, and the data length. To execute DFU/E, type: DFU/E RUN A similar table the to following is displayed on the UNIT DEV. SEGS. NAME SEQ. DATE LEN. l RXl RXl RXl 0037 0002 0002 FILEl FILEZ FILE3 l 1 2/ 4/76 1/28/76 3/ 1/76 0010 0002 2 3 4 5 6 7 8 9 10 ll 12 l3 l4 15 - - - - - - - - - - — - UNDEFINED UNDEFINED UNDEFINED UNDEFINED UNDEFINED UNDEFINED UNDEFINED UNDEFINED UNDEFINED UNDEFINED UNDEFINED UNDEFINED l screen. 0002 - - - - - — - — - — - - where: UNIT is DEV. is the three-character designation of device where the unit is located. the mass storage SEGS. is the unit. number to each logical NAME is the name is the SEQ. the file) When logical unit of segments assigned the data data file. the data is the creation date LEN. is the number or to assigned sequence number of that specific DATE using DFU/E number. DFU/EL, of of file. (what volume in a multivolume file. segments used by the data file. failure to mount each where logical units are assigned will either cause will cause the system to stop processing until the is mounted. DATA FILE storage mass an error mass device message or storage device UTILITY PROGRAM (DFU) 4-5 DFU/EL Operating Procedures 4.1.7 DFU/EL lists the expanded table of current logical is the same as DFU/E except the table is listed To execute DFU/EL, type: printer. table the mass storage to each logical on DFU/EL RUN A assignments. the This similar UNIT to following is listed the DEV. SEGS. NAME l Rxl 2 3 4 5 6 7 8 9 10 ll 12 l3 l4 l5 Rxl Rxl 0037 0002 0002 - - - - - - - - - - - - UNDEFINED UNDEFINED UNDEFINED UNDEFINED UNDEFINED UNDEFINED UNDEFINED UNDEFINED UNDEFINED UNDEFINED UNDEFINED UNDEFINED on the printer. SEQ. DATE LEN. FILEl 1 1 2/ 4/76 1/28/76 3/ 1/76 0010 FILE2 FILE3 l 0002 0002 - - - - - - - - - - - - where: UNIT is DEV. is the three—character designation device where the unit is located. SEGS. is the unit. number NAME is the name is the SEQ. the file) The one 4-6 unit logical of assigned to the file. data sequence number of that specific data file. the data is the creation date LEN. is the number of PROGRAM (what volume in a multivolume file. segments used by the data file. number of segments in a logical file in each logical unit. UTILITY of of assigned segments DATE DATA FILE number. (DFU) unit is up to you. COS—310 allows 4.2 LOGICAL UNIT ASSIGNMENTS The assignment greater of logical utilization of The COS-310 THE COS-310 SYSTEM units to mass storage storage characters 256 words 16 blocks 41 segments 61 segments 406 segments II 1 H 1 II 1 segment Rx01 storage Rx02 storage RK05 storage II II II assign logical units configuration. same to capacity capacity capacity devices not currently part of the sys— Determining Logical Unit Size 4.2.1 The provides word block not tem devices area. system handles storage using the following hierarchy: 2 Do the ON works following procedure when all records within file a are the size. the and The size of a logical unit is dependent upon the record size To determine the number number of records required in the data file. of segments required for a logical unit, use the following steps: Step 1 Step 2 Step 3 Determine of 510 is odd, the data characters in a record (maximum If the number The number must be even. make it even. number of characters). add one to deter— number the total from the COS—310 requires two characters to store mined in Step 1; add these two characters to This new total is the record size. Step 1. Determine the total the desired. by multiplying of records number record characters required in the file size found in Step 2 by the number of Step 4 for a Add 512 characters for a file header and 2 characters file trailer. This plus the total from Step 3 is the total number of characters to be used in the logical unit. Step 5 Because the than characters, 8192. in Round logical unit size up any the number is expressed from Step 4 in segments rather be divided by must remainder. following algorithm can be used to perform this calculation by signing values to fields DATA and RECS. The DATA FILE UTILITY PROGRAM (DFU) as- 4-7 RECORD D3 DATA, RECS, FSIZE, RECORD ;Number of data characters per ;Number of records in file. ;Number of characters in file. D5 D15 record. RESULT 'TRUE A18, I RECORD SIZE: ' D3 RSIZE, ' A26, , CHARACTERS FILE SIZE: ' D5 SIZE, A9, , ' SEGMENTS' PROC 2 + 512 RSIZE FSIZE IF l)/2)*2 * RSIZE SIZE XMIT = SIZE (8, + Logical Units On system device, at 2 TO OK the would 1 RESULT) How beginning, + = 4.2.2 the + RECS FSIZE/8192 (FSIZE.EQ.SIZE*8192)GO SIZE OK ((DATA + are Assigned by logical units are which Unit 2; Unit 1, order assigned in a pushdown example, a disk with three from the as: beginning, For end of the device. be arranged, starting logical units Monitor; Directory; to DFU User programs; Unused space System programs; Unit 1; Logical Logical programs may be added; As more logical units are assigned, Logical Logical Unit 3. Logical Unit 2, etc., move closer to the beginning of the devnew user ice. order logical units are assigned in sequential 4 For a disk with of the device. beginning example, starting Unit 1; 2; Logical Unit Logical logical units might be arranged: Unused space. Logical Unit 4; Logical Unit 3; On nonsystem devices, at the Example: Logical Unit Device 1 DKO DKO DKO DKl DKl DKl 2 3 4 5 6 4-8 DATA FILE UTILITY PROGRAM Size (Segments) 5 5 5 2O 21 20 (DFU) The preceding logical unit assignments would cause an RK05 system disk and nonsystem disk (DKl) to be organized as follows: (DKO) Non—system Disk System Disk DKO DKl (I) LU3 E LUZ U E lit-l (D L01 0 '\ U) UNUSED UNUSED SPACE SPACE S (é: o a USER g PROGRAM (SOURCE 8 N U) E BINARIES) a z o SYSTEM PROGRAMS [d m \D M M MONITOR L06 L05 Eng 32 _‘§ 0 DIRECTORY It is advisable to actual data file wastes 4.3 create size LU4 5']: logical units only slightly larger than since a short file in a large logical the unit storage. DISK USERS RK05 disk cartridges each contain 406 segments. four RK05 Up to drives can be mounted on a system. 200 blocks (or 12 Approximately must be to left hold the and segments) unassigned operating system In 50 segments should be left to store addition, system programs. The source control 344 logical programs, segments for programs, and binary programs. unit assignments. This DATA FILE UTILITY PROGRAM leaves (DFU) 4-9 DKO l 12 system programs A 62 406 source and 344 binary files for segments logical unit assignments sample logical unit assignment might be: DKO l 12 system 62 source and binary files The for 4.4 area between logical unit system program DFU 268 free logical logical logical space unit unit 9 unit can be 8 and the system unassigned Explanation than Attempted to use an option switch other Use only allow— /B, /K, /D, /DL, /E, or /EL. option switches. able DEVICE A device Enter INSUFFICIENT SPACE ON ROOM FOR than one usable by the in logical device designation. correct the unit system table. DEVICE are allocate more segments than Either allocate fewer device. Attempted to available on segments, make use ENOUGH other designated was NOT left 10 ERROR MESSAGES SWITCH ILLEGAL 8 overflow. Message BAD 406 360 314 SYSTEM a AND a segments more available, or larger device. FILES was too small to hold sys— PIP OPT- E to put files. and Use program system on one device and files on another. Device designated tem Number number # TOO LARGE SYNTAX Missing ERROR Correct 4-10 DATA FILE UTILITY PROGRAM entered smaller than commas, error (DFU) larger than was and 4095. Enter 4095. extra reenter. characters, etc. 5 CHAPTER The Compiler The by the printer on 5.1 COMP OPERATING execute RUN source the the for a listing map Turn To DIBOL space program. the Compiler outputs storage a COMPILER storage reserves used converts DIBOL source of the before (COMP) program constants, into a binary program compilation records and fields used running the program and variables, and statements and a listing by the program. Compiler. PROCEDURES Compiler program, type: COMP[,filnaml...,filnam7][/xx] where: filnaml...,filnam7 are file(s) no is /xx files to are If compiled into one binary program. buffer in the edit the program specified, be compiled. or is one switches: a combination of the following option and the /N stops output of the compilation storage map listing. /G compiles the program and, if no errors are detect— The ed, executes the binary program; implies /N. message LOADING successfully the program, to be tion. ment /T enables the is listing displayed when If INIT completed. the program must have compiled and executed compiling is SYS an END with ' TRACE function; implies /G. the used is in state— /G op— /D transfers control /0 creates to DDT; implies /G. binary program that requires less memory eliminating the TRACE feature and accuExecution speed of the comreporting. is increased as much as 20%. piled program by This option can be combined with /N or /G. a space by rate error The /0 option saves Saves 0 memory space location one follows: as for each executable statement. 0 Saves one 0 Uses one location for each label. location for ON each ERROR statement. Use the /0 option thoroughly debugged on programs. the command, /N or /G option is specified in the RUN COMP Division and a (Data outputs two-part compilation listing Procedure Division) of the source program and a storage map either on the printer or on the device specified in START, PROC, or END. Unless the Compiler Compiler underscores the number and inserts a caret (“) pointing to ed on the storage map. Errors must can be executed. The The 5.1.1 COS lZ-JUL-78 DIBOL 0100 START 0110 RECORD 0120 0130 0140 0150 0160 0170 0180 0190 0200 0210 0220 0230 0240 0250 number of the the Other errors are list— before the corrected program be line where error an occurs error. errors as nn ERRORS Program Compilation Listing Source DIVISION DATA 5-2 the Compiler displays of WED ;Optional compilation named INBUF. ;Numeric field named INBUF , , , , statement. STOCKN. field named DESC. ;Five—character numeric field. ;Four—character numeric field. ;Unreferencable unnamed field. ;Record named OUTBUF. ;Unnamed numeric field. ;Twenty-five character field. ;Unnamed field. ;Temporary storage field. ;Numeric field named ECOST. D9 D4 A25 D5 D4 ECOST, 01 ;Alphanumeric OUTBUF , PAGE ;Record STOCKN, D4 DESC, A25 UCOST, D5 QORDER, D4 RECORD 8.00 V COMPILATION LISTING COMPILATION STATEMENT OPTIONAL D9 ;Unnamed record-temporary storage RECORD ;cannot TITLE, DIBOL COMPILER A6, 'OVRHED' (COMP) ;Field be directly initialized referenced. 'OVRHED'. to COS 12—JUL-78 DIBOL PROCEDURE 0260 0270 0280 0290 END ;Opens ;‘OUTPUT' ;Transfer OUTBUF=INBUF ;INBUF moved TITLE on V 8.00 PAGE 02 DIVISION PROCEDURE Procedure Division. channel l-input. channel 2-output. on INBUF to to EOF. OUTBUF. IF(STOCKN.LT.100) GO TO LOOP ;Conditional statement. ECOST=UCOST*QORDER ;UCOST times QORDER moved to ECOST. XMIT(2,0UTBUF) ;Transfer OUTBUF onto channel 2. ; GO TO FINI EOF, 0380 FINI LOOP ;Branch control to LOOP. ;Identifies end of logical unit. ;Writes record and closes file. ;Stops program execution. ;Marks the end of the program. (2) (l) END 5.1.2 Storage Map Listing STOP lZ-JUL-78 DIBOL # STORAGE WED TYPE NAME 0001 0002 0003 0004 0005 0006 0007 0010 0011 0012 0013 0014 0015 0016 The of INIT(1,I,TITLE) INIT(2,0, 'OUTPUT') XMIT(1,INBUF,EOF) 0390 0400 NO DIVISION-BEGIN ;Beginning LOOP, 0340 0350 0360 0370 0014 DATA PROC 0300 0310 0320 COS LISTING COMPILATION WED DIVISION INBUF RECORD STOCKN DECMAL DESC ALPHA UCOST DECMAL QORDER DECMAL OUTBUF RECORD ECOST DECMAL TITLE ALPHA ..l ..2 ..OUTP DECMAL ALPHA LOOP LABEL LABEL ..1000 DECMAL LISTING DIM SIZE ORIGIN 01 01 01 49 04 20000 20002 25 05 04 20006 01 01 01 01 01 01 DECMAL EOR MAP 00 01 03 8.00 PAGE ~14 BUFFERS] 20037 20044 20062 20132 20146 20154 20155 20156 10110 10144 20164 49 09 06 01 01 06 01 01 04 01 01 00 V labels ERRORS DETECTED. 08 K CORE storage map lists the record REQUIRED and [3956 field FREE names LOCS and the labels as The information is arranged in they processed by the Compiler. six columns with the following headings: were # 2. contains the internal number of the name in column This number is only used in machine—level programming. DIBOL COMPILER (COMP) 5-3 is the name (field name, record name, program label) or used in literal the Literals are compiled program. numeric or alphanumeric characters which appear in the Procedure of Division the source program. Only the NAME first four characters of a numeric Each numeric literal is preceded by distinguish four map describes the ALPHA used use used used as a record LABEL used as a program less is get Maximum 24K—byte Use 5-4 the for lists the cannot as multiply tempts at flagged as is an TAGl SAVE of error the the of the octal command DIBOL COMPILER to is of name or as a literal. record as or label. label not is label the referenced TO TAGl GO appear is to as the a the pro— in a program label. by printer even in The line effect. used is displayed. of is if number of fields) column name. in The all the meaning— size of a RECORD its labels plus 2. byte memory address of the number of errors the detected, bottom of the is name. memory required, the You storage map. suppress listing of storage map. in a l6K-byte 511. store field numeric a output characters allowed (COMP) of or types of labels. other systems, program. array dimension (number or numeric labels. The the size labels larger does /N option used, the example: For the the labels undefined locations are listed at this information if you or in more defined All at(redefined). definition after the first are errors in the compiler listing. This number gives number storage once the name of an alphanumeric field alphanumeric literal. RECORD alphanumeric of the on than four char— they occur in the program. a double quote and end with in name the name literal. contains free of numeric where number than to literals with as an gram. where and once more with used. single quote. UNDEF*** The only occur are REDEF ORIGIN appear may are periods (..) Numeric name. literals Numeric DECMAL SIZE less or though they as DIM internal listed each time literals begin with acters Record TYPE an characters even program. a as literal two binary program. system is 365; in 5.2 CONDITIONAL COMPILATION PROCEDURE (CCP) Conditional Compilation Procedure (CCP) is a feature which permits to include statements in a source program which will be compiled if you elect to have those statements compiled. only The you included in a program for conditional closed within angle brackets as in the following Statements RECORD compilation are en— example. A D5 Bl, A4 C1, PROMPT, D1 RECORD NAME, N A6 PROC (PROMPT XMIT(8,"ENTER NAMEz') > XMIT(7,N) STOP END The this (<) is followed by a control variable (in Unless the control variable is turned on before the left angle bracket is encountered, statements between the angle brackwill be ignored. A right angle bracket marks the end of a condi— ets tional area and is on a line by itself. The command to turn on a control variable is as follows: case left angle bracket PROMPT). =control variable The above program requires the operator to type in a name on the key— If this same program is recompiled with the control variable board. PROMPT on, it produces a DIBOL program which first displays a message to the operator. RECORD A D5 Bl, A4 C1, PROMPT, Dl NAME, RECORD A6 N PROC =PROMPT ;Turn on prompt. <PROMPT XMIT(8,"ENTER NAME:') > XMIT(7,N) STOP END Conditional in source vari- to statements debug compilation can also be used Once the program has been tested, the control program. able can be removed by deleting the command to turn it on. DIBOL COMPILER (COMP) a 5-5 also allows several similar (but not combined into one source program. CCP If the to programs be variable used in a CCP statement is undefined, the comaside space for it; this is wasteful of automatically used for some CCP, use variables that are already being control will piler identical) set For space. other purpose. The CCP value of a variable (on variable's ordinary DIBOL value. or off) is independent of the CCP variable is used in the middle of a record definition (in the Division of a DIBOL program) the variable must have been previadditional ously defined, otherwise the Compiler will allocate space for it in the middle of a record. If a Data sections can be off will be CCP nested CCP section that is any depth. Any To indicate that certain ignored by the Compiler. statements are not being used, the Compiler listing will not print the line number for that statement. There must be a matching > for each < If this condition is not met, used. the a CCP Compiler generates This error is fatal if angle brackets do not match by ERROR message. to turned end the 5.3 of the SIZE OF program. THE BINARY PROGRAM Each variable uses as many bytes of memory as specified in its data definition statement. For a variable defined as 6D3 rem example: This is 9 words since a word quires 18 bytes of storage. computer consists of 2 bytes. Variables in the defined record in an overlay record being overlaid. Each RECORD statement is reserved for word tions. Each If record the Each number, begins on a length is used storage of a in (in numeric memory with the variables of requires one additional word memory. the COS-310 word count storing during I/O record literal quires length share word odd the literal including leading opera» boundary (an even—numbered byte address). (in bytes), one byte of memory is wasted. Procedure bytes) This Division of DIBOL program re~ equal to the length of the literal. in is equal to the number of digits The the a zeros. fewer characters Each distinct literal with a length of four or apThus, if the lit— pears only once in the space reserved for literals. eral 32 appears three times in the program, it will appear only once the reserved data area. in However, literals larger than four characters require space each time they appear in the program. 5-6 DIBOL COMPILER (COMP) Each statement requires than the Each statement label an overhead of one word. Unlabeled statements with line numbers 1000 more line number require one additional word each. requires word. one previous The number of words of memory generated by mined by the following formula: Add together the Add in the operators Add number include for one The following ous DIBOL each table number of variables and of binary operators +, -, /, subscript shows *, an expression literals can be deter— used. which appear. The binary #- reference. how many words of code are required by vari— statements. DIBOL Table 5-1 of Code Statement Words Requirements of Words of Code Generated No. Statement ACCEPT (y,x) y+x+l 1 label CHAIN chnum CALL chnum+l (line,column,expr) [/list control] DISPLAY END FINI (channel,skipcode) (labell,...,labeln),key (exprl.rel.expr2)stmnt INCR var INIT (channel, (channel, INIT ON ERROR PROC READ dev) dev,filnam[,unit]) label [n] [/list control] (channel,record,number) RETURN START [/1ist control] STOP [NO] TRACE TRAP var= var=expr var=exprl,expr2 WRITE XMIT channel+skipcode+l l label GOTO IF l channel+l (channel) FORMS GOTO line+column+expr+l (channel,record,number) (channel,record[,1abel]) key+n+2 exprl+expr2+3 var+l channel+2 channel+3+filnam+unit l 0 channel+number+record+l l 0 1 l 2 var+l var+expr+l* var+expr1+expr2+l channel+number+record+l channel+record+2 the statement marked with an asterisk (*) 1 if the principal operator of exp: subtract both types are numeric. For in is the previous binary + or -, DIBOL COMPILER table, and (COMP) if 5-7 Example: words of storage, while D = 3+5 takes 4 D = D = 3*5 3+4+5 D = takes takes takes 5 words. Similarly, 6 words while 7 words. 3*(4+5) Additional table label, space is also consists of two or literal used. required by words 5.4 COMPILER ERROR MESSAGES Most Compiler error for the internal symbol table. This each distinct variable, statement messages are printed on the which the error occurs. A ly after the line on message points to in the are listed the approximate location of the listing direct(A) in the error Other error. errors storage map listing. Explanation Message BAD ALPHA Initial value in an definition statement end with a single VALUE ' NUMERIC The VALUE initial value incorrectly was data alphanumeric did not begin or mark. quotation single quotes. Insert BAD source caret numeric field Check and form for a formed. correctly. BAD PROC The # number from digit BAD RELATIONAL An in a 0 to PROC 7. statement Enter 0 was not a through 7. in IF an illegal relational occurs For example, a .GX. instead Retype correctly. statement. of a .GT. CCP Matching angle ERROR COMMA No MISSING comma ed. DATA INITIALIZATION MISSING 5-8 DIBOL COMPILER (COMP) appeared Insert (< or >) missing. where one was expect“ comma. initialization followed a definition statement. or input initial value. No data in a comma bracket brackets. Insert data comma Remove Explanation Message EXPECTED LABEL IS MISSING label required A is missing. Enter label. EXPRESSION NOT ALLOWED A complex expression to occurs a the variable is bad or left of an allowed. character where only and cor- at the end Eliminate extra a of char- = or Find rect. EXTRA CHARS STMNT AT END Extra characters legal occur statement. acters. FIELD TOO ILLEGAL LARGE OR In a data description statement, the di— or more than 3 digits mension was 0 long, or the field size was 0 or larger than 511. Bring size dimensions within limits. 0 A OPERATOR bad in an was encountered an where operator would be cor— with Check and replace character expression expected. character. rect ILLEGAL The STMNT statement tion was statement with not (it a had manipula— data no =) nor did recognizable keyword. sign. appropriate keyword and use start a it Use = INITIAL VALUE WRONG SIZE data The initial value in a specificaa tion statement had length different Make infrom the field size specified. itial LABEL NOT ALLOWED CLOSE PAREN label No OPEN PAREN No OPERAND or in an a parenthesis occurred where Add parenthesis. expected. one where one open was MISSING size. with defined close was MISSING agree the wrong expression was record or a label which had used. Use was been redefined unique label of the correct type. A type MISSING value parenthesis expected. Add occurred parenthesis. an expresbinary operator occurs in or with no operand following it; is occurs where one no expression at all Insert operand and/or appro— expected. priate expression. A sion DIBOL COMPILER (COMP) 5"9 Explanation Message BAD MISSING OR The MODE mode ment was state— INIT designation in an or an with illemissing began gal character. signation. MISSING QUOTE The correct mode Insert statement contained Delete ('). quotes de- odd number of quote when an add or appropriate. MISSING RELATIONAL relational No ment. PREVIOUSLY NAME NOT A OR DEFINED D Enter attempt was made ously defined name. An A character in A D or LABEL A or TOO BIG RECORD STMNT TOO BIG TOO was not a label ‘1abel‘ a oc- required. was for the big binary Enlarge scratch area with too is too complex Simplify the or is nest— statement. close occurred parenthesis Enter appropriate subscript. punctuation. No comma or a The type of Use numeric More ITEMS (COMP) subscript subscript. a was not numeric. in initialized an the field Eliminate excess elements. elements than array dimension. DIBOL COMPILER occurred statement where character Replace E. The statement ed too deep. COMPLEX SUBSCRIPT NOT NUMERIC 5-10 previ— named record exceeded 510 characters in size. Either use unnamed record or reduce the size of record. after MANY D or a name. A SUBSCRIPT ERROR TOO area. OPT- unique label. proper Binary output PIP than A expected. where scratch Use D. symbol which Enter redefine to state- specification was curred PROGRAM other data a with A NOT IF appeared in an relational. legal were are specified in Explanation Message TOO MANY SYMBOLS! fatal message. Only 365 symbols symbol table in l6K-byte sys— in 511 allowed tem, and only symbols The compiler stops comlarger systems. A allowed TOO MUCH DATA NAME no Rewrite and A TYPE produced. exceeds 24K bytes. program. is in or a used which was not defined Division. Define this name name already defined. Mixed data sion, an types occurred in argument which was numeric ments in be was be can shorten program. Data name use storage map Division Data the WRONG DATA in piling; Rewrite UNDEFINED error of the was a not, or one an expres- supposed of the to argu— manipulation statement the Replace wrong type. data data. DIBOL COMPILER (COMP) 5-11 6 CHAPTER DIBOL DEBUGGING TECHNIQUE The DIBOL Debugging Technique If a program is compiled with (DDT) the is DDT used option (DDT) debug binary programs. (/D), the compiled binary to The program automatically branches to DDT upon execution. DDT include breakpoint, variable examination, subroutine back, and iteration. 6.1 To PROCEDURES DDT OPERATING execute a features of call trace- binary with program DDT, type: pronam RUN [ ][,filnaml...,filnam7]/D chain0+chainl...+chain7 where: pronam is the name If the loads and program name is omitted, the Monitor the DIBOL program in the binary scratch area. of the binary program to be debugged. executes chain0+chainl... programs which constitute one into several chained programs. up programs to be debugged. are binary broken large These program are the filnaml...,filnam7 are /D is names the of option additional in the label An /D option. source switch 768 Data files that on the system device. requests DDT. words of memory plus 3 words for each Division are required because of the DDT The DDT. During execution of the program, control is passed to followed by a hy— an appropriate DDT version number displays program phen (-) to indicate that it is ready to accept commands. 6.2 DDT COMMANDS Command variable= Explanation Display the contents Division). variable of Variable (a label have can single from the double or Data sub— scripts. variable=v variable Set equal to (v is v legal any alphanumeric string). If v IN CMD has more is characters than Display the Set the last Set a contents the of variable last examined breakpoint at line at a given time. tive defined Execute variable, ERR the breakpoint at variable examined. equal to v. One breakpoint is breakpoint set at line nnnn. A meaningless because the program >n for displayed. the never nth executes occurrence line of ac- 0 is 0. line nnnn. For example: -$300 ->4 When the fourth line program starts to execute the breakpoint is executed time, transferred CTRL/Z Start is to for the 300 and control is DDT. ‘ If a breakpoint, execution of DIBOL program. Jr at line number nnnn, control reverts to DDT when is reached and the following message is printed: set nnnn BREAK! Type additional commands in response 6-2 DIBOL DEBUGGING TECHNIQUE (DDT) to the hyphen (-). 1 TRAP com— lines from which calls (CALL or made (pushdown stack) during execution of to used This command is generally the DIBOL program. trace the execution of the program after a breakpoint or The is the occurred. system error has usually Display the mands) were shift/six key. While a causes breakpoint is pending, if a DIBOL program error such as ILLEGAL SUBSCRIPT or to NUMBER TOO LONG conmessage appear, trol is transferred to DDT; DDT commands can be used for program examination. If an error is fatal, the DIBOL program cannot be restart— ed by the CTRL/Z command. a DDT Once a DIBOL less a breakpoint program is occurs running or an under cannot be restarted un— with a breakpoint pending. to return to breakpoint but want error DDT, line if you do not require a for program examination if an error number which will not be executed. 6.3 DDT Therefore, DDT ERROR IN occurs, set a breakpoint at a MESSAGES Explanation Message ERR DDT occurs CMD Entered an invalid mand and retry. DDT command. Correct DIBOL DEBUGGING TECHNIQUE the com— (DDT) 6m3 CHAPTER 7 CROSS The Reference Cross It velopment. REFERENCE a is (CREF) Program provides table PROGRAM primarily an aid to program an alphabetical listing of showing labels used in a DIBOL source program, label is defined, and the line numbers 7.1 CREF To execute RUN (CREF) the where line each number label is where used. de- all each OPERATING PROCEDURES CREF, type: CREF[,filnaml...,filnam7] where: filnaml...,filnam7 are the parts of If no files are is used. buffer The CREF table CREF on program reads the the line printer, bytes or use and source specified, (maximum program the program in the lists program, control to returns the the cross-reference Monitor. not minimal amount of error checking is performed by CREF; no be made to cross reference programs having compilation should If CREF finds a line it cannot work with, it prints: A nnnn Is BEING IGNORED where: nnnn 7). edit bytes of memory and can handle any 16K-byte program have an excessive number of symbols and labels. If 24K is available, CREF expands its cross-reference table more to of the available space. does make DIBOL DIBOL 16K requires that a is the number of the line CREF cannot work with. attempt errors. Following is the cross—reference 1-1 of Chapter 1. COS-310 CREF LABEL DEF DESC 130 ECOST EOF 220 390 110 310 170 150 120 260 140 INBUF LOOP OUTBUF QORDER STOCKN TITLE UCOST LABELS V table 8.00 for the DIBOL program 24—MAY-78 WED in Figure PAGE 1 label is REFERENCES 340 310 310 330 320 340 330 280 340 DEFINED BUT NEVER 320 380 360 01 REFERENCED: where: LABEL is DEF is the line defined. the name of the number label in in used the the program. program where the REFERENCES are 7.2 CREF the line numbers where each IS referenced. Explanation BEING IGNORED CREF with. detected Usually statement. statement 7-2 is ERROR MESSAGES Message nnnn label CROSS REFERENCE PROGRAM (CREF) a line means Check line and retry. it cannot work invalid number for DIBOL an valid 8 CHAPTER PERIPHERAL The cal INTERCHANGE PROGRAM (PIP) Peripheral Interchange Program (PIP) moves files between two logi— units, copies the contents of one device onto another, and consol— idates files to space the 8.1 PIP To execute RUN to free remove binary scratch PIP is also used to allocate more area. PROCEDURES OPERATING PIP, blocks. type: PIP[,cmndfl][/n] where: ,cmndfl is stored file PIP commands. containing is on a separate line; no blank lines or comments are used. When the command file is specified, PIP a line from the file each time one of the reads following prompts is displayed: a previously Each command OPTIN- OUT— MORE? TYPES An 24K FILES end—of—file mark quires The OF all responses command file is of memory bytes TO BE SKIPPED terminates to come the from (S,B,V): command file the keyboard. ignored on machines capabilities. with and less re— than Example: If the cmndfl EXAMP 0100 C 0110 0120 0130 RXO .RUN PIP,EXAMP contains: Rxl X Then: indicates the number (0-9) of the binary scratch area. The /n junction the PIP V RUN to allocate used in con— that the time segments to /n switch with OPT- E, but is entered command is typed. at is PIP to the RUN PIP command with: 8.00 (or current version number) of the following options: Option Explanation responds PIP ;will copy RXO to RXl. OPT- Respond with one transfer C D copy device transfer a data E consolidate I copy R you Following is requested by 8-2 space file system file to Monitor transfer transfer X return PIP source displays IN and OUT questions requesting information. summary of the PIP options the IN and OUT questions. a PERIPHERAL file directory and V respond, option-dependent a verify data perform a read/check S After binary file B INTERCHANGE PROGRAM (PIP) and the information being OPT , OUT IN B filnam[,dev] filnam[,dev] C dev dev filnam[/logical unit #] filnam[/logical unit #1 D /K /L /T E ‘dev I dev dev dev dev R filnam[,dev} filnam[,dev] S V 8.1.1 Transfer Binary filnam[,dev] filnam[,dev] File (OPT- E) B in response to OPTfile~oriented devices. to Type move binary a program between two question with the name of the binary program to be moved If no de— optionally, a comma and an input device designation. vice is designated, the system device is assumed. the Answer IN and, the Answer file and, is device If you IN or to the question with the name to be assigned a comma and an device optionally, output designation. designated, the system device is assumed. OUT to attempt OUT message move is data to from or non—file—oriented a output If device, no the repeated. Example: .RUN PIP PIP V8.00 OPT- B ;Request TEST,DKO OUT- TEST,DKl ;File named ;File named IN- OPT- 8.1.2 of binary file. Test from Test to DKO. DKl. X Copy Device Type C in response similar move (OPT- C) to OPT- to copy the contents of one device onto a device. Answer the IN Answer the OUT question with question with device a a device designation. designation. PERIPHERAL INTERCHANGE PROGRAM (PIP) 8u3 Example: .RUN PIP PIP V8.00 OPT- C ;Request a copy between devices. ;Input device is DKO. IN- DKO OUT- DK3 OPT- X 8.1.3 Type ;Output device is DK3. Transfer D in response Answer the number (1-15) Files Data to OPT- (OPT- D) transfer to question with a file preceded by a slash, IN and name or files data answer When devices. optionally, a logical unit the IN question with /K. Answer the OUT question with a file name and unit number or a slash, answer preceded by device switch. Output device switches are: /L /T between a optionally, logical the OUT question with a printer screen the of end the input file is reached, PIP asks: MORE? N TURN key PIP the the and Type to RETURN specify key more if is there no more input or Y and the RE— is treated as input. A negative transfers alphanumeric data only. letter which has the equivalent code. number Examples: .RUN PIP PIP V8.00 0PT- D IN- EMPNAM/l :Dump EMPNAM from logical unit 1 onto the printer. OUT- /L MORE? N OPT- X .RUN PIP PIP V8.00 OPT- D IN- HRPAy,2 ;Combines two data files OUT- PAYFIL/l MORE? Y IN- SALPAY,3 MORE? N 0PT- x 8-4 PERIPHERAL INTERCHANGE PROGRAM (PIP) into one output file. Consolidate Space 8.1.4 in Directory (0PT- E) to consolidate the free blocks on the input files on the output device. It is possible to or kinds of files erase one or two of (source, system) binary, file Free blocks are shown in the the consolidation. directory during and are created when a file is deleted from the directory. The boot— strap, Monitor, and logical units are not copied by OPT- E. in E Type response store and device Answer the IN Answer the OUT the the nates the with question free a device system device the space device a question with consolidating When OPT- to as shown files r r e e e e files after itself, onto DEVICE f f files designation. OPT- PIP elimi- E below: SYSTEM before designation. (SYS) logical logical logical unit unit unit 8 9 10 files logical logical logical unit unit unit 8 9 10 free another consolidating a device other than the system device onto device, PIP OPT- E consolidates the free space but does not COpy logi- When cal units. NONSYSTEM f before files The following idated, and TYPES f files I OF message stored. FILES TO I e e e e files after DEVICE logical logical logical unit unit unit 8 9 10 files free asks The BE which files you do files you choose to SKIPPED not want skip will copied, be consol— erased. (S,B,V): PERIPHERAL INTERCHANGE PROGRAM (PIP) If files all RETURN key. (erased), type separated by The a be to are If one one or a following example source files from DKO and stored, the type the types of files are to be skipped B combination of two of the characters S, V, or and comma consolidated, copied, two of followed the by consolidate DKl. will to RETURN free key. space will but not copy Example: .RUN PIP PIP V 8.00 OPT- E IN- DKO OUT- TYPES DKl OF FILES All CTRL keys is completed. 8.1.5 TO BE SKIPPED until ignored are Allocate Space to Binary The PIP OPT- E is used in the binary scratch area. mand. Extremely large the two The the PIP S OPT- Scratch Area E consolidation operation (OPT— E) with /n to change the /n is typed along with the RUN conjunction The need programs may more space (32 blocks) usually allocated segments can be allocated with size PIP available than the binary PIP OPT- E. to of com— in scratch PIP operation will allocate two additional segments (32 This particular operation the binary scratch area on DKO. the /n option typed in the RUN PIP command. following blocks) uses nine to Up area. DIBOL segments (S,V,B): to /2 as .RUN PIP/2 PIP V 8.00 The size OPT- E IN- DKl OUT- DKO TYPES OF FILES BE SKIPPED (S,V,B): following information is helpful of the binary scratch area. 0 If the binary the two number mand. 8-6 TO when using OPT- E to change the input device, the size of the output device equals the sum of in the segments normally binary scratch area plus the of segments stipulated by the /n in the RUN PIP com- output device scratch area is not on PERIPHERAL INTERCHANGE PROGRAM the the (PIP) o device is consolidated onto itself, the binary scratch is set either to the size of the current area or to 2+n, a device onto itself C an whichever is less. Compressing shrink the binary scratch area. The binary scratch area cannot be expanded if a device is being compressed onto itself If a area that because Copy and Verify in response to OPT- and verify the copy. Answer the IN Answer the OUT I over existing files. PIP command, the size same the the as binary binary (OPT- I) device Type require writing If /n is not specified in the RUN is to be scratch area assumed scratch area of the input device. 0 8.1.6 would question to with copy device a question with a entire an device onto similar a designation. device designation. Example: .RUN PIP PIP V8.00 OPT- ;Request copy and verify. ;Input device is DKl. I DKl OUT— DK2 IN- If Type Answer No OUT DK2. configuration includes bytes of memory. 32K Perform R is machine your require 8.1.7 ;Output device X OPT— a in reply the IN Read/Check to OPT— question an LQP printer, OPT- PIP I will (OPT— R) to verify with the the readability designation of of the a device. device to be read. question is displayed. Example: .RUN PIP PIP V8.00 OPT— R IN- DKl OPT- X ;Request Read/Check. ;Read contents of DKl. PERIPHERAL INTERCHANGE PROGRAM (PIP) 8--7 Transfer 8.1.8 Source S in response to file—oriented devices. Type Files (OPT— S) OPT— to transfer source files between two the IN question with the name of the source file to be trans— ferred If and, optionally, a comma and the input device designation. no device is specified, the system device is assumed. Answer the OUT question with the name to be assigned file and, optionally, a comma, and the output device no device is specified, the system device is assumed. Answer to the output designation. If Example: .RUN PIP PIP V8.00 OPT— ;Request transfer of source file. ;Transfer TEST from DKO. ;Receive TEST into DKl. S IN- TEST,DKO OUT— TEST,DK1 OPT- If you IN or X attempt OUT 8.1.9 to transfer to or from a non-file-oriented device, the between two question is repeated. Transfer (OPT— V) System Program V in response to OPTfile-oriented devices. to Type move system a program to be of the the IN question with the name system program transferred and, optionally, a comma and the designation for the input If no device is specified, the system device is assumed. device. Answer Answer the file, and, no device OUT question optionally, is specified, with a the comma the name and system be to assigned the output device device is assumed. to the output designation. If Example: .RUN PIP PIP V8.00 OPT— V SORT,DKl OUT— SORT,DK3 IN- OPT- If you IN or 8-8 X attempt OUT ;Request transfer of system program. ;Transfer SORT from DKl. ;Transfer SORT to DK3. to question transfer is to or from a non—file-oriented device, repeated. PERIPHERAL INTERCHANGE PROGRAM (PIP) the 8.1.10 Type Return in X to Monitor response to (0PT- X) 0PT~ to terminate PIP and return to the Monitor. OPT— x feature is useful when PIP is included in a string of Mon— This itor commands and PIP program in a BATCH program. The OPT- x signals the end of the the next Monitor command in the BATCH program is exe- cuted. 8.2 PIP ERROR MESSAGES Explanation Message BAD DIRECTORY on to reference or store a file a with a damaged or nonexistent directo— Only files with directories can be used. call is the directory damaged, your Attempted device ry. If Software COMPARISON ERROR Specialist. disverification part of OPT- I found a of information between the original its copy. If Retry the operation. a have media continue, discrepancies you problem or a hardware problem. The crepancy text and ILLEGAL NO ROOM DEVICE SWITCH OPT- D that switch was specified for /K for input or /L or /T for output. of the allowable switches. one A was not Use Attempted to store a file Stipulate another device. PERIPHERAL on INTERCHANGE a full PROGRAM device. (PIP) 8-9 SORT is CHAPTER 9 PROGRAM (SORT) utility program that arranges to needs. according your fixed-length records. SORT a files data the records within The data files must COS-310 contain command file Before you can execute SORT you must write a SORT the records to be sorted, specifies labels for input and defines to be in used put files, and designates the arrangement (key) that out- the sort. command file rearrange one data file at a time. file for each file sorted. SORT uses a must be separate SORT command The SORT ately. a file command A merge There file each volume of a multivolume separ— then be done to combine the volumes into one sorts must pass to file. 9.1 To SORT OPERATING execute RUN SORT, PROCEDURES type: SORT,cmndfll...,cmndfl7[/L] where: cmndfl]...,cmndfl7 is the SORT command file than This one file. the specifies designates the arrangement (key) to files are specified, the command file in sorted, files, If /L no which can be as more stored file defines the records to be for and labels input output and buffer is used. lists the SORT command file on the printer. be used, the edit 9.2 SORT COMMAND FILE The command file storage device. SORT mass Division and Record 9.2.1 The to Record be an is The created with editor commands and written on a command file consists of a Record Descriptor INPUT/OUTPUT Division. Descriptor Division Division defines the division has the form: fields within Descriptor stored. This the records and is DEFINE Fs, xn where: is the division first statement DEFINE (must be heading in the DEFINE) the file. the fields in the record (must be P). All fields be defined in the Record Descriptor Division and numbered in the order they appear in the record. These F5 are must numbers (5) with l, are nonskipped sequential, begin and cannot exceed 511. Total record size cannot exceed 510 characters. xn represents field and of the the number type (alphanumeric characters Each field descriptor statement (F5) is and is terminated with the RETURN key. (1-510) in or the numeric), field. consecutive lines names of and INPUT/OUTPUT Division specifies the input files and how many logical units are to be used for work areas the SORT operation. This division has the following format: during 9.2.2 entered on INPUT/OUTPUT Division The INPUT [SORT KEY [filnam][/logical unit #][,filnam][/logical /logical unit #,...logical unit #1 n Fs[(m,n)][-],... [filnam][/logical unit #] OUTPUT END 9-2 SORT PROGRAM (SORT) unit #] output where: INPUT [filnam][/logical unit #][.filnam][/logical unit #] to be is the name of the file containing the records If sorted. no name is specified, SORTIN is assumed. If the command file is used for a separate merge opera- the second file tion, merged with the first. is the name of a file to be the The logical units identify the file. storage location of [SORT n name /logical unit #...,logical unit #1 is as the number work of logical units during the sort. If $WORK2...,etc. (n) areas labeled $WORK1, is not present, work units should file. The input units. KEY Using (3 to 7) to These work the SORT be used areas are statement 4 units are assumed. The size of the be as large as one volume of the logical unit numbers are default work default units bypasses the MOUNT message. Fs[(m,n)][—],... to number(s) of the field delimit the The [(m,n)] key. part If no be used as a SORT charkey. are entire field is used as a acters the specified, The order. SORT key. requests a SORT in descending to eight fields or parts of fields can be specified Up The total size of the which for the SORT key. fields Fs be of is the field used as the the field to name (F) and SORT — the key cannot be larger than 510 characters. is done left to right. leftmost The is key most and the leftmost character in each significant, key field is most significant for sorting purposes. comprise The OUTPUT SORT [filnam][/logical unit #1 is the file name to be given to the sorted records. If this statement is missing, SORT assigns the name SRTOUT For multivolume files, to the output. the names $TMPnn (nn can be any two—character numeric from 00 to 99) are used. The /1ogical unit number is the default unit for the output file. END terminates control program. SORT PROGRAM (SORT) 9-3 Following 9.3 To is an example 0010 0020 0030 0040 0050 0060 0070 0080 0090 DEFINE 0100 OUTPUT 0110 END INPUT SORT KEY execute SORT a command file: ;Part number. Fl,D6 F2,A30 F3,D7 F4,D6 F5,D6 MERGE RUN of ;Date. PRTFIL/l 4/2,3,4,5 file ;Data name. ;Work units. Fl-,F4 ;Sort part numbers in descending ;Sort date in ascending order. ;Sorted data file name. PRTFIL/l order, OPERATING PROCEDURE SORT as a operation, merge type: SORT,cmndf11...,cmndfl7/x[L] where: cmndfll...,cmndfl7 is the command file (possibly in stored two or more files). /x is one of the following switches: /A names of from files to be merged are entered the in to FILE LAanswer the INPUT keyboard message BELS:. The output data file and default unit name are in the OUTPUT line of the command specified file. /M names of files line of INPUT to the be bypasses the message /n files merged SORT INPUT listed in the This option file. are command FILE LABELS:. files must have be merged (all of the is listed in the INPUT line name) of command file. This checks for the number with the same name on the number of default files units as specified. If the number of units speci— fied is more than the number of units shown on the name of the SORT same SORT control INPUT line, a MOUNT message is for those files not on the INPUT line. to dis— played /L 9-4 can optionally and lists SORT PROGRAM (SORT) the be SORT used with any of control program the on above the switches printer. Merge Using SORT and the /A Option 9.3.1 To the use write SORT program with is Following 0100 0110 sample a the /A option to merge data first files, file. command file named PAYKEY: DEFINE F1,A6 F2,D5 F3,D11 0120 0130 0140 0150 0160 0170 0180 To command SORT a INPUT SORT 3/l,2,3 KEY F2 OUTPUT PAYROL/6 END this execute sample command file with the SORT and program the /A of the option, type: SORT,PAYKEY/A ~RUN The program displays the data files to be merged: INPUT FILE Enter to at two up least a To the a 0100 0110 0120 0130 Enter file names and default units, the program is exethree SORT work units: logical units 1, 2, and 3. file is PAYROL; the sorted file is stored on unit 6. are SORT is names the program a the with the /M Option /M option to merge data files, first file. command Following request the maximum of six data file names and default units. or the error message N0 INPUT is displayed. Merge Using SORT and use to names you enter There cuted. The output data 9.3.2 message LABELS: After write following sample command file named PAYKEY: DEFINE F1,A6 F2,D5 F3,Dll 0140 INPUT 0150 SORT 0160 0170 OUTPUT 0180 END KEY PAYROL/4, 3/1,2,3 PAYl/Z F2 PAYROL/6 SORT PROGRAM (SORT) 9-5 To this execute sample command file with the and the /M INPUT line of SORT program option, type: .RUN SORT,PAYKEY/M input data file control file: The the PAYROL PAYl on To Merge Using use the the file, the SORT same name, common name be to logical unit logical unit on The output data 9.3.3 names are found in the unit 6. 4 2 PAYROL, SORT merged is the and put on logical /n Option files with data program with the /n option to merge first write a command file. The INPUT line contains to the files and the default units where the files are found. Following is 0100 0110 0120 0130 0140 0150 0160 0170 0180 To The 9-6 sample command file named PAYKEY: DEFINE F1,A6 F2,D5 F3,Dll INPUT SORT KEY PAYROL/4,2 3/l,2,3 F2 OUTPUT PAYROL/6 END this execute option, a sample command file with the SORT program and type: .RUN SORT, input data PAYROL on PAYROL on PAYKEY/Z files to be logical unit logical unit SORT PROGRAM (SORT) merged 4 2 are: the /n 9.4 SORT ERROR MESSAGES Explanation Message BAD DIGIT NUMERIC IN INITIAL VALUE character in a numeric iniUse only numeric characters tial value. in initial numeric values. Alphanumeric BAD RECORD contains File SIZE All length. the be same of records variable records to be stored must record Redefine length. length. BAD WORK Number COUNT UNIT of work work Specify units in 3-7. range within allowable not units range. EXTRA CHARS FIELD NUMBER MISSING AT Characters not relating to statement apon Delete any the statement line. pear from statement nonessential characters lines. END STMNT OR 0 Field number is missing, than or equal greater missing number 1 ILLEGAL SORT and Bad KEY or to enter is or is 0, 512. Enter the a number between 511. syntax KEY on statement, KEY complex, or Review key file. information statement and KEY too missing. correct com- mand ILLEGAL INITIAL UNIT ALPHA VALUE Default unit Correct command DOESN'T BEGIN WITH is 0 or than greater 15. file. QUOTE Beginning quotation mark missing for initial value. Put single alphanumeric the iniquotation at the beginning of tial INITIAL VALUE TOO INITIAL VALUE TOO SMALL BIG value. The initial value is specified larger than the field size. Either define a of larger field size or reduce the size the initial value. The initial value specified is than the field size. Either the field size or increase the the initial value. SORT PROGRAM smaller redefine size (SORT) of 9-7 Explanation Message MISSING CLOSE QUOTE ON ALPHA INITIAL VALUE of the MISSING INITIAL VALUE not inserted after Comma was COMMA AFTER FIELD NAME No Add an but initial value Either delete comma value. NO end specified at the alphanumeric initial value. missing close quotation marks. Quotation mark comma or specified. insert or character a not size and type was other initial than comma after the field name. specified Enter the missing comma or delete incor— was rect NO A OR and then the enter comma. Input file is null or not enough input files Two files specified for a merge. are needed two to execute a merge. Use nonempty files. INPUT NOT character character other than A or D occured in data specification statement where A or D was expected. command Correct the file. D A a NOTHING AFTER FIELD NAME Field after command NUMBER REPEATED OR OUT OF and type field size and name Correct the used more file. ORDER field sequence once or is than A Correct sequence. OUTPUT specified not are comma. number out of the is ascending command order file. error. Start SORT Indicates an I/O If it continues, check for media or hardware problem. ERROR over. TOO MANY FILES more specified. Specify files UNIT xx IS FREE for This tive is that are merge not an message free. 6 than Merge only, command file. error. It showing the xx is a files than six input more no is COS an informa— logical units logical unit number. UNRECOGNIZABLE 9-8 LINE SORT PROGRAM (SORT) Parameter line keyword. Correct did not the start command with a good file. CHAPTER 10 FILE EXCHANGE PROGRAM (FILEX) File Exchange Program (FILEX) transfers files between diskettes in format and any COS—310 file storage device or any OS/8 file universal on an RK05 disk or from to disk(OS/8 files cannot be transferred The ettes). Files are transferred in of one three formats: ASCII, IMAGE, or EBCD- The EBCDIC format is compatible with diskettes (universal format). an IBM 3741 produced by except when using multivolume universal inter— IC change files 10.1 or UNIVERSAL when bad mapping sectors. DISKETTE diskette contains 77 tracks (some of which cannot be used A sector Each track has 26 sectors numbered from 1 to 26. contains one record of 128 characters or less. (See Figure 10—1 for a visual representation of a universal diskette.) universal for data). A A record in preceded by record a a a COS-310 file word count is assumed and to be independent a of string sector of characters A boundaries. universal diskette in EBCDIC format must begin on a sector and one record is allowed per sector. If the record boundary only does not fill a sector, the remainder of the sector is filled with blanks. Since these restrictions make EBCDIC format inefficient and wasteful of space, only use EBCDIC when you must read or write disk— ettes compatible with IBM 3741 format. on Track 0 of the the describes diskette has a contains the universal diskette diskette. Each of files on the specific function. information the 26 sectors which on a 10- p. .» I Function Sector 1-6 Reserved. 7 Identifies the diskette format. If bytes 0—3 contain VOLl diskette is assumed to format directory. remainder of which FILEX does The 8-26 Contain sectors 128 tails number to Each 7 sector not in EBCDIC have a characters, universal contains other the interchange information use. the the labels or These directory entries. contain information such as record length (up For further de— characters) and creation date. on these sectors refer to the IBM manual, form GA21-9128—0. byte in sectors 8-26 has a Function Bytes 0—3 special function. Are for HDRl label (DDR1 identification if the file has and contain been delet- ed). 6-13 Contain the file 23-27 Specify the record 29—30 Contain name. length. EBCDIC two identify the track ning of the data. 31 Must 32-33 Contain be EBCDIC two 0 Contain the reserved for EBCDIC 0. 38-39 Contain identify reserved 48—53 10-2 FILE EXCHANGE PROGRAM Contain (FILEX) which begin— (360 octal). EBCDIC identify the sector ning of data. 35-36 characters number at the characters number at the of number this file. the Byte last track 37 must be characters EBCDIC the number of the last for this file. two creation year, month, which begin_ and which sector day. Function Bytes 75-76 Contain 77 Must 78-79 Contain be the track EBCDIC the number. 0. number of the next unused sector. ‘5 esqxe 14 u 15 (I 2 [/‘i 4 r FlCATlON a?\\ Figure 10—1 Universal FILE Diskette EXCHANGE PROGRAM (PILEX) 10~3 in universal are never used a interchange universal diskette is stored in either 7—bit data on a ASCII format is equivalent to data written as ASCII or 8-bit EBCDIC. a continuous string of bytes ignoring sector boundaries; records are terminated by a carriage return/line feed. The first record of a file on a sector boundary. All character code translation and must begin record blocking is done implicitly by FILEX and need not be explicitly COS-310 character codes All file. specified. File extensions name format; change are universal inter— normally recognized in single eight-character file name is used. has degree of compatibility with 08/8, FILEX not instead, a In order to provide some been designed to accept a six—character file name with a two—character than six extension. If a file name on a universal diskette has more File names characters, it must be entered in the format of filnam.ex. it or between must not include spaces anywhere within the file name and the extension. 10.2 To FILEX OPERATING execute RUN FILEX, PROCEDURES type: [,cmndfl] FILEX where: is ,cmndfl the table name of of a desired containing previously created file logical unit assignments. a the the command file option is not used, FILEX uses logical unit assignments already in the system. If RX02 command file is used, FILEX uses a special that reads and writes RXOl compatible diskettes and assigns logical unit numbers on RXOl and RX02 disk~ the same system, provided the system is con_ in ettes kind this for RXOZS. usually Assignments of figured cannot exist on the same system. If the handler These RX02 completed, become the Following FILEX V8.00 OPT Enter or Z, 10-4 (C, D, of the one (or L, X, however, all in logical When effect. units assigned FILEX to is RXOls undefined. FILEX RUN remain assignments command, the program displays: version number) current 2): options; Zero (clear). FILE EXCHANGE PROGRAM C, COPY; (FILEX) D, Delete; L, List; X, exit; 10.3 (OPT:C) COPY If you select op— copies the contents of one file onto another. the tion C, system requests the input mode (the directory structure and the file format) of the file to be copied. OPT:C INPUT (A, MODE Type the letter ASCII (A), 10.3.1 is (D), Data ASCII format ASCII U): corresponding COS—310 05/8 D, the input mode Universal (U). OS/8 used: be to (Mode A) Input that to or by 08/8. used If you select input mode the A, displays: program FILE Type the NAME: file and name the device designation in the form: following filnam[.ex][,dev] where: filnam[.ex] is six-character or less file name plus extension the identifying a optional an file two—character to be input. is a three-character device designation. 08/8 RXOl and COS-310 RXOl diskettes are incompatible so do not specify an RXn device designation. ,dev If the device assumed. If the file is not specified, given already exists, name FILEX the system device is displays: REPLACE? Type Y Having for YES, N or established OUTPUT Sections MODE 10.3.4 any the (A, D, other character input file S, name, for the NO. program displays: U): through 10.3.4.4 explain the OUTPUT FILE EXCHANGE MODE. PROGRAM (FILEX) 10-5 If (Mode D) COS-310 Data Input 10.3.2 you select FILE the input mode D, program displays: NAME: Type the file filnam logical unit # the and name unit [/logical in the following form: identifying the #1 where: filnam is be six—character a been OUTPUT Sections 10.3.3 If you given the MODE (A, 10.3.4 DISKETTE logical unit where input file D, S, Input mode input DATA the name, MODE the program file FILE Type the to one of is found. displays: U) the OUTPUT MODE. (Mode U) U, the (A, I, program displays: U): Type the letter corresponding to the diskette data mode U, Universal. A, ASCII; I, Image; If you select any gram displays: file , the through 10.3.4.4 explain Universal select name #1 identifies Having less input. unit [/logical or the diskette data modes A, I, to or U, be used: the pro— NAME: input file name in the following form: filnam[.ex][,RXn] where: filnam[.ex] name an or less is a six-character optional plus the identifies This name extension. two-character input file. 10-6 FILE EXCHANGE PROGRAM (FILEX) is ,RXn n After you type the file OUTPUT Sections 10.3.4 MODE 10.3.4 (A, D, through Output Modes If you OS/8 select FILE RX; file; S, ASCII displays: FILEX name, U): S, 10.3.4.4 explain the (A, D, S, U) are: A, 08/8 ASCII; The four output modes COS-310 source file; 10.3.4.1 be Must three-character device designation. it is mounted. on which the drive represents a and U, Universal OUTPUT MODE. D, COS-310 diskette. data (Mode A) Output output mode A, the program displays: NAME: Type the file and name the device designation in the following form: filnam[.ex][,dev] where: filnam[.ex] is a six-character or less file name plus an optional This file name identifies the two-character extension. file where output is to go. is three—character designation is to go. OS/8 RXOl ettes are incompatible so do not ,dev of a the and output the device COS-310 RXOl specify an RXn where disk— device designation. If the device assumed. Type the OPT file name; (C, OS/8 files D, L, FILEX X, is not executes specified, the the transfer and system returns device is to: Z): For this and other always multiples of 16 blocks long. be files reasons, resulting 08/8 output may longer than necessary. Use the 05/8 PIP program /A to recover the unnecessary space. are the FILE EXCHANGE PROGRAM (FILEX) 10-7 COS-310 Data File 10.3.4.2 If you select FILE Output (Mode D) output mode D, the program displays: NAME: Type the file name logical unit # and in the following form: filnam[/logical unit #1 where: filnam is a six—character where output is to /logical less or identifying name the file go. unit # identifies the unit logical where the output transfer and returns file is found. Type the file OPT (C, 10.3.4.3 If D, FILE Type the L, X, executes the to: 2)): COS-310 Source select you FILEX name; File Output output mode S, the (Mode S) displays: program NAME: file name in the following form: filnam where: filnam is output file The To is a six—character or COS—310 output file. correct file, do 10-8 a the generated 16 directory entry FETCH and a WRITE as less blocks to name to be assigned to the length of the long. reflect the actual follows: file have just created. FE filnam ;Fetch WR filnam/Y ;The WRITE command enters the correct file The /Y switch ;length into the directory. message response when ;bypasses the REPLACE? ;a duplicate file name is encountered. FILE EXCHANGE PROGRAM the (FILEX) you Type the file OPT 10.3.4.4 If (C, X, executes MODE diskette to: returns Z): output mode U, DATA and transfer the Universal Diskette Output DISKETTE three L, D, you select The FILEX name; (A, the I, data modes (Mode U) displays: program U): ASCII; A, are: I, Univer— U, Image; sal. Select diskette data mode A the program displays: FILE Type the (ASCII), I (Image), or U (Universal), and NAME: file in name the form: following filnam[.ex][RXn] where: filnam[.ex] is a or six—character two—character extension less to plus assigned name be optional an to the output file. is ,RXn n If you and selected returns OPT (C, Must three—character device designation. the drive on which it is mounted. represents a diskette data mode A or I, FILEX performs the be RX; transfer to: D, L, X, Z): An ASCII diskette data mode A or I, sector boundaries are ignored. transfer (A) deletes nulls and rubouts, removes parity, and terminates writes each record with a RETURN. An Image transfer reads and (I) each byte exactly. The net effect of an Image transfer is similar to, and, in most cases, indistinguishable from an ASCII transfer. In If you selected OUTPUT diskette RECORD SIZE data mode U, the program displays: (DEFAULT=80): a number (1-128) representing the size of the output record. If In this unirespond with RETURN, the record size defaults to 80. is versal diskette data mode, one sector is equal to one record which line. to one equal Type you FILE EXCHANGE PROGRAM (FILEX) 10-9 Type the output record size; FILEX performs the transfer and returns to: OPT (C, D, Figure 10-2 is tion L, a X, Z): visual representation of the execution of the C op- in FILEX. D: L! x! Z): INPUT MODE (A, D, U)t OPT (C, 1 1 _DISKETTE DATA MODE OUTPUT (A, FILE NAME: MODE (A, D, I, S, U): U): lIW I FILE NAME: DISKETTE DATA MODE (A, I, U): ( FILE NAME: FILE OUTPUT Figure 10-10 FILE EXCHANGE 10-2 PROGRAM RECORD SIZE Flowchart of FILEX OPT:C (FILEX) NAME: (DEFAULT = 80): 10.4 (0PT:D) DELETE deletes a single file from select option D, the program OPT:D the you displays: FILE universal diskette directory. If NAME: Type the file in name the form: following filnam[.ex],RXn where: filnam[.ex] is a six-character or less file name plus an optional extension which identifies the file to be two-character deleted. is the three-character designation of Must be RX; which the file is found. drive on which the device is mounted. ,RXn Type 10.5 the file OPT (C, LIST D, DISKETTE the X, the file and returns device the identifies on the to: Z): (OPT:L) OPT:L displays If directory. Type the mounted. L, deletes FILEX name; n a listing you DRIVE number After select of all diskette NUMBER: the drive on number, FILEX displays corresponding you files in the universal the program displays: the option L, type the to which a diskette the table similar is to following: RESERVED USED DATE 73 73 576 ASCZ IBMZ 73 73 576 73 193 03-JUN-76 03-JUN-76 03-JUN-76 03-JUN-76 03-JUN-76 <EMPTY> 910 0 (EMPTY) 0 <EMPTY> 0 0 0 0 O 0 0 0 0 0 0 NAME IMAGE ASCII IBM <EMPTY> (EMPTY) <EMPTY> <EMPTY> 73 193 FILE EXCHANGE PROGRAM (FILEX) 10-11 <EMPTY> 0 0 0 0 (EMPTY) 0 <EMPTY> 0 0 0 0 0 0 0 (EMPTY) <EMPTY> <EMPTY> <EMPTY> 0 0 where: is NAME either the file name or a designation for empty an area. RESERVED is either the number of sectors reserved for a file or the number of sectors available for additional files. There is space for a total of 19 files using a total of 1898 sectors. USED is the number DATE is the creation date then FILEX OPT returns (C, D, 10.6 EXIT OPT:X returns 10.7 ZERO OPT:Z for is OPT A zeroed rectory. any files the used by the file. file. Z): X, the to COS—310 Monitor. (OPT:Z) (clears) files. the of actually to: control DISKETTE zeroed sectors (OPT:X) zeros new Type L, of If DRIVE an you universal entire select option Z, diskette and makes it the program displays: ready NUMBER: corresponding to the drive on which the diskette When zeroing is completed, FILEX returns to: number to be mounted. (C, L, D, X, Z): universal diskette has This reserves 1898 can using OPT:D 10-12 FILE of be transferred to one this FILEX. EXCHANGE PROGRAM file sectors (FILEX) diname entry (DATA) in the Before (the entire diskette). diskette, DATA must be deleted 10.8 FILEX ERROR MESSAGES The most common error message is a return caused by inputting an answer, usually a Check mat. the format of your answer and Message BAD to file the This options. name, in the wrong is for— retry. Explanation DIRECTORY to reference or store a file on a device without a or on a device directory where the directory has been destroyed. Only devices with directories can be used. If the directory is damaged, call your Software Spe— Attempted cialist. DEVICE system failed in an write to a device. Check for media problem ERROR The or check FILE ALREADY EXISTS A for from attempt to read Retry the operation. or (use PIP OPT— R), hardware problem. file name already on the entered in response was universal to the diskette output The system returns message. Start the option D, L, X, Z): (C, again and use a unique file name. NAME: to FILE OPT sequence source output file exceeds 16 blocks; The file too large for device. output it then can and system outputs as much as COS—310 FULL IBM the error Use larger de— message. reduce the size of output, or determine the loss is worth the change. displays vice, if ILLEGAL information contains a device in agreement with the logical unit information. indevice Stipulate new formation. The file that is DEVICE INSUFFICIENT SPACE ON name not DEVICE are allocate more segments than Either allocate fewer a device. or available, segments segments, make more device. use a larger NO END Attempted to available on No end—of-file mark in the the input file. 05/8 input file. (FILEX) 10-13 Correct FILE EXCHANGE PROGRAM Explanation Message NO is available for the file in the outdevice directory (OS/8, IBM). Delete to make space or use device with a directory ROOM No room put space. NOT ENOUGH ROOM FOR SYSTEM AND FILES Designated files. on NOT one The FOUND tem NOT # UNIVERSAL TOO LARGE SYNTAX TOO BIG 10-14 ERROR DISKETTE? device a both comodate Use PIP device and is that the OPT— too small system program E to put system files to ac— and the program another. on The sys— input file name was not found. Check the directory displays FILE NAME: the name of name.found in file for a a the a device universal floppy. iversal floppy. Requested The number of ceeded 4095. file is file. The containing formatted the system. Enter directory. not contain device with un— that does Request a segments ments on in a logical unit logical unit assign— Reformat the incorrectly. the It too exceeds The record is large. or for source file characters output Reduce characters for data file output. size of the record. FILE EXCHANGE PROGRAM (FILEX) ex— 120 510 the PATCH 11 PROGRAM (PATCH) fix (patch) either a system program or the Monitor on All input information for the PATCH operation is distributed as official patches from Digital Corporation. Equipment No other informainformation is a line-by—line dialogue. The patch PATCH a is CHAPTER used COS-310 tion to system. should be used. (files) and the Monitor consist of blocks of numerical information coded into machine language instructions and stored on the These machine language instructions are numbered from system device. 0 to 377 octal. PATCH reads one of these blocks, allows you to exam— ine and/or change individual words within the block, and writes the block back out to the system device. System programs 11.1 To PATCH execute RUN PROCEDURES OPERATING PATCH, type: PATCH[,cmndfl] [/C] where: ,cmndfl is previously a command is stored file of PATCH commands. Each separate line; there can be no blank lines or comments. When the command file is option PATCH reads a line from the command file specified, each time one of the following prompts is displayed: FILE on a NAME: BLOCK: LOCATION: NEW VALUE: RELATIVE After or from the an the last error CHECKSUM: line of the command file has been is encountered, all responses must used come keyboard. 11-1 /C changes the blocks the After the RUN PATCH PATCH V8.00 FILE /C option, PATCH patching system device. displays: OPTION the displays: program (or current version number) o The o /N of name /X is you enter be patch for a printed file a to as provided by DIGITAL: patched. the Monitor. The responds system MONITOR. indicate to EXIT file the indicate to PATCHING If TO UPDATE C NAME: Respond with the following information o operation CHECKSUM CORRECT--USE command, Without /C, but does not When run without system device. the on simulates the change the file on the PATCH the end of the PATCH-operation. The and control returns to the Monitor. name or /N, PATCH message displays: BLOCK: or END with either to indicate If the block Answer the number that number is no corresponding more typed, blocks the are program to a be to block within a file, patched. displays: LOCATION: to corresponding Respond with either the number patched, or END to indicate that no more locations If a location OLD is number VALUE: typed, the program a are location to displays: nnnn where: is nnnn This display requires NEW 11-2 the old no (current) input VALUE: PATCH PROGRAM (PATCH) and value is at the followed location. by: be to be patched. the new value as indicated The program displays: Enter TAL. in the information supplied by DIGI— LOCATION: with Answer patched, If END or is either the END indicate to typed, RELATIVE the number corresponding that program no more to are to be to be patched. displays: CHECKSUM: Enter the checksum from the information supplied by checksum is correct, the program displays either: NEW location a locations PATCHED BLOCK DIGITAL. If this OK or CHECKSUM The CORRECT—-USE OPTION C TO UPDATE been accurately entered. to Use option C the update Once the program is updated it cannot be changed except by another PATCH routine. asks Following the OK statement, the program for another block number where patching is to be done: patch has program. BLOCK: If no more If further patching information is available, enter it. Following END the program patching information is provided, type END. displays the number (nn) of blocks patched within the file: nn BLOCK(S) PATCHED With this statement be patched. Enter FILE NAME: the file name the as IN THIS program FILE requests the supplied by DIGITAL. name If of another patching file to is complete, be eliminated type /X. Following /X, the program displays: EXIT COS 11.2 Much with MONITOR V 8.00 (or current version number) ERROR CORRECTION of the seriousness of errors while the use of the command file option. patching can PATCH PROGRAM (PATCH) 11-3 CTRL/U 11.2.1 R or is the checksum statement an error and PATCH will return to the FILE NAME question. During the PATCH operation, the DELETE key is inoperIf you make an error on a line, type CTRL/U and the correct inable. formation. If at any time (Restart) discovered, 11.2.2 prior to the (for R type end of Restart) Wrong Old Value The old value displayed by the program must be the same as old the value supplied in the PATCH information. If it is not, go through the following procedure. Step 1 sure If the FILE that letter everything previously typed is perfect. number was R and restart at BLOCK wrong typed, type in NAME. If the wrong LOCATION was typed, type RETURN Be to answer specified. NEW VALUE. Type the This makes no change to the location location number in answer to L0— correct CATION. If everything typed was correct, check the version the Monitor or the system program in question. Step 2 Step 3 If everything save error an seems output and in order consult but your the dialogue doesn't Software of agree, Specialist. Bad Checksum 11.2.3 If all number in the checksum is detected, the following message is dis— played: BAD CHECKSUM LOCATION: faulty block is The newly changed block is still in memory. locations to see if they are correct. the and then type found, type R it 11-4 to not written to the system device. The numbers and is found, fix END to the LOCATION: If an error is not message. restart the program and patch the entire block again. PATCH PROGRAM (PATCH) the Review the error If 11.3 Most for PATCH ERROR MESSAGES Check each messages result from incorrect entries. entry All entries must be exactly as supplied by DIGITAL. accuracy. error Message BAD Explanation CHECKSUM An attempt the to write a Type R which block and restart program. Attempted BAD NUMBER A number with either nondigit, Enter BLOCK made to reference or store a file on a device with a damaged or nonexistent directory. Only files with directories can be used. If the is call damaged, your directory Software Specialist. DIRECTORY BAD was incorrectly patched. was the or number 4 than 8 or 9 digits more digits, was a typed. correctly. It can— incorrect block number was typed. file be than the of the larger length block Enter the correct patched. being number. TOO BIG An not FILE NOT LOCATION NO CHANGE file was not found on the system device. for the file name. If Check the directory the file name is not found, check for correct version number. FOUND The TOO BIG A BLOCK no made to write a block with it. Make changes proper changes using patch information. IN location than greater number. location Retype An attempt 377 was typed. was in PATCH PROGRAM (PATCH) 11-5 CHAPTER 12 BOOT BOOT if is is the run 12.1 To bootstrap the has been moved system to start the system on used to PROGRAM (BOOT) system from from the one one type device to device of to another, i.e., another, boot device. new BOOT OPERATING PROCEDURES execute RUN BOOT, type: BOOT/xx where: /xx An is the 12.2 designation operation. want /DK is the RKOS disk /RX is the RXOl diskette unit 0. /DY is the RXOZ diskette unit 0. unit to bootstrap a device which produce unpredictable results. attempt will is for the device which 0. not ready or does not exist BOOT ERROR MESSAGES Explanation Message N0 two—character to get into you device or an device illegal designation was Control returns to the Monitor. specified. a device legal designation. Specify N0 CHAPTER 13 LINE (LINCHG) Change Program (LINCHG) is a utility program which temporari— changes the lines-per-page configuration of printed programs with— Its use affecting the SYSGEN lines-per-page default value of 66. ly out limited 13.1 To PROGRAM Line The is CHANGE to printers without LINCHG OPERATING execute LINCHG, forms hardware. PROCEDURES type: LINCHG[/n] RUN where: is the number use the /n option, /n If you do not HOW MANY LINES PER Type the number (1-99) fied the 66 The number as lines of the you want program on a page. displays: PAGE? of lines number of you want. LINCHG lines-per—page. installs The this speci— system defaults to lines—per-page. LINCHG number will remain is made, the system is LINCHG in effect rebooted, or a call to unless further the system is closed down. Example: of 66 is a batch program with a SYSGEN default lines-perLine change commands change the lines-per—page of various pro- Following page. grams. 13-1 .RUN JOBl .RUN LINCHG/10 .RUN JOB2 .RUN LINCHG/33 .RUN JOB3 .RUN LINCHG/99 JOB4 LINCHG HOW MANY LINES .RUN ;66 lines-per—page. ;10 lines—per-page. :33 lines-per-page. ;99 lines-per-page. .RUN PER PAGE? 50 .RUN JOBS .RUN LINCHG/66 The above with the :50 lines-per—page. example shows how default variety of changes for the default The the number. by rebooting the system. 13.2 normal LINCHG ERROR series of programs may be run starting the first program, then incorporating a finishing with programs which follow, and a for 66 lines-per-page be reestablished Explanation to Attempted with printer cannot 13-2 also MESSAGES Message INVALID OPERATION can LINE CHANGE PROGRAM be (LINCHG) made. change forms lines-per-page hardware. Such on a a change CHAPTER 14 FORMAT PROGRAMS (DKFMT, DYFMT) it used on RK05 disk or an RX02 diskette can be COS-310, initialized. Initialization consists of formatting the disks. Do not initialize a disk or diskette containing any important informaInitialization destroys tion such as the Monitor or other such files. the data on the disk. Before an be must Formatting the RK05 marks sense onto and RX02 means writing the and necessary timing the disk or diskette and erasing any other informa- tion. An RXOl diskette procedure formatted 14.1 To The be can formatted be reversed. cannot to be used on an RXOl FORMATTING RK05 format an RK05 RUN DKFMT to The an RX02 diskette. diskette does not need become RXOl This be to drive. DISKS disk, type: displays: program DKMFT 8.00 V DRIVE? Respond with the number After type you ARE YOU this (0—3) number the of the drive following where message the disk is mounted. is displayed: SURE? Any response other than Y (Yes) brings back the DRIVE? (Yes) response causes the program to display: WRITE READ question. A Y PASS PASS 14-1 These phrases indicate two that the program is in operation; they re- Some time (a matter of seconds) response from the keyboard. the that elapses after each phrase appears while program completes particular phase of operation. quire When no the formatting operation is complete, the program another disk. Time displays: DRIVE? This is a cue begin formatting to the physical changing of disks. CTRL/C to return to the Monitor. FORMATTING RX02 14.2 To format an RUN DYFMT The program DYFMT RX02 If the formatting is is allowed for complete, type DISKETTES diskette, type: displays: 8.00 V DRIVE? Respond with the number The program ARE YOU (0-1) of the drive where the disk is mounted. displays: SURE? Any response other than Y (Yes) brings back the (Yes) response causes the program to display: FORMATTING DRIVE DRIVE question. A Y n where: is n the remains formatting is This statement When the number on the (0-1) of screen completed, the the drive until previously formatting program displays: is indicated. completed. DRIVE? This is for the Time is a cue to begin formatting another diskette. If the formatting physical changing of the diskettes. pleted, type CTRL/C 14-2 to FORMAT PROGRAMS return to the (DKFMT, DYFMT) Monitor. allowed is com- CHAPTER 15 DUMP AND FIX TECHNIQUE (DAFT) Dump and Fix Technique (DAFT) program is similar in function to an but it is used for data records. DAFT allows you to search editor, and to list records or parts of for, examine, and change records, The records the on printer or on the screen. one input and one output file to be open at the same time. files can be the same file when in UPDATE mode. Memory alrecord from the file contains a known as the ways input current record. The current record can be modified by the CHANGE com— An output file is not mand before being written on the output file. needed if records from the input file are only being examined. DAFT allows These two 15.1 DAFT the Because these DAFT COMPILING PROCEDURE two can source be .SAVE To source binary file files, before DAFT DAFT OPERATING execute RUN DIBOL one COMP,DAFTA,DAFTB .RUN 15.2 two program is distributed as files must be compiled into To compile DAFT, type: executed. DAFT DAFT, PROCEDURES type: DAFT[,cmndf11...,cmndfl7] where: cmndfl1...,cmndfl7 are to previously be used to command files the keyboard. which contain DAFT commands data file. If the optional are not present, commands are entered via After the last command in the last file stored dump or files fix a 15-1 is executed, additional commands can be entered through is displayed to indicate An asterisk (*) the keyboard. that the DAFT program is ready for a command. 15.3 DAFT COMMAND FILE file is created with the COS editor and contains DAFT com— The entries in the command file are ordered accordin to a se— To create an effective quence of needs within individual records. command file you must know the contents of the record and the possible areas needing correction. The command mands. 15.4 DAFT COMMANDS The first word in a DAFT command is a keyword consisting of any number of nonblank characters, only the first of which is significant. Some commands involve both a keyword and arguments. These are arguments separated from each other and from the keyword by one or more spaces. 15.4.1 in DAFT Commands Used Symbols represents n is an optional unsigned in nonzero command a positive integer. and is omitted, n=l If it is as— sumed. <a,b> a key field of character positions a through Both a and b are unsigned nonzero posi— inclusive. If tive integers and b must not be smaller than a. is optional in a command and is omitted, the subthis scripted area specified in the KEY command is used. represents b the indicates that before a record is read from input the current record in memory (if there is one) is The + sign does not have a written on the output file. the only argument. it it is before unless space + file, data represents a piece of data. form: ‘characters...' Numeric [—1 15-2 data has the digits... DUMP AND FIX TECHNIQUE (DAFT) form: Alphanumeric data has the Before being used the is in executing a is command, data key field <a,b>. ad— If smaller and it is alphanumeric, in the field and filled with spaces on left—justified the right. If data is smaller and it is numeric, and filled with zeros on the left. If right-justified data is larger and alphanumeric, excess characters on the are If it is larger and numeric, right ignored. excess characters on the left are ignored. justed the 15.4.2 to data DAFT Command Summary are entered after Commands same length displays DAFT the asterisk an Command (*). Function Advance [n][+] Backspace [n] Advances [<a,b>]data the Backspaces UPDATE file the input command. was current key field of memory with the data <a,b> is used, it temporarily key field specified in the key in data If the specified. if records records. n the currently in record overrides file input the the Replaces the n with opened Change as statement. Display [n] Exit line of Sets the width of the or device (screen printer) to If n is omitted, (maximum 130). turns the grid on if it is off off if it is on. control to the is open. Returns COS—310 the listing characters this command and turns it n Monitor if no output file Fini [+] Closes the the input file Goto Help n[+] are first data To DATE, the Makes record must + a n be the summary DUMP AND If + is specified, remainder of the to the output copied to a file Opened for UP- record write file. Displays file. output current and the specified. current record. of commands. DAFT FIX TECHNIQUE (DAFT) 15-3 Function Command Input filnam[/logica1 unit #] Opens the specified record first record. read The for file input. and becomes the current the key to character inclusive. Sets Key a,b b List is [n][<a,b>][+] Prints positions a through consecutive records with beginning record. The subscript <a,b> rep— are resents the consecutive characters that to be considered. the n current Output filnam[/logical unit #] Opens the specified file for output. Put In] Writes n memory onto copies the of the output record file. currently and Displays the names of the input files, the units where the files Query are Reopens the the comes Search Type [<a,b>]data[+] [n][<a,b>][+] input current file. The record. first output located, the ver- record be— the record currently in memory, and sion number of the DAFT program. Rewind in Searches the current record and then succeed— for an occurrence of the specirecords ing fied data appearing in the key field. Same as List the screen. except output is displayed on Update filnam[/logical unit #] This Opens the specified file for updating. command can only be specified for a file with fixed-length is used to the since records. records move version number direct of access 1/0 Version Displays Write function Performs the same as Advance [n] The nth record after the current record [+]. becomes the new current record. X [n] DAFT. of the and size Outputs the record number record on the output device current (either on the whether printer depending was output by a Type or List DAFT The printer is the initial command). output screen last or record device. 15-4 DUMP AND FIX TECHNIQUE (DAFT) DAFT OUTPUT 15.5 lines The grid has two Records can be listed with a grid above them. The lower of the two which show the character positions. numbers The upper line lines represents the ones digits of the column counts. the The tens are tens digits printed for the first represents digits. and last column in the record (or part of the record) or whenever the If there is a hundreds digit, it is printed in tens digit increments. of column 1 or is Following ,R whenever it example an increments. of a DAFT program in operation. DAFT *HELP ADVANCE N+ BACKSPACE CHANGE N <A,B> DATA DISPLAY N EXIT FINI + GOTO N+ HELP LABEL/UNIT INPUT KEY A,B LIST N KEY+ LABEL/UNIT OUTPUT PUT N QUERY REWIND SEARCH N <A,B> DATA <A,B>+ UPDATE LABEL/UNIT TYPE + VERSION WRITE N X *VERSION DAFT VERSION 8.00 *INPUT MAILING/l *DISPLAY *T 70 1 RECORD 000001 DIGITAL 146 OF FILE EQUIPMENT CORP. MAIN RECORD LENGTH=140 MAILNG, D. F. 12-3 PAVLOCK MAYNARD ST. CHARACTERS 0012345All MA01754OS/8-l *D *T 2 RECORD 000001 OF FILE MAILNG, RECORD LENGTH=140 CHARACTERS DUMP AND FIX TECHNIQUE (DAFT) 15-5 4 3 2 l 0 6 5 7 1234567890123456789012345678901234567890123456789012345678901234567890 DIGITAL EQUIPMENT CORP. PAVLOCK F. 9 8 7 D. 12-3 1 10 2 3 4 1234567890123456789012345678901234567890123456789012345678901234567890 146 MAIN. ST. RECORD 000002 0 OF MAYNARD MA01754OS/8-l FILE RECORD LENGTH=140 MAILNG, 2 1 3 0012345All 4 CHARACTERS 5 7 6 1234567890123456789012345678901234567890123456789012345678901234567890 K. RICHER 12-3 EQUIPMENT CORP. DIGITAL 7 9 8 1 10 2 3 4 1234567890123456789012345678901234567890123456789012345678901234567890 146 MAIN ST. MA01754COS 300 0001972T *T MAYNARD 3 2<25,50> RECORD 000002 OF FILE MAILNG, RECORD LENGTH=140 CHARACTERS RECORD LENGTH=140 CHARACTERS RECORD LENGTH=140 CHARACTERS 2 3 4 5 56789012345678901234567890 K. RICHER RECORD 000003 OF FILE MAILNG, 2 3 4 5 56789012345678901234567890 S. *A 1 *KEY *T RABINOWITZ 1,50 2 RECORD 000004 0 OF FILE MAILNG, 2 1 4 3 5 12345678901234567890123456789012345678901234567890 DIGITAL RECORD 0 R. 000005 OF FILE RECORD MAILNG, 2 l LARY 3 LENGTH=140 4 CHARACTERS 5 12345678901234567890123456789012345678901234567890 DEC 15-6 8. DUMP AND FIX TECHNIQUE G. WELCOME (DAFT) *Q INPUT FILE: UNIT: 01 OUTPUT MAILNG FILE: OPEN /NONE/ 00 UNIT: KEY=<001,050> 000005 OF RECORD DAFT VERSION 15.6 DAFT FILE MAILNG, LENGTH=14O RECORD 8.00 ERROR MESSAGES Message BAD Explanation DIGIT IN DATA or Search other than is contained digits In Change a bad Remove CANT BACKSPACE PAST BEGIN OF file. the BACKSPACE WITH to INPUT FILE AT EXTRA GRID SIZE CHARS ILLEGAL RECORD backspace past in the file CLOSING becomes backspace with sequential only possible when file is input. to in up- mark end—of—file This is not necessarily nnnn was last record read. the file is closed. Reopen the file. to read past the input file. the an error. The input The grid than 130 (printer width) characters. may not Reduce the be greater grid size. characters were found after the command. Remove extra characters. Extra - of beginning the nnnn on a sign field. data mode. Attempted EXCESSIVE character a minus INPUT SEQUENTIAL RECORD a numeric a first record record. current date OF or characters. The Attempted Backspace END in command, FILE Attempted CANT CHARACTERS end of FILE The file (one being updated contains the not fixed—length files. The size a bad record record I). Only records are permitted file is closed. ReOpen on the such file. (DAFT) 15-7 same as DUMP AND FIX TECHNIQUE Explanation Message KEY ENTIRELY PAST END OF RECORD The key specified in a List or Type DAFT command began with a character greater than the record size. Reduce the size of the key. KEY EXTENDS PAST RECORD END Attempted KEY TOO end Data NO LABEL The FILE NAME is terminated 100 FILE ALREADY OPEN command does have not The file name PUT, or UPDATE PUSHDOWN OVERFLOW 0 NOT ALLOWED command requires or SEARCH input file. request was made command to but output file an The not is writing file. open the Open an one terminated an output output Only at current file output The is request the current output file beone file. file with the FINI be made when the output The output file can be closed command or CTRL/C. The program will abort with this message Restart DAFT. many errors are made. when too The 0 An EXIT cannot is open. Don't 15-8 an the omitted in an OUT— INPUT, command. Implement a name. Close ignored. opening a new STILL OPEN Reduce was fore FILE such a case, the end of the input file. one was already open. while file can be open at a time. OUTPUT extends a list In at specified in a CHANGE Specify required data. an A However, characters. open. the point just prior to record on the output file. OUTPUT that key not was Open The is NO OUTPUT FILE a record. a key is possible. a command. INPUT of The key exceeded size of key. BIG NO DATA NO change with a the with such the list record. past DUMP AND PIX TECHNIQUE (zero) use (DAFT) 0. is not a permissible argument. CHAPTER 16 REPORT PRINT which describes duces the (PRINT) creation of report programs. the report, PRINT generates a the eases PROGRAM GENERATOR Using DIBOL a command which program file pro- report. reads and The first program is two programs chained together. If no validates the command file while creating memory table entries. the the second command file errors are detected, program produces The two programs which generate the report pro— DIBOL report program. gram require a total of 16K bytes of memory. PRINT 16.1 PRINT PRINT is distributed piled into The PRINT o 0 two before files contain PRINTl, PRINT3, PRINT2 PRINT4, parsing PRINT7, the several as programs source the 0 PROCEDURE COMPILING are .RUN be com— following information: data sections. PRINT6 are the procedure and validating) phase. the sections of PRINTS, PRINTO are the procedure sections of generation phase. the following procedure files into binary programs. Use the files. The files must be executed. can PRINTS, (reading PRINTB, source PRINT to compile the distributed PRINT source COMP,PRINT1,PRINTZ,PRINT3,PRINT4,PRINT5,PRINT6 .SAVE PRINTA .RUN COMP,PRINT1,PRINT2,PRINT7,PRINT8,PRINT9,PRINTO .SAVE PRINTB 16-1 16.2 To PRINT OPERATING PROCEDURES execute PRINT, type: PRINTA+PRINTB,cmndfl[/Xy] RUN where: cmndfl is the of name a previously stored command file. PRINTA+PRINTB the are switch which determines whether be on the printer; listed means list. N is a the both are the switch which determines whether file) the on y programs. to (data and DIBOL a y x PRINT is is x If compiled created printer; the N, N by executing means switches and no list, their command means file list, no L DIBOL program is to be listed L means list. PRINT preceding slash can be must be omitted. The output from the RUN PRINT command is a data file converted to a source file with the use of FILEX. 16.2.1 Use the FILEX - which Creation of Source File the following FILEX command sequence data file created by PRINT. (See to create a Chapter 10 source for file from informa— FILEX tion.) .RUN FILEX FILEX V 8.00 OPT (c, MODE FILE NAME: OUTPUT MODE FILE NAME: OPT (c, Pronam in the 16-2 D, INPUT D, L, Z): x, (A, D, c U): D $RPG/logica1 unit # (A, D, U): s, pronam L, x, Z): 8 x is any name desired, but it is usually IDENT line of the command file. REPORT PROGRAM GENERATOR (PRINT) the same name as is used 16.2.2 Compilation compile the DIBOL source put through FILEX, type: To .RUN To created by running the PRINT out— COMP,pronam .SAVE 16.2.3 program pronam Program Execution the execute .RUN compiled DIBOL program, type: pronam where: is pronam the name in compiled The execution of 16.3 The this PRINT COMMAND Print Command END IDENT IDENT FILE has six sections: the program and author page headings for the report describes the input file describes any computation to be done describes the report column headings is an optional directive at the end of Command File PRINT of and FILEX provides INPUT COMPUTE form by identifies IDENT The created produces the report. program File HEAD1,HEAD2 16.3.1 of the source program Section 16.2.2 the Print be generat- Section the IDENT section pronam[/logica1 is: unit #][,author] where: pronam is the ed. name of the DIBOL source program to /logical unit# is the number referencing the storage location of the program. REPORT PROGRAM GENERATOR (PRINT) 16-3 any text from 1 ,author 24 to characters in length. Example: TEST4l/l4, IDENT JOHN ;Program named TEST41, DOE :14, written by John 16.3.2 logical on unit Doe. HEADl and HEADZ Section HEADl is the first heading line on each page of the report. HEADZ is the second line. HEADl and HEADZ are both optional. The only difference between HEADl and HEADZ is that HEADl information will be expanded (if space permits) by inserting a space between each character. HEADZ has no such expansion capability. The is: form [HEADl 'text'] [HEADZ 'text'] where: is text a string character There the be can more individual than texts of set, to 132 characters from exclusive of single quotes. up HEADl or HEADZ linked together. one are line. If this the is COS-310 the case, Example: HEADl 'COMPUTATION AND SUMMARY RESULTS' HEADl 'FOR AUGUST, 16.3.3 INPUT 1973' Section by field consists description lines The of The INPUT form section INPUT the input of the INPUT describing statement statement the is: [filnam[/logical unit #]][,S] where: filnam 16-4 is the name of REPORT PROGRAM GENERATOR the input (PRINT) on fields of file. one the line input followed record. /logical unit # is file the logical unit summarizes ,5 If the when the The form of is name is report the omitted, which the input than describes the generated resides. file report. will program request it run. field each rather on description line is: A [fldnam], n[.m][,Lr[P]] D where: fldnam is the A is an D is a n is the size of the field, expressed maximum for A field, 15 maximum for of the field. alphanumeric field. numeric field. in D characters (510 field). is the number of decimal places valid only for numeric fields. ,Lr is used only for the break fields break field is (a in used conjunction with ACCUMULATE to print totals). The r is a single digit expressing the relative impor1 indicates least important and 9 of the field; tance for When totals are printed indicates most important. more are P The maximum 16.3.4 starts a break are number COMPUTE optional also of important printed. break, report page new in totals after the for the field is .m a This name all and lesser totals breaks for this printed. fields is 20. Section section starts with a line one word: following form: containing only COMPUTE DIBOL statements fldnam = appear on succeeding lines in the expression REPORT PROGRAM GENERATOR (PRINT) 16-5 where: is fldnam the cate name any result expression of destination field and must not dupliname nor any prev1ous computation a input field name. . any valid DIBOL expression. phanumeric field or literal, or is al— s1ngle numeric expressmn. any It may be a Unlike DIBOL, PRINT uses decimal places. of and subtraction expressions with places. decimal It will not allow addition different numbers of decimal The result of such an expression will have the same number of places as the elements of the expression. The number of decimal places in the result of a multiplication sion is the sum of the decimal places in the two expressions. The the the expres— of decimal places in the result of a division expression is difference in decimal places between the number being divided and divisor. number number of decimal places for any expression, multiply by 1.00 with the number of decimal places equal to the long— For example, expr 1 number of decimal places in the other values. 2 places, and expr 2 no places, then the To-adjust the est has constant l expr has four 16.3.5 expr decimal * 1.00 places. places in numeric constants. Section PRINT section PRINT 2 decimal allows PRINT The * begins with line a containing only one word: PRINT The next must be 12 lines describe the fields to be printed (not The form of these field descriptions is: all 12 lines an input used). fldnam, 'text'[,A][,format] where: fldnam 16-6 is the name of the field field or the result of a REPORT PROGRAM GENERATOR (PRINT) and must be computation. either alphanumeric string of COS—310 characters delim— This text is used as the headby single quotes. is an ited 'text' ing the of break report columns and is present only if the field the sum is to be printed must be numeric. ,A the on lines total for fields. is to on total be and accumulated lines. The field is a string fields. If format of text showing the format for the numeric the format is not included, PRINT will create one using the description of the field (if this is an accumulated two extra field, places will be asThat created format will use an sumed). appropriate number of decimal and integer places in the following form: XX,XXX.XXtext used for titles may be several words separated This centers each word over a column in separate lines. The asterisks. For example: 'GROSS*PAY' GPAY, will by cause GROSS PAY to be placed over the GPAY column. If GPAY is also a break field, then: GROSS will be The field PAY used on TOTAL the descriptor total line lines may instead of GROSS*PAY TOTAL. also of the be form: ,An Where in is n the the size of the field. This will produce n blank columns report. any two field descriptors are not then two blank columns will separate If separated by the fields in a filler descriptor, the report. Example: PRINT NAME, DEPT, GPAY, 'EMPLOYEE NAME‘ 'DEPARTMENT' 'GROSS*PAY',A,XX,XXX.XX REPORT PROGRAM GENERATOR (PRINT) 16-7 16.3.6 END Section The END word: section is optional and consists of a line containing only the END 16.4 Most PRINT ERROR MESSAGES errors file. in These result from incorrect information in the command correctable with the editor and Monitor commands. PRINT are PRINT evaluates each statement in the command file for correctness. entire line error occured and a errors the where the Whenever occur, The number printed near the error message indimessage are printed. the character position where the error occurred. The following cates error messages are used by PRINT. Explanation Message ALPHA LITERAL ALREADY is Expected alphanumeric literal Insert where appropriate. ing. REQUIRED DEFINED to Attempt name a section previously used. file. COMPUTE HEADER IS TOO The LONG field with in the a name Correct header line exceeds 132 the command file. the miss— INPUT or that was command characters. Correct IMPROPER Filler DEFINITION item incorrectly. IMPROPER LITERAL IMPROPER USE OF Literal DECIMAL too in the PRINT Correct long. the section is used command file. Shorten the literal. PLACES number of decimal places exceeds the Reduce size of the field being defined. the number of decimal places. The The size of a numeric field specified in the INPUT section must be between 1-15. Correct the command file. INTEGER FROM 1—15 16-8 PROGRAM GENERATOR REPORT REQUIRED (PRINT) Explanation Message INTEGER 1-132 FROM REQUIRED The fields numeric the field size characters. expected INTEGER REQUIRED Integer missing where and LITERAL TOO MUST IDENT BE BE NUMERIC MUST BE S as first be file. ITEM The section IDENT. is the File ENDING QUOTE only legal option in name that NO INPUT PRINT DIRECTIVE ITEMS follows is the de- INPUT the from IDENT command file. missing the closing quote No PRINT NO numeric Redefine. be comma. S. Correct NO file command the command the Correct item expected to fined incorrectly. Insert NAME in An S FILE Check expected. needed. must statement NEED fewer to Field description exceeds 30 characters. Reduce to fewer than 30 characters. LONG MUST insert of out Reduce range. than 132 for statement. The the INPUT No fields PRINT is or HEADZ, closing quote. HEADl, Insert statement command a statement. missing. Correct file. specified are statement. the command following Correct the file. NOT DEFINED Attempted been NOT ENOUGH RIGHT PARENTHESES A statement too few command PICTURE TOO LONG print to defined. in a field Correct the the COMPUTE right parentheses. that not file. section has Correct the file. The picture or edit mask for exceeds 22 characters. Reduce than 22 characters. REPORT has command PROGRAM GENERATOR printing to fewer (PRINT) 16-9 Explanation Message Statement contains SYNTAX ERROR options. TOO MANY COLUMNS IN REPORT HEADZ, columns 132 than More under sections. PRINT or characters command file. illegal the Correct or HEADl, the Correct command file. TOO MANY COMPUTE STATEMENTS More TOO MANY DATA ITEMS More than section. TOO MANY LEFT PARENTHESES A Correct 20 in TOO TOO MANY MANY LIST RIGHT ITEMS PARENTHESES complicated Simplify A statement file. in items command the the the the INPUT file. command COMPUTE right parentheses. many is by INPUT file. section Correct has the file. section statement. invalid Only HEADl, HEADZ, INPUT, COMPUTE, IDENT, Check PRINT, and END are legal. your for incorrect statements statements; An correct 16-10 in in command were file. COMPUTE section be deciphered the than 20 list Correct section. command DIRECTIVE to More too UNKNOWN the the PRINT. statements command items data Correct statement too COMPUTE the eight than specified. REPORT PROGRAM GENERATOR the (PRINT) command file. CHAPTER FLOWCHART The of flowchart input 17 GENERATOR PROGRAM generator program (FLOW) (FLOW) produces a flowchart from a set commands. The flowchart is 1. ical unit always written to a file named $PASSl located on log— printed flowchart can also be produced by using the The flowchart are appropriate option switches. generator programs distributed as source programs and must be compiled before use. 17.1 FLOW To FLOW COMPILING PROCEDURE consists compile .RUN the several FLOW DIBOL programs, programs. type: FLOW COMP,KREF .SAVE 17.2 of COMP,FLOW1,FLOW2,FLOW3,FLOW4 .RUN .SAVE The A KREF FLOW OPERATING PROCEDURES commands to execute FLOW have the RUN FLOW,cmndf11...,cmndfl7[/xx] RUN SORT,KRFSRT RUN KREF form: where: cmndfl]...,cmndfl7 are previously commands /xx is one of to be the stored source files containing the used in generating a flowchart. FLOW following option switches: 17-1 the lists /L flowchart on the printer. If omitted, the flowchart will only be placed SPASSl on logical unit 1. /L in is file indicates that the input files are DIBOL programs with the FLOW commands imbedded in the program. When the /P option is used, only input lines beginning with a semicolon followed by any number of treated periods followed by a space or a tab are as FLOW commands. No semicolon period space are configuration is needed if the FLOW commands /P — not part of a DIBOL — program. KRFSRT is a special sort command file sort the that will KRFSRT is distributed as cross-reference scratch file. part of the COS-310 software. KREF cross-reference DIBOL program that works specifi— FLOW. This produces a cross—reference table an alphabetical labels used listing of all in the flowchart, the page number where each label is defined, and the page numbers where each label is used. KREF is distributed as part of the COS-310 software. is a cally with containing 1 must be unit 2, 3, 4, and 5. Logical 10 the flowchart segments large enough print image (usually is sufficient). and 5 must be each large Logical units 2, 3, 4, to contain the KREF scratch file (usually 5 segments in each enough FLOW units contain logical uses to 1, logical unit). 17.3 FLOW COMMANDS Although de— are FLOW commands look like DIBOL statements, they FLOW commands have the following general used differently. some fined and format: [;.. ][1abel][,] command where: ;.. label is the FLOW command is one of PROC DISK IF 17-2 used with the /P commands and DIBOL is the special indicator distinguish between FLOW statement the label. following FLOW [;Jltext] [;][text] YES NO :label [;][text] FLOWCHART GENERATOR PROGRAM (FLOW) commands: option to statements. CALL label [;][text] START [;][text] STOP [;1[text] GOTO label CGOTO labe11,labe12,... [;][text] TITLE [;][text] SBTTL [7][text] 1/0 PAGE is the information to be placed in the flowchart block. This text is usually centered within the blocks. Some commands require a the text in format. specific text Spaces and/or 17.3.1 The inserted be for legibility. Command PROC PROC tabs may command (process) side a process block. by the command line: allows The you following to put up process to 65 block characters will be in- generated ;BUILD A TAB CHARACTER PROC *************** * * * * * BUILD * A * TAB * CHARACTER * * * ************* * 17.3.2 The DISK Command DISK block. line: command The allows you to disk following 55 put up to block will characters be inside the generated by a disk command :OPEN SYS FILE FOR INPUT DISK ************* k * * OPEN * FILE * SYS FOR INPUT * * * * * ************* FLOWCHART GENERATOR PROGRAM (FLOW) 17-3 17.3.3 IF Command command allows you to put up to 37 characters inside a decision The IF command requires that the text field be preceded by the following field: The IF block. YES :label branch to to NO The decision following IF NO:ERROR block will be generated by the command line: ;IS THERE A SYS FILE? * * * * * * THERE IS *SYS ********** ERROR * ********** FILE?* * * * 17.3.4 NO *—--->* A YES CALL Command The CALL command allows to put you a subroutine block. The CALL command preceded by the subroutine name. The block following subroutine HOF CALL will be up ;OUTPUT PAGE MARKER * HOF ************* * OUTPUT * * PAGE * MARKER * * ********* 17-4 FLOWCHART GENERATOR PROGRAM inside 33 characters that the text field be generated by the command ********* * to requires (FLOW) line: 17.3.5 START Command The command allows you to put up The following start block will START block. START characters to 13 be generated by to 13 inside a start the command line: ;HOF ROUTINE ************* * HOF * ROUTINE ************* 17.3.6 The STOP Command command STOP block. The allows you following to put up block stop will inside generated by the characters be a stop command line! STOP ;RETURN ************ * * RETURN ************ 17.3.7 GOTO Command The command allows you to put up The following GOTO block will GOTO block. GOTO to six be generated by characters inside a the command GOTO line: NEXT ********** ————————— >* NEXT * ********** FLOWCHART GENERATOR PROGRAM (FLOW) 17-5 CGOTO Command 17.3.8 The CGOTO (computed GOTO) text field spaces. lines: The branches. out The imbedded command command allows to flowchart multiway you consists of labels separated by commas withthe by following blocks will be generated ;BRANCH BASED ON COMMAND NUMBER PROCES,DISK,IF,SUBR PROC CGOTO *************** * * *BRANCH BASED * * ON * * COMMAND * NUMBER * * *************** ********** I 1 --------- >* ! l ————————— >* ————————— >* DISK * * IF ********** 1 1 * ********** l 1 PROCES ********** ————————— >* SUBR * ********** 17.3.9 The I/O Command inside an I/O command allows you to put up to 47 characters I/O The following I/O block will be generated by the command line: block. I/O ;DISPLAY 'ERROR' ************ * * DISPLAY * 'ERROR' * ************ 17.3.10 The TITLE flowchart TITLE Command command title. allows you to specify up The title will appear at pages. 17-6 FLOWCHART GENERATOR PROGRAM (FLOW) characters to 40 the top of all subsequent as a 17.3.11 SBTTL Command The SBTTL command allows you to specify up to 40 title. The subtitle is printed on the line SBTTL command implies a top—of-page command. 17.3.12 PAGE The command PAGE command 17.4 advances unnecessary The the in most to the top of the next page. pages when necessary, making the PAGE listing new instances. FLOW EXAMPLE best The sub— Command automatically generates FLOW characters as a the title. below FLOW FLOWZ, example of the use commands have been FLOW3, FLOW4). To of the inserted produce a flowchart into the generator FLOW flowchart of is source FLOW, FLOW itself. files (FLOWl, the follow- use ing procedure: 0 o 0 17.5 Assign the necessary logical units using Compile the flowchart programs. Enter the following commands: .RUN FLOW,FLOW1,FLOW2,FLOW3,FLOW4/PL .RUN SORT, .RUN KREF KRFSRT FLOW ERROR MESSAGES Explanation Message NO INPUT ERROR DFU. FLOW has Build a An error where the the no information command file. has the next build a flowchart. of The line text will be displayed on the line and correct occurred. error line. to occurred Check error. FLOWCHART GENERATOR PROGRAM (FLOW) 17-7 CHAPTER 18 MENU The MENU viously PROGRAM program allows you to created command file. (MENU) select MENU and execute permits more commands from a pre- orderly execution of commands. MENUWOPERATING PROCEDURES 18.1 To run MENU, RUN type: MENU , cmnd f l where: cmndfl is name of the MENU device. If none is buffer is used. the tem command file specified, stored on the sys- file in the edit the the command displays the text found in the Display Section of file and will accept a six-character operator response at the screen The is location specified in the Accept Section. operator response to the list of valid responses specified in the Command Seccompared tion. If a match is found, the corresponding Monitor or editor commands are then executed by COS-310. MENU MENU in 18.2 be included file. can the MENU COMMAND in a batch command file only as the last command FILE is The MENU command file is created using COS—310 editor commands and It consists of three sections: stored on the system device. Display, file is The order of these sections within the Command, and Accept. vital. 18-1 Example: DISPLAY COPY COPY RXO DIR TO Rxl DIRECTORY PRINT OF RXO COMMAND COPY =ER =l C =2 RXO =3 RXl =4 x =WR SCOPY/Y =PLEASE MOUNT DISKETTE ON DRIVE 1 PIP.$COPY =DE SCOPY/S =R MENU,cmndfl =DI,RXO =R MENU,cmndfl ACCEPT (24,10) =R DIR Display Section 18.2.1 The Display Section DISPLAY has the form: [/N] text where: DISPLAY is the first statement in the command file (must be DISPLAY). /N is the screen optional switch to suppress clearing is to the text. Without the screen /N prior displaying an cleared. text to display on the screen beginning on line one. line of text begins with a new line number. If a disline of text contains more characters than can be played on a screen line, the extra characters are lost. a Any line beginning with a semicolon is assumed to be comment and is not displayed. is text Each 18-2 MENU PROGRAM (MENU) 18.2.2 The Command Section Section has Command the form: first line COMMAND code=command where: COMMAND is code is an operator response that contains a maximum of six characters. The Section Command contain up to may sixty codes. command the is series of 18.2.3 editor command that is code is entered as the or executed operator between tabs the be executed the by listing subsequent lines with no code to the left The series of commands is combined sign. produce a batch cannot be longer There may Section. (must be COMMAND). commands may commands on of the equal file section There can be no spaces and the command. response. equal sign to the COS-310 Monitor or its corresponding a when A in be as many command file. This than one block. as 3995 characters batch command the Command in Accept Section The Accept ACCEPT Section has (y,x) [/N] is the the form: first line where: ACCEPT Y in the section (must be ACCEPT). decimal number (cannot be an expression) designatthe screen line number where the operator response of number If y is greater than the is to be entered. lines on the screen the results are unpredictable. is a ing MENU PROGRAM (MENU) 18-3 an decimal number (cannot be repreexpression) screen column number where the operator the reIf x plus the operator response is to be entered. screen than the of is (maximum six) greater sponse width, the results are unpredictable. is x a senting is /N an prior location (y,x) the screen suppress clearing selected command from the Com- Section. mand The optional switch to to executing the may fall within the text Section. 18.3 displayed by ACCEPT Explanation SECTION FOUND NOT No Accept Section Correct COMMAND SECTION NOT FOUND No DISPLAY SECTION NOT FOUND No CURSOR POSITION illegal requested Correct ILLEGAL Command STATEMENT file. in the command file. the command file. file. in file. cursor in command command the Section command An in file. Section command Display Correct ILLEGAL command Command Correct position the file. (or none) was Section. Accept file contains, a Correct command statement. TOO MANY The COMMANDS Command Reduce MANY COMMANDS FOR 1 CODE The Section size of series of MENU PROGRAM (MENU) is meaningless file. Section. commands under in length. large. too Command exceeds 1 block mand file. 18-4 Display MENU ERROR MESSAGES Message TOO the one Correct code com— APPENDIX A COS-310 CHARACTER SET both source and data files, characters (alphanumeric and numeric) two in stored characters word six-bit per binary. Negative numbers are stored with the high-order bit of the low—order digit set the number 1234- is stored as two words in the to 1. For example, following form: In are 22 1 23 24 3 65 4 WORD 1 WORD 2 2 (with high-order bit on) in that any program not made might produce Table A-1 for a list of char- This number is recognized as 123T. This means which the numeric-to—alphanumeric conversion is negative numbers with letters. acters representing negative Refer numbers. to Table A-1 Characters Representing Negative Numbers Negative Equivalent Decimal Octal Number Character Code Code -0 -1 -2 P -3 S T U V -4 -5 -6 -7 —8 -9 Q R W X Y 49 50 51 52 61 62 63 64 53 54 55 56 57 58 65 66 67 70 71 72 Table A-2 COS-310 Character Decimal Code 00 01 02 03 04 05 06 07 08 09 10 11 12 13 l4 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 A-2 Octal Code Decimal Character 00 01 02 03 Null 04 # 05 $ 06 07 10 11 12 13 14 15 l6 17 20 21 % Space 22 23 24 25 26 27 30 31 32 33 34 35 36 37 COS-310 CHARACTER SET 1 " Code 32 33 34 35 36 37 Set Octal Code Character 40 ? 41 @ 42 43 A C L + 44 44 45 46 47 50 51 52 53 54 , 45 55 46 47 48 49 56 57 60 61 62 63 64 & ' ( ) * - . / 0 l 2 3 4 5 6 7 8 9 : ; < = > 38 39 40 41 42 43 50 51 52 53 54 55 56 57 58 59 60 61 62 63 65 66 67 70 71 72 73 74 75 76 77 B D E F G H I J K M N o P Q R S T U v W X Y Z [ Tab ] 1 APPENDIX B COS-310 source, binary, types of files in the COS-310 system: Source, binary, and data files have similar strucsystem. System files use standard 05/8 SAVE format. There four are and data, ture. B.1 FILES COS-310 SOURCE FILES Each line in a source command file or DIBOL source file must be input This makes all source files look the same and line number. with a Each input line has the following makes them compatible with COS-310. format: line number word count (n) n-l words, two characters per The first word contains the word with the following expression. n The = ((number of characters second word is the count on COS-310 word for that line. It is computed line +1)/2)+l statement line number, 0000-7777 octal (0000-4095 decimal). The third and successive words contain the text of the line packed two The total characters of data per line characters COS-310 word. per does not include the two-character (l word) word count number. 3.2 COS-310 DATA FILES the of file is completely devoted to storage on unit holds one data file. Labels data logical only associated with logical units by the Monitor in conjunction Every block in data. a data Each files are with DIBOL or system programs. The format of a line in a data file is similar to the format line in a source file except there is no line number on a data A line of text in word n count (n) data file words, two a has the = (number characters word per of characters The second and successive words COS-310 characters per word. 3.3 a following format: The first word contains the word count with the following expression: n for file. in for record contain that line. It is computed +l)/2 the text of the line, two COS-310 BINARY FILES are file binary interpreted differently file, externally the two files are structured exactly alike. of That is, the binary code for each line a DIBOL source program is stored as a word count followed by the interpretive code to be used by the run-time system. Although the the than 3.4 contents of contents of a a data COS-310 SYSTEM FILES block of The first All system files are stored in OS/8 SAVE format. the file is a memory control block indicating where in memory the rest is of the blocks of the file are to be loaded. Each successive block a 256-word memory image. See the 08/8 Software Support Manual for de— tails. 3.5 SYSTEM DEVICE FORMAT This label the first COS—310 puts a label on all devices. occupies 256 words of each device; four words are the actual label, one word is the date, and the other words may be a bootstrap. 3-1 illustrates the layout of the Monitor portion of the system As noted in the figure, COMP should be the first file in the device. The location of COMP is particularly when file area. the important binary scratch area is to be expanded. Figure 3-2 COS-310 FILES BLOCK NO. (Octal) 0 Bootstrap 1 Directory 10 Monitor 14 Editor Overlay 20 Editor 34 Run—Time System Loader 40 Edit Buffer 60 Run-Time System 70 Compiler Overlays 100 Binary Scratch Area 140 Files OF MEDIA COS-310 FILES END Figure 8-1 Monitor Organization 8-3 is automatically put on a system device. system device is organized as follows: A The label Word directory of a Contents 0 The negative 1 The starting block number 2 The link word to the next directory block end. There are seven directory blocks on devices. 3 of directory entries in this block. for file of ways negative number equals —l). 5 The first 6 The next two characters of name. 7 The last two characters of name. 8 A 9 The 4 storage. if or empty all multifile (unused). Empty The number two auxiliary characters of two-character words entry per (al- name. extension. date. of the file 10 Length 11-255 Repeat of 5-10 for each file. (negative). kinds of files is allocated on the disk at beginning On an RK05 first free block following the COS-310 system files. for file available disk, the system directory knows that the space storage only extends to block 4095. Space for other the Access to Data Data Files are DFU. DFU information referenced actually for sets each by their logical unit up logical 0 Handler 0 Drive number 0 Starting segment Length in segments 0 3-4 Files address COS-310 FILES internal unit: an table numbers containing as assigned by following the the specific device handler to use drive number indicates which disk a particular logical a 12-bit indicated The starting segment is drive to reference. by the physical device space allocated for the which to number points this The length is the number of segments reserved for logical unit. logical unit. The for handler address is a pointer to unit. The Example: If logical unit teenth entry in 14 the handler address DK is assigned to a 32-block area on table might contain the following drive 1 the fourinformation: DKl, starting segment length 212 —40 (octal) (octal) 212-251 to would refer segments Any references to logical unit 14 The first block in segment 212 would have a label for (octal) of DKl. that logical unit. COS-310 FILES 3-5 APPENDIX C ERROR MESSAGE INDEX This index will refer you to the chapters where corrective and backinformation is located. Locate the error message you have enIf the message is countered and go to the chapter referenced. listed ‘more than once, check the message listed with the program that you are ground running. Message SECTION NOT ACCEPT ALPHA LITERAL ALREADY FOUND REQUIRED DEFINED VALUE Program Refer MENU Chapter 18 PRINT Chapter 16 PRINT Chapter 16 COMP Chapter 5 to BAD ALPHA BAD CHAIN Run—Time Chapter 2 BAD CHECKSUM PATCH Chapter 11 BAD COMPILATION Monitor Chapter 2 BAD DATE Monitor Chapter 2 BAD DIGIT Run-Time Chapter BAD DIGIT IN DATA DAFT Chapter 15 BAD DIGIT IN NUMERIC SORT Chapter 9 INITIAL 2 VALUE BAD DIRECTORY FILEX Chapter 10 BAD DIRECTORY Monitor Chapter 2 BAD DIRECTORY PATCH Chapter 11 BAD DIRECTORY PIP Chapter 8 Message Program Refer BAD Monitor Chapter 2 PATCH Chapter ll COMP Chapter 5 COMP Chapter 5 N LABEL BAD NUMBER BAD NUMERIC VALUE # to BAD PROC BAD PROGRAM Run—Time Chapter BAD RECORD SIZE SORT Chapter BAD RELATIONAL COMP Chapter BAD SWITCH SYSGEN Chapter BAD SWITCH DFU Chapter BAD WORK SORT Chapter PATCH Chapter DAFT Chapter 15 BLOCK UNIT T00 COUNT BIG CANT BACKSPACE PAST BEGIN BACKSPACE WITH SEQUENTIAL INPUT CANT OF FILE IBWUIW 11 DAFT Chapter 15 ERROR COMP Chapter COMMA MISSING COMP Chapter MENU Chapter PIP Chapter COMP Chapter FILEX Chapter CCP COMMAND SECTION NOT COMPARISON DATA ERROR INITIALIZATION DEVICE deV FOUND MISSING ERROR MUST BE INCLUDED IN DIBOL FILE NUMBER DIBOL FILE NUMBER NOT EDIT BUFFER FULL C-2 ERROR MESSAGE USE IN DISPLAY SECTION NOT CONFIGURATION INITED FOUND INDEX SYSGEN Chapter Run-Time Chapter Run-Time Chapter 2 MENU Chapter 18 Monitor Chapter 2 Program Refer Run-Time Chapter 2 DAFT Chapter 15 DDT Chapter 6 'FLOW Chapter 17 COMMAND Monitor Chapter dev, Monitor ’Chapter Message END OF FILE END OF INPUT ERR CMD IN FILE AT RECORD ERROR ERROR IN ERROR ON RETRY? EXCESSIVE GRID EXPECTED LABEL SIZE DAFT Chapter IS COMP Chapter COMP Chapter DAFT Chapter MISSING NOT ALLOWED EXPRESSION nnnn to EXTRA CHARS EXTRA CHARS AT STMNT END COMP Chapter EXTRA CHARS AT STMNT END SORT Chapter SORT Chapter COMP Chapter FILEX Chapter 10 FIELD NUMBER MISSING FIELD TOO LARGE OR OR 0 FILE ALREADY FILE NOT FOUND Monitor Chapter 2 FILE NOT FOUND PATCH Chapter ll FULL FILEX Chapter 10 FULL SYSGEN Chapter 3 PRINT Chapter 16 MENU Chapter 18 HEADER IS EXISTS 0 TOO LONG ILLEGAL CURSOR ILLEGAL DEVICE DFU Chapter 4 ILLEGAL DEVICE FILEX Chapter 10 ILLEGAL DEVICE Run—Time Chapter 2 ILLEGAL DEVICE PIP Chapter 8 POSITION SWITCH ERROR MESSAGE INDEX C-3 Message Program Refer ILLEGAL OPERATOR COMP Chapter 5 ILLEGAL PROGRAM Monitor Chapter 2 ILLEGAL RECORD DAFT Chapter 15 ILLEGAL RECORD Run—Time Chapter ILLEGAL SORT SORT Chapter 9 ILLEGAL STATEMENT MENU Chapter ILLEGAL STMNT COMP Chapter ILLEGAL SUBSTRING Run-Time Chapter ILLEGAL UNIT Monitor Chapter ILLEGAL UNIT SORT Chapter CLOSING - FILE # KEY to 2 18 IMPROPER DEFINITION PRINT Chapter 16 IMPROPER LITERAL PRINT Chapter 16 IMPROPER USE PRINT Chapter 16 Monitor Chapter IN OF DECIMAL PLACES USE INSUFFICIENT SPACE ON DEVICE DFU Chapter INSUFFICIENT SPACE ON DEVICE FILEX Chapter INITIAL ALPHA VALUE DOESN'T BEGIN WITH QUOTE SORT Chapter INITIAL VALUE TOO BIG SORT Chapter INITIAL VALUE TOO SMALL SORT Chapter INITIAL VALUE WRONG SIZE COMP Chapter INTEGER FROM REQUIRED PRINT Chapter PRINT Chapter l6 INTEGER FROM 1-15 1-132 REQUIRED INTEGER REQUIRED PRINT Chapter l6 INVALID OPERATION PATCH Chapter l3 DAFT Chapter l5 KEY C-4 ENTIRELY PAST ERROR MESSAGE END OF INDEX RECORD Montage KEY EXTENDS KEY TOO LABEL PAST END OF RECORD BIG NOT ALLOWED Program Refer DAFT Chapter 15 DAFT Chapter COMP Chapter to 15 LINE TOO LONG Monitor Chapter LINE # TOO LARGE Monitor Chapter LINE TOO LONG Run-Time Chapter LONG PRINT Chapter 16 BIG PATCH Chapter COMP Chapter LITERAL TOO LOCATION TOO MISSING CLOSE PAREN MISSING CLOSE QUOTE MISSING INITIAL MISSING OPEN ON ALPHA VALUE PAREN MISSING OPERAND MODE INITIAL ll VALUE SORT Chapter SORT Chapter COMP Chapter COMP Chapter COMP Chapter MISSING OR BAD MISSING QUOTE COMP Chapter MISSING RELATIONAL COMP Chapter MOUNT filnam #nn FOR INPUT: Monitor Chapter MOUNT filnam #01 FOR INPUT: Monitor Chapter MOUNT filnam Monitor Chapter PRINT Chapter 16 PRINT Chapter 16 PRINT Chapter 16 COMP Chapter PRINT Chapter 16 CREF Chapter MUST BE #nn FOR OUTPUT: IDENT MUST BE NUMERIC MUST BE NAME PREVIOUSLY NEED FILE nnn IS ITEM S DEFINED NAME BEING IGNORED ERROR MESSAGE INDEX C-S Message Program Refer NO BOOT Chapter Run—Time Chapter PATCH Chapter 11 NO COMMA AFTER FIELD NAME SORT Chapter NO DATA DAFT Chapter NO END FILEX Chapter 10 NO ENDING QUOTE PRINT Chapter NO FILE Run-Time Chapter Monitor Chapter NO BUFFERS NO CHANGE ?NO . FILE LEFT BLOCK IN TO SAVE to 15 16 NO INIT Monitor Chapter NO INPUT FLOW Chapter NO INPUT SORT Chapter NO INPUT DIRECTIVE PRINT Chapter 16 NO INPUT FILE DAFT Chapter 15 NO LABEL NAME DAFT Chapter 15 NO LP Monitor Chapter NO OUTPUT FILE DAFT Chapter 15 NO PRINT ITEMS PRINT Chapter 16 NO ROOM FILEX Chapter 10 NO PIP Chapter BUFFER ROOM NOT A OR D COMP Chapter NOT A OR D SORT Chapter PRINT Chapter 16 PRINT Chapter 16 NOT DEFINED NOT ENOUGH RIGHT NOT ENOUGH ROOM C-6 PARENTHESES FOR ERROR MESSAGE SYSTEM INDEX AND FILES DFU Chapter 4 Program ROOM NOT ENOUGH FOR SYSTEM AND Refer to FILES FILEX Chapter 10 NOT FOUND FILEX Chapter 10 NOT LABEL COMP Chapter SORT Chapter SORT Chapter DFU Chapter Run-Time Chapter SORT Chapter DAFT Chapter 15 DAFT Chapter 15 NOTHING AFTER FIELD NAME REPEATED OR OUT NUMBER OF # TOO LARGE LONG NUMBER TOO ERROR OUTPUT OUTPUT FILE ALREADY OPEN OPEN ORDER OUTPUT FILE STILL PICTURE T00 LONG PRINT Chapter 16 PROGRAM TOO BIG COMP Chapter PROGRAM TOO BIG Run-Time Chapter DAFT Chapter Run—Time Chapter COMP Chapter Monitor Chapter PUSHDOWN OVERFLOW OVERFLOW PUSHDOWN TOO RECORD BIG REPLACE? REPLACE filnam #nn ? Monitor Chapter RETURN WITHOUT CALL Run-Time Chapter COMP Chapter SUBSCRIPT ERROR COMP Chapter SUBSCRIPT NOT NUMERIC COMP Chapter SUBSCRIPT Run-Time Chapter SYNTAX ERROR DFU Chapter SYNTAX PRINT Chapter STMNT TOO COMPLEX TOO ERROR BIG ERROR MESSAGE INDEX C-7 ' Message T00 MANY COLUMNS T00 MANY COMMANDS T00 MANY COMMANDS T00 MANY COMPUTE T00 DATA MANY REPORT IN FOR 1 CODE STATEMENTS ITEMS Program Refer PRINT Chapter 16 MENU Chapter 18 MENU Chapter 18 PRINT Chapter 16 PRINT Chapter 16 to T00 MANY FILES SORT Chapter 9 T00 MANY ITEMS COMP Chapter 5 T00 MANY LEFT PARENTHESES PRINT Chapter 16 T00 MANY LIST ITEMS PRINT Chapter T00 MANY RIGHT PRINT Chapter 16 T00 MANY SYMBOLS! COMP Chapter TOO MUCH DATA COMP Chapter UNDEFINED NAME COMP Chapter UNKNOWN DIRECTIVE PRINT Chapter UNRECOGNIZABLE SORT Chapter COMP Chapter ZERO DIVISOR Run-Time Chapter 0 NOT ALLOWED DAFT Chapter WRONG C-8 DATA PARENTHESES LINE TYPE ERROR MESSAGE INDEX 16 APPENDIX D ADVANCED PROGRAMMING TECHNIQUES D.1 ACCEPT AND DISPLAY D.1.1 Background Information statements were originally used when the terminal was a Teletypefi The VT52 display terminal uses newer concepts programmable cursor control and hardware display clear. ACCEPT and DISPLAY statments were the DIBOL language to use these features. to The terminal can added in two ways: now be used XMIT -— 1. As a Teletype by using 2. As a powerful XMIT data entry statements. tool by ACCEPT using and DISPLAY statements. (Refer to the ACCEPT and DISPLAY statements in Chapter 1 before proceeding further.) Interaction D.1.2 of ACCEPT and DISPLAY DISPLAY statements are used extensively in data entry pro— The These data entry programs typically work one of two ways. This first asks (DISPLAY) questions and interprets (ACCEPT) answers. The second method method of operation closely simulates a Teletype. or on the screen and the cursor either a format moves heading displays to the right or to a position below the question to be answered. ACCEPT and grams. is data en— second method, the format is never cleared but This method is used and cleared continuously from the screen. in repetitive data entry and updating. Quite often the four keys up down arrow, left arrow, and right arrow have special meanings. arrow, For example, assume ten headings are displayed on the screen, indicatten fields are to be entered or updated. The up arrow might be ing used to re—enter information in the first field, no matter which field With tered the inforthe down arrow might mean no more is currently being entered; the left arrow might restart entering for mation any of the fields; the the right arrow might mean go on to data into the current field; next field without changing the current field. Example Using ACCEPT and D.1.3 To DISPLAY a six—digit customer number following program might be used: enter the and a lS—character customer name, RECORD TCHAR,D2 ALPHA,A15 CNO,D6 CNAME,A15 PROC l DISPLAY(1,1,1) ;Clear screen and position cursor. CUSTOMER NAME') DISPLAY(0,0,'CUSTOMER NO. DISPLAY(2,1,2) ;Clear line 2 and position cursor. ALPHA= ;Clear this field. ACCEPT(TCHAR,ALPHA) LOOP, ON ERROR LOOP ;Re—enter if not numeric. CNO=ALPHA ALPHA= DISPLAY(2,16,0) ;Clear this field again. ;Position cursor. ACCEPT(TCHAR,ALPHA) CNAME=ALPHA ;Save data. . GO D.1.4 LOOP Generalized ACCEPT Subroutines D.1.4.1 ple TO Hardware works 1. Clear lacks Type RUBOUT to clear the program Type CTRL/U rent Since it properly, both 2. Display data line and Feature Although the previous features which would be useful: — (a DIGITAL convention) from both the program D-2 and to clear the character the entire from cur- display. is getting more sophisticated, it can best be calls to a subroutine. The following two subroutines and will accept data from the keyboard and use the RUBOUT programs acceptance performed by test entered the previously the display. exam- ADVANCED PROGRAMMING TECHNIQUES the CTRL/U key as previously first The specified. program the clearing feature built into the hardware of the VT52. same line the Unfortunately, this feature destroys data if it is on and to the right of what is being accepted. key and uses START KBDIN, RECORD A80 RECORD 80A1 ROW, RECORD D2 COL, D2 TCHAR, CHAR, D2 Al D2 D2 KBDBUF, VTSZIN, VTLIM, ;Erases remainder of line ;Storage for keyboard for errors. input. ,X ;Work area. ;Cursor Y—coordinate on entry to ;(needed for correction only). ;Cursor X—coordinate on entry to ;(needed for correction only). subroutine VT52 subroutine VT52 character in an accept statement. from an accept statement. character ;Input ;Number of characters accepted by subroutine VT52. ;Number of characters to be accepted by ;subroutine VT52. ;Terminating PROC BEGIN, DISPLAY(1,1,1) ;Clear screen. DISPLAY(1,40,'ERASED IN CORRECTION‘) DISPLAY(1,1,'NAME:') *********** ROW=1 * SAMPLE * COL=6 VTLIM=20 CALL VT52 * TEST PROGRAM * ;20 IF (KBDBUF.EQ.'END') GO TO characters STOP ~\. CALL ~. * * * * * * *********** sequence ROW= Y coordinate COL= X coordinate VTLIM= Maximum number ~o * * ‘ BEGIN Calling ~o maximum. * * of characters to accept VT52 ;Accept a maximum of VTLIM characters at location specified by ;ROW and COL. Return when either the maximum number of characters ;(VTLIM) has been entered, a termination character is entered, is entered. Rubout deletes last character entered and the entire entry. RUBOUT and CTRL/U clear the eliminates ;CTRL/U ;remainder of the line faster than displaying spaces. ;or a space VT52, VT521N= VT522, ACCEPT(TCHAR,CHAR) IF (TCHAR.EQ.O) GO TO VT523 IF (TCHAR.EQ.21) GO TO VT524 KBDBUF= ;Nonterminating character. ;CTRL/U. ADVANCED PROGRAMMING TECHNIQUES D-3 IF VT523, (TCHAR.EQ.32) TO VT525 GO ;RUBOUT. RETURN ;Terminating IF(CHAR.EQ.‘ ;than rubout or CTRL/U. ;Space is a terminating ') RETURN character ;character. ;To eliminate this this other feature, and put ;label on next statement. ;VT521N=# of input characters. ;remove INCR VTSZIN statement KBDIN(VT521N)=CHAR VT524, IF (VT521N.EQ.VTLIM) GO TO RETURN ;The specified number of ;characters were input. VT522 IF(VT521N.EQ.0) GO TO VT52 DISPLAY(ROW,COL,2) ;to GO VT525, characters entered end—of—line. ;Clear TO VT52 IF(VT521N.EQ.0) KBDIN(VTSZIN)= GO TO VT522 VT52IN=VT521N-l DISPLAY(ROW,COL+VT521N,2) ;RUBOUT previous ;to GO D.1.4.2 TO Clear VT522 Data by Displaying Spaces program clears incorrectly entered data by displaying slower than using the hardware display clear feature, same line and to the right is not cleared. START character end-of-line. Incorrect ;Corrects only characters in — The following spaces. but data This on error. RECORD KBDBUF, KBDIN, A80 RECORD 80Al RECORD BLNKSO, A80 DZ ROW, COL, D2 TCHAR, VTLIM, D2 Al D2 D2 VT52XX, DZ CHAR, VTSZIN, ;Storage for keyboard input. ,X ;Work area. ;80 blank characters. ;Cursor Y coordinate on ;(needed for correction ;Cursor X coordinate on ;(needed for correction ;Terminating character ADVANCED subroutine VT52 entry to subroutine VT52 only). in an ACCEPT statement. ;Input character from an ACCEPT statement. ;Number of characters accepted by subroutine VT52. ;Number of characters to be accepted by ;subroutine VT52. ;Temporary storage for subroutine VT52. PROC D-4 to entry only). PROGRAMMING TECHNIQUES is the BEGIN, DISPLAY(l,l,l) ;Clear screen. DISPLAY(1,40,'NEVER ERASED') *********** * * DISPLAY(l,l,'NAME:') * * ROW=1 * SAMPLE COL=6 VTLIM=20 * TEST * * PROGRAM * characters maximum. CALL VT52 * * IF * * (KBDBUF.EQ.'END') GO TO ‘0 ;20 * STOP *********** BEGIN Calling ~u sequence ROW= Y-coordinate X-coordinate Maximum number of characters to accept CALL VT52 ~u ;Accept a maximum of VTLIM characters at location specified by ;ROW and COL. Return when either the maximum number of characters ;(VTLIM) has been entered, a termination character is entered, ;or a space is entered. RUBOUT deletes last character entered and ;CTRL/U eliminates the entire entry. RUBOUT and CTRL/U display ;space(s) to delete only the necessary characters (not the ~n COL= ~¢ VTLIM= ;remainder of the line). VT52, VT521N= VT522, ACCEPT(TCHAR,CHAR) IF (TCHAR.EQ.0) GO TO VT523 IF (TCHAR.EQ.21) GO TO VT524 IF (TCHAR.EQ.32) GO TO VT525 ;RUBOUT. RETURN ;Terminating KBDBUF= VT523, IF(CHAR.EQ.' ') ;Nonterminating ;CTRL/U. ;remove INCR VT52IN GO VT524, TO RETURN VT525, of statement. input characters. ;The specified number of ;characters were input. VT522 ;Clear ;Reposition DISPLAY(ROW,COL,0) TO this ;VT521N=# IF(VT521N.EQ.0) GO TO VT52 DISPLAY(ROW,COL,BLNK80(l,VT521N)) GO other character ;than RUBOUT or CTRL/U. ;Space is a terminating ;character. ;To eliminate this feature, RETURN KBDIN(VT521N)=CHAR IF (VTSZIN.EQ.VTLIM) character. characters entered. cursor. VT52 IF(VT52IN.EQ.0) KBDIN(VT521N)= GO TO VT522 VT521N=VT521N-l VT52XX=VT521N+COL DISPLAY(ROW,VT52XX,' ') DISPLAY(ROW,VT52XX,0) GO TO ;Rubout previous character. ;Reposition cursor. VT522 ADVANCED PROGRAMMING TECHNIQUES D-S D.l.4.3 the Other Desired Features previous program, the Right justification 2. Automatic features are START KBDBUF, VT52IN, VT5215, VTSZXX, the following subroutine and A16 PROC INCR ;Clear screen. 24) (ROW,53,'NOT ERASED') (ROW,1,'NAME:') .GT. STOP ;20 characters maximum. STOP D-6' * * * * * * * * SAMPLE * * TEST * * * PROGRAM * * * * * * * * * *********** BEGIN Calling *********** * COL=34 VTLIM=15 CALL VTSZN - statement. * (KBDBUF.EQ.‘END') DISPLAY(ROW,30,'NO:') ‘0 ACCEPT ROW (ROW TO an 0 IF GO in ;Input character from an ACCEPT statement. ;Number of characters accepted. ;Number of characters to be accepted. ;Cleared for alpha input, set to l for numeric input. ;Contains numeric input for VT52N entry. Not changed ;or used in VT52A entry. ;Temporary storage for redisplay of numeric input. COL=7 VTLIM=20 CALL VTSZA ‘0 program: keyboard input. ;Terminating character DISPLAY \o test ;Cursor Y coordinate. ;Cursor x coordinate. D2 D2 A1 D2 D2 D1 D15 DISPLAY ‘0 fields. ;Work area. ;80 blank characters. D2 IF fil in 80Al DISPLAY(1,1,1) BEGIN, in ;Storage for RECORD VTLIM, VTSZSW, the features found also be desired: ,X BLNK80, A80 ROW, COL, TCHAR, CHAR, numeric to might ;Subroutine VT52A and VT52N. RECORD A80 RECORD KBDIN, features positioning. cursor used of addition In following 1. These - sequence Y coordinate COL= X coordinate VTLIM= Maximum number of characters CALL VT52A for alphanumeric input CALL VT52N for numeric input ROW= ADVANCED PROGRAMMING TECHNIQUES to accept ;Accept a maximum of VTLIM characters at location specified by ROW ;and COL. Return when VTLIM characters or a termination character For numeric input, a space is a terminator. ;is entered. deletes last character entered and CTRL/U eliminates the ;RUBOUT ;entire entry. RUBOUT and CTRL/U display space(s) to delete only ;the necessary characters (not the remainder of the line). ;For numeric input, the entire entry is redisplayed right-justified zeros suppressed. VT5215 contains the number to the calling program. ;with leading ;on return VT52A, VT525W= VT52N, VT52, ;Entry for alphanumeric VT52 VTSZSW=1 VT521N= KBDBUF= GO input. TO numeric ;Entry for input. ;Position cursor. ACCEPT(TCHAR,CHAR) IF(TCHAR.EQ.0) GO TO VT523 ;Nonterminating DISPLAY(ROW,COL,0) VT522, IF(TCHAR.EQ.21) IF (TCHAR.EQ.32) (VT521N.EQ.0) TO VT524 GO TO VT525 ;CTRL/U. RETURN ;No GO VT522X, IF VT522Y, IF (VTSZSW.EQ.0) RETURN VT5215=KBDBUF(1,VT521N) character. ;RUBOUT. input except terminating ;character. ;Alphanumeric input. ;Numeric input (can't exceed ;15 digits). VT52XX(l,VTLIM+l)=VT5215,'XXXXXXXXXXXXXXX-' ;Allows negative ;numbers. DISPLAY(ROW,COL,VT52XX(1,VTLIM+1)) ;Display numeric input ‘ ;right—justified and zero ;suppressed. VT523, RETURN IF (VTSZSW.NE.1) GO TO ') GO TO IF VT523B, (CHAR.EQ.'—') (CHAR.LT.'0') IF (CHAR.LE.'9') DISPLAY (0,0,7) VT523X VT522X VT523X VT523B GO TO VT523X IF GO TO IF GO TO GO VT523X, (CHAR.EQ.‘ INCR VT52IN KBDIN(VT521N)=CHAR IF (VT521N.EQ.VTLIM) GO TO VT526 . GO VT524, ;The specified number of ;characters were input. VT522 (VT52IN.EQ.0) GO TO VT52 DISPLAY(ROW,COL,BLNK80(l,VT52IN)) IF GO VT525, TO input. ;Sound alarm-—bad input. ;Start over (don't clear ;the error). ;VT521N=# of input characters. VT52 TO ;Save alphanumeric ;Space as a terminating ;character for numeric input. ;Minus sign is acceptable. ;Check for numeric input. TO ;Clear characters entered. VT52 (VT521N.EQ.0) KBDIN(VT521N)= IF GO TO VT522 VT52IN=VT52IN-l VT52XX=VT521N+COL DISPLAY(ROW,COL+VT521N,‘ ') ;Rubout previous character. ADVANCED PROGRAMMING TECHNIQUES D-7 :Reposition DISPLAY(ROW,COL+VT521N,0) GO VT526, TO cursor. VT522 IF(VTSZSW.EQ.1) GO VT522Y TO RETURN A command protocol D.l.4.4 is Escape Code Sequences as Terminators built around the Escape code (27 decimal) to implement commands needed by the VT50 and VT52, but not found in 7-bit ASCII. Upon receiving the Escape code 27, the terminal is set to Escape mode and treats the — next are character received as a called Escape Sequences. order In for code to the use command. VT50/VT52 cursor Commands created positioning keys in as this manner terminators statement, the DIBOL program must check for the Escape 27) and then execute another ACCEPT statement into a one ACCEPT an (decimal field. The contents of this variable can be character alphanumeric The program then will erase checked to determine which key was typed. the alpha character entered in this manner and go to the routine associated to the key that was typed. SPECIAL 27-A+ 27—B+ 27—C+ 27—D+ 27—P ESCAPE Cursor SEQUENCES Positioning Functions Special function keys at top numeric keypad (Unlabeled at present) of D.2 DIRECT ACCESS Background Information D.2.1 A TECHNIQUES file contains records of fixed variable or length. the size, system automatically operating The size of a record into 512—character blocks. records (in characters) is two plus the number of characters in all the fields in the record. (The two added characters represent the record size in add characters divided by two.) If the resulting record size is odd, one character since only an even number of characters may be written. Regardless of the record writes the Example: If A88 D-8 the two field, ADVANCED fields in a record record size is the are defined 100 (2+9+88+l). PROGRAMMING TECHNIQUES as a D9 field and an in records Assuming that all of the length, the operating system will pack this file the are same 5 records and the first 12 characters of the sixth record into the first block; the last 88 from the characters sixth record, 4 records, and the first 24 characters from the eleventh record into the second block; and so on to the When this end. file input in is later processed, either sequentially (defined statement) or through direct access (defined as UPDATE in an INIT statement), the operating system will comrestore the record, even if it overlaps two blocks, bepletely fore passing it to the DIBOL program. as D.2.2 The Reason an for INIT Direct Access Many applications involve the sequential processing of data. transaction file is entered in random master file sorted in the same a order, sorted For ex— then used to update a Errors in sequence. the transaction file cannot be found until the UPDATE program is run. made for the The errors are corrected and a new transaction file is corrected items, which is then sorted and run against the master file. This type of This process continues until no more errors exist. pro— 20 of evolved with the electronic data process— years ago age cessing ing. Systems specialists have desired a better method of operation. ample, and is to verify that data is entered correctly. The op— keying the data file should be able to interact with the master file. For example, a program can be written in which an operator information could type an employee number and know entering payroll The best method erator exists on the master within a second or two whether this employee file. This would be impossible with sequential processing because of Direct acthe time involved in sequentially accessing every record. of desired record without cess retrieval processing any permits any other D.2.3 records. How the Direct Access Technique Works in DIBOL The to access any record in a file. uses a record number prohas to convert operator input into a record number recognizable gram will This section on direct access explain by the operating system. several methods to make this conversion. DIBOL ADVANCED PROGRAMMING TECHNIQUES D-9 0.2.4 Unsorted File Assume that you have an 1 unsorted file containing as other a KEY field as well to 99 fields. done in the records. This contains record key The first thing be used for direct access. following is to fill up a table. There is a one-to-one correspondence program between each element in the table and each record in the file. No 1/0 is to if determine a code is in the master file necessary specified since this code would not have a match in the table lookup. Each will RECORD MASTER D5 KEY, , TABLE, I, LOOKUP, :Could be any size field. :Remainder of file. A90 RECORD 10005 D3 D5 PROC 1 INI'I‘ (1 , INPUT, :Working storage. ;Table containing keys. ;Index. ' FILNAM ') XMIT(1,MASTER,EOF) LOAD, INCR I TABLE(I)=KEY GOTO LOAD FINI(1) EOF, INCR I :Indicates end of table. TABLE(I)=99999 INIT(1,UPDATE,'FILNAM') ;LOOKUP contains code for master ;file lockup. . I: FINDIT, INCR I IF(TABLE(I).EQ.LOOKUP) GO TO FOUND ;Match. IF(TABLE(I).EQ.99999) GO TO NONE 7N0 match. NONE GOTO XMIT FINDIT (8,'RECORD NOT FOUND') STOP FOUND, D-10 READ(1,MASTER,I) ;Read ADVANCED PROGRAMMING TECHNIQUES record I. Sorted File 0.2.5 in Section D.2.4 except sort the file by same circumstances as Filling the table is the same, but table lookup is faster since code is not compared to every element in the table. A "no match" the Use key. the condition is is known as soon as down the the table element exceeds the code. number of in the table comparisons middle of the table to the code, checking which half of the table might contain the code, determining the middle of that half of the table, and so on until the element is found. This more comtechnique allows faster access, but programming it is much It lookup possible to cut by comparing the plicated. RECORD KEY, D5 , A90 MASTER RECORD TABLE, I, LOOKUP, D5 PROC LOAD, ;Working storage. 100D5 D3 1 INIT(1,INPUT,'FILNAM') XMIT(1,MASTER,EOF) INCR I TABLE(I)=KEY GOTO EOF, LOAD FINI(l) INCR I ;Indicates end of table. TABLE(I)=99999 INIT(l,UPDATE,'FILNAM') ;Lookup contains code for . master file. I: FINDIT, INCR I IF(TABLE(I).EQ.LOOKUP) IF(TABLE(I).GT.LOOKUP) NONE, GO TO FOUND GO TO NONE GOTO FINDIT XMIT (8,'RECORD NOT FOUND') ;Match. ;No match. STOP FOUND, READ(1,MASTER,I) ;Read record I. ADVANCED PROGRAMMING TECHNIQUES D-ll is impractical to use direct access with DIBOL on an unsorted file containing many records since an exceedingly large lookup table would It be needed. D.2.6 At Rough Table, some point, be saved available. in a a No Index File file will contain table. When this too many point is records reached, for two every key solutions to are The first is to create a "rough" index table containing every 10th or For 20th key. lookup, the rough index will specify within 10 or 20 is or 20 records on the master file which one desired. These 10 records are then sequentially examined to find the desired record (see the following example program). and “fine" a The second solution is to create a "rough" index table In this method, the rough index table specifies to within index file. The index file is then 10 or 20 records of the file desired. sequenIf a match occurs, the mastially examined to find the desired key. ter file is then read. The proper use of an index file technique can cut down on the number of For a file of 98 characters reads. master I/O per record example, would take up to four I/O reads to find the desired record if the index An index file technique could narrow within 20 records. rough This technique bewould take one I/O read to find the master record. comes faster as the size of the master file record increases. RECORD MASTER D5 A90 KEY, , TABLE, 1, J, LOOKUP, :Working storage. ;lst,let,4lst key,etc. RECORD 100D5 D4 D4 D5 PROC l (l,INPUT,'FILNAM') XMIT(1,MASTER,EOF) INIT LOAD, INCR I IF (I.NE.I/20*20+l) INCR J TABLE(J)=KEY GO EOF, TO GO ;Save TO LOAD only lst,21st,4lst key, LOAD FINI(1) INCR J ;Indicates end INIT(1,UPDATE,'FILNAM') TABLE(J)=99999 D-12 ADVANCED PROGRAMMING TECHNIQUES of table. etc. ;LOOKUP contains code for master file. I =1 ROUGH, I NCR I IF(TABLE(I).LE.LOOKUP) GO TO ROUGH ;No rough match yet. ;Set I to beginning of rough index-1. I=(I—2)*20 FINE, INCR I READ(l,MASTER,I) IF(KEY.LT.LOOKUP) GO TO FINE ;NO match yet. IF(KEY.EQ.LOOKUP) GO TO FOUND XMIT (8,‘RECORD NOT FOUND') ;No match. STOP FOUND, 0.2.7 Rough Table Plus Index File MASTER RECORD D5 A90 RECORD 100D5 D4 ;Working storage. ;lst,2lst,4lst key, etc. D4 D5 RECORD D5 PROC 2 LOAD, ;Index file. INDEX INIT(1,INPUT,'FILNAM') INIT(2,0UTPUT,'XFILE') XMIT(1,MASTER,EOF) INCR I XKEY=KEY XMIT(2,INDEX) IF(I.NE.I/20*20+l) INCR ;Create GO TO EOF, index file. J TABLE(J)=KEY GO fine LOAD ;Save only lst,let,4lst key. LOAD TO FINI(l) FINI(2) INCR J TABLE(J)=99999 INIT(l,UPDATE,'FILNAM') INIT(2,UPDATE,'XFILE‘) ;Indicates end of table. ;LOOKUP contains code for master file. i=1 ADVANCED PROGRAMMING TECHNIQUES D-13 ROUGH, INCR I FINE, INCR I IF(TABLE(I).LE.LOOKUP) GO TO ROUGH ;No rough match yet. ;Set to beginning of rough index-l. I=(I—2)*20 . ;Read index record. READ(2,INDEX,I) 1F£XKEY.LT.LO0KUP) GO TO FINE ;No match yet. IF(XKEY.EQ.LOOKUP) XMIT (81'RECORD NOT GO TO FOUND :No match. FOUND') STOP READ(1,MASTER,I) FOUND, D.2.8 ;Match. , Summary This discussion on direct access does not include information about all situations. In cases where the master file is between possible 2,000 and 40,000 records, the approach might be to have a very rough table, a rough index file, a fine index file, and a master file. is possible to work with a large unsorted master file by creating index file two fields: the key field and the record containing When a number of the master file. Sort the index file by key. match is found on the key field of the index file, the program uses the record number field to read the proper record of the unsorted mas— ter file. It an Creation of an index table or an index file can be done in a separate This separate program can save from several seconds to sevprogram. eral minutes each time the program is run. The index file would only need to be changed when a master file is updated (perhaps on a weekly or monthly basis). D.2.9 To Record Count one of the number of records in a master file, reserve in first The record the record to contain the record count. is the number of records in the file. When a record is added to keep track field count this file, the record count in the first record is incremented by one This technique will work fine with a file master and written out. that is out of order. D-14 ADVANCED PROGRAMMING TECHNIQUES D.3 DIRECT ACCESS NOTES 0.3.1 XMIT Statements (Extending a File) statements can be XNIT file. An XMIT of record An XMIT n+1. interspersed with direct access operations following a READ with record n is equivalent to a Successive XMIT's following a WRITE of read record n records n+2, transmits n+3, etc. to record data on a READ n+1. Records n+2 to the end of the file may be changed by successive XMIT's after a WRITE. However, to change a series of records in the middle of the file, do not use a WRITE followed by several XMIT's. The ful XMIT D.3.1.l the statement used after WRITE a statement has following the use- applications. Truncating following a File — To truncate a file after record N, use a file TECHNIQUES D-15 sequence: READ(channel,record,n) WRITE(channe1,record,n) XMIT(channel,NULL,EOF) FINI(channel) EOF, where NULL is a record with no contents defined by: RECORD NULL RECORD 0.3.1.2 with n Appending records, use to a the File — To following READ(channel,record,n) WRITE(channel,record,n) XMIT(channe1,record) append records to the end of sequence: ;Append records to file. XMIT(channel,record) EOF, XMIT(channel,NULL,EOF) FINI(channel) ADVANCED PROGRAMMING 0.3.1.3 of the Rewriting file, use A File the - rewrite To following a file from record n to the end sequence: WRITE(channel,record,N) XMIT(channe1,record) XMIT(channel,record) ;Rewrite records . EOF, D.4 to end—of-file. XMIT(channel,NULL,EOF) FINI(channel) NUMERIC FIELD VERIFICATION Any numeric field that is entered in a DIBOL program should be checked if it determine contains The numeric field only numeric data. should be read as an alphanumeric field XMIT or an ACCEPT through This move is preced— statement. Then it is moved to a numeric field. ed by an ON ERROR statement to check for non—numeric data. For examto ple: RECORD TCHAR, DECMAL, ALPHA, D2 D5 A5 PROC ALPHA= ACCEPT(TCHAR,ALPHA) ON ERROR FIX DECMAL=ALPHA With an alphanumeric-to-numeric lowing examples illustrate most cases: ALPHANUMERIC NUMERIC ' 00123 00123 00123 123' ' '123 '00123' ' —123' ‘ 123—' '-123—' ' 12-3' '1-2—3' '1+2+3' '1+2—3' ' '1 23 '00128' D-16 move, ADVANCED PROGRAMMING 00128 00128 00123 00128 00123 00123 00128 00123 illegal TECHNIQUES many checks are done. The fol— The If characters only legal 9!I.——JI and +I in an alphanumeric-to-numeric move are 0 to ‘- file contains numeric fields, these fields must be read as If contain a the least they negative number, significant contains a minus sign and is listed with its equivalent character. For If 3W were read as example, —37 would look like 3W. run-time error would alphanumeric, and then converted to numeric, a occur since letter of the is in an any alphabet illegal conversion. alphanumeric-to-numeric data a numeric. character D.5 CHAIN STATEMENT NOTES 0.5.1 Interaction of CHAIN and Source input files can be specified Accessing such files ed programs. lowing rules. All 1. files must files. the dummy statements. command first be in command containing chain— done according to the fol- the RUN command the before pronam, filnaml...,filnam7 files could be processed in pronam. statement value of a to over" were: Transferring Variable the chained must must source D.5.2 For file RUN 0 RUN source input open the first files by the chained "skip remaining In the above RUN issuing dummy INIT(channel,SYS) statements. in to read file INPl, PRONAM would have to order command, Because CHAINZ issue two dummy INIT(channel,SYS) statements. is the last chain program, it would not have to issue any RUN CHAIN a listed Any CHAIN statement which is 2. the in must PRONAM+CHAIN1+CHAIN2,INPl,INP2 .RUN If be CHAIN source (channel,SYS) INIT variable to program occupy the same complished by either more than once by executing a Values be successfully transmitted from one in the variable which the value another, appears location in both CHAIN programs. This may be acof the two following methods. to ADVANCED PROGRAMMING TECHNIQUES D-l7 Define be records which are to passed and make the definitions programs for variable names which may be different). 1. between chained identical (except all first, Example: Chainl Chain2 RECORD RECORD CUST, PROD, RECORD STOCK, 2. Use the Multiple it D2 INVENT D4 RECORD QUANTY, INVENT D4 compiler storage maps listing for the that the desired variables verify two CHAIN occupy pro- the same location. storage Sometimes CPINFO CUST, A30 PCODE, D2 to grams 0.5.3 A30 CHAIN is Entry Points desirable the However, program. chained program at the the Using technique to CHAIN first have several statement statement entry points starts always following the into a execution PROC CHAIN of the statement. of transferring variable values between chained the multiple entry points can be programmed as indicated in following example. programs, Chainz Chainl RECORD RECORD WHERE,D2,01 RETURN,D2 WHERE,D2 RETURN,D2 PROC PROC TO(Ll,L2,L3,L4),WHERE Ll,RETURN=2 GO GO CHAIN TO(E1,E2,E3),WHERB 2 L2,... WHERE=RETURN CHAIN l D-18 ADVANCED PROGRAMMING TECHNIQUES D.6 DIBOL PROGRAMMING OF SOURCE FILES D.6.l Up Operating to RUN The at run a DIBOL program. They are is not available to a DIBOL program. Division Data RECORD in filnaml...,filnam7 pronam, edit buffer D.6.2 The files can be used time by: source seven specified Procedures description RECORD would be follows: as recnam LINENO, A2 CHAR, A120 LINENO contains the ignore the a line two-character line number. However, number it can in binary. Most programs be converted to decimal by statement: varnam Varnam must = #LINENO*64+#LINENO(2,2) be CHAR contains a the DIBOL four-digit field. characters program may record. This can be lines: want to done by one line created by the editor. determine the number of characters in with preceding the RECORD statement of The the the RECORD TRICK, and 2A1 adding the following line in varnam = the Procedure Division: (4096-64*#TRICK(3)—#TRICK(4)*2 three-digit field. Varnam must be There is Monitor tabbing within a by output from the command LIST or LIST/L is done by the operating system. of are internally stored as characters with a decimal equivalent Any character may be checked for a tab by the statement: Tabs no IF(#CHAR(n,n).EQ.61) CHAR. GO TO The tabbing seen 61. TAB ADVANCED PROGRAMMING TECHNIQUES D-19 D.6.3 The Procedure Division first following file source in specified the RUN is command opened by the the EOF statement: INIT(channel,SYS) Each record is accessed by the following statement: XMIT(channel,record,eof label) When an end—of-file condition label of the XMIT statement. ment be file. must source occurs, At that executed prior to an To handle a variable INIT(channel,SYS) statement by an the transfers program to EOF label, a FINI channel a INIT(channel,SYS) to open number of ON ERROR state— second files, precede source The statement. the program will to the ON ERROR statement when an INIT(channel,SYS) transfer statement is executed and there are no more source files. The only way CHAIN n source files. to process a which statement source resets file the more than once is to execute operating system pointers files This example combines up to seven source file. The resulting data file can be converted into to a a to single data file using source FILEX. Example: RECORD D3 RECORD 2A1 RECORD SIZE, TRICK, A122 PROC , ON ;Line from LINE source file. 2 ERROR NOFILE ;Open system file. ;Open output file on logical unit 1. XMIT(1,LINE,EOF) ;Read a line from source file. SIZE=(4096-64*#TRICK(3)-#TRICK(4))*2 ;Get size of line. XMIT(2,LINE(3,SIZE+2)) ;Output line without line number. INIT(l,SYS) INIT(2,0,'$FILE',1) NEXT, GO TO NEXT ;Close system file. FINI(l) EOF, ON ERROR DONE INIT(l,SYS) GO DONE, NOFILE, D-20 TO ;Open next system file. NEXT FINI(2) ;Close output file. STOP ADVANCED PROGRAMMING TECHNIQUES a the D.7 CHECKDIGIT FORMULA applications involving identification numbers, each number may for accuracy by a checkdigit, a redundant digit added to The checkdigit is determined by performing an ar— the normal number. on ithmetic the number in such a way that the usual errors operation encountered in transcribing a number are detected. is The checkdigit In most verified be determined follows: as with Step 1 Start Step 2 Multiply right). the Add Step 4 Subtract ing in the first Add and digit every the in sum the from resulting * digit by 2 = 10 2 6 (left * 2 = to 12 numbers and the digits 1+0+7+1+2+4 =15 not number end- Step 3 from the next higher 20-15=5 zero. the other 5 checkdigit (This is the D4 field.) Note number....5764. the digits multiplied. Step 3 Step 5 a to correct the end of checkdigit the original if the number 57645 number. is entered in a In that a checkdigit procedure is not completely error proof. It is example given above, 5764 or 5673 give the same checkdigit. occur. The unlikely, however, that transpositions of this sort will checkdigit does not guard against the possible assignment of an incorrect but valid code, such as the assignment of a wrong valid identifi— cation code to a customer. number entered for a checkdigit calculation is shorter than the the rightmost digit is used as the checkdigit and the remainder on left. the of the number is right—justified and padded with zeros The zeros are considered when the checkdigit formula is calculated. If the field, ADVANCED PROGRAMMING TECHNIQUES D-21 D.8 VTSO/VTSZ ESCAPE SEQUENCBS command protocol is built around the escape code (027) to implement needed by the VT50/VT52 but not found in 7-bit ASCII. commands Upon receiving the escape code 027, the terminal is set to escape mode Commands created and treats the next character received as a command. in this manner are called Escape Sequences. The VT50/VT52 recognizes the following Escape Sequences: A those Action Taken Code Character 27 ESC 65 A Moves cursor up 66 B Moves cursor down 67 C Moves cursor right 68 D Moves cursor left 72 H Moves cursor to 74 J Erases first 027 changes changes it back. The from the mode, the second 027 line. one one line. position. one one the cursor position. home position. position to the end—of- screen. 75 K 90 Z Erases line from cursor to right margin. The terminal to identify itself. will respond with 027 047 072; terminal 047 075. terminal will respond with 027 will in Other different terminals respond Requests the VT50 VT52 ways. 1Teletype is a registered trademark of the Teletype Corporation. D-ZZ ADVANCED PROGRAMMING TECHNIQUES GLOSSARY alphanumeric character set that contains letters, digits, and other characters as punctuation marks. such The COS-310 alphanumeric character set includes the uppercase letters A—Z, the digits 0—9, and most of the A acters, on the terminal characters back slash (\) and back arrow nals an special as underscore), are keyboard. (<——) of Two (shown these some on char- termi- illegal. array A DIBOL length fields, for technique and each alphanumeric specifying The array to be three digits fields, each to be type. field of the same space for five numeric The array 2A10 describes two long. ten characters long. more 5D3 than one reserves ASCII This American Standard Code for Information Interchange. method of coding alphanumeric characters. is one file A command to execute the file containing a sequence of commands. file will cause the commands within the file to be executed sequen- batch A tially. batch The processing technique stored of Monitor automatically executing a of previously more constants group commands. binary operator An operator, such or variables (e.g., A=B—C). as + or —, which acts upon two or binary program The kind of program which scratch area The area in memory where tion. is output by the compiler. binary the binary program is stored during execu- Glossary-l bit A binary digit (0 or 1). block The basic COS-310 unit of of up to 512 characters. storage capacity. mass block A consists bootstrap A short routine system software loaded at system start-up time be read into machine memory. which enables the to branch A in change the execution of sequence of COS—310 for input state- program ments. buffer A temporary storage used usually area or output data smallest unit transfers. bug An error or malfunction in a machine. or program byte A of group of bits considered information that can be as unit. a channel A number between 1 and 15 used ment with a specified device. to byte A in addressed is DIBOL a associate the program. input/output an state- character A letter, digit, or other symbol used to control or to represent data. character A string linear connected sequence characters. of clear Setting alphanumeric field an to spaces or numeric a field to zeros. command An operator following a request for Monitor RETURN services; usually to be executed key. comments Notes for Comments are read; ignored people to they optional and follow a semicolon on are concatenated Strung 2-Glossary together without intervening space. by a the compiler. statement line. conversational program program.that prompts responses from an operator pending upon the response from the operator. and A reacts de- cursor at the flashing light indicator which appears where the next character will be displayed. The point on the screen data A representation of information in a manner suitable for communicaor interpretation, processing by either people or machines. tion, COS-310 In systems, data entry The process files. of Data data is collecting entry is key represented by characters. and to inputting data into the computer data disk. data management The planning, development, and operation of a system an to its information mechanize by organization available the data needed by the organization. like flow COS-310 and make debug To detect, or machine. locate, and remove errors or malfunctions from a program DEC Acronym for Digital Equipment Corporation. decimal Refers to a base ten number. delimiting The device bounds (beginning and end) of a series or string. designation The first three-character designation for a mass storage device. the third character two characters designate the type of device; designates the number of the drive on which the device is mounted. A device independence stored COS—310 system design permits data files and programs to be or disks. At run time, the operator chooses on diskettes either the most suitable or most available input and output devices. device A designations three-character abbreviation used to name the COS-310 I/O dev- ices. TTY = Screen KBD = Keyboard LPT = DKO-DK3 RXO-Rx3 DYO—DY3 = = = Printer Disk drives Disk drives Disk drives Glossary-3 DIBOL Digital's Business Oriented Language is to write business application programs. COS—310 system. direct a COBOL—like language used The source language of the access The process of obtaining data from, or placing data into, a storage device where the availability of the data requested is independent of the location of the data most recently obtained or in placed storage. Direct access is available to users of COS-310 systems by writing the position number of any record in a data file. ample, you can request the 5th, 35th, and 711th records in For a ex- file. directory A place for listing information ed with the DI copy the external contents for reference. Displayed or print- command. dump To to of all or part of storage, usually from memory storage. edit buffer The work area in memory where files source are created and edited. end-of-file mark A control character which marks the physical end of a multivolume For both file. input and output files, the Monitor detects this next EOF mark and types a message for the operator asking that the volume in the file be mounted. fatal error An error terminates program which execution. field A specified data; in a data record used for alphanumeric exceed the specified character length. area cannot file A or numeric . collection of records, treated as a logical unit. fixed-length records Each ords only rec— record in a data file is the same length. Fixed-length are the only type handled by COS-310 utility programs and the type on which direct access to data files is allowed. flowchart flow pictorial technique for analysis and solution of data Symbols represent operations, and processing problems. necting flowlines show the direction of data flow. A data 4-Glossary and con- handlers A specialized software function peripheral devices. interfaces between which the system and illegal character character that is not valid to the COS-310 according design rules. DIBOL will not accept back slash (\) and back arrow (<——) in al(back arrow is replaced on some terminals with underscore) A phanumeric strings. initialization Putting a device into successfully function the correct format or in a configuration. position where it can input Data flowing into the computer. input/output Either input or output, I/O. both. or jump A departure from the normal of sequence executing instructions in a computer. justify The is whose size process of positioning data in a field larger In alphanumeric fields, the data is left-justified the data. than in numeric fields and any remaining positions are space-filled; the are right-justified and any remaining positions to the digits left are zero—filled. key or more sort a file. fields within a record used to match or If a file is to be arranged by customer name, then the field that In a sort contains the customers' names is the key field. opera— the fields of two records are compared and the records tion, key are resequenced when necessary. One load To enter data or programs into main memory. load-and-go An operating technique in which loading and executing phases of there a are no between stops the program. location Any place where data may be Stored. logical unit number number (1—15) which identifies an number The references the table device. A entry in to a a logical location on a unit table. mass storage Glossary-5 logical units An of area storage units be on a assigned device. to 15 storage Up logical system start—up by the data file utility mass at may These areas and their assigned program (DFU). the logical unit table printed by DFU. sizes are listed in loop sequence of instructions that is executed repeatedly until a ter— minal condition prevails. A commonly used programming technique in processing data records. A machine—level programming Programming using a sequence cutable by the computer. mass A of binary instructions in a form exe— storage device device having large storage capacity. master file A data file memory The that authority an as is in either a relatively permanent particular job. or that is treated computer's primary internal storage. merge combine records from two or more another that is string arranged similarly To phases mnemonic Brief LPT, of a sort the ordered same strings order. The into latter operation. identifiers which and in are easy remember. to Examples are KBD, TTY. mode A designation which being file used. a used in was INIT to indicate the for purpose indicate the input/output device statements opened or to modulo number condition where the exceeds the maximum specified in a The maximum allowable number is then condition variable. used subtracted from the specified number and the remainder is by if 17 were specified (maximum is 15), In modulo 16, the processor. 16 would be subtracted from 17 and the processor would use 1 as the variable. A Monitor COS—310 system program other useful tasks. A that loads and runs programs and performs nest To embed grams. 6-Glossary subroutines, loops, or data in other subroutines or pro- nonfatal An error which will error not completely terminate program execution. nonsystem device A device tor. A that does not contain the operating system device used exclusively for data storage. and the Moni— option switch A one— in two—character designation indicating a with a command. Usually preceded or conjunction function special by a slash (/) in COS-310. output Data flowing out The technique of the same of the computer. overlay data. specifying several different Special rules apply. record formats for parameter A variable that is given value constant a for a specific purpose or process. peripheral equipment Data processing equipment which is distinct from the computer. pushdown stack A list in the pushed items where the last item entered becomes the first item list and where the relative position of the other items is back one. of random access Similar to direct access. RECORD A statement that reserves memory for DIBOL data language programs. segment Sixteen blocks of sequential operation Operations performed, serial screen The one block after the is 512 bytes long. other. access The process the where most A storage. of recently obtained line number which number data into, from, or storage putting dependent upon the location of the data placed in storage. data time is getting access or indicates the order of the horizontal lines on the screen. Glossary-7 sign Positive or negative positive. are but numbers prefixed sign, negative is number Indicates whether a numbers do not require a with the minus sign (—). significant digit A source is that digit needed program written recognized in COS-310 A program statement An instruction or in a source DIBOL for specified purpose. a language. program. string A connected linear subscript A designation sequence of characters. which clarifies the particular parts within a larger grouping or array. (characters, records) values, switch character A single letter specified in a command following of language. a slash (/). syntax The rules the governing structure a system configuration The combination of puter hardware and that make software usable com- System, and a system. system device A mass storage device reserved for Monitor, other up system and source Run-Time programs. systems directory A list of creation, with programs on the systems device and other useful information. lengths, dates of system handlers specialized software which interfaces peripheral devices. The terminal A between the system and variable or alarm signal emitted from the terminal. unary operator An operator, constant such as + or -, which acts upon only one (e.g., A=-C). utility program A system program which performs common services and requires format Examples are SORT and PRINT. programs. 8-Glossary variable A quantity that can assume any one of a set record the data records are not such records is not possible. of values. variable—length A access uniform in which file to length. Direct accomplished accu- in verify To determine if a transcription of data has been rately. word A zero To string of 12 binary bits representing two COS-310 characters. fill fill the remaining character positions in a numeric field with zeros. Glossary-9 INDEX Arithmetic operations, basic, Arithmetic operators, binary, A /A, Sort, ACCEPT, 9—4 Arrange records, 9—1 Array, dimensions specified, 1-9 names without subscripts, subscripted, 1-9 afield before, 1-4 generalized subroutines, clear D—2 ACCEPT — Input/Output statement, 1-37 subroutines, D—2 used with DISPLAY, 1-4 ACCEPT and DISPLAY, interaction, D-l Access to Data files, B—4 Add one to counter, l—25 1—3, l-4, Addition (+), 1-11 Addition of lines, Arrays, 1—32 Arrow key, down, D—l left, D—l up, D-l ASCII, files transferred in format, FILEX RESEQUENCE, OS/8 input, 10-5 OS/8 output, 10-7 Assignment of logical units, FILEX Programming Techniques, 4-1, 4-7 Afield, clear before defined, 1—4 stores to D-l right, D-l Aid 1-13 10-1 2—21 Advanced 1-13 l—ll Assignments, logical unit on COS-310, 4—7 table of logical unit, 4—2, 4-3, 1-4 ACCEPT, keyboard entry, 1-4 development, 7—1 program Alarm, terminal, l—l8, is terminal (PLEASE), 2—10 Algorithm for calculating segments of logical units, 4-7 Allocate space to binary scratch definition, 1-14 xv to spaces, 1—13 fields formatted to numeric 1-16 with embedded signs, label, l—l fields, literal, 1—9, 1-10 string, 1—18 Alphanumeric values values, to numeric 1-11, l-lS (CCP), 5-5 file, D-15 Angle brackets Appending a Arithmetic Arithmetic numbers, 2-19 B BATCH, certain programs Monitor command, BATCH Batch destination cleared fields line D~6 positioning, cursor terminate, 2-5 2-5 after error, 2-5 command file, 2-4, 2—5 file, terminate with CTRL/C, restart 8—6 8—1, area, 4-6 1-19 sounded Alphanumeric, data, moving, 4-5, Automatic Automatic expressions, expressions, l—ll l—ll 2—5 Batch file START (SYSGEN), 3—4 Batch file START, space 3—2 Batch stream, from, 2—5 not 3-2, required, accept input Batching commands, 2-1 Binary arithmetic operators, Binary file, transfer, 8-3 Binary files, COS—310, xiv, l—ll B—2 Binary operators, addition (+), COS—310, 1—12 division (/), 1—11 l-ll addition, 1—13 calculate, 1-9 division, 1—13 multiplication (*), l—ll priority of execution, l-ll rounding (#), l—ll multiplication, 1-13 rounding, 1—12 subtraction, 1—13 subtraction (-), l—ll Index-1 INDEX Binary program, 2—13 compiler converts source program to, copied 5_l and debug with DDT, on device, with DELETE, executes, 2-11 size of, 5-6 use SAVE to area, area, 2—7 to obtain, messages, 2—19 12—1 program, limitations, 2—20 xiv 1-26 Channel number 1-21 12—1 operating procedures, A—ll xv, 1-17 I uppercase, xiv Channel (definition), 1-21 Channel in INIT, 1-26 Channel number associates mode, BOOT, error number lowercase, COS—310, special COS-310, xv special in formatting, terminating, 1—5 5-4 2-12 allocate 8—6 to, line, Blank store, scratch scratch space Set, Characters, maximum in source program, 1-3 maximum number on line, 2—18 maximum per line, 1-3 red, xiv 6-1 erase Binary Binary Character line stored 2—13 RUN (Cont.) 12~1 disassociates mode, is, 12-1 Monitor loaded via, 2-4 Braces notation conventions, xv Brackets, angle (CCP), 5-5 Brackets notation conventions, xv Branch program control, 1-6, 1—23 Breakpoint, DDT, 6-1 Change system handlers, 3—1, 3—3 Change system date, 2—6 Changes to lines-per-page configuration, 13-1 Changes using line numbers, 2—14 Check, perform a Read/, 8-2, 8—7 Checkdigit formula, D—Zl C Clear Bootstrap, BOOT Bootstrap, from line, 2—20 fields and records, 1—9, 1—13, 1—19 Clear ,C option (clear Calculate 1—9 arithmetic 1—31 record), expressions, Calculating the segments for logical unit, 4-7 a statement, 1—3, 1—6 subroutine, 1—6 CALL traceback, subroutine, (DDT), CALL Control — to CALL 6-1 points to error, 5—8 (Conditional Compilation Caret CCP Procedure), 5-5 CCP sections nested CCP 5-6 value to any independent of 5—6 CHAIN and INIT, CHAIN Control depth, DIBOL value, - interaction, D—l7 statement, 1-3, hardware control returns program, to 1-7 incorrect text Cmndfl (definition), xvi BATCH, 2-5 DAFT, 15-1 FILEX, 10—4 FLOW, 17-1 MENU, 18-1 PATCH, ll—l PIP, 8—1 PRINT, 16-2 SORT, 9—1, 9-2 Code, COS—310 Command multiple entry points, programs declared command, in D—l8 interpretive, file, BATCH, 2-5 DAFT, 15—2 FILEX, 10—4 RUN 147 program example, 1-7 TRACE and Trap turned with valid 1—8 DDT, display, data, D-4 from edit buffer, 2—15 Clearing feature of VT52, D—3 Close data files, 1—21 Clear Clear requirements, skip-code, 1—22 words of required, CHAIN, 2—Index function, D—2 5—7 1—7 DIBOL ,Clear data off, 1—8 FLOW, MENU, binary program, 1—8 PIP, 17-1 18-1 8—1 5-7 xiv INDEX PRINT, SORT, 16—2, 16—3 9—1, 9—2 Control 6-2 Commands, DDT, Commands entered in to response Monitor, 2—4, 2—14 Commands, Monitor Keyboard, 2—2 Commands, orderly execution of (MENU), 18—1 Comments, line, statement with with COMP, /DI /G, /NI CALL, 1—6 CHAIN, 1—7 GO TO, 1-23 IF, 1-24 ON ERROR, 1—28 RETURN, 1-33 STOP, 1-35 1—37 Conventions, braces, xv brackets, xv manual notation, PROC, 1-29 START, 1—34 Conversational 5-2 5-1 5-]. 1-11 Convert to (compiler), by RUN, 2-11 defined, xiii, 5—1 Copy and verify, 5—1 operating procedures, Comparison between expressions, Comparison between relational expressions, 1-24 Compatibility with OS/8, 10-4 converts (CCP), program, statement, END, character 5—1 5—8 1-20, statements, PROC, 5—1 START, 1-29 1-3, 1—20 storage map listing, 5—3 set, 9-1 1—12 A-l xv interpretive code, source source 8-5 files, xiv, 2-14 line number editor, 2—14 logical unit assignments, records in, 10—1 DAFT, 15—1 FLOW, 17—1 PRINT, 16-1 Computed GO TO, 1—23 Conditional compilation (CCP), 5-5 Consolidate space in directory, 8-2, 3—3 data files, B-l data input, FILEX, 10—6 data output, FILEX, 10—8 file structure, xiv files, B—l Compiling procedure, Consolidate files, 8—1 Control, branches by CALL, 1—6 branches to RETURN, 1-6 branches with GO TO, 1-23 master program, 2—1 in records characters, operating procedures, 1—3, 5-5 program binary device, 2—13 arranges 5-1 messages, Copy binary program binary files, B—2 binary operators, 5-2 to onto COS—310: Compilation procedure, source 8—7 8-2, Copy device, 8—3 Copy Monitor and/or files, 1—24 conditional data, source 1-9 5-1 Compilation, listing, Compiler, equivalent decimal Converting data, 1-9 Converts and justify accessed error 3—1 program, 1-12 code, COMP DIBOL, xiv Conversion, data, l—ll Conversions, justification of, /0, 5—2 /T, 5-1 DIBOL, 1-3 (DIBOL), statements TRAP, 1-1 1-1 following semicolon, on (Cont.) file output, files, B-l FILEX, 4—7 10—8 storage hierarchy, 4-7 system files, B-2 unary operators, 1—12 COS MONITOR, 2-4 Create system on new device, 3—l Creation of report programs, 16—1 Creation of source file (PRINT), FILEX, CREF 16-2 (Cross Reference) program, 7-1 error messages, 7—2 Index—3 INDEX moving alphanumeric, moving numeric, 1—14 7—1 operating procedures, 7-l table, (Cont.) with transfer CTRL/C Monitor Keyboard command, 2—2, to terminate batch file, 2-5 CTRL/O, 2-2, 2-17 CTRL/Q, 2-2, 2-17 CTRL/S, 2—2, 2-17 0—1 CTRL/U, CTRL/Z, 2-2, 2-2, 2-19, 2—19, Current date specification 11—4, 6—3 1—32 Cursor positioning, 1—18, (,D), D—6 Data XMIT, 1—14 1—40 manipulation, expressions, l—lO literals, 1—10 statements (DIBOL), variable name, variables, 1—9 1-3, 1—9 1-9 Datasystem 308 or 310, xiii DATE command, 2—4, 2-6 DATE, Monitor command, 2-6 Date, system stores, 2—6 Dates, valid, 2—8 DDT D (DIBOL Debugging commands, 6—2 (data specification), ,D RECORD error 1—32 DAFT in and Fix), file, 15—2 (Dump command 15-1 compiling procedure, messages, keyword, 15—2 15—1 15-5 from line, incorrect, copy and definition Data 2—20 D-4 Decimal Decimal 8-2, 8-7 1-9, 1-11 statement division, define destination in, 1-9 entry programs, D—l area file output, COS—310 (FILEX), 10-8 Data file, transfer a, 8—2, 8-4 Data File Utility program (DFU), Data 4—1 access COS—310, arranges 2—7 transfer, 8—4 records in, 10-6 between fields, 1—9 from memory with WRITE, 1-39 move 4—Index dfield, 9—1 4—2 DFU/B, lines—per—page (SYSGEN), 13-1 Default DELETE value (SYSGEN), 3-2 command, 2—2, 2—4, 2— 7 FILEX, key, lO—ll 2—19 2—2, lines (RESEQUENCE), 2—21 Deletions with alphanumeric 1—9 formatting, 1-16 input, cos—310 (FILEX), stores 2—18 Destination, area defined, Data, move in Deletion of replace, format, xv Default, Default, DELETE B-l COS—310 (definition), value, 6-1 value, terminating characters, 1—5 Decimal code, equivalent, 1—12 Default conditions, line number, Delete, xiv to, B—4 files, Data 1—36 Decimal 1-3, 1-31 Data division, l—l, D-19 Data TRACE/NO 1—4 (RECORD), Data 1—3 statements Debugging technique, DIBOL, Debugging tools, 1—36 verify, conversion, Data (DIBOL) statements, TRACE, Data, clear clear 6-3 CHAIN, Debugging Debugging operating procedure, 15-1 output, 6-1 operating procedures, 6—1 Debug binary programs, 6—1 Debug statements with CCP, 5—5 Debugging aids use numbers, l—l 15-7 error messages, 1-8 Technique), 1-13 defined numeric stores in line 1-9 cleared Data cleared source numbers, to 2-14 spaces, Division, to zeros, data, 1-9 1—9 1—13 Determining logical unit size, Dev (definition), xv 4-7 INDEX Development, aid Device, COPY! 8—3 create system to 7-1 program, (Cont.) Directory, system device, B-4 Disk, formatting an RKOS (DKFMT), 14—1 on new, 3—1 designation, order of logical units on, 4-8 2-3 store binary program on, xv system format, B—2 (defined), 1—4 Dfield, stores decimal values, DFU (Data File Utility), xiii, formatting 1-4 4-1 functions 4-8 operating procedures, 4—1 compiler (COMP), 5—1 DIBOL debugging technique (DDT), (DIGITAL's Business Oriented Language), xiii source program, l—l words of required, 5—7 DIBOL files, of an address 2-21 14-2 for, contents contents scratch D-9 DIBOL, reason access, READ erase WRITE 2—4, 1—39 2-8 command, to memory, area, (clear) 2-8 2—4 Directory space, consolidate, to in editing 2—12 text screen from, 2—15 2—20 or printer, 2—17 8—5 Directory entry dates, valid, Monitor output l-30 statement, command, stored lines edited in, list from, 2-17 D—9 techniques, returned 2—12 l-lO for, D—9 statement, access, transferred 10-1 Edit buffer, array, in files format, in, access, DIRECTORY, (DAFT), (format RXOZ diskette), EBCDIC 1—3 Oriented (DIBOL), xiii Language DIRECTORY 1-37 E Business access, key, D-l Technique Fix Duplicate line numbers, 1—3 manipulation, debugging, 1-3 Input/Output, 1—3 access arrow DYFMT data field 1—8, 15—1 terminating control, 1—3 data definition, KEY 1—3, statement, l—3 compiler, Direct Direct fields for l-l8 numeric DISPLAY, Dump and 1—4 Dimensions D-l Down statements, DIGITAL's interaction with ACCEPT, DISPLAY, 1—1, 1-13 l-l, D-l9 Procedure, l-l, D—20 results of, l—12 DKMFT (format RK05 disk), 14—1 Dollar, rounding to the, l—12 code statement, value, Input/Output statement, - 1—18 (/), source statement, hardware, feature, Data, D—19 use 1-4 with, Division language, l—l programs in CHAIN, 1-7 slowed by TRAP, 1—38 table of symbols, 7—1 of used D-2 DISPLAY DISPLAY 1-3 in, statements programming 10—1 format, special effects, D—9 access, clear 14—2 on 10-1 ACCEPT DISPLAY, 6—1 DIBOL of format, (DYFMT), sectors universal Display RXOZ an of universal, in DIBOL kinds 3741 IBM 10—1 4-10 DIBOL, direct with compatible DFU, messages, logical unit assignments, on RKOS, 4-9 Diskette, data mode, 10—6 Dfield error logical unit assignments Disks, 8m5 into files, 2-19 files loaded into, 2-16 separated source Editing, features functions of the refer Monitor, to 2—1 line numbers, l-l Index-5 INDEX scratch area, 2-12 Editor commands, ERASE, 2-14, 2—15 FETCH, 2—14, 2-16 LIST, 2-14, 2—17 Line Number, 2—14, 2—18 Number Commands, 2—14, 2-20 RESEQUENCE, 2-14, 2—21 WRITE, 2—14, 2—22 Editor, COS—310 line numbers, 2—14 Effective use of TRAP, 1—37 Eight-bit EBCDIC, 10—4 End of subroutine, RETURN, 1—33 END, same effect as STOP, 1—35 Erase edit buffer, load source file, 2-16 Eliminate free space, 1—28, End—of-file, ERASE command, Erase program, text from Erase Error, Error 1—3, 1—12 2-15 DELETE, 2—7 edit buffer, 2—15 points to, 5—8 checking, minimal by CREF, caret 7—1 correction 11—3 line during numbering, 2-19 Error, line with underscored, messages, Error messages, BOOT, 12-1 COMP, 5—8 CREF, 7—2 DAFT, 5-2 C D-15 F Fatal 2-24 error, DIBOL command, program 2-14, under 2-16 Field descriptor statement, SORT, 9-1 Field, numeric verification, D—16 Field, part accessed by subscripting, 1—13 Field statement information, 1—31 Fields, clear, 1—9 Fields, clearing, 1—13 D—15 3-4 space required, 3-2 exchange program (FILEX), 10—1 extending a, D—15 index technique, use of, D-l2 batch batch (SYSGEN), START START, extension, OS/8 compatibility, 10—4 15—7 output, COS—310 data COS-310 source (FILEX), 10-8 DFU, 4~10 FILEX, 10-13 output, FLOW, 17-7 LINCHG, 13—2 MENU, 18—4 Monitor, 2-23 replace PATCH, 11-5 PIP, 8-9 PRINT, 16-8 source 2—13 D-16 loaded into edit an rewriting source old, a, buffer, 2—16 2—24 Error terminates BATCH, 2-5 Errors, fatal, 2—24 Errors, trappable (nonfatal), Escape code sequences terminators, D-8 (FILEX), 10—8 SORT, 9—7 SYSGEN, 3-5 2—24 as Escape sequences, VTSO/VTSZ, D-22 6-Index 1—24 comparisons, file, name DDT,‘6—3 Run-Time, a appending, C—l Appendix relational Extending File, (PATCH,) automatic Error Error 1—20 2-14, Error 6-1 SORT, Exit, FILEX, 10-12 Expressions, arithmetic, 1-11 calculate arithmetic, 1—9 data manipulation, 1—10 (definitions), xvi, 1—10 parentheses in, 1—12 FETCH 2—25 1—40, statement, Examination of variables with Fatal error, DDT, 6—3 8-5 compiler Equivalent decimal code, END (Cont.) stored on specified device, 2-22 START batch, to execute, 3—2 status information destroyed (CHAIN), 1-8 structure, xiv transfer a binary, 8—2, 8—3 transfer a data, 8-2, 8-3 transfer a source, 8—2, 8-3 transfer a system, 8—2, 8—3 truncating, D-l5 garbled, 2-3 File name, INDEX File name extensions, (Cont.) diskettes Format, binary, xiv, IBM B-2 consolidate, 8-1 COS—310, B-l data, xiv, B—4 source, xiv, B-l system, xiv, B-2 Files, DIBOL number Format for Format Format printer output, 1-22 system device, B—2 1—12 files of source, program, as 2—12 file, one 2-12 skipped (erased), 8—5 D-ll buffer separated tranSferred in, 10-1 14-1 Formatting data, 1-16 RKOS disks (DKFMT), 14—1 RXOZ diskettes (DYFMT), 14—2 numeric fields to alphanumeric fields, 1-16 special characters, 1—17 hardware, printers without, Forms sorted, edit 2-19 into 3-4 two, FORMS program, 1-3 transferred in ASCII format, source rounding, programs, in multiples passed compatible with 10—1 3741, Formats, programming D-l9 maximum 1-9 data, Format 10- 4 Files, statement, 1—22 1—3, per G 10-1 transferred 10-1 transferred 10-1 unsorted, FILEX (File in in EBCDIC IMAGE format, format, GO Exchange program), (PRINT), options, 1 0-5 Copy, Delete, 1 0-4, 10—11 List, 10— 4, 1 0-11 exit, 10— 4, 1 0-12 Z, Zero (cle ar). 10—4, FILEX Output Modes, 10-7 Filnam, FINI Fix address, B—5 Handlers, change in system, 3-3 Handler Hardware D—2 statement ll— 3, 3741 IBM 1-37 IF (DAFT), IF, 1—21 , 9-1 (Flowchart Generator), file , commands, 17 -l - 17-1 messages, 17-7 example of, 17-7 Flowchart Generator program l7 -1 format, 2—1 feature, diskettes 10-1 Control statement, to make best use of 1—36 IMAGE format, files 1—3, 1—24 TRACE, transferred, 10—1 Incorrect data, clear, D-4 rounding, 1—12 (increment) statement, INCR 1—25 error (FLOW), clear Increment, l7 -2 compiling procedures, Monitor, compatible with, technique, Dump and, Fixed-length records, in display Hardware, printers without forms (SYSGEN), 3-4 Hierarchy, COS-310 storage, 4-7 xvi command 1-3, 10-12 15-1 FLOW statement, H contained operating procedures, 10—4 Option C flowchart, 10— 10 10- 4, Control — 2-3 subroutines, 1—23 file , 10 -4 creation of source file 16—2 error messag es, 10—13 Input Mode, 10-5 C, D, L, X, TO D— 10 10—1 command FILEX Garbled file name, Generalized ACCEPT D-2 Index, error messages, C-l file Index INIT 1—3, , - technique, D—12 Input/Output statement, 1-3, 1-26, 1-37 Index-7 INDEX interaction of CHAIN and, INIT, D-l7 logical unit INIT, Initial values l-l, 1—32 Initialization, Input, for 1-27 in, No. statements, OS/8 ASCII Language, DIBOL, xviii, on (FILEX), Last 2-18 line, 10—5 diskette (FILEX), 10—6 Input/Output statements (DIBOL), ACCEPT, 1—4 Left Limitations, input line, source D—l Interaction of CHAIN and characters 1—3 per, subroutine, Line Number 2—18 Line Number (LN) command, Editor, 2—13 Editor 2—18 1-6 automatically output, 2—18 5-8 6-1 Line numbers, changes with, 2—14 deletions with, 2—14 insertions with, Justification of numeric fields, D—6 conversions, l—ll Justify source data, 1—9 2—14 Lines—per-page configuration, change, 13-1 for List programs Justified LIST command, review, 2-14, 2-17, 2—8 10—11 Listing, source program compilation, 5—2 K Literals KEY field Key, last direct typed, l—S for access, alphanumeric, l—lO manipulation, D—10 data (defined), 1—10, numeric, l—lO Keyboard commands, Monitor, 2—2 Keyboard input, stores in afield, 1—4 RECORD, l—lO 5-6 1-10 (Line Number) command, 2-14, 2—18 Logical units, xvi LN Keyword, DAFT, 15—2 KREF, FLOW, 17—2 KRFSRT, FLOW, 17—2 Logical unit assignments, 4-1 the edit buffer, 4—2 stored file, 4—2 a from the keyboard, 4—3 displayed on screen, 4-3 listed on printer, 4.4 from from L (definition), Labels, Label maximum allowed 5—4 system, 8—Index in 13—1 2—14, commands, 2-18 exceeds 4095, 2—21 Line number default conditions, Line Number Line number J right, ll—l l~3 13—2 messages, Line numbers DDT, 2—20 program, operating procedures, 13-1 Line Change program (LINCHG), INIT, D—l7 symbol table, 1-5 D—l (Line Change program), LINCHG error XMIT, 1-40 I/O handlers, 2-1 1/0 statements, 1-3 Input/Output division (SORT), 9—2 Insertions with line numbers, 2-14 Interaction of ACCEPT and DISPLAY, Iteration, 1-1 LINCHG, 1-39 Internal key typed, arrow key, Line, DISPLAY, 1—18 INIT, 1—26 READ, 1—30 WRITE, allowed in 24K byte system, 5—4 referenced in statements, l—l separated from statements, l—l table of, used in DIBOL program, 7—1 characters universal maximum 14-1 COS-310 data (FILEX), 10-6 line limitations, 2—20 maximum (Cont.) xvi, l-l 16K byte on RKOS disks, 4-9, 4-10 INDEX Logical unit, assigned by DFU, 4-8 calculating segments for, defined, xvi pushdown, 4—8 size, table, 4—7 4—7 maximum open, on Lowercase 4—2 1-29 nonsystem device, 4-8 system device, 4—8 characters, xiv a a M Machine language instructions, 11-1 Mapping bad sectors, 10—1 Master control program, 2—1 Master file, records in, of edit 2—12 contents returned to, Memory, messages, program, to, 2-14 buffer to, Monitor Monitor Monitor 5—2 via ERROR ON response 2-1 bootstrap, 2—4 prevents return 1—28 error messages, 2—23 2—4 operating procedures, Monitor, MOUNT Move return 18-1 8-9 8-2, to, 2—3 messages, data between fields, Moving, alphanumeric data, numeric data, records, 1—9 1—14 1-14 1—15 Multiple entry points, D—18 Multiple definition of fields, CHAIN 9-1, 1—31 9—4 designations, Multiple screen, 16, Monitor, 1—18 Multivolume 1—26 files, 1-26 files Name as one file, (*), 1-11, universal 1—13 interchange lO—l (defined), data manipulation, 1—9 2-4 and (SYSGEN), 2—23 keyboard commands, 2-21 organization, 3-3 Monitor commands, messages, BATCH,2—4, DATE, 2-4, DIRECTORY, passed N 2—1 commands, files 2-12 Multiplication disassociate, 1—21 input (FILEX), 10—4 output (FILEX), 10—9 error 3-3 in organization, B—3 Monitor, to patch, ll-l 18-1 Messages, MOUNT, 2-3 Messages, show on the Mode, associates, 1-26 copy (SYSGEN), commands 2—2 2— loaded Monitor, program file, 18—1 Merge pass, combine volumes, Modulo 2—5 Monitor, editing features of, MONITOR/EDITOR Programs, xiii Monitor Keyboard commands, CTRL/C, 2-2 CTRL/O, 2-2 CTRL/Q, 2—2 CTRL/S, 2-2 CTRL/U, 2—2 CTRL/Z: 2-2 Monitor 18—4 operating procedures, dot, D-l4 data Memory saved by COMP/O, MENU, command file, 18—1 Monitor sequential DELETE, RETURN, with WRITE, 1-39 Memory, Memory, record‘moved to, 1—30 Memory requirements because of DDT option (/D), 6—1 move error RUN, 2-4, 2—11 SAVE, 2—4, 2—13 Monitor commands, execution of, Monitor, copy maximum entries, unit size, 4-7 on 2—10 2—4, PLEASE, Logical Logical units, order order (Cont.) 2-5 2—6 2-4, 2—8 3—3 Negative numbers, representing, Nested, CCP characters A—l sections to any depth, 5-6 Nested, Nested subroutine depth Of to No index file, NO TRACE statement, CALLS, 1—6 50, 1'6 rough table, D-12 1-3, l—34 Nonsystem device, order of logical units, 4-8 Index-9 INDEX (Cont.) Notation conventions, braces, LINCHG, 13—1 MENU, 18—1 xv brackets,.xiv manual, xiv RETURN, xv Merge, 9-4 Monitor, 2-4 PATCH, ll—l PIP, 8-1 PRINT, 16-2 SORT, 9-1 symbols, xiv Number 2-20 2-14, commands, Number, to, editing functions refer 1‘1 SYSGEN, Numbered 1—1 line begins statement, Numbers, debugging aids refer to, error refer to, messages binary and unary, 1—12 binary, priority of execution, Numbers, negative, A-l Numeric, data, moving, 1-14 data verification, l—ll l—ll of Order 1—36 execution, program Orderly execution of commands 18-1 (MENU), to zeros, l-13 Organization of the Monitor, B-3 OS/8, formatting to alphanumeric, 1-16 fields, special effect fields, DISPLAY, 1-18 field verification, ASCII converted alphanumeric, variable, 'variable, add file to, name D—6 extensions for 10—4 RKOS disk, 10-1 files on Output, ‘ COS-310 10-8 1—25 1—7 10-5 10-7 compatibility, l—ll one CHAIN, (FILEX), Output (FILEX), compatibility, 10—4 D—l6 to Input ASCII in fields, right justification, literals, 1—10 values 1-13 Operator interaction, BATCH may require, 2—5 Operators, binary arithmetic, l—ll 1—1 (definition), xvi destinations cleared _ Operations, basic arithmetic, 1-1 Numbers, 3—1 DAFT, source file (FILEX), 15-5 Modes (FILEX), 10-7 (FILEX), 10-7 Universal diskette (FILEX), Overlay record, 1-31 OS/8 0 Octal (definition), xv Old file, replace, 2-13, 2-22 Control statement, ON ERROR 1—3, 1—28 ON ERROR, preceding a data conversion statement, 1—11 ASCII p - ON ERROR presents Monitor, 1—28 return Operating procedures, 12-1 5-1 7—1 DAFT 15-1 DDT, 6-1 DFU, 4-1 DKFMT, 14-1 DYFMT, 14-2 FILEX, 10-4 BOOT, COMP, CREF, (information insertion), 1—32 (RECORD) ,P Parentheses to arithmetic 1—12 PATCH, cmndfl, 11-1 error correction, error messages, 11-3 11—5 operating procedures, program, ll—l restart, 11-3 Perform a Read/Check, PIP ll-l 8-2, (Peripheral Interchange Program), accessed error lO-Index in expressions, by RUN, messages, 2-11 8-9 8—7 10—9 INDEX (Cont.) 8-1 operating procedures, options, PIP 8- 8—2, B, size of binary, source (DIBOL), source files 5—6 1-1 1—3 per, compilation listing, 5—2 source limitations, 1—3 system executed by RUN, 2-11 source of table 7—1 labels tracing, in DIBOL, used 1-36 Programs, ACCEPT 8- I command, PRINT (Report program generator), 2-4, certain compiling procedure, messages, edit buffer 4—1 output 1—38 2-8 slower than processor, 1-37 without forms hardware, 3-2 hardware of operators, 1—11 PROC, comment with, 1—29 PROC statement, 1-3, 1—29 Procedure, conditional compilation (CCP), 5—5 Procedure Division, l-l, D—20 Program, of 4—8 Pushdown stack, 1-6 READ 1-23 1—7 1-7 DIBOL CHAIN, DIBOL slowed by TRAP, 1—38 with DELETE, 2—7 execution terminated with 1—35 last statement in, 1—20 1—30 restrictions l—3, READ, readability, renumber lines within, on Read/Check, perform Readability of 1-39 8—7 2—19 use, 8-2, a, program, Record, file D-l4 (defined), Division Descriptor 10—1 , (SORT), 9—2 memory, 1—30 in data manipulation, 1—9 names names, subscripted, 1-40 names subscripted in an array, 1-13 to 1-31 size dependent on logical units, 4—7 RECORD — Data statement, STOP, in, 2-21 literals, arrange 2—12 definition 1-3, l-31, 5—6 1—10 Records, clear, 2-1 files xvi logical units, overlaying, examination, DDT, 6-3 execution, Monitor, 2-1 execution, order of, 1—36 of 2-19 advanced, Input/Output statement, — moved number files, source order CHAIN, example of, 1—7 control, branches with GO TO, control, DIBOL Pushdown, count, maximum 1—34 Programming techniques, COS-310 master 2—8 D—l9 binary copied and stored, 2—13 binary executed by RUN, 2—11 erase 6—1 2—5 R execution, binary development aid, 7-1 DIBOL binary sequence, D—l DDT. (SYSGEN), 3-4 Priority review, D—l Pronam (definition), on-line, forms for Programming, limitations because of TRAP, without in, BATCH, of stored, 2—8 segment sections, type of, 2-7 16-8 logical unit table, Printer, contents of to, 2—17 list 16—1 Print DISPLAY terminate directory 16-1 error and binary debugged with 2—10 PLEASE COS—310 1—9 data, 9—1 clearing, 1—13 file, D—l4 moving, 1—15 master subscripted, use with care, 1—40 Index-11 INDEX Red characters, xiv Relational comparisons expressions, 1—24 Renumbering program between lines, 2—14, 2-21 Repetition Replace an Replace an 1—32 character, old file, 2-13 old source file, count 2—22 Report programs, creation of, 16-1 Report program generator (PRINT), 16-1 Restrictions after LN, RETURN at end of 1-33 subroutine, xv, 2—2, 2-19 Control statement, key, - branches Monitor, to 1-3, 8-2, or TRAP, numeric fields, D—6 RK05 disk, format (DKFMT), RK05 disk, logical unit assignments Rough table, of Rounding on, 1—6 8—9 1-33 to, PIP, CALL Rewriting a file, D-l6 Right arrow key, D-l Right justification of Run—Time 2—4, 14-1 program, accessed by command diskette, SORTIN, 9-3 Source (defined) file, D—12 (#), 1—12 1-7 , 4—2 S (assign variable), 1—32 SAVE command program, Scratch area to value of binary 2—13, 5—4 (binary) modification, 2—12, 8-6 Screen, of edit buffer to, 2—17 line number, 1-18 contents move cursor on, output 1-18 when full, 2—18 Search for records, Sectors on 10-1, 12-Index universal 12-1 data 1—9 in destination, area stored area converted 1—9 and files, xiv, D-19 COS-310, B-l COS—310 output (FILEX), lO~8 DIBOL programming of, D-l9 creation of, 16—2 load into edit buffer, 2—16, Source 2—16 1—3 program, replace old, 2—22 stored on device, 2—22 separate edit buffer into two, 2—19 store 2—4, 9-1 justified, 2—11 (RECORD) 9—7 messages, 1—9 . messages, 2-24 format (DYFMT), error RUN, 2-11 file, 9—1, 9—5 key, 9-3 operating procedures, Sorted file, D—ll Source 4-10 in, 1—22 9—1 xiv, SORT per ,8 l—ll manipulation, index no numbers declared Monitor, RX02 fields, Size, Source command, CHAIN Seven-bit ASCII, 10-4 Signs embedded in alphanumeric error control RETURN without RUN Monitor Skip—code (definition), Skip (erase) files, 8—5 2—19 1—33 Return of 2—5 commands, defined and WRITE, READ on Return RETURN, Sequential execution program, 5—6 in RECORD statement, 1—1 determining logical unit, 4-7 Six-bit binary word, A-l 2-21 1-39 RETURN Segment programs, 1—34 Segments, calculating for logical unit, 4-7 Semicolon, comments after, 1-1 binary RESEQUENCE command, 2—14, Restart (PATCH), 11-4 RETURN (C0nt.) 15-1 diskette, transfer, Source 8—2, 8—8 program, compilation listing, 5—2 compiler converts to binary, debug with CCP, 5-5 DIBOL, erase l-l with DELETE, limitations, maximum 5-1 2-7 1—3 characters in, 1—3 Space, allocate 8-6 to consolidate binary scratch directory, 8—2, area, 8-5 INDEX Special characters, xv, 1-17 Special characters in formatting, START DISPLAY, l-18 DISPLAY codes, 1-18 Compiler statement, l—3, in codes . — l-34 system START with on 12-1 device, new 1—34 comment, program Store system date, 5-1, on 5—3 device, 2—6 Subroutine, ACCEPT, D—2 Subroutine, branches control statements, 1—6 traceback, 6-1 internal, 1—6 nested in, 1—6 TRAP, 1—37 Subroutines, generalized ACCEPT, call batch file, 2—4, batch batch file file space 3—2 (SYSGEN), define define in, 3-4 l—34 comment, comments 3—3 required, Statement, CHAIN encountered, D—l 1—7 l—l size l—l 1—1 1-20 last in program is END, lines with comments, l—l separated from label, 1-l of, type of, Statements, Division, manipulation, initial l—9 kinds 1—40 Subscripting fields, Subtraction to parts of access 1—13 (—), 1—11, 1-13 internal, 5-8 DAFT command, 15—2 maximum in system, 1—3 notation convention, xiv for, 1—1 labels, 1'1 in DIBOL: 1-3 values reference Subscripted array in data manipulation, 1-9 Subscripted record names, l-l3, Symbol table, Symbols, l-l Data data (System Generation PROGRAM), XIII, 3-1 SYSGEN default, 3—2, 13-1 SYSGEN Statements, DIBOL ACCEPT, l—3 CALL, 1-6 CHAIN, 1-6 3—1 SYSGEN/B, SYSGEN/C, 3-3 END: 1‘20 FINI, 1-21 FORMS' 1‘22 boot $3,T2:2}1'23 cos—:10 logical] units an, crea Control 1'35 EFFECT device, new 3—3 1'36 statement, AS e on new ev1ce, 4-7 — change, 2-6 date stored by DATE, 2-7 device directory, B-4 device holds BATCH cmndfl, 2—5 device, order of logical units, 4-8 l—4 encounters ACCEPT, device format, B—2 1—3, STOP, terminates on date TRAP, 1-37 WRITE, 1-39 XMIT, 1-40 SAME start change handlers in, ERROR' 1'28 PROC, 1-29 READ, 1-30 RECORD, 1-31 START, 1-34 STOP, l-3, 1—35 TRACE/NO TRACE: — to 12-1 0N STOP to, Subroutine, CALL START, SlX listing, binary Store l—6 START With Storage map, 2-13 1—17 Special Special (Cont.) 1-35 END, ' program execution, 1-35 . Storage hierarchy, 4—7 files, files, files, xiv, B—2 COS—310, B-2 transfer, 8-2, 8-8 generation program (SYSGEN), I/O handlers in Monitor, 2—1 maximum program, program, programs symbols per, erase with, transfer, accessed programs executed 3-1 1-3 2—7 8-8 by RUN, by RUN, 2—11 2—11 Index-l3 INDEX (Cont.) T limitations TAB Tab key produces 8 spaces, settings, 1—1 on printers, 1—38 normally precedes FORMS or XMIT, 2—19 used in DIBOL 7—1 Table, logical unit assignments, 4—2, 4—6 Table lookup, direct access, D—lO, D—ll 1—37 slows DIBOL programs, 1—38 subroutine construct, 1—37 turned off in CHAIN, 1—8 labels Table, program, Tabs for readability, 2-19 alarm is sounded (PLEASE), 2-10 Terminal BATCH, certain programs, 2—5 Terminate program execution with STOP, 1—35 Terminating character, 1-4, 1-5 Terminating value, used by DIBOL, used Trappable error, 2—24 Truncating a file, D~15 Two-line PLEASE command, 2—10 Type, define in RECORD statement, 1-1 Terminal 1—4 Terminators, escape sequences, Text, (clear) edit erase U in COS—310, 1—12 Unconditional GO TO, 1-23 Underscores line number with errors, 5-2 Unary operators Universal diskette, (definition), lO—l format for, lO-l D—8 buffer, functions 2—15 Text, lines of assigned number, 2—14 a line Debugging — 1—36 turned use of off IF Trace/No in to Trace Traceback, 1-3 statement, placement of, V 8—3 1—36 statements, 1—36 CHAIN, isolate, (DDT), 6—1 Transfer, 8—2, 8-3 (XMIT), 1-40 files, 8—4 data records, 1—40 files, ASCII format, 10-1 files, SYSGEN, 3-3 files, universal format, 10—1 source files, 8—2, 8—8 system files, 8—8 binary file, data data Transferring control through IF l—24 Transferring variable values, TRAP - Control statement, D—7 1—3, 1—37 TRAP, information for of, l4—Index 1—37 (FILEX), 10-9 file, D-lO Up arrow key, D—l Uppercase characters, xiv Unsorted subroutine call statement, 10-1 output TRACE, indiscriminate sectors, 10-2 Datasystem, xiii Datasystem, xiii Top-of—page command, 1—34 308, 310, TRACE of input (FILEX), 10-4, 10—6 interchange format directory, effective use Valid directory entry dates, 2—8 Value, default initial (SYSGEN), 3-2 (definition), 1—32 terminating used by DIBOL, 1—4 Values, CCP different than DIBOL, 5—6 transferring variable, D-l7 Variable, add one to numeric, l—25 examination in DDT, 6—1 1-9 name, numeric in CHAIN, 1-7 values, transferring, D—l7 Variables (defined), 1—9, 5—6 Verfication, numeric field, D—16 Verify data, copy and, 8-2, 8-7 Verify numeric data, l—ll VT50/VT52 Escape Sequences, D—22 VT52 clearing feature, D-3 W INDEX Word boundry, Word count Words of WRITE - WRITE (Cont.) 5-6 B—l code requirement, 5-7 editor command, 2-14, 2-22 number, Input/Output statement, * 1—3, 1—39 1-37, WRITE, move data with, restrictions on 1—39 use, 1—39 X XMIT - Input/Output statement, 1—3, XMIT 1—40 1—37, statement, with, extending a file D-15 2 Zero, divison by, 1-28, 2-26 lS-Index COS-310 System Reference Manual AA-D647A-TA READER'S COMMENTS DIGITAL will only. this form at the company's Problems with software should be reported discretion. If you on a Software Performance Report (SPR) form. receive to and are a written eligible reply require submit your comments on an SPR one under SPR service, This NOTE: use form is comments for document submitted comments on form. find Did you errors in this manual? If so, Did you find this manual understandable, Please make suggestions for improvement. specify by and usable, page. well-organized? along cut Please sufficient documentation on associated system programs If not, for use of the software described in this manual? what material is missing and where should it be placed? Is there required Please indicate the type of user/reader that you Assembly language Name DECIDED programmer Occasional programmer (experienced) little nearly represent. programmer Higher-level language User with most programming experience Student programmer Non-programmer interested in computer concepts and capabilities Date Organization Street City State Zip Code or Country Fold Here Do Not Tear - Fold Here and Staple FIRST CLASS PERMIT NO. 33 MAYNARD. MASS. BUSINESS REPLY MAIL NO POSTAGE STAMP NECESSARY IF MAILED IN THE UNITED STATES Postage will be paid by: Eflflfllfill Business Products Software Development Group MKl-Z/H32 Continental Blvd. Merrimack, New Hampshire 03054
Home
Privacy and Data
Site structure and layout ©2025 Majenko Technologies