Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

@LIST - Print work file ranges or string variables

&pagelevel(3)&pagelevel

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

If only one column number is specified then the remainder of the line or
string variable is output as of this column. If the first column specification is
greater than the length of the line or string variable then the line or string
variable is ignored.

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
in @PRINT.. X.

N

The line numbers or the numbers of the string variables are omitted on
printing.

C int

EDT expects an EBCDIC line feed character as the first character in each
line in the specified column range. This generates a line feed during printing
but is not itself printed. The line feed character must be present in the
character set of the current work file or the current string variable (see
below). EDT bases its interpretation of this character on the meaning of the
equivalent EDF041 character.
Any characters which EDT cannot interpret in the first column result in a
simple line feed.

Values between 0 and 256 are permitted for int. If a value of int other than
0 is specified, EDT generates not only the line feeds present in the record
itself but also a form feed after int output lines (taking account of the form
and line feeds present in the record itself). If int has the value 0 then no
additional form feed is generated.

The value set here for the page size remains valid and therefore influences
all outputs to SYSLST.

If int is not specified, EDT uses the last page size setting defined with the
@LIST or @PAGE statement independently of whether int was specified
in combination with C or P. If there has been no previous @LIST modifying
the value of int then the default value 65 is assumed (see @PAGE
statement).

P int

EDT prefixes every output record with an EBCDIC line feed character.
When doing this, EDT only uses the EBCDIC feed characters Line feed
after printing each line or Form feed in the coding corresponding
to the character set for the output file in question (SYSLST or temporary file)
(see below).

Values between 0 and 256 are permitted for int. If int is not equal to 0
then a form feed is inserted exactly after every int lines. If int has the
value 0 then no form feed is inserted. The value set here for the page size
remains valid and therefore influences all outputs to SYSLST.

I

Printing starts immediately. This means that EDT writes the records that are
to be output to a temporary file (using the system file SYSLST97) and then
outputs these after closure to the defined standard printer by means of a
/PRINT-DOCUMENT command.

When ranges from a work file are output, the temporary file is created in the
character set used by the work file provided that this is an EBCDIC
character set. If not, the reference character set is used provided that this
is an EBCDIC character set. In all other cases, the temporary file is created
in the character set UTFE. If ranges of string variables are to be output then
the character set is determined in the same way for each individual string
variable. If the character sets determined in this way are all identical then
this character set is used, otherwise UTFE.

If the user is not authorized to create temporary files or if the system
administrator has prohibited the use of temporary files or if, for any other reason,
it is not possible to create the file or write its content then a @LIST
statement issued with the I operand is rejected with a corresponding error
message.

The I operand is only permitted in interactive mode. It is only of value if the
defined standard printer is able to reproduce the character set used for the
output correctly.

If I is not specified then the output is sent to SYSLST. If SYSLST is not
assigned to a file then printing does not start until after /LOGOFF. If SYSLST
is assigned to a file then users must initiate output themselves.

S

Eliminates the additional line feed which usually takes place before the first
output line.

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 using
LINE-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
ter


0020

20

40

40


No feed before printing, new line after
printing

00a0

c2a0

6741

41


One line feed before printing, new
line after printing

00e2

c3a2

68b0

42

â

Two lines feed before printing, new
line after printing

00e4

c3a4

689f

43

ä

Three lines feed before printing, new
line after printing

00e0

c3a0

6841

44

à

Four lines feed before printing, new
line after printing

00e1

c3a1

68aa

45

á

Five lines feed before printing, new
line after printing

00e3

c3a3

68b1

46

ã

Six lines feed before printing, new
line after printing

00e5

c3a5

68b2

47

å

Seven lines feed before printing, new
line after printing

00e7

c3a7

68b5

48

ç

Eight lines feed before printing, new
line after printing

00f1

c3b1

688f

49

ñ

Nine lines feed before printing, new
line after printing

0060

60

4a

4a

`

Ten lines feed before printing, new
line after printing

002e

2e

4b

4b

.

Eleven lines feed before printing, new
line after printing

003c

3c

4c

4c

<

Twelve lines feed before printing, new
line after printing

0028

28

4d

4d

(

Thirteen lines feed before printing,
new line after printing

002b

2b

4e

4e

+

Fourteen lines feed before printing,
new line after printing

007c

7c

4f

4f

|

Fifteen lines feed before printing, new
line after printing

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 SYSLST. The print-out (possibly initiated by the system) is not started until LOGOFF.

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 SYSLST without line numbers.

Print output

TRANSFERRED TO PAPER

IN ANY DESIRED FORM.

(3)

The two columns 12 and 13 of line 4 are to be output in hexadecimal to SYSLST.

Print output

4.0000 E3D6

(4)

All the lines are to be printed immediately.

Print output

As in (1). However, the following system message is also displayed:

% SCP0810 SPOOLOUT OF FILE 'XXX' ACCEPTED, TSN: 'XXX', PNAME: 'XXX'.

in order to confirm that the print job has been assigned.