HPlogo FCOPY Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 5 FCOPY Functions

SKIPEOF

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

Instructs FCOPY to skip end-of-file (EOF) markers on a serial storage device in order to position the device at the desired file before copying.

Syntax

   ;SKIPEOF=[{+

              -}from-eofs

              from-file-number][,{ {+

                                  -}to-eofs

                                  to-file-number}]

Where:

+/-

Specifies forward (+) or reverse (-) movement.

from-eofs

Is a positive integer specifying how many files to skip on the "from" device.

from-file-number

Is an integer specifying an absolute file number on the "from" device. Absolute file numbers begin with 1.

to-eofs

Is a positive integer specifying how many files to skip on the "to" device.

to-file-number

Is an integer specifying an absolute file number on the "to" device.

File Attributes

The files that use the SKIPEOF function (either the fromfile or the tofile, or both) must reside on unlabeled magnetic tapes, serial disks, or cartridge tapes. The fromfile must have read access, and the tofile must have write access.

Operation

SKIPEOF lets you specify particular files on unlabeled magnetic tapes, cartridge tapes, and serial disks.

Absolute File Numbers

In the syntax description of the SKIPEOF function, from-file-number and to-file-number represent absolute file numbers. Absolute file numbers refer to specific files on a tape or serial disk. Tape and serial disk files are sequentially numbered, beginning with 1. You can use file numbers to identify the files you want to copy. For example, to copy from the fourth file on a tape, specify 4 as the from-file-number, SKIPEOF=4.

When you specify a from-file-number or a to-file-number, such as SKIPEOF=,2, the SKIPEOF function positions the tape at the beginning of the specified file. The tape's position before you issue the command does not affect the file copied. Figure 5-6 illustrates this process.

Figure 5-6 Skipping Absolute File Numbers

[Skipping Absolute File Numbers]

If you specify zero as a from-file-number or a to-file-number, FCOPY copies from or to the first file on the tape or serial disk.

Relative File Numbers

Both from-eofs and to-eofs represent the number of files to skip relative to the tape's current position. If you use a plus sign (+) to specify forward movement, the SKIPEOF function skips forward over the specified number of EOF marks. Figure 5-7 shows the effect of specifying SKIPEOF=+3.

Figure 5-7 SKIPEOF=+3

[SKIPEOF=+3]

If you use a minus sign (-) to specify backward movement, the SKIPEOF function skips backward over the specified number of EOF marks plus 1, and then skips forward one EOF mark. This action positions the tape at the beginning of a file, rather than at the end of the preceding file. Figure 5-8 shows the effect of specifying SKIPEOF=-3.

Figure 5-8 SKIPEOF=-3

[SKIPEOF=-3]

If you specify +0 or -0 for either of these parameters, SKIPEOF positions the tape at the beginning of the current file, as illustrated in figure 5-9.

Figure 5-9 SKIPEOF=+0

[SKIPEOF=+0]

Examples

The command below instructs FCOPY to skip to the fourth file of *THISTAPE and to the fifth file of *THATTAPE before copying data from *THISTAPE to *THATTAPE:

   >FROM=*THISTAPE;TO=*THATTAPE;SKIPEOF=4,5

In the example below, FCOPY copies information from the file three files ahead of *TAPES's current position to the seventh file of *TAPE2. If, for example, the current position of *TAPES is at the second file mark, FCOPY begins to copy from the sixth file. No matter where skipping begins on *TAPE2, FCOPY copies data to its seventh file:

   >FROM=*TAPES;TO=*TAPE2;SKIPEOF=+3,7

The FCOPY command below skips to the fifth file of *TAPEA and positions *TAPEB four files back from its current position. FCOPY copies file #5 of *TAPEA to the selected file on *TAPEB:

   >FROM=*TAPEA;TO=*TAPEB;SKIPEOF=5,-4

If you are copying several files from or to the same device, you can use an asterisk (*) to refer to the "from" or "to" device in the previous command. For example, the command below copies file #2 of *TAPES, the "from" device in the previous example, to file #8 of *TAPE2, the "to" device in the previous example:

   >FROM=*;TO=*;SKIPEOF=2,8

In the example below, FCOPY does not move *MYTAPE from its current position, but positions $CTUL, a terminal cartridge tape unit (refer to chapter 6), at the ninth file. FCOPY then copies the file at the current position of *MYTAPE to the ninth file of the cartridge tape:

   >FROM=*MYTAPE;TO=$CTUL;SKIPEOF=,9