COMPILATION LISTING OF SEGMENT tape_ansi_attach_ Compiled by: Multics PL/I Compiler, Release 33e, of October 6, 1992 Compiled at: CGI Compiled on: 2000-04-18_1153.80_Tue_mdt Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1981 * 4* * * 5* * Copyright (c) 1972 by Massachusetts Institute of * 6* * Technology and Honeywell Information Systems, Inc. * 7* * * 8* *********************************************************** */ 9 10 11 12 /****^ HISTORY COMMENTS: 13* 1) change(86-08-18,GWMay), approve(), audit(), install(): 14* old history comments: 15* 0) Created: 16* 1) Modified: 04/11/79 C. D. Tavares 17* for authentication and resource management. 18* 2) Modified: 06/29/79 Rick Riley 19* allow reading and writing ibm tapes in binary mode. 20* 3) Modified: 9/79 R.J.C. Kissel 21* to handle 6250 bpi tapes. 22* 4) Modified: 10/01/80 C. D. Tavares 23* allow ibm file names to be > 8 chars if they contain periods. 24* 5) Modified: 9/81 M.R. Jordan 25* to fix bugs whereby io_call attachments would fail and not report errors. 26* 6) Modified: 4/82 by J. A. Bush to allow blocksizes > 8192 bytes. 27* 2) change(86-08-18,GWMay), approve(86-09-09,MCR7536), audit(86-09-15,Dupuis), 28* install(86-09-24,MR12.0-1162): 29* Changed to accommodate error message lengths > 32 chars. 30* END HISTORY COMMENTS */ 31 32 33 /* format: style4,delnl,insnl,indattr,ifthen,dclind9 */ 34 tape_ansi_attach_: 35 procedure; /* this entry not used */ 36 return; 37 38 /* parameters */ 39 dcl iocbP ptr, /* pointer to iocb */ 40 options (*) char (*) varying, /* array of attachment options */ 41 comerr bit (1) aligned, /* "1"b if com_err_ can be called */ 42 code fixed bin (35); /* error code */ 43 1 1 /* BEGIN INCLUDE FILE ..... iocb.incl.pl1 ..... 13 Feb 1975, M. Asherman */ 1 2 /* Modified 11/29/82 by S. Krupp to add new entries and to change 1 3* version number to IOX2. */ 1 4 /* format: style2 */ 1 5 1 6 dcl 1 iocb aligned based, /* I/O control block. */ 1 7 2 version character (4) aligned, /* IOX2 */ 1 8 2 name char (32), /* I/O name of this block. */ 1 9 2 actual_iocb_ptr ptr, /* IOCB ultimately SYNed to. */ 1 10 2 attach_descrip_ptr ptr, /* Ptr to printable attach description. */ 1 11 2 attach_data_ptr ptr, /* Ptr to attach data structure. */ 1 12 2 open_descrip_ptr ptr, /* Ptr to printable open description. */ 1 13 2 open_data_ptr ptr, /* Ptr to open data structure (old SDB). */ 1 14 2 reserved bit (72), /* Reserved for future use. */ 1 15 2 detach_iocb entry (ptr, fixed (35)),/* detach_iocb(p,s) */ 1 16 2 open entry (ptr, fixed, bit (1) aligned, fixed (35)), 1 17 /* open(p,mode,not_used,s) */ 1 18 2 close entry (ptr, fixed (35)),/* close(p,s) */ 1 19 2 get_line entry (ptr, ptr, fixed (21), fixed (21), fixed (35)), 1 20 /* get_line(p,bufptr,buflen,actlen,s) */ 1 21 2 get_chars entry (ptr, ptr, fixed (21), fixed (21), fixed (35)), 1 22 /* get_chars(p,bufptr,buflen,actlen,s) */ 1 23 2 put_chars entry (ptr, ptr, fixed (21), fixed (35)), 1 24 /* put_chars(p,bufptr,buflen,s) */ 1 25 2 modes entry (ptr, char (*), char (*), fixed (35)), 1 26 /* modes(p,newmode,oldmode,s) */ 1 27 2 position entry (ptr, fixed, fixed (21), fixed (35)), 1 28 /* position(p,u1,u2,s) */ 1 29 2 control entry (ptr, char (*), ptr, fixed (35)), 1 30 /* control(p,order,infptr,s) */ 1 31 2 read_record entry (ptr, ptr, fixed (21), fixed (21), fixed (35)), 1 32 /* read_record(p,bufptr,buflen,actlen,s) */ 1 33 2 write_record entry (ptr, ptr, fixed (21), fixed (35)), 1 34 /* write_record(p,bufptr,buflen,s) */ 1 35 2 rewrite_record entry (ptr, ptr, fixed (21), fixed (35)), 1 36 /* rewrite_record(p,bufptr,buflen,s) */ 1 37 2 delete_record entry (ptr, fixed (35)),/* delete_record(p,s) */ 1 38 2 seek_key entry (ptr, char (256) varying, fixed (21), fixed (35)), 1 39 /* seek_key(p,key,len,s) */ 1 40 2 read_key entry (ptr, char (256) varying, fixed (21), fixed (35)), 1 41 /* read_key(p,key,len,s) */ 1 42 2 read_length entry (ptr, fixed (21), fixed (35)), 1 43 /* read_length(p,len,s) */ 1 44 2 open_file entry (ptr, fixed bin, char (*), bit (1) aligned, fixed bin (35)), 1 45 /* open_file(p,mode,desc,not_used,s) */ 1 46 2 close_file entry (ptr, char (*), fixed bin (35)), 1 47 /* close_file(p,desc,s) */ 1 48 2 detach entry (ptr, char (*), fixed bin (35)); 1 49 /* detach(p,desc,s) */ 1 50 1 51 declare iox_$iocb_version_sentinel 1 52 character (4) aligned external static; 1 53 1 54 /* END INCLUDE FILE ..... iocb.incl.pl1 ..... */ 44 45 2 1 /* BEGIN INCLUDE FILE: tape_ansi_cseg.incl.pl1 */ 2 2 /* */ 2 3 /* 1) Modified: 12/01/75 by Ross E. Klinger -- to allow */ 2 4 /* for allocation of the attach and open descriptions */ 2 5 /* within the cseg structure. */ 2 6 /* 2) Modified for resource management. */ 2 7 /* 3) Modified 9/79 by R.J.C. Kissel to handle the new tseg. */ 2 8 /* 4) Modified 4/82 by J.A. Bush for block sizes > 8192 bytes */ 2 9 2 10 /* format: style4,delnl,insnl,indattr,ifthen,dclind9 */ 2 11 dcl cP ptr; /* pointer on which cseg structure is based */ 2 12 dcl cseg_tseg_version_2 fixed bin internal static options (constant) init (2); 2 13 2 14 dcl 1 cseg based (cP), /* control structure */ 2 15 2 file_set_lock bit (1) aligned, /* "1"b if file set in use */ 2 16 2 invalid bit (1) aligned, /* invalid cseg - delete at detach time bit */ 2 17 2 standard fixed bin, /* label standard */ 2 18 /* 1 - ANSI standard */ 2 19 /* 2 - IBM/OS-VS */ 2 20 /* 3 - IBM/DOS-VM */ 2 21 2 attach_description, /* iox_ attach description */ 2 22 3 length fixed bin (17), /* actual length of string */ 2 23 3 string char (256), /* maximum is 256 characters */ 2 24 2 open_description, /* iox_ open description */ 2 25 3 length fixed bin (17), /* actual length of string */ 2 26 3 string char (32), /* maximum is 32 */ 2 27 2 module char (12) varying, /* IO module name */ 2 28 2 ndrives fixed bin, /* maximum number of drives to be used */ 2 29 2 nactive fixed bin, /* number of drives actually in use */ 2 30 2 write_ring bit (1) aligned, /* volumes mounted with write rings */ 2 31 2 protect bit (1) aligned, /* volumes have rings, but are hardware protected */ 2 32 2 density fixed bin, /* file set recording density */ 2 33 /* 2 - 800 bpi NRZI */ 2 34 /* 3 - 1600 bpi PE */ 2 35 2 vcN fixed bin, /* number of links in volume chain */ 2 36 2 fcP ptr, /* file chain pointer */ 2 37 2 flP ptr, /* pointer to file link of current file */ 2 38 2 hdw_status, /* hardware status structure */ 2 39 3 bits bit (72) aligned, /* IOM status */ 2 40 3 no_minor fixed bin, /* number of minor status codes */ 2 41 3 major fixed bin (35), /* major status */ 2 42 3 minor (10) fixed bin (35), /* minor status */ 2 43 2 lbl_buf char (80), /* label I/O buffer */ 2 44 2 open_mode fixed bin, /* opening mode */ 2 45 /* 4 - sequential_input */ 2 46 /* 5 - sequential_output */ 2 47 2 close_rewind bit (1) aligned, /* rewind volume at next close */ 2 48 2 force bit (1) aligned, /* force file overwrite switch */ 2 49 2 user_labels bit (1) aligned, /* process user labels switch */ 2 50 2 no_labels bit (1) aligned, /* "1"b if volume has no labels */ 2 51 2 output_mode fixed bin, /* 0 - input */ 2 52 /* 1 - extend */ 2 53 /* 2 - modify */ 2 54 /* 3 - write */ 2 55 /* 4 - create */ 2 56 2 replace_id char (17), /* replace file identifier */ 2 57 2 retain fixed bin, /* 0 - default to rcp_ defaults */ 2 58 /* 1 - unassign drives and volumes */ 2 59 /* 2 - retain drives, unassign volumes */ 2 60 /* 3 - unassign drives, retain volumes */ 2 61 /* 4 - retain drives and volumes */ 2 62 2 lrec, /* logical record IO control data */ 2 63 3 bufP ptr, /* pointer to current processing buffer */ 2 64 3 nc_buf fixed bin, /* number of characters in buffer */ 2 65 3 offset fixed bin, /* current processing offset within buffer */ 2 66 3 saveP ptr, /* pointer to current D/V format RCW/RDW */ 2 67 3 file_lock bit (1) aligned, /* "1"b if file in use */ 2 68 3 blkcnt fixed bin (35), /* physical block count */ 2 69 3 reccnt fixed bin (35), /* logical record count (not presently used) */ 2 70 3 code fixed bin (35), /* lrec_io_ non-restartable error code */ 2 71 2 read_length, /* read_length control data */ 2 72 3 rlP ptr, /* pointer to read_length segment */ 2 73 3 rlN fixed bin (21), /* number of characters in segment */ 2 74 2 user_label_routine (6) variable entry (char (80), bit (1)), 2 75 /* 1 - read UHL */ 2 76 /* 2 - write UHL */ 2 77 /* 3 - read UTL */ 2 78 /* 4 - write UTL */ 2 79 /* 5 - read UVL */ 2 80 /* 6 - write UVL */ 2 81 /* THE FOLLOWING IS NEEDED ONLY WHILE TAPEIO_ / TDCM IS THE IO PROCEDURE */ 2 82 2 syncP ptr, /* pointer to synchronous IO buffer */ 2 83 2 mode fixed bin, /* 0 = binary -- 1 = 9 mode */ 2 84 2 soft_status, /* software status structure */ 2 85 3 nbuf fixed bin, /* number of suspended buffers */ 2 86 3 buf (2), 2 87 4 bufP ptr, /* pointer to buffer */ 2 88 4 count fixed bin, /* buffer character count */ 2 89 2 ( 2 90 free_list, 2 91 busy_list, 2 92 chain (3), 2 93 bufct (3) 2 94 ) fixed bin, /* buffer management variables */ 2 95 2 wait_switch (1:63) bit (1) unaligned, /* per-drive event wait switches */ 2 96 2 buf_size fixed bin, /* size of each tseg buffer in chars (bytes) */ 2 97 2 tseg aligned, 2 98 3 version_num fixed bin, 2 99 3 areap ptr, /* pointer to DSM area */ 2 100 3 ev_chan fixed bin (71), /* event channel number */ 2 101 3 write_sw fixed bin (1), /* 0 = read, 1 = write */ 2 102 3 sync fixed bin (1), /* non-zero for synchronous i/o */ 2 103 3 get_size fixed bin (1), /* ON for record sizes to be returned */ 2 104 3 ws_segno bit (18), /* rcp_ kluge */ 2 105 3 drive_name char (32), 2 106 3 tracks fixed bin, 2 107 3 density bit (36), 2 108 3 speed bit (36), /* bits are 75, 125, 200 ips respectively */ 2 109 3 pad99 bit (36), /* see tseg.incl.pl1 */ 2 110 3 buffer_offset fixed bin (12), /* offset of first buffer to be processed */ 2 111 3 buffer_count fixed bin (12), /* number of buffers to be processed */ 2 112 3 completion_status 2 113 fixed bin (2), /* 0 = no pending i/o or no status */ 2 114 /* 1 = normal termination of i/o */ 2 115 /* 2 = non-zero major status from previous i/o */ 2 116 3 hardware_status bit (36) aligned, /* major and sub-status */ 2 117 3 error_buffer fixed bin (12), /* buffer in which i/o error occurred */ 2 118 3 command_count fixed bin (12), /* number of non-data commands to execute */ 2 119 3 command_queue (10) fixed bin (6) aligned, /* non-data-transfer commands */ 2 120 3 bufferptr (12) fixed bin (18) aligned,/* relative ptrs to buffers */ 2 121 3 buffer_size (12) fixed bin (18) aligned,/* size of buffer */ 2 122 3 mode (12) fixed bin (2) aligned, /* 0 = bin, 1 = bcd, 2 = 9 track */ 2 123 3 buffer (4) char (cseg.buf_size) aligned, 2 124 /* data buffers */ 2 125 /* END OF TAPEIO_ / TDCM DATA */ 2 126 2 vl (63), /* volume chain link */ 2 127 3 position, /* volume position */ 2 128 4 fflX fixed bin unal, /* index of first file link on volume */ 2 129 4 cflX fixed bin unal, /* index of current file link */ 2 130 4 pos fixed bin unal, /* intra-file position code */ 2 131 /* 0 = in HDR group */ 2 132 /* 1 - in data / passed HDR TM */ 2 133 /* 2 = in EOx group / passed data TM */ 2 134 4 lflX fixed bin unal, /* index of last file link on volume */ 2 135 3 vol_data, 2 136 4 volname char (32), /* volume name */ 2 137 4 canonical_volname 2 138 char (6), /* volume name as appears on label */ 2 139 4 comment char (64) varying, /* mount comment */ 2 140 4 auth_code char (3) aligned, /* authentication code for this volume */ 2 141 4 rcp_id fixed bin (6), /* TDCM DUMMY - CHANGE TO BIT (36) ALIGNED */ 2 142 4 event_chan fixed bin (71), /* rcp_ attach event channel */ 2 143 4 tape_drive char (32), /* name of tape drive */ 2 144 4 ws_segno bit (18), /* segno of IOI workspace (per drive) */ 2 145 4 write_VOL1 fixed bin, /* 0 - correct VOL1 label */ 2 146 /* 1 - blank tape */ 2 147 /* 2 - can't read 1st block */ 2 148 /* 3 - 1st block not VOL1 label */ 2 149 /* 4 - valid VOL1 label but wrong volume ID (Obsolete) */ 2 150 /* 5 - correct VOL1 label, but wrong density */ 2 151 /* 6 - invalid file-set format (Obsolete) */ 2 152 /* -1 - correct VOL1 label of an earlier format */ 2 153 /* (no authentication code) */ 2 154 4 ioi_index fixed bin, /* ioi_ index for IO */ 2 155 3 reg_data, /* registration data */ 2 156 4 tracks fixed bin unal, /* number of tracks */ 2 157 4 density fixed bin unal, /* density code */ 2 158 4 label_type fixed bin unal, /* volume format */ 2 159 4 usage_count fixed bin unal, /* number of attachment to this volume */ 2 160 4 read_errors fixed bin unal, /* number of read errors */ 2 161 4 write_errors fixed bin unal, /* number of write errors */ 2 162 2 chain_area area; /* file chain allocation area */ 2 163 2 164 /* END INCLUDE FILE: tape_ansi_cseg.incl.pl1 */ 46 47 3 1 /* BEGIN INCLUDE FILE: tape_ansi_fd.incl.pl1 */ 3 2 3 3 dcl 1 fd aligned based (cseg.fcP), /* first file chain link */ 3 4 2 backP ptr init (null), /* no previous links (ever) */ 3 5 2 nextP ptr init (null), /* pointer to next link; null if only */ 3 6 2 flX fixed bin init (0), /* link index is 0 */ 3 7 2 vlX fixed bin init (0), /* start file chain on 1st volume */ 3 8 /* in conjunction with eov, below, which */ 3 9 2 dummy_HDR2 bit (1), /* "1"b if file has dummy_HDR2 label */ 3 10 2 eox fixed bin init (2), /* 2 forces volume switch on first real file link */ 3 11 3 12 2 hdr1, /* HDR1 data */ 3 13 3 file_id char (17), /* file identifier */ 3 14 3 set_id char (32), /* reel id of 1st volume of multi-volume set */ 3 15 3 canonical_set_id char (6), /* in canonical format */ 3 16 3 dummy_section fixed bin, 3 17 3 sequence fixed bin, /* file sequence number (inter-file) */ 3 18 3 dummy_generation fixed bin, 3 19 3 dummy_version fixed bin, 3 20 3 creation char (5), /* holds today's date in Julian form */ 3 21 3 expiration char (5), /* Julian expiration date */ 3 22 3 access char (1), 3 23 3 dummy_blkcnt fixed bin (35), 3 24 3 system char (13), /* holds system code for labels */ 3 25 3 26 2 hdr2, /* HDR2 data */ 3 27 3 format fixed bin, /* logical record format code */ 3 28 /* 1 - U format */ 3 29 /* 2 - F format */ 3 30 /* 3 - D format (ANSI) / V format (IBM) */ 3 31 /* 4 - S format (ANSI) / V spanned (IBM) */ 3 32 3 blklen fixed bin, /* actual/maximum physical block length */ 3 33 3 reclen fixed bin (21), /* actual/maximum logical record length */ 3 34 3 dummy_next_volname char (32), 3 35 3 canonical_dummy_next_volname char (6), 3 36 3 blocked bit (1), /* "0"b - unblocked / "1"b - blocked */ 3 37 3 mode fixed bin, /* file data recording mode */ 3 38 /* 1 - ASCII, 9 mode */ 3 39 /* 2 - EBCDIC, 9mode */ 3 40 /* 3 - binary */ 3 41 3 bo fixed bin, /* ANSI buffer offset: # of chars preceding each block */ 3 42 3 cc char (1); /* IBM HDR2 control characters code */ 3 43 3 44 /* END INCLUDE FILE: tape_ansi_fd.incl.pl1 */ 48 49 4 1 /* BEGIN INCLUDE FILE: tape_ansi_fl.incl.pl1 */ 4 2 4 3 dcl 1 fl aligned based (cseg.flP), /* file chain link */ 4 4 2 backP ptr init (null), /* pointer to previous link in chain, or null if 1st */ 4 5 2 nextP ptr init (null), /* pointer to next link in chain, or null if last */ 4 6 2 flX fixed bin init (0), /* index of this link within file chain */ 4 7 2 vlX fixed bin init (0), /* volume link index */ 4 8 4 9 2 HDR2 bit (1) init ("0"b), /* "1"b if file has HDR2 label */ 4 10 2 eox fixed bin init (0), /* 0 - trailer labels not yet processed */ 4 11 /* 1 - trailer labels are EOF */ 4 12 /* 2 - trailer labels are EOV */ 4 13 4 14 2 hdr1, /* HDR1 data */ 4 15 3 file_id char (17), /* file identifier */ 4 16 3 set_id char (32), /* reel id of 1st volume of multi-volume set */ 4 17 3 canonical_set_id char (6) unaligned, /* reel id in canonical format */ 4 18 3 section fixed bin, /* file section number (intra-file) */ 4 19 3 sequence fixed bin, /* file sequence number (inter-file) */ 4 20 3 generation fixed bin, /* file generation number */ 4 21 3 version fixed bin, /* generation version number */ 4 22 3 creation char (5), /* Julian creation date "yyddd" */ 4 23 3 expiration char (5), /* Julian expiration date */ 4 24 3 access char (1), /* file accessability code */ 4 25 3 blkcnt fixed bin (35), /* number of data blocks - in EOx1 */ 4 26 3 system char (13), /* system/IO module code */ 4 27 4 28 2 hdr2, /* HDR2 data */ 4 29 3 format fixed bin init (0), /* logical record format code */ 4 30 /* 1 - U format */ 4 31 /* 2 - F format */ 4 32 /* 3 - D format (ANSI) / V format (IBM) */ 4 33 /* 4 - S format (ANSI) / V spanned (IBM) */ 4 34 3 blklen fixed bin init (0), /* actual/maximum physical block length */ 4 35 3 reclen fixed bin (21) init (0), /* actual/maximum logical record length */ 4 36 3 next_volname char (32) init ("") unaligned, /* volume name of next volume */ 4 37 3 canonical_next_volname char (6) init ("") unal, /* in canonical format */ 4 38 3 blocked bit (1) init ("0"b), /* "0"b - unblocked / "1"b - blocked */ 4 39 3 mode fixed bin init (0), /* file data recording mode */ 4 40 /* 1 - ASCII, 9 mode */ 4 41 /* 2 - EBCDIC, 9mode */ 4 42 /* 3 - binary */ 4 43 3 bo fixed bin init (0), /* ANSI buffer offset: # of chars preceding each block */ 4 44 3 cc char (1) init (" "); /* IBM HDR2 control characters code */ 4 45 4 46 /* END INCLUDE FILE: tape_ansi_fl.incl.pl1 */ 50 51 5 1 /* BEGIN INCLUDE FILE: tape_attach_options.incl.pl1 */ 5 2 5 3 /* format: style4,delnl,insnl,indattr,ifthen,dclind9 */ 5 4 dcl taoP ptr; /* pointer on which tao structure is based */ 5 5 5 6 dcl 1 tao based (taoP), 5 7 2 noptions fixed bin, /* number of elements in options array */ 5 8 2 ntracks fixed bin, /* number of tracks: 7 or 9 */ 5 9 2 density fixed bin, /* recording density */ 5 10 /* 0 - 200 bpi */ 5 11 /* 1 - 556 bpi */ 5 12 /* 2 - 800 bpi */ 5 13 /* 3 - 1600 bpi */ 5 14 2 speed bit (36), /* "100"->75ips, "010"->125ips, "001"->200ips */ 5 15 2 write_ring bit (1), /* write permit ring status */ 5 16 /* "0"b - no write ring */ 5 17 /* "1"b - write ring */ 5 18 2 clear_cseg bit (1), /* "0" - don't delete cseg if one exists */ 5 19 /* "1" - delete current cseg and create new one */ 5 20 2 retain fixed bin, /* detach retention */ 5 21 /* 0 - rcp_ default */ 5 22 /* 1 - retain none (neither devices or volumes */ 5 23 /* 2 - retain device(s) */ 5 24 /* 3 - retain volume(s) */ 5 25 /* 4 - retain all (both device(s) and volume(s)) */ 5 26 2 output_mode fixed bin, /* 0 - none specified */ 5 27 /* 1 - extend */ 5 28 /* 2 - modify */ 5 29 /* 3 - generate */ 5 30 /* 4 - create */ 5 31 2 force bit (1), /* force file overwrite */ 5 32 2 user_labels bit (1), /* process user labels switch */ 5 33 2 replace_id char (17), /* replace file identifier */ 5 34 2 file_id char (17), /* file identifier */ 5 35 2 sequence fixed bin, /* file sequence number */ 5 36 2 expiration char (5), /* expiration date in Julian form */ 5 37 2 format char (4) varying, /* record format */ 5 38 2 DOS bit (1), /* "0"b - OS/VS :: "1"b - DOS/VM */ 5 39 2 no_labels bit (1), /* "0"b - IBM Standard Labels :: "1"b - IBM no labels */ 5 40 2 blklen fixed bin, /* physical block length */ 5 41 2 reclen fixed bin (21), /* logical record length */ 5 42 2 mode fixed bin, /* recording mode */ 5 43 /* 1 - 9 mode, ASCII */ 5 44 /* 2 - 9 mode, EBCDIC */ 5 45 /* 3 - binary */ 5 46 2 ndrives fixed bin, /* number of drives to be used */ 5 47 2 nvolumes fixed bin, /* number of specified volumes */ 5 48 2 volname (tao_max_volnames) char (32), 5 49 /* volume names */ 5 50 2 comment (tao_max_volnames) char (64) varying; 5 51 /* mount comments */ 5 52 5 53 dcl tao_max_volnames fixed bin int static options (constant) init (63); 5 54 5 55 /* END INCLUDE FILE: tape_attach_options.incl.pl1 */ 52 53 6 1 /* --------------- BEGIN include file rcp_volume_formats.incl.pl1 --------------- */ 6 2 6 3 6 4 6 5 /****^ HISTORY COMMENTS: 6 6* 1) change(86-12-08,GWMay), approve(86-12-08,PBF7552), 6 7* audit(86-12-08,Martinson), install(86-12-17,MR12.0-1250): 6 8* added array entry 0 to the volume format types to indicate that the tape 6 9* volume was not authenticated by rcp. 6 10* END HISTORY COMMENTS */ 6 11 6 12 6 13 /* General volume types */ 6 14 6 15 dcl (Volume_unauthenticated initial (0), 6 16 Volume_blank initial (1), 6 17 Volume_unknown_format initial (6), 6 18 Volume_unreadable initial (7), 6 19 6 20 /* Tape volume types */ 6 21 6 22 Volume_multics_tape initial (2), 6 23 Volume_gcos_tape initial (3), 6 24 Volume_ibm_tape initial (4), 6 25 Volume_ansi_tape initial (5)) fixed bin static options (constant); 6 26 6 27 /* Printable descriptions of volume types */ 6 28 6 29 dcl Tape_volume_types (0:7) char (16) static options (constant) initial 6 30 ("unauthenticated", 6 31 "blank", 6 32 "Multics", 6 33 "GCOS", 6 34 "IBM", 6 35 "ANSI", 6 36 "unrecognizable", 6 37 "unreadable"); 6 38 6 39 /* ---------------- END include file rcp_volume_formats.incl.pl1 ---------------- */ 54 55 7 1 /* Begin include file ... rcp_resource_types.incl.pl1 7 2* * 7 3* * Created 3/79 by Michael R. Jordan for MR7.0R 7 4* * 7 5* * This include file defines the official RCP resource types. 7 6* * The array of names is indexed by the corresponding device type. 7 7* * MOD by RAF for MCA 7 8**/ 7 9 7 10 7 11 7 12 /****^ HISTORY COMMENTS: 7 13* 1) change(85-09-09,Fawcett), approve(85-09-09,MCR6979), 7 14* audit(85-12-09,CLJones), install(86-03-21,MR12.0-1033): 7 15* Support of MCA. 7 16* END HISTORY COMMENTS */ 7 17 7 18 dcl DEVICE_TYPE (8) char (32) 7 19 internal static options (constant) 7 20 init ("tape_drive", "disk_drive", "console", "printer", "punch", "reader", "special", "mca"); 7 21 7 22 dcl NUM_QUALIFIERS (8) fixed bin /* Number of qualifiers for each device type. */ 7 23 internal static init (3, 0, 0, 2, 0, 0, 0, 0); 7 24 7 25 dcl VOLUME_TYPE (8) char (32) 7 26 internal static options (constant) 7 27 init ("tape_vol", "disk_vol", "", "", "", "", "", ""); 7 28 7 29 dcl TAPE_DRIVE_DTYPEX fixed bin static internal options (constant) init (1); 7 30 dcl DISK_DRIVE_DTYPEX fixed bin static internal options (constant) init (2); 7 31 dcl CONSOLE_DTYPEX fixed bin static internal options (constant) init (3); 7 32 dcl PRINTER_DTYPEX fixed bin static internal options (constant) init (4); 7 33 dcl PUNCH_DTYPEX fixed bin static internal options (constant) init (5); 7 34 dcl READER_DTYPEX fixed bin static internal options (constant) init (6); 7 35 dcl SPECIAL_DTYPEX fixed bin static internal options (constant) init (7); 7 36 dcl MCA_DTYPEX fixed bin static internal options (constant) init (8); 7 37 dcl TAPE_VOL_VTYPEX fixed bin static internal options (constant) init (1); 7 38 dcl DISK_VOL_VTYPEX fixed bin static internal options (constant) init (2); 7 39 7 40 7 41 /* End include file ... rcp_resource_types.incl.pl1 */ 56 57 58 59 /* automatic storage */ 60 dcl 1 auto_tao like tao auto; /* tape attach options */ 61 62 dcl area_size fixed bin (26), /* size of allocation area */ 63 block_attribute bit (1), /* "0"b - unblocked | "1"b - blocked */ 64 drop fixed bin, /* number of drives to be freed */ 65 error_msg char (80) varying init (""),/* attach option error message */ 66 format_code fixed bin init (0), /* format code */ 67 (i, j) fixed bin, 68 mask bit (36) aligned, /* IPS mask word */ 69 part_file_name char (17) varying, /* temp for validating labels */ 70 standard fixed bin, /* tape standard code */ 71 temp_file_name char (17), /* temp for validating labels */ 72 blocksize fixed bin, /* size of tseg buffers in chars */ 73 tstring char (256) varying; /* temporary attach description */ 74 75 /* builtin functions */ 76 dcl (addr, after, before, index, length, min, mod, null, rtrim, size, string, substr, verify) 77 builtin; 78 79 /* conditions */ 80 dcl (any_other, area, cleanup) 81 condition; 82 83 /* internal static */ 84 dcl module_name (2) char (12) varying internal static 85 init /* IO Module name */ ("tape_ansi_", "tape_ibm_"); 86 dcl system_code (2) char (13) internal static 87 init /* system code for HDR1 label */ ("MULTICS ANSI ", "MULTICS IBM "); 88 89 dcl 1 format internal static, /* -format interpretation */ 90 2 type (2, 7) char (4) varying 91 init 92 /* possibilities */ ("u", "fb", "f", "db", "d", "sb", "s", "u", "fb", "f", "vb", "v", 93 "vbs", "vs"), 94 2 fcode (2, 7) fixed bin 95 init /* interpretation - format code */ (1, 2, 2, 3, 3, 4, 4, 1, 2, 2, 3, 3, 4, 4), 96 2 blkatrib (2, 7) bit (1) 97 init 98 /* interpretation - blocking attribute */ ("0"b, "1"b, "0"b, "1"b, "0"b, "1"b, "0"b, "0"b, 99 "1"b, "0"b, "1"b, "0"b, "1"b, "0"b); 100 101 dcl 1 ibm_verifies unaligned internal static options (constant), 102 2 ibm_verify1 char (55) init ("@#$ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"), 103 /* letters and national characters */ 104 2 ibm_verify2 char (11) init ("0123456789-"); 105 /* numbers and hyphen */ 106 107 /* external static */ 108 dcl ( 109 error_table_$noalloc, 110 error_table_$noarg, 111 error_table_$not_detached, 112 error_table_$unable_to_do_io, 113 error_table_$file_busy, 114 error_table_$inconsistent, 115 error_table_$invalid_cseg, 116 error_table_$bad_arg 117 ) fixed bin (35) ext static; 118 dcl sys_info$max_seg_size fixed bin (35) ext static; 119 120 121 /* external procedures */ 122 dcl area_ ext entry (fixed bin (26), ptr), 123 canon_for_volume_label_ 124 entry (char (*), char (*), char (*), fixed bin, fixed bin (35)), 125 clock_ ext entry returns (fixed bin (71)), 126 com_err_ ext entry options (variable), 127 continue_to_signal_ ext entry (fixed bin (35)), 128 tape_ansi_control_ ext entry (ptr, char (*), ptr, fixed bin (35)), 129 datebin_ ext 130 entry (fixed bin (71), fixed bin, fixed bin, fixed bin, fixed bin, fixed bin, fixed bin, 131 fixed bin, fixed bin, fixed bin), 132 datebin_$dayr_clk ext entry (fixed bin (71), fixed bin), 133 tape_ansi_detach_ ext entry (ptr, fixed bin (35)), 134 tape_ansi_file_cntl_$open 135 ext entry (ptr, fixed bin, bit (1) aligned, fixed bin (35)), 136 hcs_$delentry_seg ext entry (ptr, fixed bin (35)), 137 hcs_$make_seg ext entry (char (*), char (*), char (*), fixed bin (5), ptr, fixed bin (35)), 138 hcs_$reset_ips_mask ext entry (bit (36) aligned, bit (36) aligned), 139 hcs_$set_ips_mask ext entry (bit (36) aligned, bit (36) aligned), 140 hcs_$truncate_seg ext entry (pointer, fixed bin (18), fixed bin (35)), 141 iox_$propagate ext entry (ptr), 142 tape_ansi_mount_cntl_$free 143 ext entry (ptr, fixed bin, fixed bin (35)), 144 tape_ansi_mount_cntl_$insert_rings 145 ext entry (ptr, fixed bin (35)), 146 tape_ansi_mount_cntl_$mount 147 ext entry (ptr, fixed bin, fixed bin (35)), 148 tape_ansi_mount_cntl_$write_permit 149 ext entry (ptr, fixed bin (35)), 150 tape_ansi_mount_cntl_$write_protect 151 ext entry (ptr, fixed bin (35)), 152 tape_ansi_nl_file_cntl_$open 153 ext entry (ptr, fixed bin, bit (1) aligned, fixed bin (35)), 154 tape_ansi_parse_options_ 155 ext entry (ptr, (*) char (*) varying, char (*) varying, fixed bin (35)), 156 tape_ansi_attach_$no_user_routine 157 ext entry options (variable), 158 tape_ansi_tape_io_$attach 159 ext entry (ptr), 160 terminate_process_ ext entry (char (*), ptr); 161 162 tape_ansi_attach: 163 entry (iocbP, options, comerr, code); 164 standard = 1; /* indicate tape_ansi_ entry */ 165 go to common; 166 167 tape_ibm_attach: 168 entry (iocbP, options, comerr, code); 169 standard = 2; /* indicate tape_ibm_ entry */ 170 171 common: 172 if iocbP -> iocb.attach_descrip_ptr ^= null then do; 173 /* is iocb already attached? */ 174 code = error_table_$not_detached; 175 error_msg = iocbP -> iocb.name; 176 goto bad_attopt; 177 end; 178 179 taoP = addr (auto_tao); /* base tao on automatic storage */ 180 call tao_init; /* initialize the attach option structure */ 181 call tape_ansi_parse_options_ (taoP, options, error_msg, code); 182 /* evaluate attach options */ 183 if code ^= 0 then do; /* did an error occur? */ 184 bad_attopt: 185 if comerr then 186 call com_err_ (code, module_name (standard), "^a", error_msg); 187 /* write msg if permitted */ 188 return; 189 end; 190 191 call check_attopt (error_msg, code); /* check if all ok for this IO Module */ 192 if code ^= 0 then 193 go to bad_attopt; 194 if tao.blklen <= 8192 then /* if standard block size.. */ 195 blocksize = 8192; /* set buffer size for 2K words */ 196 else do; /* non-standard block size wanted */ 197 if standard = 1 then /* if tape_ansi_ attachment */ 198 if tao.blklen > 99996 then do; /* if block size > max, complain */ 199 error_msg = "Block size > 99996 bytes not allowed"; 200 code = error_table_$bad_arg; 201 go to bad_attopt; 202 end; 203 else ; 204 else if tao.blklen > 32760 then do; /* tape_ibm_ block size > max, complain */ 205 error_msg = "Block size > 32760 bytes not allowed"; 206 code = error_table_$bad_arg; 207 go to bad_attopt; 208 end; 209 210 blocksize = tao.blklen; /* set the desired block size */ 211 end; 212 cP = null; /* dont' try to cleanup non-existent stuff */ 213 on cleanup call cleaner; /* don't leave segments and/or drives around */ 214 215 i = min (length (rtrim (tao.volname (1))), 32 - length (rtrim (module_name (standard))) - length ("_.cseg")); 216 217 call hcs_$make_seg ("", module_name (standard) || substr (tao.volname (1), 1, i) /* make cseg */ || "_.cseg", 218 "", 01011b, cP, code); /* or initiate if already exists */ 219 if cP = null then do; /* no cseg made or found - fatal */ 220 error_msg = "Unable to initiate/create temporary data segment."; 221 goto bad_attopt; 222 end; 223 224 if cseg.vcN > 0 then /* already exists */ 225 if cseg.vl (1).volname ^= tao.volname (1) then 226 /* but not the right one */ 227 call hcs_$truncate_seg (cP, 0, code); /* this is possible because we cannot use the */ 228 /* full name of the volume in the cseg name */ 229 230 if tao.clear_cseg then 231 call hcs_$truncate_seg (cP, 0, code); /* re-do cseg */ 232 233 if cseg.vcN > 0 then do; /* cseg previously existed */ 234 if cseg.file_set_lock then do; /* file set is locked */ 235 code = error_table_$file_busy; 236 error_msg = "The file set is locked."; 237 goto er_exit; 238 end; 239 else cseg.file_set_lock = "1"b; 240 code = 0; /* not an error */ 241 go to re_attach; /* this is a re-attachment to the file set */ 242 end; 243 244 cseg.file_set_lock = "1"b; /* cseg made and locked */ 245 cseg.standard = standard; 246 cseg.no_labels = tao.no_labels; 247 cseg.module = module_name (standard); 248 cseg.ndrives = 1; 249 cseg.nactive = 0; 250 cseg.vcN = 0; 251 cseg.fcP = null; 252 cseg.write_ring = tao.write_ring; 253 cseg.protect = "0"b; 254 cseg.density = tao.density; 255 cseg.rlP = null; 256 cseg.buf_size = blocksize; /* set the tseg buffer size */ 257 call cseg_init; /* initialize cseg with attach data */ 258 cseg.invalid = "0"b; /* cseg is valid */ 259 260 call tape_ansi_tape_io_$attach (cP); /* initialize IO */ 261 262 on area 263 begin; /* shouldn't occur, but handle if does */ 264 code = error_table_$noalloc; 265 go to er_exit; /* cleanup is necessary */ 266 end; 267 area_size = sys_info$max_seg_size - size (cseg); 268 call area_ (area_size, addr (cseg.chain_area)); /* format chain area for link allocation */ 269 allocate fd in (chain_area) set (cseg.fcP); /* allocate the dummy file chain link */ 270 271 do i = 1 to tao.nvolumes; /* build the volume chain */ 272 call vl_init (i); /* initialize all other values */ 273 cseg.vcN = i; /* set the new volume chain count */ 274 end; 275 276 call tape_ansi_mount_cntl_$mount (cP, 1, code); /* mount the volume on a new drive */ 277 if code ^= 0 then 278 go to er_exit; /* success? */ 279 280 call fd_init; /* initialize file data with attach and mount data */ 281 282 attach_ok: 283 cseg.attach_description.length = length (tstring);/* prepare attach description */ 284 cseg.attach_description.string = tstring; 285 if tao.DOS then 286 cseg.standard = 3; /* up standard for ibm_lrec_io_ */ 287 mask = "0"b; /* IPS interrupts not masked yet */ 288 revert cleanup; /* cleanup no longer matters */ 289 on any_other call handler; /* pick up any condition */ 290 call hcs_$set_ips_mask ("0"b, mask); /* mask all IPS interrupts */ 291 if cseg.no_labels then 292 iocbP -> iocb.actual_iocb_ptr -> iocb.open = tape_ansi_nl_file_cntl_$open; 293 else iocbP -> iocb.actual_iocb_ptr -> iocb.open = tape_ansi_file_cntl_$open; 294 iocbP -> iocb.actual_iocb_ptr -> iocb.control = tape_ansi_control_; 295 iocbP -> iocb.actual_iocb_ptr -> iocb.detach_iocb = tape_ansi_detach_; 296 iocbP -> iocb.actual_iocb_ptr -> iocb.attach_descrip_ptr = addr (cseg.attach_description); 297 iocbP -> iocb.actual_iocb_ptr -> iocb.attach_data_ptr = cP; 298 call iox_$propagate (iocbP -> iocb.actual_iocb_ptr); 299 /* reflect changes to all iocb's */ 300 call hcs_$reset_ips_mask (mask, mask); /* permit IPS interrupts */ 301 return; 302 303 re_attach: 304 if tao.density ^= -1 then 305 if tao.density ^= cseg.density then do; /* density changed from previous attach */ 306 do i = 1 to cseg.vcN; /* see if all volumes demounted */ 307 if vl (i).rcp_id ^= 0 then do; /* still mounted - can't change density */ 308 error_msg = "Cannot change file set density."; 309 bad_re_attach: 310 code = error_table_$bad_arg; 311 cseg.file_set_lock = "0"b; /* unlock the file set */ 312 go to bad_attopt; 313 end; 314 end; 315 cseg.density = tao.density; /* (re)set it */ 316 end; 317 318 if tao.no_labels ^= cseg.no_labels then do; /* can't change label standard */ 319 error_msg = "Cannot change label standard."; 320 go to bad_re_attach; 321 end; 322 323 if tao.ndrives = 0 then 324 go to chain_ck; /* ndrives unspecified - maintain old value */ 325 if tao.ndrives >= cseg.ndrives then do; /* necessary to free drives? */ 326 cseg.ndrives = tao.ndrives; /* no - set new value */ 327 go to chain_ck; /* check volume sequence validity */ 328 end; 329 else cseg.ndrives = tao.ndrives; /* yes - set new value */ 330 331 if cseg.nactive <= cseg.ndrives then 332 go to chain_ck; /* not necessary to free any drives */ 333 else drop = cseg.nactive - cseg.ndrives; /* drives must be freed */ 334 335 /* scan file chain to find requested file */ 336 cseg.flP = cseg.fcP; /* start with dummy link */ 337 if fd.nextP = null then 338 go to no_chain; /* no file chain */ 339 do cseg.flP = fl.nextP repeat fl.nextP; /* start with 1st real link */ 340 if tao.sequence = 0 then do; /* search for fileid */ 341 if tao.replace_id = fl.file_id then 342 go to got_fl; /* match? */ 343 if tao.file_id = fl.file_id then 344 go to got_fl; /* match? */ 345 end; 346 else if tao.sequence = fl.sequence then 347 go to got_fl; /* search for sequence */ 348 if fl.nextP = null then 349 go to got_fl; /* no more links - exit */ 350 if fl.nextP -> fl.flX = -1 then 351 go to got_fl; /* stop before eofsl */ 352 end; 353 354 got_fl: 355 do i = 1 to fl.vlX - 1; /* search up to wanted volume */ 356 if vl (i).rcp_id ^= 0 then do; /* active - free it */ 357 call tape_ansi_mount_cntl_$free (cP, i, code); 358 if code ^= 0 then 359 go to er_exit; /* trouble */ 360 drop = drop - 1; 361 if drop = 0 then 362 go to chain_ck; /* done? */ 363 end; 364 end; 365 366 no_chain: 367 do i = cseg.vcN to fl.vlX + 1 by -1; /* search down to wanted volume */ 368 if vl (i).rcp_id ^= 0 then do; /* active - free it */ 369 call tape_ansi_mount_cntl_$free (cP, i, code); 370 if code ^= 0 then 371 go to er_exit; /* trouble */ 372 drop = drop - 1; 373 if drop = 0 then 374 go to chain_ck; 375 end; 376 end; 377 378 code = error_table_$invalid_cseg; /* this is very very bad */ 379 error_msg = "Control segment deleted."; 380 go to er_exit; 381 382 chain_ck: 383 if tao.nvolumes = 1 then 384 go to finish; /* no follow-on volumes specified */ 385 do i = 2 to tao.nvolumes; /* loop to check each follow-on volume */ 386 if i > cseg.vcN then do; /* links do not exist for the following volumes */ 387 do j = i to tao.nvolumes; /* make a link for each new volume */ 388 call vl_init (j); /* initialize all other values */ 389 cseg.vcN = j; /* set the new volume chain count */ 390 end; 391 go to finish; 392 end; 393 if vl (i).volname ^= tao.volname (i) then do;/* link exists - mismatch? */ 394 if vl (i).fflX ^= 0 then do; /* this volume is a volume set member */ 395 error_msg = "Invalid volume set sequence."; 396 code = error_table_$bad_arg; 397 cseg.file_set_lock = "0"b; /* unlock the file set */ 398 go to bad_attopt; 399 end; 400 else do; /* this volume is a volume set candidate */ 401 if vl (i).rcp_id ^= 0 then do; /* mounted? */ 402 call tape_ansi_mount_cntl_$free (cP, i, code); 403 /* free it */ 404 if code ^= 0 then 405 go to er_exit; 406 end; 407 call vl_init (i); /* re-initialize the link */ 408 end; 409 end; 410 end; 411 412 finish: 413 if tao.write_ring then do; /* user wants to write */ 414 if ^cseg.write_ring then do; /* but no rings are in the volumes */ 415 call tape_ansi_mount_cntl_$insert_rings (cP, code); 416 /* so put them in */ 417 if code ^= 0 then 418 go to er_exit; 419 end; 420 if cseg.protect then do; /* but hardware protect is on */ 421 call tape_ansi_mount_cntl_$write_permit (cP, code); 422 /* so set hardware permit */ 423 if code ^= 0 then 424 go to er_exit; 425 end; 426 end; 427 428 else do; /* user doesn't want to write */ 429 if cseg.write_ring then do; /* but rings are in */ 430 if ^cseg.protect then do; /* and hardware protect is off */ 431 call tape_ansi_mount_cntl_$write_protect (cP, code); 432 /* so turn it on */ 433 if code ^= 0 then 434 go to er_exit; 435 end; 436 end; 437 end; 438 439 call cseg_init; /* fill cseg with attach data */ 440 call fd_init; /* fill file data with attach data */ 441 go to attach_ok; 442 443 check_attopt: 444 procedure (msg, ecode); /* IO Module-specific attach option validation */ 445 446 dcl msg char (*) varying, /* erroneous option */ 447 ecode fixed bin (35); /* error code */ 448 449 dcl ANSI char (18) internal static init ("ANSI standard and "); 450 dcl IBM char (17) internal static init ("IBM standard and "); 451 dcl NL char (17) internal static init ("""-no_labels"" and "); 452 dcl NOUT char (22) internal static init (" and no output option."); 453 454 msg = ""; /* initialize returned arguments */ 455 ecode = 0; 456 457 if tao.ntracks = 0 then 458 tao.ntracks = 9; /* default is 9 track drives */ 459 else if tao.ntracks ^= 9 then do; /* ANSI doesn't support any other tracks */ 460 msg = "Only ""-track 9"" is valid."; 461 go to bad; 462 end; 463 464 if tao.density = -1 then 465 ; /* default is ok */ 466 else if tao.density = 2 then 467 ; /* 800 bpi is ok */ 468 else if tao.density = 3 then 469 ; /* 1600 bpi is ok */ 470 else if tao.density = 4 then 471 ; /* 6250 bpi is ok */ 472 else do; /* any other is invalid */ 473 msg = "Invalid ""-density"" option."; 474 go to bad; 475 end; 476 477 478 if standard = 1 then do; /* ANSI standard checks */ 479 if tao.DOS then do; 480 msg = ANSI || """-dos""."; 481 go to bad; 482 end; 483 if tao.no_labels then do; 484 msg = ANSI || """-no_labels""."; 485 go to bad; 486 end; 487 end; 488 489 else do; /* IBM standard checks */ 490 if tao.output_mode = 3 then do; /* -generate */ 491 msg = IBM || """-generate""."; 492 go to bad; 493 end; 494 if tao.output_mode > 0 then do; /* output option specified */ 495 if tao.blklen ^= 0 then do; /* -block specified */ 496 if mod (tao.blklen, 4) ^= 0 then do; 497 /* blklen not word multiple */ 498 msg = """-block"" not multiple of 4."; 499 go to bad; 500 end; 501 end; 502 end; 503 if tao.no_labels then do; /* -no_labels specified */ 504 if tao.DOS then do; /* -dos specified */ 505 msg = NL || """-dos""."; 506 go to bad1; 507 end; 508 if tao.file_id ^= "" then do; /* -name specified */ 509 msg = NL || """-name""."; 510 go to bad1; 511 end; 512 if tao.replace_id ^= "" then do; /* -replace specified */ 513 msg = NL || """-replace""."; 514 go to bad1; 515 end; 516 if tao.sequence = 0 then do; /* no sequence specified */ 517 msg = """-no_labels"" requires ""-number""."; 518 go to bad3; 519 end; 520 if tao.output_mode = 1 then do; /* -extend specified */ 521 msg = NL || """-extend""."; 522 go to bad1; 523 end; 524 else if tao.output_mode = 2 then do; /* -modify specified */ 525 msg = NL || """-modify""."; 526 go to bad1; 527 end; 528 if tao.expiration ^= "00000" then do; /* -expires specified */ 529 msg = NL || """-expires""."; 530 go to bad1; 531 end; 532 if tao.force then do; /* -force specified */ 533 msg = NL || """-force""."; 534 go to bad1; 535 end; 536 go to format_ck; 537 end; 538 end; 539 540 if tao.output_mode = 4 then do; /* ANSI and IBM checks - create */ 541 if tao.file_id = "" then do; /* no -name */ 542 msg = """-create"" requires ""-name""."; 543 go to bad3; 544 end; 545 if standard = 2 then do; /* validate file id if IBM */ 546 temp_file_name = tao.file_id; 547 msg = "Invalid ""-name"" identifier."; 548 549 do while (temp_file_name ^= ""); 550 part_file_name = rtrim (before (temp_file_name, ".")); 551 temp_file_name = after (temp_file_name, "."); 552 if length (part_file_name) = 0 then 553 goto bad; /* must have name! */ 554 if length (part_file_name) > 8 then 555 goto bad; /* no component can be > 8 chars */ 556 if index (ibm_verify1, substr (part_file_name, 1, 1)) = 0 then 557 goto bad; /* first char must be from limited set */ 558 if verify (part_file_name, string (ibm_verifies)) > 0 then 559 goto bad; /* all chars must be from certain set */ 560 end; 561 562 msg = ""; 563 end; 564 end; 565 else do; /* extend, modify, generate, or none */ 566 if tao.replace_id ^= "" then do; /* -replace specified */ 567 msg = """-replace"" requires ""-create""."; 568 go to bad3; 569 end; 570 else if tao.output_mode = 0 then do; /* none specelse ified */ 571 if tao.expiration ^= "00000" then do; 572 msg = """-expires""" || NOUT; 573 go to bad3; 574 end; 575 if tao.force then do; 576 msg = """-force""" || NOUT; 577 go to bad3; 578 end; 579 end; 580 else if tao.output_mode < 3 then do; /* output mode is extend or modify */ 581 if tao.expiration ^= "00000" then do; /* and expiration specified */ 582 if tao.output_mode = 1 then 583 msg = """-extend"" and ""-expires""."; 584 else msg = """-modify"" and ""-expires""."; 585 go to bad1; 586 end; 587 end; 588 end; 589 590 if tao.sequence = 0 then do; /* no explicit sequence */ 591 if tao.file_id = "" then do; /* and no -name */ 592 msg = """-name"" or ""-number"" needed."; 593 go to bad3; 594 end; 595 end; 596 597 format_ck: 598 if tao.format = "" then do; /* default format */ 599 format_code = 0; 600 go to test (0); 601 end; 602 do i = 1 to 7; /* validate format */ 603 if tao.format = format.type (standard, i) then do; 604 /* match? */ 605 format_code = format.fcode (standard, i); 606 block_attribute = format.blkatrib (standard, i); 607 go to test (format_code); 608 end; 609 end; 610 msg = "Unsupported ""-format"" option."; 611 go to bad; 612 613 test (1): 614 if tao.reclen ^= 0 then do; /* u format */ 615 msg = """-record"" and ""-format""."; 616 go to bad1; 617 end; 618 go to test (0); 619 test (2): 620 if tao.blklen ^= 0 then do; /* f format */ 621 if tao.reclen ^= 0 then do; 622 if block_attribute then do; 623 if mod (tao.blklen, tao.reclen) ^= 0 then do; 624 br_inc: 625 msg = """-block"" and ""-record""."; 626 go to bad1; 627 end; 628 end; 629 else if tao.blklen ^= tao.reclen then 630 go to br_inc; 631 end; 632 end; 633 go to test (0); 634 test (3): 635 if tao.blklen ^= 0 then 636 if tao.reclen ^= 0 then do; /* d/v format */ 637 if standard = 1 then 638 i = 0; /* don't allow for BDW if ANSI */ 639 else i = 4; /* IBM - allow for 4 byte BDW */ 640 if block_attribute then do; 641 if tao.blklen < tao.reclen + i then 642 go to br_inc; 643 end; 644 else if tao.blklen ^= tao.reclen + i then 645 go to br_inc; 646 end; 647 test (0): 648 test (4): 649 tstring = module_name (standard); /* initialize attach description with module name */ 650 do i = 1 to tao.noptions; /* append each option */ 651 tstring = tstring || " " || options (i); 652 end; 653 return; 654 655 bad: 656 ecode = error_table_$bad_arg; 657 return; 658 bad1: 659 ecode = error_table_$inconsistent; 660 return; 661 bad3: 662 code = error_table_$noarg; 663 return; 664 665 end check_attopt; 666 667 tao_init: 668 procedure; /* initialize attach options */ 669 670 tao.noptions, tao.ntracks, tao.retain, tao.output_mode, tao.sequence, tao.blklen, tao.reclen, tao.mode, 671 tao.nvolumes, tao.ndrives = 0; 672 673 tao.density = -1; 674 675 tao.write_ring, tao.clear_cseg, tao.force, tao.user_labels, tao.DOS, tao.no_labels = "0"b; 676 677 tao.format, tao.replace_id, tao.file_id, tao.volname (*), tao.comment (*) = ""; 678 679 tao.expiration = "00000"; 680 681 return; 682 683 end tao_init; 684 685 cseg_init: 686 procedure; /* initializes cseg with attach data */ 687 cseg.flP = null; 688 cseg.open_mode = 0; 689 cseg.force = tao.force; 690 cseg.file_lock = "0"b; 691 cseg.close_rewind = "0"b; 692 cseg.user_labels = tao.user_labels; 693 cseg.output_mode = tao.output_mode; 694 cseg.replace_id = tao.replace_id; 695 cseg.retain = tao.retain; 696 if tao.ndrives ^= 0 then 697 cseg.ndrives = tao.ndrives; /* set ndrives only if specified */ 698 cseg.rlN = -1; 699 cseg.user_label_routine (*) = tape_ansi_attach_$no_user_routine; 700 return; 701 end cseg_init; 702 703 fd_init: 704 procedure; /* initializes file data with attach and mount data */ 705 fd.hdr1.file_id = tao.file_id; 706 fd.hdr1.set_id = vl (1).volname; 707 fd.hdr1.canonical_set_id = vl (1).canonical_volname; 708 fd.hdr1.sequence = tao.sequence; 709 fd.hdr1.creation = today (); 710 fd.hdr1.expiration = tao.expiration; 711 if standard = 1 then 712 fd.access = " "; 713 else fd.access = "0"; 714 fd.hdr1.system = system_code (standard); 715 fd.hdr2.format = format_code; 716 fd.hdr2.blocked = block_attribute; 717 fd.hdr2.blklen = tao.blklen; 718 fd.hdr2.reclen = tao.reclen; 719 fd.hdr2.mode = tao.mode; 720 fd.hdr2.bo = 0; 721 fd.cc = " "; 722 end fd_init; 723 724 725 vl_init: 726 procedure (n); /* initialize a volume link */ 727 dcl n fixed bin; /* link index */ 728 dcl canon_std (2) fixed bin initial (Volume_ansi_tape, Volume_ibm_tape); 729 730 vl (n).volname = tao.volname (n); 731 vl (n).comment = tao.comment (n); 732 vl (n).fflX = 0; 733 vl (n).cflX = 0; 734 vl (n).pos = 0; 735 vl (n).lflX = 0; 736 vl (n).tracks = 0; 737 vl (n).density = 0; 738 vl (n).label_type = 0; 739 vl (n).usage_count = 0; 740 vl (n).read_errors = 0; 741 vl (n).write_errors = 0; 742 vl (n).rcp_id = 0; 743 vl (n).event_chan = 0; 744 vl (n).tape_drive = ""; 745 vl (n).write_VOL1 = 0; 746 vl (n).ioi_index = 0; 747 call canon_for_volume_label_ (VOLUME_TYPE (TAPE_VOL_VTYPEX), vl (n).volname, vl (n).canonical_volname, 748 canon_std (standard), code); 749 if code ^= 0 then do; 750 error_msg = tao.volname (1); 751 goto bad_attopt; 752 end; 753 754 return; 755 end vl_init; 756 757 er_exit: 758 if comerr then 759 call com_err_ (code, module_name (standard), "^a", error_msg); 760 call cleaner; 761 return; 762 763 764 handler: 765 procedure; /* intercept any faults during iocb manipulation */ 766 dcl 1 ti aligned, 767 2 version fixed bin init (0), 768 2 code fixed bin (35); 769 770 if mask ^= "0"b then do; /* IPS interrupts masked */ 771 ti.code = error_table_$unable_to_do_io; /* very bad trouble */ 772 call terminate_process_ ("fatal_error", addr (ti)); 773 /* kill the process */ 774 end; 775 call continue_to_signal_ (0); 776 return; 777 end handler; 778 779 780 cleaner: 781 procedure; /* tidy up if bad trouble */ 782 if cP ^= null then do; /* cseg exixts */ 783 do i = 1 to cseg.vcN; /* check every link, if any */ 784 if vl (i).rcp_id ^= 0 then 785 call tape_ansi_mount_cntl_$free (cP, i, 0); 786 /* active */ 787 end; 788 call hcs_$delentry_seg (cP, 0); /* delete cseg */ 789 end; 790 end cleaner; 791 792 793 today: 794 procedure returns (char (5)); /* returns today's date in Julian form */ 795 dcl clock fixed bin (71), /* holds hardware clock value */ 796 ddd picture "999", /* day of year */ 797 yy picture "99", /* year */ 798 temp fixed bin; /* temporary */ 799 800 clock = clock_ (); /* get hardware clock value */ 801 call datebin_$dayr_clk (clock, temp); /* get day of year */ 802 ddd = temp; /* convert to characters */ 803 call datebin_ (clock, 0, 0, 0, temp, 0, 0, 0, 0, 0); 804 /* get year */ 805 yy = temp - 1900; /* drop century and convert to characters */ 806 return (yy || ddd); /* return formatted date */ 807 808 end today; 809 810 no_user_routine: 811 entry; /* dummy entry point to indicate no user label routine */ 812 813 814 815 816 end tape_ansi_attach_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 04/18/00 1153.8 tape_ansi_attach_.pl1 >udd>sm>ds>w>ml>tape_ansi_attach_.pl1 44 1 05/20/83 1946.4 iocb.incl.pl1 >ldd>incl>iocb.incl.pl1 46 2 06/10/82 1145.3 tape_ansi_cseg.incl.pl1 >ldd>incl>tape_ansi_cseg.incl.pl1 48 3 11/20/79 2115.6 tape_ansi_fd.incl.pl1 >ldd>incl>tape_ansi_fd.incl.pl1 50 4 11/20/79 2115.6 tape_ansi_fl.incl.pl1 >ldd>incl>tape_ansi_fl.incl.pl1 52 5 06/10/82 1145.3 tape_attach_options.incl.pl1 >ldd>incl>tape_attach_options.incl.pl1 54 6 12/17/86 1650.5 rcp_volume_formats.incl.pl1 >ldd>incl>rcp_volume_formats.incl.pl1 56 7 03/27/86 1220.0 rcp_resource_types.incl.pl1 >ldd>incl>rcp_resource_types.incl.pl1 NAMES DECLARED IN THIS COMPILATION. IDENTIFIER OFFSET LOC STORAGE CLASS DATA TYPE ATTRIBUTES AND REFERENCES (* indicates a set context) NAMES DECLARED BY DECLARE STATEMENT. ANSI 000121 constant char(18) initial packed unaligned dcl 449 ref 480 484 DOS 25 based bit(1) level 2 packed packed unaligned dcl 5-6 set ref 285 479 504 675* IBM 000114 constant char(17) initial packed unaligned dcl 450 ref 491 NL 000107 constant char(17) initial packed unaligned dcl 451 ref 505 509 513 521 525 529 533 NOUT 000101 constant char(22) initial packed unaligned dcl 452 ref 572 576 TAPE_VOL_VTYPEX constant fixed bin(17,0) initial dcl 7-37 ref 747 VOLUME_TYPE 000135 constant char(32) initial array packed unaligned dcl 7-25 set ref 747* Volume_ansi_tape internal static fixed bin(17,0) initial dcl 6-15 ref 728 Volume_ibm_tape internal static fixed bin(17,0) initial dcl 6-15 ref 728 access 37 based char(1) level 3 dcl 3-3 set ref 711* 713* actual_iocb_ptr 12 based pointer level 2 dcl 1-6 set ref 291 293 294 295 296 297 298* addr builtin function dcl 76 ref 179 268 268 296 772 772 after builtin function dcl 76 ref 551 any_other 000256 stack reference condition dcl 80 ref 289 area 000264 stack reference condition dcl 80 ref 262 area_ 000042 constant entry external dcl 122 ref 268 area_size 000104 automatic fixed bin(26,0) dcl 62 set ref 267* 268* attach_data_ptr 16 based pointer level 2 dcl 1-6 set ref 297* attach_descrip_ptr 14 based pointer level 2 dcl 1-6 set ref 171 296* attach_description 3 based structure level 2 unaligned dcl 2-14 set ref 296 auto_tao 000104 automatic structure level 1 unaligned dcl 60 set ref 179 backP based pointer initial level 2 dcl 3-3 set ref 269* before builtin function dcl 76 ref 550 blkatrib 52 000000 constant bit(1) initial array level 2 packed packed unaligned dcl 89 ref 606 blklen 46 based fixed bin(17,0) level 3 in structure "fd" dcl 3-3 in procedure "tape_ansi_attach_" set ref 717* blklen 26 based fixed bin(17,0) level 2 in structure "tao" dcl 5-6 in procedure "tape_ansi_attach_" set ref 194 197 204 210 495 496 619 623 629 634 641 644 670* 717 block_attribute 000105 automatic bit(1) packed unaligned dcl 62 set ref 606* 622 640 716 blocked 62 based bit(1) level 3 dcl 3-3 set ref 716* blocksize 000154 automatic fixed bin(17,0) dcl 62 set ref 194* 210* 256 bo 64 based fixed bin(17,0) level 3 dcl 3-3 set ref 720* buf_size 310 based fixed bin(17,0) level 2 dcl 2-14 set ref 224 256* 267 268 268 269 307 356 368 393 394 401 706 707 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 747 784 cP 000100 automatic pointer dcl 2-11 set ref 212* 217* 219 224 224 224 224* 230* 233 234 239 244 245 246 247 248 249 250 251 252 253 254 255 256 258 260* 267 267 268 268 268 268 269 269 269 273 276* 282 284 285 291 296 297 303 306 307 307 311 315 318 325 326 329 331 331 333 333 336 336 337 339 339 341 343 346 348 350 352 354 356 356 357* 366 366 368 368 369* 386 389 393 393 394 394 397 401 401 402* 414 415* 420 421* 429 430 431* 687 688 689 690 691 692 693 694 695 696 698 699 705 706 706 706 707 707 707 708 709 710 711 713 714 715 716 717 718 719 720 721 730 730 731 731 732 732 733 733 734 734 735 735 736 736 737 737 738 738 739 739 740 740 741 741 742 742 743 743 744 744 745 745 746 746 747 747 747 747 782 783 784 784 784* 788* canon_for_volume_label_ 000044 constant entry external dcl 122 ref 747 canon_std 000360 automatic fixed bin(17,0) initial array dcl 728 set ref 728* 728* 747* canonical_set_id 25 based char(6) level 3 dcl 3-3 set ref 707* canonical_volname based char(6) array level 4 packed packed unaligned dcl 2-14 set ref 707 747* cc 65 based char(1) level 3 dcl 3-3 set ref 721* cflX based fixed bin(17,0) array level 4 packed packed unaligned dcl 2-14 set ref 733* chain_area based area(1024) level 2 dcl 2-14 set ref 268 268 269 cleanup 000272 stack reference condition dcl 80 ref 213 288 clear_cseg 4(01) based bit(1) level 2 packed packed unaligned dcl 5-6 set ref 230 675* clock 000372 automatic fixed bin(71,0) dcl 795 set ref 800* 801* 803* clock_ 000046 constant entry external dcl 122 ref 800 close_rewind 177 based bit(1) level 2 dcl 2-14 set ref 691* code parameter fixed bin(35,0) dcl 39 in procedure "tape_ansi_attach_" set ref 162 167 174* 181* 183 184* 191* 192 200* 206* 217* 224* 230* 235* 240* 264* 276* 277 309* 357* 358 369* 370 378* 396* 402* 404 415* 417 421* 423 431* 433 661* 747* 749 757* code 1 000106 automatic fixed bin(35,0) level 2 in structure "ti" dcl 766 in procedure "handler" set ref 771* com_err_ 000050 constant entry external dcl 122 ref 184 757 comerr parameter bit(1) dcl 39 ref 162 167 184 757 comment based varying char(64) array level 4 in structure "cseg" dcl 2-14 in procedure "tape_ansi_attach_" set ref 731* comment based varying char(64) array level 2 in structure "tao" dcl 5-6 in procedure "tape_ansi_attach_" set ref 677* 731 continue_to_signal_ 000052 constant entry external dcl 122 ref 775 control 66 based entry variable level 2 dcl 1-6 set ref 294* creation 33 based char(5) level 3 dcl 3-3 set ref 709* cseg based structure level 1 unaligned dcl 2-14 set ref 267 datebin_ 000056 constant entry external dcl 122 ref 803 datebin_$dayr_clk 000060 constant entry external dcl 122 ref 801 ddd 000374 automatic picture(3) packed unaligned dcl 795 set ref 802* 806 density 125 based fixed bin(17,0) level 2 in structure "cseg" dcl 2-14 in procedure "tape_ansi_attach_" set ref 254* 303 315* density based fixed bin(17,0) array level 4 in structure "cseg" packed packed unaligned dcl 2-14 in procedure "tape_ansi_attach_" set ref 737* density 2 based fixed bin(17,0) level 2 in structure "tao" dcl 5-6 in procedure "tape_ansi_attach_" set ref 254 303 303 315 464 466 468 470 673* detach_iocb 26 based entry variable level 2 dcl 1-6 set ref 295* drop 000106 automatic fixed bin(17,0) dcl 62 set ref 333* 360* 360 361 372* 372 373 ecode parameter fixed bin(35,0) dcl 446 set ref 443 455* 655* 658* eox 7 based fixed bin(17,0) initial level 2 dcl 3-3 set ref 269* error_msg 000107 automatic varying char(80) initial dcl 62 set ref 62* 175* 181* 184* 191* 199* 205* 220* 236* 308* 319* 379* 395* 750* 757* error_table_$bad_arg 000036 external static fixed bin(35,0) dcl 108 ref 200 206 309 396 655 error_table_$file_busy 000030 external static fixed bin(35,0) dcl 108 ref 235 error_table_$inconsistent 000032 external static fixed bin(35,0) dcl 108 ref 658 error_table_$invalid_cseg 000034 external static fixed bin(35,0) dcl 108 ref 378 error_table_$noalloc 000020 external static fixed bin(35,0) dcl 108 ref 264 error_table_$noarg 000022 external static fixed bin(35,0) dcl 108 ref 661 error_table_$not_detached 000024 external static fixed bin(35,0) dcl 108 ref 174 error_table_$unable_to_do_io 000026 external static fixed bin(35,0) dcl 108 ref 771 event_chan based fixed bin(71,0) array level 4 dcl 2-14 set ref 743* expiration 21 based char(5) level 2 in structure "tao" packed packed unaligned dcl 5-6 in procedure "tape_ansi_attach_" set ref 528 571 581 679* 710 expiration 35 based char(5) level 3 in structure "fd" dcl 3-3 in procedure "tape_ansi_attach_" set ref 710* fcP 130 based pointer level 2 dcl 2-14 set ref 251* 269* 336 337 705 706 707 708 709 710 711 713 714 715 716 717 718 719 720 721 fcode 34 000000 constant fixed bin(17,0) initial array level 2 dcl 89 ref 605 fd based structure level 1 dcl 3-3 set ref 269 fflX based fixed bin(17,0) array level 4 packed packed unaligned dcl 2-14 set ref 394 732* file_id 13(18) based char(17) level 2 in structure "tao" packed packed unaligned dcl 5-6 in procedure "tape_ansi_attach_" set ref 343 508 541 546 591 677* 705 file_id 10 based char(17) level 3 in structure "fd" dcl 3-3 in procedure "tape_ansi_attach_" set ref 705* file_id 10 based char(17) level 3 in structure "fl" dcl 4-3 in procedure "tape_ansi_attach_" ref 341 343 file_lock 220 based bit(1) level 3 dcl 2-14 set ref 690* file_set_lock based bit(1) level 2 dcl 2-14 set ref 234 239* 244* 311* 397* fl based structure level 1 dcl 4-3 flP 132 based pointer level 2 dcl 2-14 set ref 336* 339* 339 341 343 346 348 350* 352* 354 366 687* flX 4 based fixed bin(17,0) initial level 2 in structure "fl" dcl 4-3 in procedure "tape_ansi_attach_" ref 350 flX 4 based fixed bin(17,0) initial level 2 in structure "fd" dcl 3-3 in procedure "tape_ansi_attach_" set ref 269* force 7 based bit(1) level 2 in structure "tao" packed packed unaligned dcl 5-6 in procedure "tape_ansi_attach_" set ref 532 575 675* 689 force 200 based bit(1) level 2 in structure "cseg" dcl 2-14 in procedure "tape_ansi_attach_" set ref 689* format 45 based fixed bin(17,0) level 3 in structure "fd" dcl 3-3 in procedure "tape_ansi_attach_" set ref 715* format 23 based varying char(4) level 2 in structure "tao" dcl 5-6 in procedure "tape_ansi_attach_" set ref 597 603 677* format 000000 constant structure level 1 unaligned dcl 89 in procedure "tape_ansi_attach_" format_code 000134 automatic fixed bin(17,0) initial dcl 62 set ref 62* 599* 605* 607 715 hcs_$delentry_seg 000066 constant entry external dcl 122 ref 788 hcs_$make_seg 000070 constant entry external dcl 122 ref 217 hcs_$reset_ips_mask 000072 constant entry external dcl 122 ref 300 hcs_$set_ips_mask 000074 constant entry external dcl 122 ref 290 hcs_$truncate_seg 000076 constant entry external dcl 122 ref 224 230 hdr1 10 based structure level 2 in structure "fd" dcl 3-3 in procedure "tape_ansi_attach_" hdr1 10 based structure level 2 in structure "fl" dcl 4-3 in procedure "tape_ansi_attach_" hdr2 45 based structure level 2 dcl 3-3 i 000135 automatic fixed bin(17,0) dcl 62 set ref 215* 217 271* 272* 273* 306* 307* 354* 356 357* 366* 368 369* 385* 386 387 393 393 394 401 402* 407* 602* 603 605 606* 637* 639* 641 644 650* 651* 783* 784 784* ibm_verifies 000053 constant structure level 1 packed packed unaligned dcl 101 ref 558 ibm_verify1 000053 constant char(55) initial level 2 packed packed unaligned dcl 101 ref 556 index builtin function dcl 76 ref 556 invalid 1 based bit(1) level 2 dcl 2-14 set ref 258* iocb based structure level 1 dcl 1-6 iocbP parameter pointer dcl 39 ref 162 167 171 175 291 293 294 295 296 297 298 ioi_index based fixed bin(17,0) array level 4 dcl 2-14 set ref 746* iox_$propagate 000100 constant entry external dcl 122 ref 298 j 000136 automatic fixed bin(17,0) dcl 62 set ref 387* 388* 389* label_type based fixed bin(17,0) array level 4 packed packed unaligned dcl 2-14 set ref 738* length 3 based fixed bin(17,0) level 3 in structure "cseg" dcl 2-14 in procedure "tape_ansi_attach_" set ref 282* length builtin function dcl 76 in procedure "tape_ansi_attach_" ref 215 215 215 282 552 554 lflX based fixed bin(17,0) array level 4 packed packed unaligned dcl 2-14 set ref 735* lrec 212 based structure level 2 unaligned dcl 2-14 mask 000137 automatic bit(36) dcl 62 set ref 287* 290* 300* 300* 770 min builtin function dcl 76 ref 215 mod builtin function dcl 76 ref 496 623 mode 30 based fixed bin(17,0) level 2 in structure "tao" dcl 5-6 in procedure "tape_ansi_attach_" set ref 670* 719 mode 63 based fixed bin(17,0) level 3 in structure "fd" dcl 3-3 in procedure "tape_ansi_attach_" set ref 719* module 115 based varying char(12) level 2 dcl 2-14 set ref 247* module_name 000010 internal static varying char(12) initial array dcl 84 set ref 184* 215 217 247 647 757* msg parameter varying char dcl 446 set ref 443 454* 460* 473* 480* 484* 491* 498* 505* 509* 513* 517* 521* 525* 529* 533* 542* 547* 562* 567* 572* 576* 582* 584* 592* 610* 615* 624* n parameter fixed bin(17,0) dcl 727 ref 725 730 730 731 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 747 nactive 122 based fixed bin(17,0) level 2 dcl 2-14 set ref 249* 331 333 name 1 based char(32) level 2 dcl 1-6 ref 175 ndrives 31 based fixed bin(17,0) level 2 in structure "tao" dcl 5-6 in procedure "tape_ansi_attach_" set ref 323 325 326 329 670* 696 696 ndrives 121 based fixed bin(17,0) level 2 in structure "cseg" dcl 2-14 in procedure "tape_ansi_attach_" set ref 248* 325 326* 329* 331 333 696* nextP 2 based pointer initial level 2 in structure "fl" dcl 4-3 in procedure "tape_ansi_attach_" ref 339 348 350 352 nextP 2 based pointer initial level 2 in structure "fd" dcl 3-3 in procedure "tape_ansi_attach_" set ref 269* 337 no_labels 202 based bit(1) level 2 in structure "cseg" dcl 2-14 in procedure "tape_ansi_attach_" set ref 246* 291 318 no_labels 25(01) based bit(1) level 2 in structure "tao" packed packed unaligned dcl 5-6 in procedure "tape_ansi_attach_" set ref 246 318 483 503 675* noptions based fixed bin(17,0) level 2 dcl 5-6 set ref 650 670* ntracks 1 based fixed bin(17,0) level 2 dcl 5-6 set ref 457 457* 459 670* null builtin function dcl 76 ref 171 212 219 251 255 269 269 337 348 687 782 nvolumes 32 based fixed bin(17,0) level 2 dcl 5-6 set ref 271 382 385 387 670* open 32 based entry variable level 2 dcl 1-6 set ref 291* 293* open_mode 176 based fixed bin(17,0) level 2 dcl 2-14 set ref 688* options parameter varying char array dcl 39 set ref 162 167 181* 651 output_mode 203 based fixed bin(17,0) level 2 in structure "cseg" dcl 2-14 in procedure "tape_ansi_attach_" set ref 693* output_mode 6 based fixed bin(17,0) level 2 in structure "tao" dcl 5-6 in procedure "tape_ansi_attach_" set ref 490 494 520 524 540 570 580 582 670* 693 part_file_name 000140 automatic varying char(17) dcl 62 set ref 550* 552 554 556 558 pos based fixed bin(17,0) array level 4 packed packed unaligned dcl 2-14 set ref 734* position based structure array level 3 packed packed unaligned dcl 2-14 protect 124 based bit(1) level 2 dcl 2-14 set ref 253* 420 430 rcp_id based fixed bin(6,0) array level 4 dcl 2-14 set ref 307 356 368 401 742* 784 read_errors based fixed bin(17,0) array level 4 packed packed unaligned dcl 2-14 set ref 740* read_length 224 based structure level 2 unaligned dcl 2-14 reclen 27 based fixed bin(21,0) level 2 in structure "tao" dcl 5-6 in procedure "tape_ansi_attach_" set ref 613 621 623 629 634 641 644 670* 718 reclen 47 based fixed bin(21,0) level 3 in structure "fd" dcl 3-3 in procedure "tape_ansi_attach_" set ref 718* reg_data based structure array level 3 packed packed unaligned dcl 2-14 replace_id 7(09) based char(17) level 2 in structure "tao" packed packed unaligned dcl 5-6 in procedure "tape_ansi_attach_" set ref 341 512 566 677* 694 replace_id 204 based char(17) level 2 in structure "cseg" packed packed unaligned dcl 2-14 in procedure "tape_ansi_attach_" set ref 694* retain 211 based fixed bin(17,0) level 2 in structure "cseg" dcl 2-14 in procedure "tape_ansi_attach_" set ref 695* retain 5 based fixed bin(17,0) level 2 in structure "tao" dcl 5-6 in procedure "tape_ansi_attach_" set ref 670* 695 rlN 226 based fixed bin(21,0) level 3 dcl 2-14 set ref 698* rlP 224 based pointer level 3 dcl 2-14 set ref 255* rtrim builtin function dcl 76 ref 215 215 550 sequence 30 based fixed bin(17,0) level 3 in structure "fd" dcl 3-3 in procedure "tape_ansi_attach_" set ref 708* sequence 30 based fixed bin(17,0) level 3 in structure "fl" dcl 4-3 in procedure "tape_ansi_attach_" ref 346 sequence 20 based fixed bin(17,0) level 2 in structure "tao" dcl 5-6 in procedure "tape_ansi_attach_" set ref 340 346 516 590 670* 708 set_id 15 based char(32) level 3 dcl 3-3 set ref 706* size builtin function dcl 76 ref 267 standard 000146 automatic fixed bin(17,0) dcl 62 in procedure "tape_ansi_attach_" set ref 164* 169* 184 197 215 217 245 247 478 545 603 605 606 637 647 711 714 747 757 standard 2 based fixed bin(17,0) level 2 in structure "cseg" dcl 2-14 in procedure "tape_ansi_attach_" set ref 245* 285* string builtin function dcl 76 in procedure "tape_ansi_attach_" ref 558 string 4 based char(256) level 3 in structure "cseg" packed packed unaligned dcl 2-14 in procedure "tape_ansi_attach_" set ref 284* substr builtin function dcl 76 ref 217 556 sys_info$max_seg_size 000040 external static fixed bin(35,0) dcl 118 ref 267 system 41 based char(13) level 3 dcl 3-3 set ref 714* system_code 000126 constant char(13) initial array packed unaligned dcl 86 ref 714 tao based structure level 1 unaligned dcl 5-6 taoP 000102 automatic pointer dcl 5-4 set ref 179* 181* 194 197 204 210 215 217 224 230 246 252 254 271 285 303 303 315 318 323 325 326 329 340 341 343 346 382 385 387 393 412 457 457 459 464 466 468 470 479 483 490 494 495 496 503 504 508 512 516 520 524 528 532 540 541 546 566 570 571 575 580 581 582 590 591 597 603 613 619 621 623 623 629 629 634 634 641 641 644 644 650 670 670 670 670 670 670 670 670 670 670 673 675 675 675 675 675 675 677 677 677 677 677 679 689 692 693 694 695 696 696 705 708 710 717 718 719 730 731 750 tao_max_volnames constant fixed bin(17,0) initial dcl 5-53 ref 60 60 677 677 677 731 tape_ansi_attach_$no_user_routine 000120 constant entry external dcl 122 ref 699 tape_ansi_control_ 000054 constant entry external dcl 122 ref 294 tape_ansi_detach_ 000062 constant entry external dcl 122 ref 295 tape_ansi_file_cntl_$open 000064 constant entry external dcl 122 ref 293 tape_ansi_mount_cntl_$free 000102 constant entry external dcl 122 ref 357 369 402 784 tape_ansi_mount_cntl_$insert_rings 000104 constant entry external dcl 122 ref 415 tape_ansi_mount_cntl_$mount 000106 constant entry external dcl 122 ref 276 tape_ansi_mount_cntl_$write_permit 000110 constant entry external dcl 122 ref 421 tape_ansi_mount_cntl_$write_protect 000112 constant entry external dcl 122 ref 431 tape_ansi_nl_file_cntl_$open 000114 constant entry external dcl 122 ref 291 tape_ansi_parse_options_ 000116 constant entry external dcl 122 ref 181 tape_ansi_tape_io_$attach 000122 constant entry external dcl 122 ref 260 tape_drive based char(32) array level 4 packed packed unaligned dcl 2-14 set ref 744* temp 000376 automatic fixed bin(17,0) dcl 795 set ref 801* 802 803* 805 temp_file_name 000147 automatic char(17) packed unaligned dcl 62 set ref 546* 549 550 551* 551 terminate_process_ 000124 constant entry external dcl 122 ref 772 ti 000106 automatic structure level 1 dcl 766 set ref 772 772 tracks based fixed bin(17,0) array level 4 packed packed unaligned dcl 2-14 set ref 736* tstring 000155 automatic varying char(256) dcl 62 set ref 282 284 647* 651* 651 type 000000 constant varying char(4) initial array level 2 dcl 89 ref 603 usage_count based fixed bin(17,0) array level 4 packed packed unaligned dcl 2-14 set ref 739* user_label_routine 230 based entry variable array level 2 dcl 2-14 set ref 699* user_labels 201 based bit(1) level 2 in structure "cseg" dcl 2-14 in procedure "tape_ansi_attach_" set ref 692* user_labels 7(01) based bit(1) level 2 in structure "tao" packed packed unaligned dcl 5-6 in procedure "tape_ansi_attach_" set ref 675* 692 vcN 126 based fixed bin(17,0) level 2 dcl 2-14 set ref 224 233 250* 273* 306 366 386 389* 783 verify builtin function dcl 76 ref 558 version 000106 automatic fixed bin(17,0) initial level 2 dcl 766 set ref 766* vl based structure array level 2 unaligned dcl 2-14 vlX 5 based fixed bin(17,0) initial level 2 in structure "fl" dcl 4-3 in procedure "tape_ansi_attach_" ref 354 366 vlX 5 based fixed bin(17,0) initial level 2 in structure "fd" dcl 3-3 in procedure "tape_ansi_attach_" set ref 269* vol_data based structure array level 3 unaligned dcl 2-14 volname 33 based char(32) array level 2 in structure "tao" packed packed unaligned dcl 5-6 in procedure "tape_ansi_attach_" set ref 215 217 224 393 677* 730 750 volname based char(32) array level 4 in structure "cseg" packed packed unaligned dcl 2-14 in procedure "tape_ansi_attach_" set ref 224 393 706 730* 747* write_VOL1 based fixed bin(17,0) array level 4 dcl 2-14 set ref 745* write_errors based fixed bin(17,0) array level 4 packed packed unaligned dcl 2-14 set ref 741* write_ring 123 based bit(1) level 2 in structure "cseg" dcl 2-14 in procedure "tape_ansi_attach_" set ref 252* 414 429 write_ring 4 based bit(1) level 2 in structure "tao" packed packed unaligned dcl 5-6 in procedure "tape_ansi_attach_" set ref 252 412 675* yy 000375 automatic picture(2) packed unaligned dcl 795 set ref 805* 806 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. CONSOLE_DTYPEX internal static fixed bin(17,0) initial dcl 7-31 DEVICE_TYPE internal static char(32) initial array packed unaligned dcl 7-18 DISK_DRIVE_DTYPEX internal static fixed bin(17,0) initial dcl 7-30 DISK_VOL_VTYPEX internal static fixed bin(17,0) initial dcl 7-38 MCA_DTYPEX internal static fixed bin(17,0) initial dcl 7-36 NUM_QUALIFIERS internal static fixed bin(17,0) initial array dcl 7-22 PRINTER_DTYPEX internal static fixed bin(17,0) initial dcl 7-32 PUNCH_DTYPEX internal static fixed bin(17,0) initial dcl 7-33 READER_DTYPEX internal static fixed bin(17,0) initial dcl 7-34 SPECIAL_DTYPEX internal static fixed bin(17,0) initial dcl 7-35 TAPE_DRIVE_DTYPEX internal static fixed bin(17,0) initial dcl 7-29 Tape_volume_types internal static char(16) initial array packed unaligned dcl 6-29 Volume_blank internal static fixed bin(17,0) initial dcl 6-15 Volume_gcos_tape internal static fixed bin(17,0) initial dcl 6-15 Volume_multics_tape internal static fixed bin(17,0) initial dcl 6-15 Volume_unauthenticated internal static fixed bin(17,0) initial dcl 6-15 Volume_unknown_format internal static fixed bin(17,0) initial dcl 6-15 Volume_unreadable internal static fixed bin(17,0) initial dcl 6-15 cseg_tseg_version_2 internal static fixed bin(17,0) initial dcl 2-12 iox_$iocb_version_sentinel external static char(4) dcl 1-51 NAMES DECLARED BY EXPLICIT CONTEXT. attach_ok 001614 constant label dcl 282 ref 441 bad 004052 constant label dcl 655 ref 461 474 481 485 492 499 552 554 556 558 611 bad1 004057 constant label dcl 658 ref 506 510 514 522 526 530 534 585 616 626 bad3 004064 constant label dcl 661 ref 518 543 568 573 577 593 bad_attopt 000746 constant label dcl 184 ref 176 192 201 207 221 312 398 751 bad_re_attach 002015 constant label dcl 309 ref 320 br_inc 003706 constant label dcl 624 ref 629 641 644 chain_ck 002303 constant label dcl 382 ref 323 327 331 361 373 check_attopt 002605 constant entry internal dcl 443 ref 191 cleaner 004734 constant entry internal dcl 780 ref 213 760 common 000671 constant label dcl 171 ref 165 cseg_init 004171 constant entry internal dcl 685 ref 257 439 er_exit 002533 constant label dcl 757 ref 237 265 277 358 370 380 404 417 423 433 fd_init 004246 constant entry internal dcl 703 ref 280 440 finish 002441 constant label dcl 412 ref 382 391 format_ck 003572 constant label dcl 597 ref 536 got_fl 002134 constant label dcl 354 ref 341 343 346 348 350 handler 004670 constant entry internal dcl 764 ref 289 no_chain 002212 constant label dcl 366 ref 337 no_user_routine 002576 constant entry external dcl 810 re_attach 001753 constant label dcl 303 ref 241 tao_init 004071 constant entry internal dcl 667 ref 180 tape_ansi_attach 000632 constant entry external dcl 162 tape_ansi_attach_ 000616 constant entry external dcl 34 tape_ibm_attach 000653 constant entry external dcl 167 test 000074 constant label array(0:4) dcl 613 ref 600 607 618 633 today 005030 constant entry internal dcl 793 ref 709 vl_init 004346 constant entry internal dcl 725 ref 272 388 407 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 5702 6030 5200 5712 Length 6442 5200 126 376 502 10 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME tape_ansi_attach_ 388 external procedure is an external procedure. on unit on line 213 64 on unit on unit on line 262 64 on unit on unit on line 289 88 on unit check_attopt internal procedure shares stack frame of external procedure tape_ansi_attach_. tao_init internal procedure shares stack frame of external procedure tape_ansi_attach_. cseg_init internal procedure shares stack frame of external procedure tape_ansi_attach_. fd_init internal procedure shares stack frame of external procedure tape_ansi_attach_. vl_init internal procedure shares stack frame of external procedure tape_ansi_attach_. handler internal procedure shares stack frame of on unit on line 289. cleaner 74 internal procedure is called by several nonquick procedures. today internal procedure shares stack frame of external procedure tape_ansi_attach_. STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 module_name tape_ansi_attach_ STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME on unit on line 289 000106 ti handler tape_ansi_attach_ 000100 cP tape_ansi_attach_ 000102 taoP tape_ansi_attach_ 000104 area_size tape_ansi_attach_ 000104 auto_tao tape_ansi_attach_ 000105 block_attribute tape_ansi_attach_ 000106 drop tape_ansi_attach_ 000107 error_msg tape_ansi_attach_ 000134 format_code tape_ansi_attach_ 000135 i tape_ansi_attach_ 000136 j tape_ansi_attach_ 000137 mask tape_ansi_attach_ 000140 part_file_name tape_ansi_attach_ 000146 standard tape_ansi_attach_ 000147 temp_file_name tape_ansi_attach_ 000154 blocksize tape_ansi_attach_ 000155 tstring tape_ansi_attach_ 000360 canon_std vl_init 000372 clock today 000374 ddd today 000375 yy today 000376 temp today THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_char_temp cat_realloc_chars call_ext_out_desc call_ext_out call_int_this call_int_other return_mac tra_ext_1 alloc_auto_adj mdfx1 enable_op shorten_stack ext_entry ext_entry_desc int_entry verify_eis op_alloc_ THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. area_ canon_for_volume_label_ clock_ com_err_ continue_to_signal_ datebin_ datebin_$dayr_clk hcs_$delentry_seg hcs_$make_seg hcs_$reset_ips_mask hcs_$set_ips_mask hcs_$truncate_seg iox_$propagate tape_ansi_attach_$no_user_routine tape_ansi_control_ tape_ansi_detach_ tape_ansi_file_cntl_$open tape_ansi_mount_cntl_$free tape_ansi_mount_cntl_$insert_rings tape_ansi_mount_cntl_$mount tape_ansi_mount_cntl_$write_permit tape_ansi_mount_cntl_$write_protect tape_ansi_nl_file_cntl_$open tape_ansi_parse_options_ tape_ansi_tape_io_$attach terminate_process_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$bad_arg error_table_$file_busy error_table_$inconsistent error_table_$invalid_cseg error_table_$noalloc error_table_$noarg error_table_$not_detached error_table_$unable_to_do_io sys_info$max_seg_size LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 60 000576 62 000611 34 000615 36 000624 162 000625 164 000646 165 000650 167 000651 169 000667 171 000671 174 000700 175 000703 176 000710 179 000711 180 000713 181 000714 183 000743 184 000746 188 001003 191 001004 192 001020 194 001023 197 001032 199 001040 200 001045 201 001050 203 001051 204 001052 205 001055 206 001062 207 001065 210 001066 212 001071 213 001073 215 001115 217 001160 219 001245 220 001252 221 001257 224 001260 230 001315 233 001336 234 001341 235 001343 236 001347 237 001354 239 001355 240 001357 241 001361 244 001362 245 001364 246 001366 247 001373 248 001405 249 001407 250 001410 251 001411 252 001413 253 001416 254 001417 255 001421 256 001423 257 001425 258 001426 260 001430 262 001437 264 001453 265 001457 267 001462 268 001507 269 001521 271 001552 272 001563 273 001565 274 001570 276 001572 277 001610 280 001613 282 001614 284 001617 285 001623 287 001631 288 001632 289 001633 290 001651 291 001664 293 001701 294 001712 295 001720 296 001723 297 001725 298 001732 300 001742 301 001752 303 001753 306 001761 307 001771 308 002010 309 002015 311 002021 312 002022 314 002023 315 002025 318 002031 319 002040 320 002045 323 002046 325 002050 326 002052 327 002053 329 002054 331 002055 333 002057 336 002062 337 002064 339 002071 340 002076 341 002101 343 002107 345 002113 346 002114 348 002120 350 002125 352 002131 354 002134 356 002147 357 002165 358 002201 360 002204 361 002206 364 002210 366 002212 368 002225 369 002243 370 002257 372 002262 373 002264 376 002266 378 002271 379 002275 380 002302 382 002303 385 002307 386 002315 387 002320 388 002331 389 002333 390 002336 391 002340 393 002341 394 002370 395 002376 396 002403 397 002407 398 002410 401 002411 402 002416 404 002432 407 002435 410 002437 412 002441 414 002445 415 002450 417 002462 420 002465 421 002470 423 002502 426 002505 429 002506 430 002511 431 002513 433 002525 439 002530 440 002531 441 002532 757 002533 760 002570 761 002574 810 002575 816 002604 443 002605 454 002616 455 002621 457 002622 459 002630 460 002632 461 002642 464 002643 466 002647 468 002652 470 002655 473 002660 474 002670 478 002671 479 002674 480 002677 481 002716 483 002720 484 002723 485 002742 487 002744 490 002745 491 002750 492 002767 494 002771 495 002773 496 002775 498 003000 499 003010 503 003011 504 003014 505 003017 506 003036 508 003040 509 003044 510 003063 512 003065 513 003071 514 003110 516 003112 517 003114 518 003124 520 003125 521 003130 522 003147 524 003151 525 003153 526 003172 528 003174 529 003200 530 003217 532 003221 533 003224 534 003243 536 003245 540 003246 541 003252 542 003256 543 003270 545 003271 546 003274 547 003277 549 003311 550 003316 551 003344 552 003362 554 003364 556 003366 558 003377 560 003405 562 003406 564 003411 566 003412 567 003416 568 003430 570 003431 571 003433 572 003437 573 003460 575 003462 576 003465 577 003506 579 003510 580 003511 581 003513 582 003517 584 003535 585 003547 590 003550 591 003553 592 003557 593 003571 597 003572 599 003600 600 003601 602 003602 603 003607 605 003626 606 003634 607 003640 609 003641 610 003643 611 003655 613 003656 615 003660 616 003672 618 003673 619 003674 621 003676 622 003700 623 003702 624 003706 626 003720 628 003721 629 003722 633 003724 634 003725 637 003731 639 003736 640 003740 641 003742 643 003746 644 003747 647 003753 650 003765 651 003775 652 004046 653 004051 655 004052 657 004056 658 004057 660 004063 661 004064 663 004070 667 004071 670 004072 673 004105 675 004107 677 004123 679 004165 681 004170 685 004171 687 004172 688 004175 689 004177 690 004203 691 004204 692 004205 693 004211 694 004213 695 004216 696 004220 698 004223 699 004225 700 004245 703 004246 705 004247 706 004255 707 004270 708 004275 709 004277 710 004307 711 004314 713 004322 714 004324 715 004330 716 004332 717 004334 718 004336 719 004340 720 004342 721 004343 722 004345 725 004346 728 004350 730 004361 731 004411 732 004433 733 004440 734 004454 735 004462 736 004470 737 004476 738 004507 739 004515 740 004523 741 004530 742 004536 743 004542 744 004550 745 004557 746 004563 747 004600 749 004655 750 004660 751 004666 754 004667 764 004670 766 004671 770 004672 771 004675 772 004700 775 004722 776 004732 780 004733 782 004741 783 004746 784 004760 787 005012 788 005015 790 005027 793 005030 800 005032 801 005041 802 005052 803 005062 805 005123 806 005136 ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved