• Aucun résultat trouvé

Tape-to-Disk Utility Program (TAPDSK)

Utility Control Statements

Two utility control statements may be used with the Tape-to-Disk program:

The utility-modifier statement, which outlines the method of transferring a set of data records (a file) from tape to disk.

The field-select statement, which des-cribes the transfer of individual fields

TAPE-TO-DISK UTILITY-MODIFIER STATEMENT The utility-modifier statement controls the file transfer by indicating the type of

utility-modifier statement. It must be punched starting in column 1.

TD Program initials for the Tape-to-Disk program. They may be omitted, since the JOB statement actually specifies a tape-to-disk program (Program name Tape-to-Disk Utility Program 25

r---T---'---T---T---T---,

I I 10perandi I I

I

IPossiblelSpeci-

I

I Default

I

jOperand

I

Forms Ifica-

I

Explanation ISpecification I

I I Ition I I I

~---f---f---f---f---{

IStatement IDI//bUTDb I TD I Tape-to-Disk I I

1//bUxxb

I I

lutility identifier

I I

I

1/

/bUb I I General utility identifier I / /bUb

I

r---f---f---f---f---T--~

IType of I TC I C I Copy I TC 1* I

I Function I TF I FIField-Select I I ~

I Tt I TR I R I Reblock I I I

I I TRF I RF IReblock and Field-Select I I I

~---f---f---f---+---f--~

I Format I FF 1 F IFixed-length records I FF 1* J

IFF I

I I

I

I I

r---f---+---+---+---+--~

I

Input IA= (n"m) I

I

Fixed-length records I I *

I

IDescription I I I I

1 I

1A,=(input) I I n IInput record length, IA=(270,270) I I

I I I m I Input block length I I I

r---f---+---t---+---+--1

I

Output IB=(a"c) I IFixed-length records

I

1* I

IDescription I I I I I I

IB=(output) I I a )output record length, IB=(270~270) I I

I I I c 10utput block length I I I

~---f---t---+---f---L--1

I Rewind I IN I N IDO not rewind I I

I

Input Tape

I

IR ) R

I

Rewind

I I

IIx I IU I U IRewind and unload I IU I

I

I 1M

I

M IMultiple-reel input I I

I I

I I (All reels are rewound

I I

I I I I and unloaded) I I

t---+---+---+---+---1

IDisk I Oy I y IWrite-disk check I I

I

Check I I I I Oy I

lOx I ON

I

N IDo not write-disk check I

I

L ____________

L ____ . ____

~

_______ L __________________________ L ______________

J

*Default permitted only if entire card is omitted.

r---,

1//bUTDbTt,FF,A=(inpl.lt),B=(Ol.ltput),Ix,Ox I L ________________________________________ J

Figure 10. Tape-to-Disk Program Utility-Modifier Statement be listed in the above order, and all must

appear unless the card is omitted entirely.

The additional operands (Ix and Ox) may appear in any order after the four required ones.

Tt _. Type of Function operand

This operand specifies the transfer to be performed, when "t" is replaced by one or two initials. Files can be transferred in four ways:

• JC --

Copy. No change is made in the records or the file itself. This option is used to produce an identical file.

• 'rR -- Reblock. The number of records per block in the output (disk) file is different from that of the input (tape)

file. The record format remains unchanged.

• TF -- Field-Select. The record format is changed. Data fields within each record are rearranged, omitted, or con-verted to zoned or packed decimal. The output record length may differ from the input record length; however, the number of records per block remains the same as in the input file.

• TRF -- Reblock and Field-Select. This is a combination of the two preceding options. It is used when both the record format and the number of records per block are to be changed.

FF - Record-Format Operand pro-gram., the program automatically assumes certain itandard ("default") specifications for the missing operand(s).

You can omit the entire Tape-to-Disk utility-modifier statement (and run your program with the END statement only), if all your requirements match the default specifications as shown in Figure 10:

• Copy only, no field-selection or reblocking.

• Fixed-length records.

• Input record and block lengths arc both Field-Select statement for the Tape-to-Disk program. For a more detailed discussion see the section Field-Select Statement under General Description of utility Con-trol Statements.

The FS statement is only required if TF or TRF is specified in the Tt operand of the Tape-to-Disk utility-modifier state-ment .. field-select control statement. It must be punched starting in column

Tape-to-Disk Utility Program 27

t

END CONTROL STATEMENT

The END statement is the last of the utili-ty control statements and must appear even if none of the others is needed. It is punched

r----T---T---,

I

NamelOperationloperand

I

~----+---+---~

The control statement identification for Tape-to-Disk is /lbUTDb, the TD entry being because certain default specifications are appropriate for this -job. An alternate copied unchanged; therefore no field-select statement is needed.

3. Transfer a file from tape to disk, changing tne format of the records.

Rewind the tape. Do not make a write-disk check. The input records are eighty bytes long with three records to a block. The output record and block sizes will be the same as the input sizes. Both input and output records contain three fields. Further job specifications are listed in Figure 11.

Figure 9 shows what is changed during transfer.

/ /bUTDbTF ,FF"A= (80, 240), B= (80,240) " IR, ON / /bFSbl, 60,21/61, (P" 13,7) ,1/74, (U, 7,13) ,,8 //bEND

This field-select statement is discussed in Sample Problem 3 in the section Disk-to-Tape Utility Program.

4. Transfer a file from tape to disk wi thout change. Records are unblocked"

270 bytes each. Make a write-disk check and rewind and unload the tape.

The only utility control statement need-ed is

//bEND

Default specifications for all operands satisfy the job requirements.

5. Transfer a file from tape to disk. The 90-byte input records are tlocked, with the block size ranging from three to six records per block. The output records on disk are to be unblocked, 90 bytes long. Rewind and unload the input tape. Make a write-disk check.

//bUTDbTR, FF"A='(90, 540), B= (90,90) //END

Since the input blocks contain a varia-ble number of records, the maximum block size, i.e., 6x90=540 must be sfecified.

The Ix and Ox operands assume their default specifications.

r---T---,

I

Input Record

I

Output Record

I

r---+---~

I

Location

I

Location

I

I

(bytes) Format

I

(bytes) Format Conversion

I

I

Field 1 1-60 packed decimal

I

21-80 packed decimal none

I I

Field 2 61-73 zoned decimal

I

1-7 packed decimal to be packed

I I

Field 3 74-80 packed decimal

I

8-20 zoned decimal to be unpacked

I

l __________________________________ ,_~ __________________________________________ J

Figure 11. Field Modification for Tape-to-Disk Transfer Problem

Tape-to-Disk utility Program 29