1 /*  BEGIN INCLUDE FILE:  tape_ansi_cseg.incl.pl1            */
  2 /*                                                          */
  3 /*  1) Modified: 12/01/75 by Ross E. Klinger  --  to allow  */
  4 /*     for allocation of the attach and open descriptions   */
  5 /*     within the cseg structure.                           */
  6 /*  2) Modified for resource management.                              */
  7 /*  3) Modified 9/79 by R.J.C. Kissel to handle the new tseg.         */
  8 /*  4) Modified 4/82 by J.A. Bush for block sizes > 8192 bytes        */
  9 
 10 /* format: style4,delnl,insnl,indattr,ifthen,dclind9 */
 11 dcl      cP                     ptr;                        /* pointer on which cseg structure is based */
 12 dcl      cseg_tseg_version_2    fixed bin internal static options (constant) init (2);
 13 
 14 dcl      1 cseg                 based (cP),                 /* control structure */
 15            2 file_set_lock      bit (1) aligned,            /* "1"b if file set in use */
 16            2 invalid            bit (1) aligned,            /* invalid cseg - delete at detach time bit */
 17            2 standard           fixed bin,                  /* label standard */
 18                                                             /* 1 - ANSI standard */
 19                                                             /* 2 - IBM/OS-VS */
 20                                                             /* 3 - IBM/DOS-VM */
 21            2 attach_description,                            /* iox_ attach description */
 22              3 length           fixed bin (17),             /* actual length of string */
 23              3 string           char (256),                 /* maximum is 256 characters */
 24            2 open_description,                              /* iox_ open description */
 25              3 length           fixed bin (17),             /* actual length of string */
 26              3 string           char (32),                  /* maximum is 32 */
 27            2 module             char (12) varying,          /* IO module name */
 28            2 ndrives            fixed bin,                  /* maximum number of drives to be used */
 29            2 nactive            fixed bin,                  /* number of drives actually in use */
 30            2 write_ring         bit (1) aligned,            /* volumes mounted with write rings */
 31            2 protect            bit (1) aligned,            /* volumes have rings, but are hardware protected */
 32            2 density            fixed bin,                  /* file set recording density */
 33                                                             /* 2 - 800 bpi NRZI */
 34                                                             /* 3 - 1600 bpi PE  */
 35            2 vcN                fixed bin,                  /* number of links in volume chain */
 36            2 fcP                ptr,                        /* file chain pointer */
 37            2 flP                ptr,                        /* pointer to file link of current file */
 38            2 hdw_status,                                    /* hardware status structure */
 39              3 bits             bit (72) aligned,           /* IOM status */
 40              3 no_minor         fixed bin,                  /* number of minor status codes */
 41              3 major            fixed bin (35),             /* major status */
 42              3 minor            (10) fixed bin (35),        /* minor status */
 43            2 lbl_buf            char (80),                  /* label I/O buffer */
 44            2 open_mode          fixed bin,                  /* opening mode */
 45                                                             /* 4 - sequential_input */
 46                                                             /* 5 - sequential_output */
 47            2 close_rewind       bit (1) aligned,            /* rewind volume at next close */
 48            2 force              bit (1) aligned,            /* force file overwrite switch */
 49            2 user_labels        bit (1) aligned,            /* process user labels switch */
 50            2 no_labels          bit (1) aligned,            /* "1"b if volume has no labels */
 51            2 output_mode        fixed bin,                  /* 0 - input */
 52                                                             /* 1 - extend */
 53                                                             /* 2 - modify */
 54                                                             /* 3 - write */
 55                                                             /* 4 - create */
 56            2 replace_id         char (17),                  /* replace file identifier */
 57            2 retain             fixed bin,                  /* 0 - default to rcp_ defaults */
 58                                                             /* 1 - unassign drives and volumes */
 59                                                             /* 2 - retain drives, unassign volumes */
 60                                                             /* 3 - unassign drives, retain volumes */
 61                                                             /* 4 - retain drives and volumes */
 62            2 lrec,                                          /* logical record IO control data */
 63              3 bufP             ptr,                        /* pointer to current processing buffer */
 64              3 nc_buf           fixed bin,                  /* number of characters in buffer */
 65              3 offset           fixed bin,                  /* current processing offset within buffer */
 66              3 saveP            ptr,                        /* pointer to current D/V format RCW/RDW */
 67              3 file_lock        bit (1) aligned,            /* "1"b if file in use */
 68              3 blkcnt           fixed bin (35),             /* physical block count */
 69              3 reccnt           fixed bin (35),             /* logical record count (not presently used) */
 70              3 code             fixed bin (35),             /* lrec_io_ non-restartable error code */
 71            2 read_length,                                   /* read_length control data */
 72              3 rlP              ptr,                        /* pointer to read_length segment */
 73              3 rlN              fixed bin (21),             /* number of characters in segment */
 74            2 user_label_routine (6) variable entry (char (80), bit (1)),
 75                                                             /* 1 - read UHL */
 76                                                             /* 2 - write UHL */
 77                                                             /* 3 - read UTL */
 78                                                             /* 4 - write UTL */
 79                                                             /* 5 - read UVL */
 80                                                             /* 6 - write UVL */
 81                                                             /* THE FOLLOWING IS NEEDED ONLY WHILE TAPEIO_ / TDCM IS THE IO PROCEDURE */
 82            2 syncP              ptr,                        /* pointer to synchronous IO buffer */
 83            2 mode               fixed bin,                  /* 0 = binary -- 1 = 9 mode */
 84            2 soft_status,                                   /* software status structure */
 85              3 nbuf             fixed bin,                  /* number of suspended buffers */
 86              3 buf              (2),
 87                4 bufP           ptr,                        /* pointer to buffer */
 88                4 count          fixed bin,                  /* buffer character count */
 89            2 (
 90            free_list,
 91            busy_list,
 92            chain                (3),
 93            bufct                (3)
 94            )                    fixed bin,                  /* buffer management variables */
 95            2 wait_switch        (1:63) bit (1) unaligned,   /* per-drive event wait switches */
 96            2 buf_size           fixed bin,                  /* size of each tseg buffer in chars (bytes) */
 97            2 tseg               aligned,
 98              3 version_num      fixed bin,
 99              3 areap            ptr,                        /* pointer to DSM area */
100              3 ev_chan          fixed bin (71),             /* event channel number */
101              3 write_sw         fixed bin (1),              /* 0 = read, 1 = write */
102              3 sync             fixed bin (1),              /* non-zero for synchronous i/o */
103              3 get_size         fixed bin (1),              /* ON for record sizes to be returned */
104              3 ws_segno         bit (18),                   /* rcp_ kluge */
105              3 drive_name       char (32),
106              3 tracks           fixed bin,
107              3 density          bit (36),
108              3 speed            bit (36),                   /* bits are 75, 125, 200 ips respectively */
109              3 pad99 bit (36),                              /* see tseg.incl.pl1 */
110              3 buffer_offset    fixed bin (12),             /* offset of first buffer to be processed */
111              3 buffer_count     fixed bin (12),             /* number of buffers to be processed */
112              3 completion_status
113                                 fixed bin (2),              /* 0 = no pending i/o or no status */
114                                                             /* 1 = normal termination of i/o */
115                                                             /* 2 = non-zero major status from previous i/o */
116              3 hardware_status  bit (36) aligned,           /* major and sub-status */
117              3 error_buffer     fixed bin (12),             /* buffer in which i/o error occurred */
118              3 command_count    fixed bin (12),             /* number of non-data commands to execute */
119              3 command_queue    (10) fixed bin (6) aligned, /* non-data-transfer commands */
120              3 bufferptr        (12) fixed bin (18) aligned,/* relative ptrs to buffers */
121              3 buffer_size      (12) fixed bin (18) aligned,/* size of buffer */
122              3 mode             (12) fixed bin (2) aligned, /* 0 = bin, 1 = bcd, 2 = 9 track */
123              3 buffer           (4) char (cseg.buf_size) aligned,
124                                                             /* data buffers */
125                                                             /*  END OF TAPEIO_ / TDCM DATA */
126            2 vl                 (63),                       /* volume chain link */
127              3 position,                                    /* volume position */
128                4 fflX           fixed bin unal,             /* index of first file link on volume */
129                4 cflX           fixed bin unal,             /* index of current file link */
130                4 pos            fixed bin unal,             /* intra-file position code */
131                                                             /*  0 = in HDR group                          */
132                                                             /*  1 - in data / passed HDR TM               */
133                                                             /*  2 = in EOx group / passed data TM         */
134                4 lflX           fixed bin unal,             /* index of last file link on volume */
135              3 vol_data,
136                4 volname        char (32),                  /* volume name */
137                4 canonical_volname
138                                 char (6),                   /* volume name as appears on label */
139                4 comment        char (64) varying,          /* mount comment */
140                4 auth_code      char (3) aligned,           /* authentication code for this volume */
141                4 rcp_id         fixed bin (6),              /* TDCM DUMMY - CHANGE TO BIT (36) ALIGNED */
142                4 event_chan     fixed bin (71),             /* rcp_ attach event channel */
143                4 tape_drive     char (32),                  /* name of tape drive */
144                4 ws_segno       bit (18),                   /* segno of IOI workspace (per drive) */
145                4 write_VOL1     fixed bin,                  /* 0 - correct VOL1 label */
146                                                             /* 1 - blank tape */
147                                                             /* 2 - can't read 1st block */
148                                                             /* 3 - 1st block not VOL1 label */
149                                                             /* 4 - valid VOL1 label but wrong volume ID (Obsolete) */
150                                                             /* 5 - correct VOL1 label, but wrong density */
151                                                             /* 6 - invalid file-set format (Obsolete) */
152                                                             /* -1 - correct VOL1 label of an earlier format */
153                                                             /* (no authentication code) */
154                4 ioi_index      fixed bin,                  /* ioi_ index for IO */
155              3 reg_data,                                    /* registration data */
156                4 tracks         fixed bin unal,             /* number of tracks */
157                4 density        fixed bin unal,             /* density code */
158                4 label_type     fixed bin unal,             /* volume format */
159                4 usage_count    fixed bin unal,             /* number of attachment to this volume */
160                4 read_errors    fixed bin unal,             /* number of read errors */
161                4 write_errors   fixed bin unal,             /* number of write errors */
162            2 chain_area         area;                       /* file chain allocation area */
163 
164 /*  END INCLUDE FILE:  tape_ansi_cseg.incl.pl1              */