The @LIST statement is used to output ranges of a work file or string variables to SYSLST
or at the printer. Unless specified to the contrary, every output line is prefixed by the line number and every output string variable is prefixed by the number of the string variable.
Operation | Operands | F mode, L mode |
@LIST | [ {lines | svars} [:cols[:]] [ X ] [ N ] [{ C [int] | P int}] [ I ] [ S ] ] [,...] |
lines svars cols | The line range to be output. The range of string variables whose contents are to be output. Column range for output in the current work file or in the specified string If only one column number is specified then the remainder of the line or If no column range is specified then the line or string variable is read in full. |
X | The lines are printed in hexadecimal form. The output format is the same as |
N | The line numbers or the numbers of the string variables are omitted on |
C int | EDT expects an EBCDIC line feed character as the first character in each Values between The value set here for the page size remains valid and therefore influences If |
P int | EDT prefixes every output record with an EBCDIC line feed character. Values between |
| Printing starts immediately. This means that EDT writes the records that are When ranges from a work file are output, the temporary file is created in the If the user is not authorized to create temporary files or if the system The If |
S | Eliminates the additional line feed which usually takes place before the first |
If neither lines
nor svars
is specified then the entire current work file is output.
If neither P
nor C
is specified, EDT generates feed characters as in the case of P
and the last page size value set using @LIST or @PAGE is used.
If EDT generates the feed characters then it takes account of the set or specified page size and usually generates an additional line feed before the first line of every range. This operation is only omitted if the S
operand is specified or if this line is output at the start of a page. A line feed is inserted in the output after every 132 characters (or 160 characters if job switch 6 is set).
When ranges in a work file are output, these are converted from the character set used in the work file into the character set used for SYSLST
or the character set of the temporary file (see the description of the I
operand. When ranges of string variables are output, each string variable is converted from the character set assigned to it into the character set used for SYSLST
or the character set of the temporary file (see the description of the I
operand. If characters are found which do not correspond to a valid character in the target character set then these are replaced by a substitute character if such a character has been specified (see @PAR SUBSTITUTION-CHARACTER). Otherwise blanks are used.
The EBCDIC and ASA feed characters in BS2000 are valid characters in every employed 8-bit or Unicode character set and can therefore always be edited in EDT even if they cannot be displayed. This is particularly true of the feed characters which are interpreted or inserted by EDT (see the C
and P
operands. As a result, some feed characters are coded as Unicode characters with more than one byte (see the table below).
In the case of print files which are present in a Unicode character set (e.g. SYSLST), the BS2000 SPOOL subsystem converts the feed character from the print file's Unicode character set into EDF041
and interprets the resulting character as explained in the User Guide, Commands, Volume 3 [10], description of the /PRINT-DOCUMENT
command. Conversion is only performed if the file is printed usingLINE-SPACING=*BY-EBCDIC-CONTROL
or LINE-SPACING=*BY-ASA-CONTROL
. In the case of files that are to be printed using LINE-SPACING=*BY-IBM-CONTROL
no conversion is performed. In these files, the feed characters are not usually valid Unicode characters with the result that they cannot be processed in EDT. If the print file possesses a 7-bit or 8-bit character set then, as in the past, SPOOL interprets the feed character without converting it.
The codings of the EBCDIC feed characters interpreted or generated by EDT are given below for a number of character sets:
UTF16 | UTF8 | UTFE | EDF041 | Charac | |
0020 | 20 | 40 | 40 | No feed before printing, new line after | |
00a0 | c2a0 | 6741 | 41 | One line feed before printing, new | |
00e2 | c3a2 | 68b0 | 42 | â | Two lines feed before printing, new |
00e4 | c3a4 | 689f | 43 | ä | Three lines feed before printing, new |
00e0 | c3a0 | 6841 | 44 | à | Four lines feed before printing, new |
00e1 | c3a1 | 68aa | 45 | á | Five lines feed before printing, new |
00e3 | c3a3 | 68b1 | 46 | ã | Six lines feed before printing, new |
00e5 | c3a5 | 68b2 | 47 | å | Seven lines feed before printing, new |
00e7 | c3a7 | 68b5 | 48 | ç | Eight lines feed before printing, new |
00f1 | c3b1 | 688f | 49 | ñ | Nine lines feed before printing, new |
0060 | 60 | 4a | 4a | ` | Ten lines feed before printing, new |
002e | 2e | 4b | 4b | . | Eleven lines feed before printing, new |
003c | 3c | 4c | 4c | < | Twelve lines feed before printing, new |
0028 | 28 | 4d | 4d | ( | Thirteen lines feed before printing, |
002b | 2b | 4e | 4e | + | Fourteen lines feed before printing, |
007c | 7c | 4f | 4f | | | Fifteen lines feed before printing, new |
0041 | 41 | c1 | c1 | A | Page feed before printing |
When interpreting feed characters, EDT also accepts the EBCDIC control characters x'00'..x'0F'
(or their equivalents in other character sets) and interprets them as x'40'..x'4F'
. However, when output is written in the character set UTF8
or UTFE
, EDT never generates feed characters that are coded with more than one byte. Instead it generates the corresponding number of single line feeds.
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
The system files SYSLST
and SYSOUT
should only be assigned to files or library elements with a Unicode character set if it is certain that only EDT sends output to these files. Otherwise files containing invalid characters could be created since other system components do not usually take account of the character set assigned to SYSLST
or SYSOUT
.
Example
6. @PRINT 1.0000 THE @LIST STATEMENT 2.0000 PERMITS THE CONTENTS 3.0000 OF A WORK FILE TO BE 4.0000 TRANSFERRED TO PAPER 5.0000 IN ANY DESIRED FORM. 6. @LIST --------------------------------------------------------- (1) 6. @LIST 4-5 N --------------------------------------------------- (2) 6. @LIST 4 :13-14 X ---------------------------------------------- (3) 6. @LIST & I ----------------------------------------------------- (4)
(1) | The entire content of the work file is to be output to Print output 1.0000 THE @LIST STATEMENT 2.0000 PERMITS THE CONTENTS 3.0000 OF A WORK FILE TO BE 4.0000 TRANSFERRED TO PAPER 5.0000 IN ANY DESIRED FORM. |
(2) | Lines 4 to 5 are to be output to Print output
|
(3) | The two columns 12 and 13 of line 4 are to be output in hexadecimal to Print output
|
(4) | All the lines are to be printed immediately. Print output As in (1). However, the following system message is also displayed:
in order to confirm that the print job has been assigned. |