Format 3 of the @CREATE statement is used to read a string from the terminal or fromSYSDTA
and create a line with its content.
Operation | Operands | L mode |
@CREATE | line READ [string[,...]] [,CODE=name] |
line | The line number in the current work file that is to be inserted in a string. If |
string | One or more strings which are to be chained together in the specified order If |
name | Character set that is to be defined for the current work file if this is empty |
In interactive mode, the prompt formed from the operands is output at the terminal and a string is read. If the prompt formed from the operands exceeds the maximum length of 32763 bytes then it is truncated to the maximum length and error message EDT2402
is output. If string
is not specified then a string is read from SYSDTA
instead of from the terminal.
In batch mode, string
is ignored and the string is always read from SYSDTA
.
The maximum length of the read string depends on the input medium.
If the current work file already has a character set then the read string is converted into this character set before being inserted. If the string that is to be inserted 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 @CREATE statement is rejected and error message EDT5453
is output.
If the CODE
operand is not specified and the current work file is empty and has the character set *NONE
then the read string is inserted in the line without being converted. The communications character set is defined as the character set for the current work file.
If the CODE
operand is specified and the current work file already has a different character set then the character set then the @CREATE statement is not executed and the message EDT5458
is issued.
Entering [F1] without text at a terminal causes the specified line to be created as an empty line (line of length 0). Empty input that is sent with [DUE] or another function key is ignored and the prompt is output again.
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.
Example
1. @PROC 1 1. @CREATE 1 READ '*** NAME OF THE FIRST PARTICIPANT ?',CODE=UTF16 – (1) *** NAME OF THE FIRST PARTICIPANT ? SCHÖLLER 1. @PROC 2 ------------------------------------------------------- (2) 4. @PRINT 1.0000 MAIER 2.0000 LINE IS OVERWRITTEN 3.0000 SCHMIDT 4. @CREATE 2 READ '*** MUELLER OR MÜLLER ?' ---------------------- (3) *** MUELLER OR MÜLLER ? MÜLLER
(1) | The |
(2) | The character set EDF041 is defined for work file 2. |
(3) | The prompt |