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