1 /*  START OF:       abs_io_data.incl.pl1                      *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *   */
  2 
  3 
  4 /****^  HISTORY COMMENTS:
  5   1) change(87-02-20,Parisek), approve(87-07-23,MCR7716),
  6      audit(87-07-30,Fawcett), install(87-08-11,MR12.1-1080):
  7      Added the noabort flag for determining whether or not to abort after
  8      exec_com error occurs.
  9                                                    END HISTORY COMMENTS */
 10 
 11 
 12 /* Initial coding: 25 June 79 by J. Spencer Love */
 13 /* login_channel option flag BIM 11/81 */
 14 /* Added this_action and next_action 04/20/82 S. Herbst */
 15 /* Added on_info, goto_statement_(pos len) 01/06/83 S. Herbst */
 16 /* Added output_file.turn_off_ssw 05/16/83 S. Herbst */
 17 /* Added attach.trim_whitespace_sw 06/02/83 S. Herbst */
 18 /* Added listener_pl1_label and get_line_pl1_label 11/17/83 S. Herbst */
 19 /* Added (command comment control input)_line.by_control_arg 03/20/84 S. Herbst */
 20 
 21 declare   abs_data_ptr                  ptr;
 22 
 23 declare   1 abs_data                    aligned based (abs_data_ptr),
 24             2 version                   fixed bin,          /* Version = 1                                              */
 25             2 io_module_name            char (32) varying,  /* either "abs_io_" or "ec_input_"                          */
 26             2 open_description          char (24) varying,  /* either "stream_input" or "stream_input_output"           */
 27             2 unique_name               char (15) varying,  /* &! -- either blank or 15 char unique string              */
 28                                                             /*                                                          */
 29             2 ec_data_ptr               ptr,                /* -> communication area for exec_com                       */
 30             2 expand_data_ptr           ptr,                /* -> structure for abs_io_expand_                          */
 31                                                             /*                                                          */
 32             2 instance_chain,                               /* two way linked chain of abs_data blocks for debugging    */
 33               3 prev_ptr                ptr,                /* -> next older abs_data instance                          */
 34               3 next_ptr                ptr,                /* -> next newer abs_data instance                          */
 35               3 level                   fixed bin,          /* level of ec invocation in chain for debugging            */
 36               3 pad                     bit (36),           /*                                                          */
 37                                                             /*                                                          */
 38             2 arg_info,                                     /*                                                          */
 39               3 ec_path_ptr             ptr,                /* Ptr to allocated &ec_path string                         */
 40               3 ec_path_len             fixed bin (21),     /* Length of allocated &ec_path (&0) string                 */
 41               3 ec_path_quotes          fixed bin (21),     /* Number of quote chars in &ec_path, -1 if not yet counted */
 42               3 ec_name_ptr             ptr,                /* Ptr to allocated &ec_name string                         */
 43               3 ec_name_len             fixed bin (21),     /* Length of allocated &ec_name string                      */
 44               3 ec_name_quotes          fixed bin (21),     /* Number of quote chars in &ec_name, -1 if not yet counted */
 45               3 arg_ptr                 ptr,                /* pointer to allocated structure containing args           */
 46               3 arg_count               fixed bin,          /* number of arguments passed                               */
 47               3 args_copied             bit (1),            /* 1 indicates arguments were copied into work_area         */
 48               3 default_arg_ptr         ptr,                /* pointer to allocated &default args                       */
 49               3 default_arg_count       fixed bin,          /* number of &default args                                  */
 50               3 pad                     bit (36),           /*                                                          */
 51                                                             /*                                                          */
 52             2 input_string,                                 /* data about input segment or archive component            */
 53               3 ptr                     ptr,                /* pointer to input file                                    */
 54               3 len                     fixed bin (21),     /* number of characters in input file                       */
 55               3 start                   fixed bin (21),     /* initial value for input_pos, set beyond &version, if any */
 56               3 position                fixed bin (21),     /* current index into input file                            */
 57               3 limit                   fixed bin (21),     /* farthest point yet reached...begin &label search here    */
 58                                                             /*                                                          */
 59             2 open_data,                                    /* data saved at attach time for open time                  */
 60               3 output_dir              char (168) unal,    /* directory pathname of output file (if specified)         */
 61               3 output_entry            char (32) unal,     /* entryname of output file (if specified)                  */
 62               3 parser_version          fixed bin,          /* indicates version of parser (get_line) for open          */
 63               3 si                      bit (1) unal,       /* 1 indicates opening for stream_input permitted           */
 64               3 sio                     bit (1) unal,       /* 1 indicates opening for stream_input_output permitted    */
 65               3 ssf                     bit (1) unal,       /* 1 indicates output file cannot be MSF                    */
 66               3 truncate                bit (1) unal,       /* 1 indicates output file truncated at open                */
 67               3 no_set_bc               bit (1) unal,       /* 1 to set absout bitcount only at close                     */
 68               3 login_channel           bit (1) unal,       /* 1 to fish arguments from PIT */
 69               3 pad                     bit (30) unal,      /*                                                          */
 70                                                             /*                                                          */
 71             2 output_file,                                  /* data for abs_io_put_chars                                */
 72               3 fcb_ptr                 ptr,                /* -> File Control Block for msf_manager_, null if SSF      */
 73               3 seg_ptr                 ptr,                /* -> base of current component of output file              */
 74               3 current_len             fixed bin (21),     /* number of characters in current component                */
 75               3 max_len                 fixed bin (21),     /* max number of characters in a component                  */
 76               3 MSF_seg_idx             fixed bin,          /* index of current MSF component. Used to get new ones     */
 77               3 switches                aligned,
 78                4 may_be_MSF             bit (1) unaligned,  /* 1 indicates absout can become an MSF           */
 79                4 turn_off_ssw           bit (1) unaligned,  /* 1 means safety switch of absout was off originally       */
 80                4 mbz                    bit (34) unaligned,
 81                                                             /*                                                          */
 82             2 command_line,                                 /* substructure dealing with tracing command lines          */
 83               3 by_control_arg          bit (1) unaligned,  /* 1 if trace modes specified by ec control arg             */
 84               3 on                      bit (1) unaligned,  /* 1 to print tracing information                           */
 85               3 expand                  fixed bin (3) unal, /* 1 to print unexpanded, 2 expanded, 3 all, 4 both         */
 86               3 pad1                    bit (66) unaligned, /* pad to double word                                       */
 87               3 iocb                    ptr,                /* I/O switch to put trace out on                           */
 88               3 prefix                  char (32) varying,  /* prefix for &trace tracing, eg. "COMMAND: "               */
 89               3 pad2                    bit (36),           /*                                                          */
 90             2 (comment_line,                                /* for tracing comments..always unexpanded                  */
 91                control_line,                                /* for tracing control lines                                */
 92                input_line)                                  /* for tracing input lines in &attach mode                  */
 93                                         like abs_data.command_line,
 94                                                             /*                                                          */
 95             2 attach,                                       /*                                                          */
 96              3 victim_ptr               ptr,                /* -> IOCB affected by &attach (usually iox_$user_input     */
 97              3 target_ptr               ptr,                /* -> IOCB &attached to (created by exec_com command)       */
 98              3 save_ptr                 ptr,                /* -> IOCB used to save previous victim_ptr -> IOCB         */
 99              3 switches,
100               4 trim_whitespace_sw      bit (1) unaligned,  /* OFF for &attach &trim off, ON by default                 */
101               4 noabort                 bit (1) unaligned,  /* ON if continue after severity 1 error */
102               4 pad                     bit (34) unaligned,
103                                                             /*                                                          */
104             2 allocated_chars_ptr       ptr,                /* -> allocated buffer for freeing                          */
105             2 chars_ptr                 ptr,                /* -> characters in buffer waiting to be returned           */
106             2 else_clause_ptr           ptr,                /* -> characters in deferred else clause                    */
107             2 allocated_chars_len       fixed bin (21),     /* total length of allocated buffer                         */
108             2 chars_len                 fixed bin (21),     /* characters left in buffer to be returned                 */
109             2 else_clause_len           fixed bin (21),     /* length of deferred else clause                           */
110                                                             /*                                                          */
111             2 absentee                  bit (1),            /* 1 indicates logout on &quit                              */
112             2 quit                      bit (1),            /* 1 indicates orderly exit, quit or return                 */
113                                                             /*                                                          */
114             2 active                    bit (1),            /* 1 indicates get_line is busy, for recursion check        */
115             2 eof                       bit (1),            /* 1 indicates &quit found or no more input                 */
116             2 last_input_line_sw        bit (1),            /* previous line returned was an input line                 */
117             2 label_search_sw           bit (1),            /* ON when searching for target of &goto                    */
118             2 nest_level                fixed bin,          /* V1: depth of &if-&then-&else nesting                     */
119             2 expected_nest_level       fixed bin,          /* V1: depth that must be reached to resume execution       */
120                                                             /*                                                          */
121             2 goto_statement_pos        fixed bin (21),     /* position of last &goto stmt, for error msgs              */
122             2 goto_statement_len        fixed bin (21),     /* length of the &goto stmt                                 */
123 
124             2 if_info aligned,                              /* &if-&then-&else nesting info                             */
125              3 if_sw                    bit (1),            /* ON if inside an &if-&then-&else construct                */
126              3 true_sw                  bit (1),            /* ON after "&if true"                                      */
127              3 got_then_sw              bit (1),            /* ON after the &then has been seen                         */
128              3 got_else_sw              bit (1),            /* ON after the &else has been seen                         */
129              3 clause_type              fixed bin,          /* previous &then or &else                                  */
130              3 skip_sw                  bit (1),            /* ON if skipping a &then or &else clause                   */
131              3 skip_block_level         fixed bin,          /* how many levels of &do we are inside while skipping      */
132              3 prev_if_ptr              ptr,                /* ptr to if_info (saved) of &if we are nested inside       */
133              3 this_action              fixed bin,          /* copy of expand_data.this_statement.action */
134              3 next_action              fixed bin,          /* copy of expand_data.next_statement.action */
135 
136             2 on_info aligned,                              /* info pertaining to &on units in the ec                   */
137              3 cleanup_handler_ptr      ptr,                /* -> node for cleanup handler if any                       */
138              3 first_handler_ptr        ptr,                /* -> top of chain of nodes for other handlers              */
139              3 switches                 aligned,
140               4 was_attached_sw         bit (1) unal,       /* 1 indicates parent ec was &attach'ed           */
141               4 in_handler_sw           bit (1) unal,       /* 1 indicates we are now executing some handler text       */
142               4 exit_sw                 bit (1) unal,       /* 1 indicates ready to exit the handler via &exit or &goto */
143               4 goto_sw                 bit (1) unal,       /* 1 means this exit is accomplished by a nonlocal &goto    */
144               4 continue_to_signal_sw   bit (1) unal,       /* 1 means &continue_to_signal was executed                 */
145               4 pad                     bit (31) unal,
146              3 handler_node_ptr         ptr,                /* -> parent's handler_node for this condition              */
147              3 parent_abs_data_ptr      ptr,                /* -> abs_data structure of parent ec                                 */
148              3 condition_info           aligned,            /* selected condition info if in_handler_sw is ON           */
149               4 condition_name          char (32),          /* name of condition signalled                              */
150               4 mc_ptr                  ptr,                /* machine conditions ptr for signal_                       */
151               4 info_ptr                ptr,                /* ptr to specific condition info, for signal_              */
152               4 wc_ptr                  ptr,                /* machine conditions for lower ring fault, for signal_     */
153              3 goto_label_ptr           ptr,                /* -> &goto label if goto_sw is on                          */
154              3 goto_label_len           fixed bin (21),     /* length of the &goto label                                */
155              3 listener_pl1_label       label variable,     /* for nonlocal goto to parent ec's listener's stack frame  */
156              3 get_line_pl1_label       label variable,     /* for nonlocal goto to parent ec's get_line's stack frame  */
157                                                             /*                                                          */
158             2 saved_state_ptr           ptr,                /* -> top of parser stack                                   */
159             2 current_lex_block_ptr     ptr,                /* -> lex_block for current block position                  */
160             2 current_proc_block_ptr    ptr,                /* -> proc block for current procedure                      */
161             2 last_block_ptr            ptr,                /* -> last lex or proc block that has been allocated        */
162             2 current_loop_ptr          ptr,                /* -> loop_block for current active loop                    */
163             2 last_loop_ptr             ptr,                /* -> last loop block that has been allocated               */
164                                                             /*                                                          */
165             2 labels_ptr                ptr,                /* hash table ptr for label hash table                      */
166             2 first_xlabel_ptr          ptr,                /* first expandable label                                   */
167             2 last_xlabel_ptr           ptr,                /* last expandable label                                    */
168             2 variables_ptr             ptr,                /* hash table ptr for variable hash table                   */
169                                                             /*                                                          */
170             2 timed_input               bit (1),            /* 1 indicates input requests may be delayed                */
171             2 low_sleep_time            fixed bin (35),     /* low  sleep time for timed input                          */
172             2 sleep_time_range          fixed bin (35),     /* high sleep time for timed input                          */
173             2 seed                      fixed bin (35),     /* seed for timed input random numbers                      */
174                                                             /*                                                          */
175             2 work_area                 area (800);         /* extensible area for args, etc.                           */
176 
177 declare   abs_data_version_1            fixed bin static options (constant) initial (1),
178           Work_area_size                fixed bin static options (constant) initial (800);
179 
180 dcl (UNEXPANDED init (1), EXPANDED init (2), ALL init (3), BOTH init (4))
181           fixed bin int static options (constant);
182 
183 /*  END OF:         abs_io_data.incl.pl1                      *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *   */