The @XCOPY statement is used to read a POSIX file which is stored in the POSIX file system into the current work file. This statement is now only supported for reasons of compatibility. In its place, users are recommended to use @COPY (format 1) with the operand POSIX-FILE
.
Operation | Operands | F mode, L mode |
@XCOPY | F ILE=xpath [, C ODE= { name | E BCDIC | I SO } ] |
xpath | Path name of the POSIX file that is to be read into the current work file. The If the specified file does not exist or cannot be accessed as required then |
CODE= | Defines the character set that is to be assumed for the POSIX file. Since it If |
name | Character set of the POSIX file that is to be read in. The name of a valid |
EBCDIC | The keyword |
ISO | The keyword |
The records read from the file are inserted after the last line in the current work file using the procedure “Insertion between two lines” (see section “Line number assignment”).
If the current work file is empty and has the character set *NONE
then it is assigned the character set specified in CODE
. If no character set is specified then the work file is assigned the character set defined using @PAR CODE.
If the work file already has a character set then the records that are to be read in are converted from the file's character set into the work file's character set.
If the file that is to be read in contains characters which cannot be displayed in the work file's character set then these characters are replaced by a substitute character provided that such a character has been specified (see @PAR SUBSTITUTION-CHARACTER); otherwise, the file is not read in and the error message EDT5453
is output.
If the file is present in a Unicode character set and contains an illegal byte sequence, e.g. surrogate characters, then it will be impossible to read it even if SUBSTITUTION-CHARACTERS
is specified. In this case, the read operation is rejected with the message EDT5454
.
If the statement is interrupted with [K2] and the EDT session is continued with /INFORM-PROGRAM
then the processing of the statement is aborted and message EDT5501
is output.