CONTENTS Title Page Copyright Page Preface 1 VAX DIBOL Language Elements 1.1 Introduction 1.2 VAX DIBOL Character Set 1.3 Statement Types 1.3.1 Compiler Directives and Declarations 1.3.2 Data Specification Statements 1.3.3 Data Manipulation Statements 1.3.4 Control Statements 1.3.5 Intertask Communications Statements 1.3.6 Input/Output Statements 1.3.7 Functions 1.4 Program Structure 1.5 Statement Line Syntax 1.6 Procedure Division Statement Labels 1.7 Array Subscripting 1.8 Literals 1.8.1 Alpha Literals 1.8.2 Numeric Literals 1.8.2.1 Error Mnemonics 1.8.3 User-Defined Literals 1.9 Compile Time Constant Expressions (CTCE) 1.10 Substrings 1.11 Alpha Expressions 1.12 Numeric Expressions 2 VAX DIBOL Data Division 2.1 Introduction 2.2 RECORD Statement 2.3 COMMON Statement 2.4 GROUP/ENDGROUP Block 2.5 Field Definitions 2.5.1 Field Names 2.5.2 Array Declarations 2.5.2.1 Real Arrays 2.5.2.2 Pseudo-arrays 2.5.2.3 Field Type and Size 2.5.3 Initial Values 2.6 SUBROUTINE Statement 2.7 FUNCTION Statement 2.7.1 Subroutine and Function Argument Definition 2.8 External Function 2.9 LITERAL Statement 2.10 Calling A Function in the Data Division 3 VAX DIBOL Procedure Division 3.1 Alpha Expressions 3.2 Numeric Expressions 3.3 Value Assignment Statements 3.3.1 Moving Alpha Data 3.3.2 Moving Numeric Data 3.3.3 Alpha-to-Numeric Conversion 3.3.4 Numeric-to-Alpha Conversion 3.3.5 Formatting Data 3.3.6 Clearing Variables 3.4 Array Use 3.5 Substrings 3.5.1 Absolute Substring Specification 3.5.2 Relative Substring Specification 3.6 ACCEPT 3.7 BEGIN-END Block 3.8 CALL 3.9 CLEAR 3.10 CLOSE 3.11 DECR 3.12 DELETE 3.13 DETACH 3.14 DISPLAY 3.14.1 DISPLAY Output Field Attributes 3.15 DO-UNTIL 3.16 EXIT 3.17 EXITLOOP 3.18 FIND 3.19 FLUSH 3.20 FOR 3.21 FORMS 3.22 FRETURN 3.23 GOTO 3.24 GOTO (Computed) 3.25 IF 3.26 IF-THEN-ELSE 3.27 INCR 3.28 LOCASE 3.29 LPQUE 3.30 NEXTLOOP 3.31 NOP 3.32 OFFERROR 3.33 ONERROR 3.34 OPEN 3.35 PROC-END 3.36 READ (Indexed File) 3.37 READ (Relative File) 3.38 READ (Sequential File) 3.39 READS 3.39.1 READS input_field_attributes 3.40 RECV 3.41 REPEAT 3.42 RETURN 3.43 SEND 3.44 SLEEP 3.45 STOP 3.46 STORE 3.47 UNLOCK 3.48 UPCASE 3.49 USING 3.50 USING-RANGE 3.51 WHILE 3.52 WRITE (Indexed File) 3.53 WRITE (Relative File) 3.54 WRITE (Sequential File) 3.55 WRITES 3.55.1 WRITES output_field_attributes 3.56 XCALL 3.57 XRETURN 4 VAX DIBOL Functions 4.1 VAX DIBOL Functions 4.2 Calling Functions 4.3 Built-In Functions 4.3.1 %ABS 4.3.2 %ADDR 4.3.3 %ARGA 4.3.4 %ARGN 4.3.5 %B 4.3.6 %BIN 4.3.7 %BIT_IS_CLR 4.3.8 %BIT_IS_SET 4.3.9 %BKSTR 4.3.10 %CDDEDIT 4.3.11 %CDDHDR 4.3.12 %CHAR 4.3.13 %CHOPEN 4.3.14 %CPUTIME 4.3.15 %D 4.3.16 %DATE 4.3.17 %DECML 4.3.18 %DEFINED 4.3.19 %DESCR 4.3.20 %ERLINE 4.3.21 %ERROR 4.3.22 %HEX 4.3.23 %INRANGE 4.3.24 %INSTR 4.3.25 %INT 4.3.26 %INTEGER 4.3.27 %JBNO 4.3.28 %NUMARGS 4.3.29 %O 4.3.30 %OCT 4.3.31 %OUTRANGE 4.3.32 %PACKED 4.3.33 %PASSED 4.3.34 %REF 4.3.35 %RFA 4.3.36 %RSIZE 4.3.37 %RTERM 4.3.38 %SIZE 4.3.39 %STRING 4.3.40 %SUCCESS 4.3.41 %SYSERR 4.3.42 %TIME 4.3.43 %TNMBR 4.3.44 %TTNAME 4.3.45 %TTSTS 4.3.46 %UNSIGNED 4.3.47 %VAL 4.3.48 %VARIANT 4.3.49 %VERSN 4.3.50 %VMS 4.3.51 %WAIT 4.3.52 %WKDAY 4.3.53 %X 4.3.54 %XTRNL 4.3.55 %ZONED 4.4 User-Defined Functions 4.4.1 Example of User-Defined Function 5 VAX DIBOL Subroutines 5.1 Introduction 5.2 VAX DIBOL Universal Subroutines (DBLUESL) 5.2.1 The VAX DIBOL Universal External Subroutine Library (DBLUESL) 5.3 Operating System Specific Library External Subroutines (DBLOSSL) 5.3.1 The Operating System Specific Library (DBLOSSL) 5.4 The VAX DIBOL Run-Time Library Subroutines (DBLRTL) 5.4.1 The VAX DIBOL Run-Time Library (DBLRTL) 5.5 ACCESS 5.6 ASCII 5.7 BEGFL 5.8 CHAIN 5.9 DATE 5.10 DBL$ASTRST 5.11 DBL$ASTSAV 5.12 DBL$BKSTR 5.13 DBL$CHOPEN 5.14 DBL$CPUTM 5.15 DBL$CREMBX 5.16 DBL$DELMBX 5.17 DBL$DEVCLT 5.18 DBL$ERRMOD 5.19 DBL$ERRTXT 5.20 DBL$EXECUTE_IMAGE_ROUTINE 5.21 DBL$EXITERROR 5.22 DBL$GETDFN 5.23 DBL$GETFNM 5.24 DBL$PARSE 5.25 DBL$SETCTL 5.26 DBL$SETDFN 5.27 DBL$SNDOP 5.28 DBL$TIMOUT 5.29 DBL$TTBRDCST 5.30 DBL$TTCHAR 5.31 DBL$TTNAME 5.32 DBL$TT_NAME_TO_NUMBER 5.33 DBL$TT_NUMBER_TO_NAME 5.34 DBL$WKDAY 5.35 DBL$XARGS 5.36 DBL$XSTAT 5.37 DECML 5.38 DELET 5.39 DSMNT 5.40 EMPBUF 5.41 ENDFL 5.42 ERROR 5.43 FATAL 5.44 FILEC 5.45 FLAGS 5.46 GETCM 5.47 GETFA 5.48 GLINE 5.49 GTENT 5.50 INSTR 5.51 JBNAM 5.52 JBNO 5.53 KILL 5.54 LOCK 5.55 MNT 5.56 MONEY 5.57 PAK 5.58 PURGE 5.59 PUTCM 5.60 RCVID 5.61 RENAM 5.62 RSTAT 5.63 RSTATD 5.64 RUNJB 5.65 SIZE 5.66 SLICE 5.67 SORT 5.68 SRCVID 5.69 SRECV 5.70 SSEND 5.71 TIME 5.72 TNMBR 5.73 TTFLGS 5.74 TTSTS 5.75 ULOCK 5.76 UNPAK 5.77 VERSN 5.78 WAIT 6 VAX DIBOL Compiler Directives 6.1 Introduction 6.2 .ALIGN 6.3 .END 6.4 .IDENT 6.5 .IF-.ELSE-.ENDC 6.6 .IFDEF-.ELSE-.ENDC 6.7 .IFNDEF-.ELSE-.ENDC 6.8 .INCLUDE 6.9 .LIST 6.10 .MAIN 6.11 .NOLIST 6.12 .PAGE 6.13 .PROC 6.14 .PSECT 6.15 .RESTORE 6.16 .SAVE 6.17 .SHOW 6.18 .SUBROUTINE 6.19 .SUBTITLE 6.20 .TITLE A VAX DIBOL Character Set A.1 Function Key Codes B VAX DIBOL Error Messages B.1 Introduction B.2 Message Format B.2.1 Changing Text Content B.2.1.1 Changing Message Text B.2.1.2 Changing Help Text C Compiler Messages C.1 Message Format C.2 Messages D VAX DIBOL Run-Time Library Messages D.1 Message Format D.2 Trappable and Non-trappable Errors D.3 Run-Time Messages D.4 Information Messages E VAX DIBOL SORT/MERGE Messages E.1 Message Format E.2 Message Destination E.2.1 IDENT Used as a DBLSORT Command E.2.2 IDENT Not Used as a DBLSORT Command E.3 Messages F VAX DIBOL Message Manager Messages F.1 Message Format F.2 Messages G VAX DIBOL STATUS Messages G.1 Message Format G.2 Messages H VAX DIBOL ISAM Utility Messages H.1 Message Format H.2 Messages I VAX DIBOL Menu Generator Messages I.1 Message Format I.2 Messages I.3 Other Messages J VAX DIBOL Menu Subroutine Messages J.1 Message Format J.2 Messages J.2.1 Menu Prompt Messages Glossary EXAMPLES 1-1 VAX DIBOL Program Structure 5-1 XCALL SORT Parameter Record Definition FIGURES 3-1 Mode:Submode Combinations 5-1 Register 0 Longword Return Status 5-2 FLAGS Option Fields 5-3 RENAM Flowchart 5-4 Digit Positions of the Parameter Argument 5-5 WAIT Option Fields TABLES 1-1 VAX DIBOL Delimiters 3-1 Table Of Operator Precedence (from Highest to Lowest) 3-2 Format Control Characters 3-3 Valid Argument and Keyword Combinations 4-1 Data-type Functions 4-2 Conversion Functions 4-3 Compile-time Functions 4-4 DBLUESL and DBLOSSL Functions 4-5 Miscellaneous Functions 4-6 USING-RANGE Functions 4-7 Functions to Pass and Receive Subroutine or Function Arguments 4-8 Functions to Use with VAX CDD/Plus 5-1 The VAX DIBOL DBLUESL Subroutine Library 5-2 The VAX DIBOL DBLOSSL Subroutine Library 5-3 The DIBOL DBLRTL Subroutine Library 5-4 Device Classes and Types 5-5 Terminal Characteristics 5-6 FLAGS Argument Parameter Assignments 5-7 Valid Keywords and Corresponding Attributes 5-8 Meanings of TTFLGS Argument Assignments 5-9 VERSN Returned Formats 5-10 WAIT Argument Assignments A-1 VAX DIBOL Character Set A-2 Key Codes