Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

@INPUT (format 1) - Start @INPUT procedure

&pagelevel(3)&pagelevel

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
and the element name.

path1

elname

vers

Name of the library.

Name of the element.

Version of the required element (see the LMS User Guide [14]). If vers is
not specified or if *STD is specified then the highest available version of the
element is selected.

eltype

Type of element. Permitted type specifications are S,M, P, J, D, X, *STD as
well as freely selectable type names having one of these types as basic
type. If eltype is not specified then the default type specified with @PAR
ELEMENT-TYPE is used. The permitted element types and their meanings
are described in chapter “File processing”.

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
implicitly (if @PAR LIBRARY has been specified - otherwise the error
message EDT5181 is issued).

The operands elname, vers and eltype have the same meaning as when
a library is specified explicitly (see above).

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
procedure. The file name and the file attributes are stored in the Task File
Table. The file link name must not be specified as the special file name
*BY-PROGRAM. This results in the error EDT4923. If no file link name is
defined then the statement is rejected with the message EDT5480.

If the file link name is declared as the special file name *DUMMY then it is
treated as an existing empty file.

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 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).

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.

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.

PRINT

Each line of the procedure should be logged before it is executed. In
interactive mode, the output is written to SYSOUT and in batch mode it is written
to SYSLST.
Specifying PRINT also causes all error messages to be output and sets the
EDT error switch. Normally, the two messages EDT0901 and EDT4932 are
not output in procedures and the EDT error switch is not set (see section
“Message texts”).

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.