You can use the LIST command to print or display records from a disk or tape input file or from a file located on another host system.
Syntax
──┬─ LIST ───┬─┬─<file title>───────────┬──────────────────────────────► ├─ LISTAN ─┤ ├─<long file title>──────┤ └─ LAN ────┘ ├─<directory title>──────┤ ├─<long directory title>─┤ ├─ UL ─┬─────────────────┤ │ └─<old specs>─────┤ └─ FR ─┬─────────────────┤ └─<old specs>─────┘ ┌◄────────────┬──────┬────────────┐ │ └◄─ , ─┘ │ ►─┴─┬─────────────────────────────┬─┴──────────────────────────────────┤ ├─ ( ──<file attributes>── ) ─┤ ├─<print option>──────────────┤ ├─/1\─<format definition>─────┤ ├─<record range list>─┬───────┤ │ └─<key>─┤ ├─<skip specification>────────┤ ├─ TRAINID ── = ──<train ID>──┤ ├─ SKIPTM ──<integer>─────────┤ ├─ STREAM ──<integer>─────────┤ ├─ PRINT ─────────────────────┤ └─/1\─<key>───────────────────┘
Explanation
LIST <file title>
LIST <long file title>
Lists the file in EBCDIC format. If the INTMODE attribute value is not EBCDIC, DUMPALL converts all characters to EBCDIC representation for output.
By default, INTMODE is set to the value of the EXTMODE attribute of the file named in the LIST command. But you can explicitly set the values of INTMODE and EXTMODE that you want DUMPALL to use.
If the file title does not include an ON <family name> clause and the file attributes you specify do not include KIND or FAMILYNAME, DUMPALL searches for one of the following matching files:
-
For a disk file with a matching file name
-
For a tape file with a matching file name
-
For a card file with a matching file name
LISTAN <file title>
LISTAN <long file title>
LAN <file title>
LAN <long file title>
List the file in a particular format depending on the INTMODE attribute value of the file as follows:
INTMODE Value |
Print Option |
SINGLE |
EBCDIC, Hexadecimal |
HEX |
Hexadecimal |
EBCDIC |
EBCDIC, Hexadecimal |
ASCII |
ASCII, Hexadecimal |
By default, INTMODE is set to the value of the EXTMODE attribute of the file named in the LISTAN command. But you can explicitly set the values of INTMODE and EXTMODE that you want DUMPALL to use.
<directory title>
<long directory title>
Causes all files in the specified disk pack directory to be listed.
UL
UL <old specs>
Specify an unlabeled file—that is, a file with a LABELTYPE value of OMITTED.
Specify UL only for tape files. For UL, DUMPALL assigns the tape a default MAXRECSIZE and a BLOCKSIZE value of 1500 words. If you specify file attribute values other than the default values, DUMPALL assigns those values. If the attribute values are incorrect, the list might be incomplete.
UL specifies that an input file has a KIND attribute value of TAPE and has no label. UL does not require an unlabeled tape; it merely specifies that the tape be treated as unlabeled. When you use UL, it is not necessary to specify a KIND attribute value of TAPE. DUMPALL ignores UL for disk and pack files.
When you use UL for an input file whose options do not include SKIPTM or MULTI, DUMPALL can read more than one physical tape. When DUMPALL reads a tape mark from one tape, it closes that volume and attempts to open the next volume. The system then displays the “NO FILE” RSVP message for the next volume. You must respond to the RSVP message with either the FR (Final Reel) or the UL (Unlabeled) system command.
When you use an input file specification that includes SKIPTM or MULTI, UL is equivalent to FR—that is, DUMPALL uses only one physical tape. In this case, when DUMPALL reads a tape mark for the tape, the operating system does not attempt a volume switch.
<old specs>
Use old specs with unlabeled or nonstandard labeled tape files to assign values to the attributes INTMODE, MAXRECSIZE, and BLOCKSIZE. Refer to “Old Specs” later in this section for more information about <old specs>.
FR
FR <old specs>
Specify an unlabeled tape file that has only one reel, with reel switching suppressed—that is, the file has a LABELTYPE attribute value of OMITTEDEOF.
FR specifies that an input file has a KIND attribute value of TAPE and has no label. As in the case of UL, the tape used need not be an unlabeled tape. When you use FR, it is not necessary to specify a KIND value of TAPE.
The difference between the FR and the UL DUMPALL options is that when you use UL, DUMPALL reads a tape mark from the tape, closes the file, and does not generate a “NO FILE” RSVP message. Refer to “Handling Tape Files” later in this section.
(<file attributes>)
Causes DUMPALL to use the specified attributes when listing the file. If you specify the HOSTNAME file attribute, DUMPALL requests access to a file on a remote host system; in this case, Distributed Systems Services (DSS) requires that you also specify the KIND attribute. Refer to the File Attributes Reference Manual for more information about the KIND attribute.
Refer to “Understanding Structural File Attributes” earlier in this section for an explanation of the file structure, record size, block size, DEPENDENTSPECS attribute, and their effects on DUMPALL.
Refer to “Specifying Data or Character Set Translations” earlier in this section for an explanation of the effects of the EXTMODE and INTMODE file attributes on DUMPALL.
Specifies the format to be used when the file is listed. You can specify one or more print options.
If you specify a single print option and it is EBCDIC or ASCII, DUMPALL lists the record as one unit in the format specified in the print option. If you specify a single print option and it is REAL, DECIMAL, HEXADECIMAL, or OCTAL, DUMPALL lists the record in word-sized chunks.
If you specify more than one print option, DUMPALL lists the record in word-sized chunks, one format below the other on a page. Because DECIMAL is a subset of REAL, if you specify both, only REAL formatting takes place. Refer to “Print Option” later in this section for more information about <print option>.
Describes one or more fields of the record and their formats. If you do not specify any fields or formats in a print command, DUMPALL prints each record in full. If you specify any fields or formats in a print command, DUMPALL prints only the parts of the record you request. Refer to “Format Definition” later in this section for more information about <format definition>.
Specifies a group of records to be processed. Refer to “Record Range List” later in this section for more information about <record range list>.
Causes only the specified records of the file to be listed. If you use the <key> option with record range list, DUMPALL lists all files with the matching arguments. Refer to “Skip Specification” later in this section for more information about <skip specification>.
A key option allows you to select records based in part on the data in the records. Refer to “Key Option” later in this section for an explanation of <key>.
TRAINID = <train ID>
Specifies the train to be used on the printer when the file is listed.
The train ID can be any valid train ID. Refer to the File Attributes Reference Manual for a description of the TRAINID attribute and for a list of valid train IDs.
SKIPTM <integer>
Causes DUMPALL to skip past the number of tape marks specified, bypassing any records encountered between tape marks. Use SKIPTM to position an input tape at the first record of a file to be read. You can use SKIPTM only with an input file that you specify as UL or FR. SKIPTM 0 is equivalent to omitting the SKIPTM option.
Refer to “Description of Tape Formats” later in this section for an explanation of where tape marks appear on a tape.
STREAM <integer>
Specifies the number of records to list at a time. This is effective only if the file supports ANYSIZEIO = TRUE, and has a MAXRECSIZE value of 1. It can be used to reduce the otherwise voluminous output produced when a FILECLASS = CHARACTERSTREAM or FILECLASS = WORDSTREAM file is listed one record at a time.
When this type of listing is in effect, a SKIP specification still is in terms of records, but a KEY specification is in terms of output lines. An interactive SKIP command is relative to the first record in the previous display, not the last.
Used in interactive mode to cause the file to be listed on the printer instead of the terminal.
Example 1
Example 1 lists all files in the directory *SOU/999. The output goes to the printer.
LIST *SOU/999/= PRINT
Example 2
Example 2 lists an unlabeled EBCDIC tape file with 80-byte records, 10 records per block, in EBCDIC and hexadecimal formats after skipping two tape marks:
LAN UL EBC 80 800 CHAR SKIPTM 2
Example 3
Example 3 lists records 4, 5, 6, 7, 8, 13, 14, 15, and 100 through the end of the file in decimal format from a tape file named X:
L X(KIND=TAPE) DEC REC 4 THRU 8, SKIP 4 3, REC 100 THRU END
Example 4
Example 4 shows both a LIST command and the output from that command. The first number on the first output record is the record number (one-relative) of the record being listed. The letter E that follows the number specifies that the print option is EBCDIC. A vertical bar (|) separates the record number from the text; one space always follows the bar. A number appears at the end of the last line to indicate the total size of the record in print option units.
This example converts all characters in the file FILE1 to EBCDIC for printing. In this case, FILE1 has data.
LIST FILE1 E| ABCDEFGHIJKLMNOPQRSTUVWXYZ013456789...36
Example 5
Example 5 lists record 5 of the file MYFILE in EBCDIC format. The second line begins with byte 120 of the record. Bytes are the units used to specify offset when the print option value is EBCDIC. The record is 143 bytes long. A number in parentheses appears at the beginning of the second and all following lines to indicate the offset (zero-relative), in print option units, of the data listed on that line.
LIST MYFILE EBCDIC REC 5 5E| THIS IS THE DATA IN THE RECORD (0000120)E| MORE OF THE SAME RECORD...143
Example 6
Example 6 lists record 17 of the file ABC in hexadecimal format. The record is 60 digits (5 words) long. The second line begins with digit 48 of the record.
LIST ABC HEX REC 17 17H| 0123456789AB | 000000000000 | 12345AFE5400 | 333333333333 | (0000048)H| 000000000DFD |...60
Example 7
Example 7 lists record 120 of the file XYZ in decimal and EBCDIC formats. The record is 5 words (30 bytes) long. The ALPHA on line 3 indicates that the word has bit 47 ON and is not considered to be a numeric field. The REAL on line 3 indicates that the word is not an integer but a real number.
LIST XYZ DECIMAL EBCDIC REC 120 120D| 0 | 1 | 2 | E| ?????? | ?????? | ?????? | ---------------------------------------------------------- (0000003)D| ALPHA | REAL |...5 (0000018)E| RECORD | 120 |...30 ------------------------------------------
Example 8
Example 8 lists the contents of the file T/FILETHREE, which resides on one or more labeled tapes.
LIST T/FILETHREE (KIND=TAPE)
Example 9
Example 9 lists the third file of a multifile tape, which either is unlabeled or is to be treated as an unlabeled tape. Because SKIPTM is specified, only one input tape is used.
LIST UL SKIPTM 2
Example 10
Example 10 lists lines 2 through 20 that do not have "THIS" in columns 9 through 12 (the first column is column 1).
LIST FILE1 REC 2 THRU 20 KEY 8 NEQ "THIS"
Example 11
Example 11 lists lines 1 through 30 that have characters with a value less than or equal to "IN" in columns 9 through 10.
LIST FILE1 REC 1 THRU 30 KEY 8 <= "IN"
Considerations for Use
The LIST command can handle INDEXED and KEYEDIOII files. Since DUMPALL uses the KEYEDIOSUPPORT and the KEYEDIOIISUPPORT libraries respectively to access these files, deleted records are not listed.
If the KEYEDIOSUPPORT or KEYEDIOIISUPPORT libraries are not installed with the SL (Support Library) system command, then when an INDEXED or KEYEDIOII file is accessed by DUMPALL, DUMPALL terminates with the following message:
FILE <filename> OPEN ERROR: SUPPORT LIBRARY UNAVAILABLE