The @GET statement fully or partially reads an ISAM file from disk into the current work file.
Operation | Operands | F mode, L mode |
@GET | [file] [(ver)] [lines[,...]] [:cols[,...]:] [NORESEQ] |
file | Name of the ISAM file that is to be read in. The name must correspond to If there is as yet no local @FILE entry for the work file then, if the statement If the specified file does not exist or cannot be accessed as required then If the file link name |
ver | Version number of the file that is to be read. If the specified version number |
lines | One or more line ranges that are to be read in from the ISAM file. If symbolic If The line numbers specified with |
cols | One or more column ranges which define the section to be read in from If no column range is specified then the lines are read in full. |
NORESEQ | The line numbers are formed from the ISAM keys of the ISAM files that are In this case, EDT checks whether a valid line number is present in the If |
The file is only opened during the read operation. Records which consist solely of the key are read in as empty lines. If the file to be read in is empty, warning EDT2903
is output.
If the current work file is empty and has the character set *NONE
then it is assigned the character set of the file that is to be read in. If this character set is *NONE
then the work file is assigned the character set EDF03IRV
.
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 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 file read is aborted and error message EDT5453
is output. This also applies if there are invalid characters outside of the column range that is to be read. In contrast, invalid characters outside of the line range that is to be read in are ignored.
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.
Note
If a attempt is made to use @GET to read a SAM file then EDT issues the error message EDT1902
and sets the switch for EDT errors. It nevertheless reads the specified file by performing an internal @READ for this file. In this case, the lines
or NORESEQ
operands are ignored.