• Keine Ergebnisse gefunden

LOCAL OAT ASET UTILITIES

Im Dokument CRAY-1® AND CRAY X-MP COMPUTER SYSTEMS (Seite 150-156)

Local dataset utilities provide the user with a convenient means of copying, positioning, or initializing local datasets. The following utilities are available to the user:

• COPYR, COPYF, and COPYD copy records, files, and datasets, respectively.

• SKIPR, SKIPF, and SKIPD skip records, files, and datasets, respectively.

• REWIND positions a dataset at the beginning of data, that is, before the first block control word of the dataset.

• WRITEDS initializes a random dataset but can also initialize a sequential dataset.

NOTE

The utilities described in this section operate only on datasets in COS blocked format.

COPYR - COpy RECORDS

The COPYR utility copies a specified number of records from one dataset to another starting at the current dataset position. Following the copy, the datasets are positioned after the EOR for the last record copied.

The COPYR control statement is described below.

Format:

COPYR,I=idn,o=odn,NR=n.

SR-OOll

Part 2

7-1 L

7

Parameters are in keyword form.

I=idn o=odn NR=n

Name of dataset to be copied. The default is $IN.

Name of dataset to receive the copy. The default is $OUT.

Decimal number of records to copy. The default is 1. If the dataset contains fewer than n records, the copy

prematurely terminates on the next EOF. EOF or EOD is not written. If the keyword NR is specified without a value, the copy terminates at the next EOF. If the input dataset is positioned midrecord, the partial record is counted as one record.

COPYF - COpy FILES

The COPYF utility copies a specified number of files from one dataset to another starting at the current dataset position. Following the copy, the data sets are positioned after the EOF for the last file copied. The COPYF control statement is described below.

Format:

COPYF,I=idn,o=odn,NF=n.

Parameters are in keyword form.

I=idn o=odn NF=n

Name of dataset to be copied. The default is $IN.

Name of dataset to receive the copy. The default is $OUT.

Decimal number of files to copy. The default is 1. If the dataset contains fewer than n files, the copy prematurely terminates on EOD. EOD is not written. If the keyword NF

is specified without a value, the copy terminates at the EOD. If the input dataset is positioned midfile, the partial file counts as one file.

COPYD - COpy DATASET

The COPYD utility copies one dataset to another starting at their current positions. Following the copy, both datasets are positioned after the EOF of the last file copied. The EOD is not written to the output dataset. The COPYD control statement is described below.

Format:

COPYD,I=idn,o=odn.

Parameters are in keyword form.

I=idn Name of dataset to be copied. The default is $IN.

o=odn Name of dataset to receive the copy. The default is $OUT.

SKIPR - SKIP RECORDS

The SKIPR utility directs the system to bypass a specified number of records from the current position of the named dataset. The SKIPR control statement is described below.

Format:

SKIPR,DN~n,NR=n.

Parameters are in keyword form.

DN~n

NR=n

SR-OOll

Name of dataset to be bypassed. The default is $IN.

Decimal number of records to skip. The default is 1. If the keyword NR is specified without a value, the system positions dn after the last EOR of the current file. If n is negative, SKIPR skips backward on dn.

SKIPR does ~ bypass an EOF or beginning-of-data. If an EOF or beginning-of-data is encountered before n records

have been bypassed when skipping backward, the dataset is positioned after the EOF or beginning-of-data. When

Part 2

7-3 L

skipping forward, the dataset is positioned after the last EOR of the current file. This statement is available for use with online tapes except that a negative value cannot be used for NR.

SKIPF - SKIP FILES

The SKIPF utility directs the system to bypass a specified number of files from the current position of the named dataset. The SKIPF control statement is described below.

Format:

SKIPF,DN=dn,NF=n.

Parameters are in keyword form.

DN~n Name of dataset to be bypassed. The default is $IN.

NF=n Decimal number of files to bypass. The default is 1. If the keyword NF is specified without a value, the system positions dn after the last EOF of the dataset. If n

is negative, SKIPF skips backward on dn.

If dn is positioned midfile, the partial file skipped counts as one file.

SKIPF does not bypass an EOD or beginning-of-data. If beginning-of-data is encountered before n files have been

bypassed when skipping backward, the dataset is positioned after the beginning-of-data. When skipping forward, the dataset is positioned before the EOD of the current file.

This statement is available for use with online tapes except that a negative value cannot be used for NF; for interchange format tapes (DF=IC), NF can only be 1.

For example, if dn is positioned just after an EOF, the following control statement positions dn after the previous EOF. If dn is positioned midfile, dn will be

positioned at the beginning of that file.

SKIPF,DN=dn,NF=-l.

SKIPD - SKIP DATASET

The SKIPD utility directs the system to position a dataset at EOD, that is, after the last EOF of the dataset. It has the same effect as the following statement:

SKIPF,DN=dn,NF.

If the specified dataset is empty or already at EOD, the statement has no effect. The SKIPD control statement is described below.

Format:

SKIPD,DN~n.

The parameter is in keyword form.

DN=dn Name of dataset to be skipped. The default is $IN.

REWIND - REWIND DATASET

The REWIND control statement positions the named datasets at the

beginning-of-data, that is, before the first block control word of the dataset. The $IN dataset represents an exception. After REWIND, $IN is positioned after the control statement file. REWIND opens any of the named datasets that are not open. REWIND is a system verb.

REWIND causes an EOD to be written to the dataset if the previous

operation was a write or if the dataset is null. If the dataset is not memory resident, the buffers are flushed to mass storage when REWIND

follows a write operation. If the dataset is memory resident, the EOD is still placed in the buffer, but the buffer is not flushed. For an online magnetic tape dataset, REWIND positions the tape dataset to the beginning of the first volume accessed by the user. The REWIND control statement

is described below.

Format:

SR-OOII

Part 2

7-5 L

Parameters are in keyword form.

DN=dn· ~ Names of datasets to be rewound. A maximum of eight datasets can be specified, separated by colons.

WRITEDS - WRITE RANDOM OR SEQUENTIAL DATASET

The WRITEDS utility is intended for initializing a blocked dataset. It writes a dataset containing a single file consisting of a specified number of records of a specified length. This utility is especially useful for random datasets because a record written on a random dataset must end on a pre-existing record boundary. Direct-access datasets,

implemented in eFT as defined by the ANSI X3.9-l978 FORTRAN standard, can be initialized, and even extended, without the help of WRITEDS.

WRITEDS can also be used to write a sequential dataset.

The WRITEDS control statement is described below.

Format:

WRITEDs,DN=dn,NR=nr,RL=rL.

Parameters are in keyword form; the only required parameters are DN and NR.

DN=dn NR=nr

Name of dataset to be written. DN is a required parameter.

Decimal number of records to be written. NR is a required parameter set to the largest value that may be needed,

since a dataset is generally not extended when it is in random mode.

Decimal record length, that is, the number of words in each record. The default is zero words, which generates a null record.

If the record length is 1 or greater, the first word of each record is the record number as a binary integer starting with 1.

Im Dokument CRAY-1® AND CRAY X-MP COMPUTER SYSTEMS (Seite 150-156)