NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
C-117
COPY Command
VAROUT terminates a block by writing a 1-word block terminator of -1 (%177777)
to indicate that there are no more valid records in the block, then padding the
remainder of the physical block. VAROUT cannot write the terminator when the
previous record ends on a block boundary or when out-block-length is odd
and only one byte remains in the block.
Empty or zero-length records are supported.
The PAD and FOLD options are not allowed with VAROUT.
The following sample block has a BLOCKOUT length of %30. The three records
“FRESNO”, “MUNICIPAL”, and “BANK” illustrate the action of VAROUT:
___________
| %000006 | <- Length indicator for record 1
| F R | <-
| E S | | Record 1
| N O | <-
| %000011 | <- Length indicator for record 2
| M U | <-
| N I | |
| C I | | Record 2
| P A | |
| L | <-
| %177777 | <- Block terminator (end of block)
| p p | <- Padding
|___________|
For the third record, BANK and its record-length indicator require six bytes,
beginning on a word boundary. Because only four bytes remain in the sample block,
VAROUT terminates the block and writes the BANK record to the next block.
display-option
(for copying to Enscribe files only) specifies the format for displaying the file:
O[CTAL] Display in octal and ASCII
D[ECIMAL] Display in decimal and ASCII
H[EX] Display in hexadecimal and ASCII.
BYTE Display in byte format and ASCII, convert each byte separately
A[SCII] Display in ASCII
NO HEAD Omit the heading preceding each record