1 /* format: style4,indattr,idind33,^indcomtxt */
 2 
 3 /* BEGIN INCLUDE FILE:        dm_bj_records.incl.pl1        */
 4 /*
 5 Before journal records - images and marks
 6 
 7 Designed by Andre Bensoussan 02/03/82
 8 Written by Mike Pandolf 07/07/82
 9 Modified:
10 10/01/82 by Lee A. Newcomb:  To add n_txn to all records so rollback after
11             crash knows how many transactions were active at crash time.
12 15feb83  by M. Pandolf: To add fm_handler_rec for both rollback and postcommit
13             handler used exclusively by file_manager_, add BEGIN_COMMIT mark,
14             and add PREFORM_BEGIN mark (for housekeeping, never written).
15 05apr83 by M. Pandolf to add BEGIN_MARK for bj_txte.last_completed_operation
16 */
17 
18 
19 dcl  bj_rec_hdr_ptr                   ptr;                  /* pointer to various bj records */
20 
21 dcl  1 bj_rec_hdr                     aligned based (bj_rec_hdr_ptr),
22        2 type                         char (4),             /* see types below */
23        2 tid                          bit (36),             /* transaction id for this record */
24        2 process_id                   bit (36),             /* of process initiating this transaction */
25        2 prev_rec_id                  bit (36),             /* of record in this transaction */
26        2 prev_rec_byte_size           fixed bin (24),       /* of record in this transaction */
27        2 tx_rec_no                    fixed bin (35),       /* number of this record in transaction list */
28        2 n_txn                        fixed bin;            /* number of active txn's in the BJ containing this txn */
29                                                             /* with at least one record written in the BJ.  This is */
30                                                             /* used for rollback after crash */
31                                                             /* N.B. commits and abort marks do not count themselves */
32 
33 /* before journal records for the various record types */
34 
35 dcl  1 bj_committed_rec               aligned like bj_rec_hdr based (bj_rec_hdr_ptr);
36 
37 dcl  1 bj_begin_commit_rec            aligned like bj_rec_hdr based (bj_rec_hdr_ptr);
38 
39 dcl  1 bj_aborted_rec                 aligned like bj_rec_hdr based (bj_rec_hdr_ptr);
40 
41 dcl  1 bj_rolled_back_rec             aligned based (bj_rec_hdr_ptr),
42        2 header                       like bj_rec_hdr,
43        2 checkpoint_no                fixed bin (35),
44        2 last_rolled_back_rec_id      bit (36);
45 
46 dcl  1 bj_rollback_handler_rec        aligned based (bj_rec_hdr_ptr),
47        2 header                       like bj_rec_hdr,
48        2 name_len                     fixed bin (24),
49        2 info_len                     fixed bin (24),
50        2 proc_name                    char (bj_rollback_name_len refer (bj_rollback_handler_rec.name_len)),
51        2 info_bits                    bit (bj_rollback_info_len refer (bj_rollback_handler_rec.info_len));
52 
53 /* dm_bj_records.incl.pl1 CONTINUED NEXT PAGE */
54 %page;
55 /* dm_bj_records.incl.pl1 CONTINUATION FROM PREVIOUS PAGE */
56 
57 dcl  1 bj_before_image                aligned based (bj_rec_hdr_ptr),
58        2 header                       like bj_rec_hdr,
59        2 fm_uid                       bit (36),
60        2 fm_oid                       bit (36),
61        2 ci_no                        fixed bin (35),
62        2 n_parts                      fixed bin (17),
63        2 image_len                    fixed bin (24),
64        2 part                         dim (bj_before_image_n_parts refer (bj_before_image.n_parts)),
65          3 byte_offset                fixed bin (24),
66          3 byte_length                fixed bin (24),
67        2 image                        char (bj_before_image_len refer (bj_before_image.image_len));
68 
69 dcl  1 bj_fm_handler_rec              aligned based (bj_rec_hdr_ptr),
70        2 header                       like bj_rec_hdr,
71        2 fm_uid                       bit (36),
72        2 fm_oid                       bit (36),
73        2 prev_fm_handler_rec_id       bit (36),
74        2 info_len                     fixed bin,
75        2 info_bytes                   char (bj_fm_handler_info_len refer (bj_fm_handler_rec.info_len));
76 
77 /* extent definers */
78 
79 dcl  bj_rollback_name_len             fixed bin (24);
80 dcl  bj_rollback_info_len             fixed bin (24);
81 dcl  bj_before_image_n_parts          fixed bin;
82 dcl  bj_before_image_len              fixed bin (24);
83 dcl  bj_fm_handler_info_len           fixed bin (24);
84 
85 /* record type identifiers */
86 
87 dcl  1 BJ_RECORD_TYPE                 int static options (constant) aligned,
88      ( 2 BEGIN_COMMIT                 init ("bcom"),
89        2 PERFORM_COMMIT               init ("pcom"),
90        2 COMMITTED                    init ("comm"),
91        2 ABORTED                      init ("abor"),
92        2 ROLLED_BACK                  init ("roll"),
93        2 HANDLER                      init ("hand"),
94        2 FM_ROLLBACK_HANDLER          init ("fmrb"),
95        2 FM_POSTCOMMIT_HANDLER        init ("fmpc"),
96        2 BEGIN_MARK                   init ("begi"),
97        2 BEFORE_IMAGE                 init ("befo")) char (4);
98 
99 /* END INCLUDE FILE:          dm_bj_records.incl.pl1        */