NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
C-115
COPY Command
The conversion is done without regard to the data types of fields or columns of the
input, so undesired changes to the data can occur if you use EBCDICOUT with
input that is not composed of simple character data.
FOLD
(for copying to Enscribe files only) divides input records that are longer than
RECOUT out-record-length into as many out-record-length records
as needed to copy the entire input record. If the last record written is shorter than
out-record-length because of a FOLD, and you specify PAD, padding
occurs. If you omit FOLD, truncation occurs when an input record is longer than the
output file's record length.
PAD pad-character
(for copying to Enscribe files only) pads output records that contain less than out-
record-length bytes with pad-character, up to the record length specified
in the file label of the output file. Specify pad-character as a single ASCII
character inside quotation marks (“c”) or as a numeric literal in the range 0 through
255, representing the byte value of the character.
RECOUT out-record-length
(for copying to Enscribe files or tapes only) specifies the maximum length of an
output record in bytes. The actual number of bytes written for each output record
(the write count) depends on whether you also specify PAD:
If you do not specify PAD, the write count is either the read count or out-
record-length, whichever is less.
If you specify PAD, the write count is out-record-length.
In either case, if the number of input bytes exceeds out-record-length,
the input record is truncated at output-record length bytes (unless you specify
FOLD).
If you omit RECOUT and out-file is not a labeled tape, COPY determines
the out-record-length as follows:
°
If you specify out-block-length as less than or equal to 4096, the
value of out-block-length is used for out-record-length. If
out-block-length is greater than 4096, out-record-length is
4096.
°
If you do not specify out-block-length and if out-file is an
unstructured disk file, then if in-file is an SQL table, VAROUT is not
specified, and no display option was specified, out-record-length is
the length of the logical record specified by TARGETREC, or—if
TARGETREC is not specified—the length of the logical record implied by
the description of the input table. Otherwise, out-record-length is
132.
°
If you do not specify out-block-length and if out-file is a process
file, out-record-length is 132.