1 /* BEGIN INCLUDE FILE:        dm_fm_file_access_info.incl.pl1 */
 2 
 3 /* DESCRIPTION:
 4         The file_access_info structure contains per-process information
 5    about a DM file.  Each file_access_info structure is one entry in
 6    the file_access_table.e array.  The entry can be in one of three states:
 7    not-in-use (file_access_info.entry_state is 0), in-use (entry_state is
 8    -1) or still in-use, but to be discarded at the end of the transaction
 9    (any number > 0).  An entry needs to be discarded when the file is
10    completely closed by the user.  This last state is useful because it is
11    better not to discard the entry when it is completely closed until the
12    end of the current transaction, so that if the transaction is aborted, the
13    file need not be re-opened to apply the before images.  A list of entries
14    to be discarded is maintained using the entry_state variable.
15         The file can be in one of three states: exists (file_state = 1),
16    does not exist (file_state = 0), and logically_deleted (file_state = 3).
17 */
18 
19 /* HISTORY:
20 Written by Jeffrey D. Ives, 10/11/82.
21   (Original design by Andre Bensoussan, 01/28/82.)
22 Modified:
23 10/05/83 Jeffrey D. Ives: Added fields for lock advice and expanded seg_nums.
24 07/12/84 by Matthew Pierret: Re-named proc_ad to file_access_info.
25 12/17/84 by Matthew Pierret: Changed post_transaction_actions sub-structure
26             to state, with entry_state (replacing thread) and the new
27             file_state.  Added a DESCRIPTION section. Added constants for
28             possible file_state values.
29 */
30 
31 /* format: style2,^inddcls,dclind5 */
32 
33 dcl  1 file_access_info     aligned based (file_access_info_ptr),
34        2 state              aligned,
35          3 entry_state      fixed bin (17) unal,
36          3 file_state       fixed bin (17) unal,
37        2 uid                bit (36),
38        2 blocking_factor    fixed bin (17) unal,
39        2 ring_brackets      unal,
40          3 write            fixed bin (3) unsigned unal,
41          3 read             fixed bin (3) unsigned unal,
42          3 mbz_rb           fixed bin (3) unsigned unal,
43        2 integrity_switches unal,
44          3 record_time_modified
45                             bit (1) unal,                   /* record time modified in ci_header and trailer  */
46          3 transaction      bit (1) unal,                   /* permit access only during a transaction        */
47          3 lock             bit (1) unal,                   /* lock control intervals before accessing them   */
48          3 bj               bit (1) unal,                   /* put undo records in the before journal         */
49          3 aj               bit (1) unal,                   /* put redo records in the after journal          */
50          3 mbz_is           bit (4) unal,
51        2 last_transaction_id
52                             bit (36),
53        2 msf_ptr            ptr unal,
54        2 pn_tbl_idx         fixed bin (17) unal,
55        2 lock_advice        fixed bin (17) unal,
56        2 opens              fixed bin (17) unal,
57        2 seg_0_num          bit (18) unal,
58        2 seg_nums           (27) fixed bin (12) uns unal;
59 
60 
61 dcl  file_access_info_ptr   ptr init (null ());
62 
63 dcl  (
64      FILE_ACCESS_INFO_IN_USE
65                             init (-1),
66      FILE_ACCESS_INFO_NOT_IN_USE
67                             init (0),
68      FILE_DOES_NOT_EXIST init (0),
69      FILE_EXISTS            init (1),
70      FILE_LOGICALLY_DELETED init (3)
71      )                      fixed bin internal static options (constant);
72 
73 
74 /* END INCLUDE FILE:          dm_fm_file_access_info.incl.pl1  */