6–1 Sample Record Description . ................................ 6–9
6–2 Determining Fixed-Length Record Size . ....................... 6–10
6–3 Determining Fixed-Length Record Size for Files with Multiple Record
Descriptions ............................................. 6–10
6–4 Creating Variable-Length Records with the DEPENDING ON
Phrase . ................................................ 6–11
6–5 Creating Variable-Length Records with the RECORD VARYING
Phrase . ................................................ 6–11
6–6 Creating Variable-Length Recordsand Using the OCCURS Clause
with the DEPENDING ON Phrase ........................... 6–11
6–7 Defining Fixed-Length Records with Multiple Record Descriptions . . . 6–12
6–8 Defining a Disk File ....................................... 6–15
6–9 Defining a Magnetic Tape File (OpenVMS) ..................... 6–16
6–10 Defining a Magnetic Tape File (Tru64UNIX) ................... 6–16
6–11 Using Environment Variablesfor File Specification ............... 6–19
6–12 Using Environment Variables ............................... 6–19
6–13 Specifying Sequential File Organization and Sequential Access Mode
for a Sequential File ...................................... 6–21
6–14 Specifying Relative File Organization and Random Access Mode for a
Relative File ............................................. 6–21
6–15 Specifying Indexed File Organization and Dynamic Access Mode for
an Indexed File . . ........................................ 6–21
6–16 Specifying Line Sequential File Organization with Sequential Access
Mode . . ................................................ 6–22
6–17 SELECT Statements for Sequential Files with Sequential Access
Mode . . ................................................ 6–23
6–18 SELECT Statements for Relative Files with Sequential and Dynamic
Access Modes ............................................ 6–23
6–19 SELECT Statements for Indexed Files with Dynamic and Default
Sequential Access Modes . . . ................................ 6–24
6–20 SELECT Statements for Line Sequential Files with Sequential Access
Modes . ................................................ 6–24
6–21 OPEN and CLOSE Statements .............................. 6–25
6–22 Creating a Sequential File . . ................................ 6–26
6–23 Creating a Line Sequential File .............................. 6–27
6–24 Creating a Relative File in Sequential Access Mode .............. 6–30
6–25 Creating a Relative File in Random Access Mode ................ 6–30
6–26 Creating and Populating an Indexed File ...................... 6–33
6–27 Using Segmented Keys .................................... 6–35
6–28 Reading a Sequential File .. ................................ 6–38
6–29 Reading a Relative File Sequentially . . . ....................... 6–39
6–30 Reading a Relative File Randomly............................ 6–40
6–31 Reading a Relative File Dynamically . . . ....................... 6–41
6–32 Reading an Indexed File Sequentially . . ....................... 6–42
6–33 Reading an Indexed File Randomly ........................... 6–43
6–34 Reading an Indexed File Dynamically . . ....................... 6–45
6–35 Reading an Indexed File Dynamically,with READ PRIOR . . ....... 6–46
6–36 Rewriting a Sequential File . ................................ 6–49
xv