Previous | Contents | Index |
The ON...GOTO statement transfers program control to one of several lines or targets, depending on the value of a control expression.
ON INDEX% GOTO 700,800,900 OTHERWISE finish . . . finish: END PROGRAM |
The OPEN statement opens a file for processing. It transfers user-specified file characteristics to OpenVMS Record Management Services (RMS) and verifies the results.
10 INPUT 'FILE NAME';fnam$ 20 OPEN fnam$ FOR INPUT AS FILE #1%, & DEFAULTNAME "USER$$DISK:.DAT" |
Future releases of the OpenVMS Run-Time Library may alter the use of some RMS fields. Therefore, you may have to alter your USEROPEN procedures accordingly. |
OPEN "FILE.DAT" AS FILE #4 |
OPEN "INPUT.DAT" FOR INPUT AS FILE #4, & ORGANIZATION SEQUENTIAL FIXED, & RECORDSIZE 200, & MAP ABC, & ALLOW MODIFY, ACCESS MODIFY OPEN Newfile$ FOR OUTPUT AS FILE #3, & INDEXED VARIABLE, & MAP Emp_name, & DEFAULTNAME "USER$$DISK:.DAT", & PRIMARY KEY Last$ DUPLICATES, & ALTERNATE KEY First$ CHANGES MAP (SEGKEY) STRING last_name = 15, & MI = 1, first_name = 15 OPEN "NAMES.IND" FOR OUTPUT AS FILE #1, & ORGANIZATION INDEXED, & PRIMARY KEY (last_name, first_name, MI), & MAP SEGKEY |
Previous | Next | Contents | Index |