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

DEBLOCK

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

Lets you deblock blocked records. For example, you can use DEBLOCK to make smaller records from larger ones or to copy files from systems with records that are not aligned on two-byte word boundaries.

Syntax

   ;DEBLOCK=logical-record-length

Where:

logical-record-length

Is a signed integer representing the length of each logical record in the tofile. A positive integer represents the length in two-byte words, and a negative integer represents the length in bytes.

Operation

DEBLOCK is principally used for copying tapes from other systems to an HP 3000 system. For more information on copying foreign tapes, refer to chapter 3.

FCOPY assumes that each group of bytes or words you specify with DEBLOCK is a record. FCOPY copies the record to the tofile and then aligns it on word boundaries.

Be careful when specifying the logical-record-length. If the input record length is not a multiple of the logical-record-length you specify, any fractional remainder of the input record is lost. Figure 5-1 illustrates this principle.

Figure 5-1 Logical Record Length

   Input record: 250 bytes

    ------ ------ ------ ------ ------ ------

   | 45 b | 45 b | 45 b | 45 b | 45 b | 25 b |

   |      |      |      |      |      |      |

    ------ ------ ------ ------ ------ ------



   Logical-record-length   specified as 45 bytes results in:

    ------    ------    ------    ------    ------    ------

   | 45 b |  | 45 b |  | 45 b |  | 45 b |  | 45 b |  |      |

   |      |  |      |  |      |  |      |  |      |  |      |

    ------    ------    ------    ------    ------    ------

   output     output    output    output    output    lost

   rec #1     rec #2    rec #3    rec #4    rec #5    25 bytes

If you deblock labeled tapes, you must specify "undefined" records in the FILE command describing the tape file. For example:

   FILE TAPEBYTE;DEV=TAPE;LABEL=TLABEL;REC=-6000,1,U,ASCII

Example

The example below copies a file from tape to disk. The original tape file, TAPEBYTE, is a foreign tape that has records grouped in 79-byte blocks, and its blocking factor is 10. The FILE command in the example instructs FCOPY to treat TAPEFILE as if each block of the file were a single record, by defining the record length as the original record length times the blocking factor (790), and defining the new blocking factor as 1. The FCOPY command instructs FCOPY to copy the file, extracting 79-byte records from each block.

   >:FILE TAPEBYTE;REC=-790,1,U,ASCII

   >FROM=*TAPEBYTE;TO=DISC1;DEBLOCK=-79
Feedback to webmaster