The SQ (Show Queue) command displays information about the jobs in one or all job queues.
The format of times in the response is controlled by the COMPACTSQ CONTROLLER option. If the option is reset, long format is used. Otherwise, short format is used.
Syntax

Explanation
SQ
Displays the queue number, fetch status, mix number, priority, usercode, queue entry time, start time (if it has one and the start time is in the future), and job name of the job at the head of each queue.
The job name field is constructed as follows:
-
If a job name is specified after the BEGIN JOB, the job name is displayed.
-
If the job has parameters, the name displayed is the job name followed by the parameters.
-
If no job name is specified, the string displayed is BEGIN JOB followed by the first 30 characters from the next WFL statement or declaration in the job.
-
If a job contains a FETCH specification, the job number is preceded by an F.
SQ <queue number>
Displays the fetch status, mix number, priority, usercode, queue entry time, start time (if it has one), and job name of every job in the queue denoted by <queue number>.
The CONTROLLER returns the following response for the SQ <queue number> if the queue number is not defined:
SPECIFIED QUEUE(S) NOT DEFINED
If the SQ <queue number> command is used and the system has no previously defined queues, the system returns the following response:
SYSTEM HAS NO QUEUES DEFINED
SQ <queue number> <number>
Displays all entries in the queue indicated by the queue number whose priority is equal to the second number.
SQ <queue number list>
Displays the fetch status, mix number, priority, usercode, queue entry time, start time, and job name of every job in the specified queues. The queues are displayed in the order specified in the queue number list.
Examples
Example 1
SQ
QUEUE 45 (FIRST OF 2 ENTRIES) 948 50 SCHEDULE/EIGHT QUEUED: Thursday, March 06, 2008 AT 16:38:23 STARTTIME = Friday, March 07, 2008 AT 08:00:00 QUEUE 511 (SINGLE ENTRY) 940 50 BACKUP QUEUED: Thursday, March 06, 2008 AT 16:36:01 QUEUE 1 NO ENTRIES
Example 2
SQ45
QUEUE 45 948 50 SCHEDULE/EIGHT QUEUED: Thursday, March 06, 2008 AT 16:38:23 STARTTIME = Friday, March 07, 2008 AT 08:00:00 950 50 SCHEDULE/TENPM QUEUED: Thursday, March 06, 2008 AT 16:38:51 STARTTIME = Monday, March 10, 2008 AT 20:00:00
Example 3
This example shows the same response as Example 2 with the COMPACTSQ CONTROLLER option set.
SQ45
QUEUE 45 948 50 SCHEDULE/EIGHT QUEUED: 03/06/2008 AT 16:38:23 STARTTIME = 03/07/2008 AT 08:00:00 950 50 SCHEDULE/TENPM QUEUED: 03/06/2008 AT 16:38:51 STARTTIME = 03/10/2008 AT 20:00:00