Monday, June 1, 2009

(FAQ) How Can You Check Record Existence Without Using CHAIN or READ I/O Operation?

This is possible using File Information Data Structure (INFDS).
Here's the code:

Position Entry
6 F
7-52 Blank (if the information is specified on a separate continuation line)
53 K (indicates a continuation statement)
54-59 INFDS (identifies this data structure as a file information data structure)
60-65 Name of the file information data structure.

Also make the following entries on an input specification line:
Position Entry
6 I
7-12 Name of the file information data structure
13-18 Blank
19-20 DS
21-74 Blank.

For each subfield of the information data structure, make the following entries on an
input specification line:
Position Entry
6 I
7-43 Blank
44-51 *RECORD
52 Blank
53-58 Name of the subfield of the information data structure
59-74 Blank.

2 comments: