Open a record, cursor set, or file.
Restriction: This topic applies only when the AppMaster Builder AddPack has been installed, and applies only to Windows platforms.
SQL
- Syntax:
-
DB-OPEN CUR[SOR] cursorname
- General Rule:
-
- A cursor set can be opened, processed, and closed multiple times in the same program. A DB-OPEN issued for an open cursor set causes an error; first code a DB-CLOSE.
- Parameters:
-
CUR[SOR]
cursorname
|
Specify cursor.
Cursorname must be previously named by DB-DECLARE or DB-PROCESS-ID.
|
- Example:
- Open cursor set D2MAST-CURSOR, previously defined in DB-DECLARE.
DB-OPEN CURSOR D2MAST-CURSOR
VSAM Batch
- Syntax: for Format 1
-
DB-OPEN FILE filename [... filename]
... MODE option
- Syntax: for Format 2
-
DB-OPEN FILE ALL
... MODE option
- General Rule:
-
- DB-OPEN is required for single-platform applications.
- Parameters:
-
FILE
filename
|
File(s) to process.
|
MODE
option
|
File processing mode: INPUT, OUTPUT, I-O, EXTEND
|
All
|
Specify all files defined in the data view.
|
- Example:
- Open the
AORDER and ASUPLIR files for I-O processing.
DB-OPEN FILE AORDER ASUPLIR MODE I-O