SUNLIST


 

The SUNLIST utility outputs the contents of a text file on the CRT, the system printer, or to a print image disk file. The command line syntax for SUNLIST is:

 

 

SUNLIST {input}[,{start}[,{spool}]][-{options}

Parameters:
input
The required file name to list.
start
The optional starting line number, record number or page number.
spool
The optional spool file name.
options
Options described below that control the action of the utility.

Note the following:

  1. If a drive specification is not given on {input}, the current path is searched followed by all search paths.

  2. If a file type is not given, it defaults to TXT with the following exceptions:

  3.  

    Option

    Defaults to

    A

    AAM

    F

    LST

    G

    LST

    I

    ISI

 

  1. Records may be of variable length and space compressed.

  2. SUNLIST does not work with Isam or Aam files with record lengths greater than 2048 bytes.

  3. The allowable parameters for {start} are as follows:

  4. L{nnn}

    Indicates to start listing at logical record number {nnn} within the text file. This option works with all types of files supported.

    R{nnn}

    Indicates to start listing at physical sector number {nnn} within the text file. A length of 256 bytes is used for the sector length. This only works with print files or standard text files.

    P{nnn}

    Indicates to start listing at page number {nnn} within the print format file. This option is only applicable to print files.

     

  5. {spool} indicates the name of a print file to be created on the disk. If no name is given, yet the 'P' or 'Q' options are specified, the {input} file name with an extension of LST is used.

  6. If {spool} is given without a file type, LST is assumed.

  7. If {spool} already exists, it is overwritten or extended.

  8. Allowable {options} are as follows:

  9. A

    List via AAM file. A key specification must be given and enclosed within single quotes or no records are displayed. Up to five (5) AAM keys may be given and each must be preceded by the 'A'. Under Linux, the single quotes must each be preceded by a \.

    B{prog}

    Chain to program {prog} at the conclusion of the list program.

    C{n}

    Print {n} copies. Default is one.

    D

    Display on terminal (default option). When displaying a file on the terminal, the F1 key pauses the display and then continues it when it has been pressed a second time. The F2 or ESCAPE key terminates the display of the file.

    E{x}

    Replace {x} with an ESCAPE (Hex 1B) when printing the data file. This allows for control characters to be embedded within the data file for printer control. This option is only checked if the 'F' option is specified and is valid for all output devices except the screen.

    F

    List a print formatted file.

    G

    List an ANSI print formatted file.

    H{n}

    Pause for {n} number of seconds after the list is finished.

    I

    List via ISI file. All records are listed unless a beginning key or line number is entered. If a beginning key is entered, it must immediately follow the 'I' option and must be enclosed in single quotes. Under Linux, the single quotes must each be preceded by a "\". When using the Windows Command Shell, replace single quote characters with double quote characters to enclose the Isam key when it has embedded blank characters.

    J

    Force a leading form feed before printing the file.

    K

    Delete the file after completion. This option is not valid with ISI and AAM files.

    L

    List on the system printer You can specify the header on the command line by enclosing the header in quotes or hash marks ( # ).

    N{n}

    Set the number of lines per page. This determines the number of lines written before a page advance. This option is not valid with print format files.

    P

    Output to a print format file.

    Q

    Append to an existing print format file. If the file is not found, it is created.

    R

    List by page in reverse order. Read the file from end of file forward (useful for laser printers).

    S{n}

    Indicates the starting byte location within each logical record. This then becomes the first character printed or displayed.

    T{n}

    Tab to column {n} before printing each line.

    U

    The specified file is an advanced printing spoolfile created with PRTPAGE operations.

    V

    Suppress final form feed.

    W

    Wrap option. List the entire record, even if it exceeds the output medium length.

    X

    List without line numbers.

    Z{n}

    Execute a Sunlist command upon completion of the list.

    ?

    Display the list help screen.

     

  10. The Z option causes the SUNLIST utility to execute one user defined command indicated by the value {n}. There may be as many as nine (9) commands defined in the environment table or program information file (INI) named 'SUNLIST_Z1=' through 'SUNLIST_Z9='. Any field named #FILE# or #file# that is found in a user defined command will be replaced with the current output file specification for the SUNLIST utility before the command is executed.

 

 

See Also: SUNLIST Examples, Utilities

 



System Utilities SUNINDEX SUNSCAN