1 03/01/85 Tape Control Language
2
3 The TCL source file, written in the Tape Control Language TCL is
4 the control file that governs file transfer with the tape_in or
5 tape_out commands. For information on these commands, type:
6 help tape_in or help tape_out
7
8 The file is actually a program, written by the user, the contents of
9 which describe the file transfer. When the user issues the tape_in
10 or tape_out command, the control file named in the command line by
11 the path argument is compiled and, if the compilation is successful,
12 the generated code is interpreted to accomplish the desired file
13 transfers. The same control file can be used with both the tape_in
14 and tape_out commands.
15
16
17 Notes on creating a tcl control file:
18 The TCL control file consists of a list of statements of the form:
19 <keyword>: <arguments>;
20 or
21 <keyword>;
22
23 These statements are combined to form file-groups and file-groups are
24 combined to form volume-groups. A TCL control file consists of one
25 or more volume-groups.
26
27
28 Notes on file-group: A file-group is a list of statements that define
29 one file transfer. A file-group must begin with a File statement and
30 must contain a path statement. In addition, it may contain one or
31 more local statements. A file-group is terminated by a global
32 statement, an End statement, or another File statement.
33
34
35 Notes on volume-group: A volume-group is a series of statements
36 that specify the file transfers to be performed between the storage
37 system and a particular tape volume-set. A volume-group must begin
38 with a Volume statement, contain one or more file-groups, and
39 terminate with an End statement. In additon, a volume-group may
40 optionally contain one or more global statements, which apply to
41 all the file-groups within the volume-group that follow the global
42 statement.
43
44
45 List of tcl control file statements:
46 All TCL control files must have at least four statements--a Volume
47 statement, a File statement, a path statement, and an End statement.
48 All other TCL statements are optional.
49
50
51 Volume: <volid>;
52 specifies the tape volume to be used in file transfer. This
53 statement causes a tape volume whose volume identifier is
54 <volid> to be mounted on a 9-track drive. The "Volume" keyword
55 must begin with an upper case letter. <volid> must consist of
56 from 1 to 6 ASCII characters. If <volid> contains any of the
57 following characters, it must be enclosed in quotes.
58 1. any ASCII control character
59 2. : ; , or blank
60 3. the sequence /* or */
61 4. if <volid> itself contains a quote character, the quote
62 itself must be doubled and the entire <volid> string
63 enclosed in quotes
64 See the tape_ansi_ and tape_ibm_ info files for more details
65 on volume specifications.
66
67
68 File: <fileid>;
69 specifies the tape file to be read or written. The "File" keyword
70 must begin with an upper case letter. The tape file is
71 identified by <fileid> and must be from 1 to 17 characters for
72 ANSI labeled tapes, and a valid DSNAME for IBM labeled tapes.
73 The File statement marks the beginning of any local attributes
74 for a given tape file transfer.
75
76
77 path: <pathname>;
78 specifies the pathname of the storage system file to be read
79 or written. <pathname> can be either a relative or absolute
80 pathname.
81 End;
82 marks the end of the TCL statements for that volume. "End"
83 must begin with an upper case letter followed by a semicolon.
84
85
86 List of global statements:
87 A global statement changes a volume-group default.
88 See Tape Defaults below.
89 Block: <blklen>;
90 specifies the tape file maximum physical block length, in bytes,
91 to be used with subsequent file-groups.
92 Density: <den>;
93 indicates the density in which the volume is to be recorded.
94 This statement may appear only once within a volume-group or
95 an error is indicated.
96
97
98 Expiration: <date>;
99 specifies the expiration date of files to be written created.
100 <date> is of a form acceptable to the convert_date_to_binary
101 subroutine, for example, "09/12/79".
102 Format: <form>;
103 specifies the tape record format to be used with subsequent
104 file_groups.
105
106
107 Mode: <mode>;
108 specifies the tape mode and character code to be used with
109 subsequent file-groups.
110 Record: <reclen>;
111 specifies the tape file maximum logical record length, in
112 bytes, to be used with subsequent file-groups.
113 Storage: <structure>;
114 states the internal logical structure of the storage system
115 files to be specified by subsequent file-groups. An
116 unstructured file is referenced as a series of 9-bit bytes,
117 commonly called lines; a sequential file is referenced as
118 sequence of records, each record being a string of 9-bit bytes.
119 <structure> must be either unstructured or sequential.
120
121
122 Tape: <tape-type>;
123 specifies the kind of tape that is processed. This statement
124 may appear only once within a volume-group or an error is
125 indicated.
126
127
128 List of local statements:
129 A local statement overrides the volume-group defaults in
130 effect at the time a file-group is evaluated. A local statement
131 has no effect outside of the file-group in which it occurs and
132 may appear anywhere within the file-group.
133 block: <blklen>;
134 expiration: <date>;
135 format: <form>;
136 mode: <mode>;
137 record: <reclen>;
138 storage: <structure>;
139 these local statements operate exactly as do their global
140 statement counterparts, except that they affect only the
141 file-group in which they occur.
142
143
144 generate;
145 causes the entire contents of a file on an ANSI tape to be
146 replaced while retaining the structure of the file itself and
147 incrementing the file generation number.
148 modify;
149 causes the entire contents of a file on an ANSI or IBM
150 labeled tape to be replaced while retaining the structure of the
151 file itself.
152 number: <number>;
153 specifies the file sequence number of the file to be used in
154 the file transfer. <number> must be either an integer between 1
155 and 9999 inclusive, or the character "*".
156
157
158 replace: <fileid>;
159 replaces an ANSI or IBM standard labeled tape. The file to
160 be overwritten is identified by <fileid> in the replace local
161 statement and the new file to be written is identified by
162 <fileid> in the File statement.
163 storage_extend;
164 extends an already existing file in the storage system.
165 tape_extend;
166 allows new data records to be appended to an existing file on
167 an ANSI or IBM standard labeled tape without in any way altering
168 the previous contents of the tape file.
169
170
171 Tape defaults:
172 If no Tape statement is specified in the control file, ANSI standard
173 labeled tape will be assumed. If, however, a Tape statement is
174 specified, the tape characteristics for that tape-type will preside
175 as default until overridden.
176
177
178 Tape-type ansi: this is the default
179 1) density: 800 bpi
180 2) file expiration: immediate
181 3) storage system file format: unstructured
182 4) mode: ascii character code
183 5) tape file record format: variable length records, blocked
184 6) physical block length: 2048 characters maximum
185 7) logical record length: 2048 characters maximum
186
187
188 Tape-type ibmsl, ibmnl, ibmdos:
189 1) density: 1600 bpi
190 2) file expiration: immediate
191 3) storage system file format: unstructured
192 4) mode: ebcdic
193 5) tape file record format: variable length records, blocked
194 6) physical block length: 8192 characters maximum
195 7) logical record length: 8188 characters maximum
196
197
198 Control file comments:
199 Comments may be inserted anywhere within the TCL program by
200 surrounding the comment text with the comment delimiters. /* is the
201 delimiter that begins a comment, and */ is the delimiter that
202 terminates a comment.
203
204
205 Notes:
206 To read files on a labeled tape, where the file names are not known,
207 the <fileid> "*" can be used in the TCL File statement with tape_in
208 only.
209
210 If it is wished to append a file to a given tape volume, it is not
211 necessary to know how many files are on the tape if the tape is
212 labeled. In such a case, the character "*" can be used in the TCL
213 number statement if a valid file name is specified in the TCL File
214 statement. This appending feature cannot be used to create a
215 completely new volume.
216
217 Either tape_in or tape_out supports processing of unlabeled tapes,
218 provided that the tapes are structured according to the OS standard.