This format of the @INPUT statement starts an @INPUT procedure from a file. The statements and/or records in the file are processed sequentially.
For information on the structure and processing of EDT procedures, see section “EDT procedures”).
Operation | Operands | F mode, L mode |
@INPUT | { LIBRARY=path1 ([ELEMENT=] elname [(vers)] [,eltype]) ELEMENT=elname [(vers)] [,eltype] FILE={path2 | *linkname} POSIX-FILE=xpath [,CODE=name] } [PRINT] |
LIBRARY=... | The @INPUT procedure is defined by explicitly specifying the library name |
path1 elname vers | Name of the library. Name of the element. Version of the required element (see the LMS User Guide [14]). If |
eltype | Type of element. Permitted type specifications are |
ELEMENT=... | The @INPUT procedure is defined by the element name or by specifying the library name. The default library set with @PAR LIBRARY is used The operands |
FILE= path2 | The @INPUT procedure is defined by the name of a BS2000 file. Name of the file that is to be read in as an @INPUT procedure. |
*linkname | File link name of the BS2000 file that is to be read in as an @INPUT If the file link name is declared as the special file name |
POSIX-FILE= | The @INPUT file is defined by the path name of a POSIX file. |
xpath | Path name of the POSIX file that is to be read in as an @INPUT procedure. The |
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 |
Each line of the procedure should be logged before it is executed. In |
If the specified file does not exist or cannot be accessed as required or if the file cannot be read in successfully then the statement is rejected with a corresponding error message.
The @INPUT statement (format 1) must not be issued in @INPUT or in @DO procedures.
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.
The execution of an @INPUT procedure is terminated when the @RETURN statement or the last statement in the procedure has been executed.
If the @INPUT procedure contains records then these are inserted in the current work file in the same way data input in L mode (empty records are ignored). If the current work file is empty and has the character set *NONE
then it is assigned the character set of the file if records are inserted. If this character set is *NONE
then the work file is assigned the character set EDF03IRV
when records are inserted.
The statements or records read from the @INPUT procedure are interpreted in the character set corresponding to the specified file. If this character set is *NONE
then EDF03IRV
is used.
This character set may differ from the character set used in the current work file. Since statements always apply to the current work file and records are always inserted in the current work file it may therefore be necessary to convert literals in statements or records. If the file 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 execution of the @INPUT procedure is aborted with the error message EDT5453
.
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 execution of the @INPUT procedure is aborted with the message EDT5454
.