Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

@XCOPY - Read POSIX file

&pagelevel(3)&pagelevel

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 xpath operand can also be specified as a string variable. It must be
specified as a string variable if the path name contains characters which
have a special meaning in EDT syntax (e.g. blanks, semicolons in F mode
or commas).

If the specified file does not exist or cannot be accessed as required then
the statement is rejected with a corresponding error message.

CODE=

Defines the character set that is to be assumed for the POSIX file. Since it
is not possible to assign character sets to POSIX files in the POSIX file
system, a user specification is required here.

If CODE is not specified then the character set defined in @PAR CODE is
assumed. When EDT starts, the value EDF041 is set.

name

Character set of the POSIX file that is to be read in. The name of a valid
character set must be specified for name (see section “Character sets”).

EBCDIC

The keyword EBCDIC is now only supported for reasons of compatibility and
is a synonym for the character set EDF041.

ISO

The keyword ISO is now only supported for reasons of compatibility and is
a synonym for the character set ISO88591.

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.