NAME

sqlist - display job queue


SYNOPSIS

sqlist [ -options ] [ job number ... ]


DESCRIPTION

sqlist outputs a table on standard output showing jobs on the GNUspool spool queue, including those queued on other hosts on the network.

Each line of the output corresponds to a single job, and by default the output is generally similar to the default format of the jobs screen of the spq(1) command, something like:

 0024139     jmc report1 a4      23K 1 150
 0026921     jmc prgm.c  listing 12K 1 150
 red:0021941 pbt report  a4.lh   17K 2 150

The first field on each line is the numeric job number, preceded by a host name and a colon if on a remote machine.

Various options described below enable the user to control the output in various ways. The job data itself may also be extracted.

To limit the output to information about a given job or jobs, job numbers may be placed on the command line.


OPTIONS

The environment variable on which options are supplied is SQLIST and the environment variable to specify the help file is SPRESTCONF.

-? or +explain

causes a summary of the other options to be displayed without taking further action.

-C nnnn or +classcode nnnn

restricts attention to jobs matching the class code given. This may be reduced further by the user's class code unless he/she has override class privilege.

-D or +default-format

cancel a -F option and restore the default format.

-e or +no-page-counts

do not try to represent page numbers and counts on the output (this only affects the default format).

-E or +page-counts

do try to represent page numbers and counts on the output (this only affects the default format).

-F string or +format string

Specify user defined output format. The string argument contains characters to be printed and symbols representing the required data fields. This option overrides and preceding -D option, and is itself overridden by a following -D option.

See the section on format codes for details of the format code sequences.

-H or +header

generate a header for each column of the output according to the field displayed there. The headers are taken from the message file, by default rest.help, which may be adjusted as required.

-l or +local-only

display only jobs local to the current host.

-N or +no-header

cancel the -H option.

-n or +no-view-job

cancel the -V option.

-P range or +view-pages range

with the -V option, specify a range of pages to output.

A range may consist of single page numbers or subranges separated by commas, thus:

        -V -P 1
        -V -P 1,3,4-9
        -V -P 2-7,12-

such arguments would respectively select page 1, pages 1, 3 and 4 to 9 and pages 2 to 7 and 12 to the end. Omitted numbers either side of the - denote ``the beginning'' and ``the end''.

-p or +printed-jobs

restricts attention to jobs which have been printed.

-q name or +list-only name

List only jobs for, or which could be printed on the specified subset of printers. The set of printers may contain just one name, a list of names or a list of patters for matching printer names. Shell-like pattern matching applies to the pattern. You may well need to put quotes around the pattern to avoid misinterpretation by the shell.

This is further described in the pattern arguments section.

To cancel this argument, give a single - sign as an argument.

-r or +remotes

display jobs local to the current host and connected hosts.

-t string or +just-title string.

restricts attention to jobs whose title matches the pattern given.

The pattern is further described in the pattern arguments section.

-u user or +just-user user

restricts attention to jobs owned by the given user or list of users given by a pattern.

The pattern is further described in the pattern arguments section.

-V or +view-job

cancel the job listing output and send the text of the job or jobs to standard output.

-Y or +all-jobs

displays all jobs, canceling -y or -p.

-y or +unprinted-jobs

restricts attention to jobs which have not been printed.

-z or +include-null

when listing jobs restricted by a -q argument, include jobs with no destination printer.

-Z or +no-include-null

when listing jobs and printers restricted by a -q argument, do not include jobs without a destination printer.

+freeze-current

Save all the current options in a .gnuspool file in the current directory.

+freeze-home

Save all the current options in a .gnuspool file in the user's home directory.

Patterns

The -q, -t and -u options may all be given a name, a comma-separated list of names or shell-like wildcard patterns. The patterns all take the standard form:

* matches anything
? matches a single character
[a-mp-ru] matches any one character in the range of characters given
[!n-z9] matches any one character not in the range of characters given

Be careful to enclose these sequences in quotes in case the shell misinterprets them.

For example

        sqlist -q ljet,ptr3
        sqlist -q 'ptr*,lp[1-9]'
        sqlist -u 'j*'
        sqlist -t 'Acc*'

Format codes

The format string consists of a string containing the following character sequences, which are replaced by the corresponding job parameters. The string may contain various other printing characters or spaces as required.

Each column is padded, usually on the right, to the length of the longest entry. If a header is requested, the appropriate abbreviation is obtained from the message file and inserted.

%%

insert a single % sign

%A

wattn if the write attention message flag is set.

%a

mattn if the mail attention message flag is set.

%C

class code

%c

copies (right-justified)

%D

page delimiter

%d

delimiter number

%F

post-processing flags

%f

form type

%G

``halted at'' page number.

%H

hold time

%h

job title.

%K

size of job in bytes

%L

position reached in bytes.

%l

local if local job only

%m

mail if mail completion flag set.

%N

job number, prefixed by host name if remote.

%O

odd/even/swap flags.

%o

originating host (might be different if via rspr(1)).

%P

printer destination

%p

priority.

%Q

page reached.

%q

retain if retained on queue.

%R

page range.

%S

size in pages.

%s

nohdr if header suppressed.

%T

delete time if not printed.

%t

delete time if printed.

%U

user name to be posted to.

%u

user name owned by

%W

submission or start time.

%w

write if write completion message flag set.

Note that the various strings such as nohdr etc are read from the message file also, so it is possible to modify them as required by the user.

The default format is

        %N %u %h %f %Q %S %c %p %P

with the (default) -E option and

        %N %u %h %f %L %K %c %p %P

with the -e option.


FILES

~/.gnuspool configuration file (home directory)

.gnuspool configuration file (current directory)

rest.help message file


ENVIRONMENT

SQLIST

space-separated options to override defaults.

SPRESTCONF

location of alternative help file.


SEE ALSO

splist(1), spq(1), sqchange(1), sqdel(1), spsyntax(5), gnuspool.conf(5), gnuspool.hosts(5).


DIAGNOSTICS

Various diagnostics are read and printed as required from the message file, by default rest.help.


AUTHOR

John M Collins, Xi Software Ltd.