1 | Open Database File Input Information | Input | Char(*) |
2 | Return Code | Output | Binary(4) |
The Open Database File exit program is called when a job is opening a database file. This exit is called in the job that is attempting to open the file. The exit program is passed a list of files referenced in the open request and the open options. The exit program may set a return code value to end the open request. When an open request is issued, the operating system calls the user-written exit program through the registration facility. For information about adding an exit program to an exit point, see the Registration Facility APIs.
If the file being opened is a logical file or a query, multiple files may be passed to the exit program. The originally requested files will be passed in as well as any underlying physical files. Only full opens will call the exit program. Hence,
The Open Database File Exit Program can only be used with database objects. An open of a DDM file will not call the exit program on the source system, but it will call the exit program on the target system.
Authorities and Locks
Information needed by the exit program for the database files involved in the open. For the format of this parameter, see DBOP0100 Format.
Return code. The return code to indicate whether the open should be canceled. The valid values are:
The following tables show the format of the input information parameter for the exit program. For detailed descriptions of the fields in the table, see Field Descriptions.
Offset | Type | Field | |
---|---|---|---|
Dec | Hex | ||
0 | 0 | BINARY(4) | Size of fixed header for DBOP0100 |
4 | 4 | CHAR(8) | Format name |
12 | C | BINARY(4) | Offset to the referenced file array |
16 | 10 | BINARY(4) | Number of files in the referenced file array |
20 | 14 | BINARY(4) | Length of the referenced file array element |
24 | 18 | CHAR(10) | Job name |
34 | 22 | CHAR(10) | User name |
44 | 2C | CHAR(6) | Job number |
50 | 32 | CHAR(10) | Current user name |
60 | 3C | CHAR(1) | Database query open |
61 | 3D | CHAR(*) | Reserved |
The following structure shows the format of each array element of the Referenced File Array:
Offset | Type | Field | |
---|---|---|---|
Dec | Hex | ||
0 | 0 | CHAR(10) | Database file name |
10 | A | CHAR(10) | Database file library name |
20 | 14 | CHAR(10) | Database file member name |
30 | 1E | CHAR(2) | Reserved |
32 | 20 | BINARY(4) | Database file type |
36 | 24 | BINARY(4) | Database open underlying physical file |
40 | 28 | CHAR(1) | Database open input option |
41 | 29 | CHAR(1) | Database open output option |
42 | 2A | CHAR(1) | Database open update option |
43 | 2B | CHAR(1) | Database open delete option |
44 | 2C | CHAR(*) | Reserved |
Current user name. The current user profile opening the database file.
Database file library name. The database file library name that is referenced in the open request.
Database file member name. The database file member name that is referenced in the open request. When processing partition tables the member will be returned as *ALL.
Database file name. A database file name that is referenced in the open request. This is always the 10-character system name.
Database file type. The type of the database file.
Database open delete option. The delete option specified for the file on the open request.
Database open input option. The input option specified for the file on the open request.
Database open output option. The output option specified for the file on the open request.
Database open underlying physical file. The physical file underlying a logical file or view that was referenced in the open request.
Database open update option. The update option specified for the file on the open request.
Database query open. The interface used to run the database query against the files.
Format name. The name of the format being used.
Job name. The name of the job issuing the open request.
Job number. The number of the job issuing the open request.
Length of referenced file array element. The length of each element in the referenced file array.
Number of files in the referenced file array. The number of elements in the referenced file array.
Offset to the referenced file array. Indicates the offset from the start of the Open Database File Input Information to an array of files referenced in the open request.
Size of fixed header for DBOP0100. Size of header information.
User name. The user name under which the job that is issuing the open request is started.
Top | Database and File APIs | APIs by category |