Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

@CREATE (format 1) - Check line

&pagelevel(3)&pagelevel

Format 1 of the @CREATE statement creates a line with the specified content.

Operation

Operands

F mode, L mode

@CREATE

line [:] [string[,...]] [,CODE=name]

line

The line number in the current work file that is to be created. If this line
already exists then it is completely overwritten.

:This must be specified if line cannot be unambiguously separated from string.

string

One or more strings which are to be joined in the specified order and
inserted as a line.

name

Character set that is to be defined for the current work file if this is empty
and has the character set *NONE.

During the first step, the character strings specified in string are joined to one another. If all the strings involved have the same character set then the intermediate result is also assigned this character set. If the involved strings have different character sets then the intermediate result is assigned the character set UTFE.

If, after conversion, the intermediate result exceeds the maximum length of 32768 characters then it is truncated to the maximum length and message EDT2400 is output.

If the CODE operand is not specified and the current work file is empty and has the character set *NONE then the intermediate result is inserted in the line without being converted. The character set used for the intermediate result is assigned to the work file.

If the CODE operand is specified and the current work file is empty and has the character set *NONE then the intermediate result is converted into the character set name before being inserted. Precisely this character set is then defined 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 *NONE then the @CREATE statement is not executed and the message EDT5458 is issued.

If the CODE operand is not specified and the current work file already has a character set then the intermediate result is converted into the work file's 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 string is not specified then the line is created as an empty line (line of length 0). The character set EDF041 is defined for the current work file if this is empty and has the character set *NONE and the CODE operand has not been specified.

The @CREATE statement does not modify the current line number. This also applies if new lines are created after the end of the existing work file.

Example

A new line 3 is created with @CREATE.

The new line 3 is created from the content of the old line 3 joined to the new text
AND GETS LONGER

The new line 4 is created and consists of the joining of line 1, the text CHAINED WITH and lines 2 and 1.

EDIT LONG ON is input to make it possible to display the content of line 4 in full at the terminal.

A new line 4 is created. The new content of this line consists of joining columns 1 to 12 of line 1, the word FOURTH and columns 19 to 23 of line 2 in this order.

The work window then switches back to the default format.