The mainframe job entry system (MVS/JES2) views RJE as a remote device. This topic provides a quick reference to the most-used JES2 remote commands. For more information about these commands, see your IBM manual or consult your host programmer.
There are two categories of JES2 commands.
Commands used to display information about the system, devices, or jobs in the system.
Commands used to control the JES2 system and operations for the jobs and devices under the operators jurisdiction.
Enter JES2 commands from a console as follows.
$verb operand1,operand2 |
Parameter |
Description |
$ |
The JES2 command identification character. You can insert blanks anywhere in the command after the initial $, but they are usually not necessary. |
verb |
A single-character verb that identifies the action to take. |
operand |
Modifies the verb or command or identifies the job or system facility to act on. Use commas to separate operands when you specify more than one operand. |
When you enter JES2 commands embedded in JCL, you must begin them with /* as follows.
/*$verb operand1,operand2 |
RJE devices (readers, printers, and punches) are operands in many of the commands. Device names consist of two parts: device type and device number. For example, RD1 is reader 1 and PR2 is printer 2.
Because many remote terminals Terminals that are located at sites removed from the computers to which they are attached. Remote terminals rely on modems and telephone lines to communicate with the host computer. have only one reader, one punch (if any), and one printer, most examples in this section use RD1, PU1, or PR1. You can specify up to 4 readers, 4 punches, or 7 printers, depending on the number and type of devices supported at your remote.
JES2 commands limit job or device manipulation to the remote operators jurisdiction. A job is under the operators jurisdiction if the jobs output is routed to that node or if the job was submitted from that node. If a job submitted to JES2 has not been routed by a /*ROUTE statement or a DEST parameter, the job output automatically routes back to the same facility that submitted it.
Operator command restrictions prevent outside manipulation or loss of a job and ensure the systems integrity.
JES2 operator commands allow remote terminal operators to communicate with the JES2 system. This section lists the most commonly used JES2 remote commands.
Command |
Controls or Displays |
$A release |
job |
$B backspace |
printer, punch |
$C cancel |
job, printer, punch, reader |
$D display |
job, queue |
$E restart |
printer, punch |
$F space forward |
printer, punch |
$H hold |
job |
$I interrupt |
printer, punch |
$L list |
job |
$N repeat |
printer, punch |
$O release |
job |
$P purge |
job, printer, punch, reader |
$R route |
job, queue |
$S start |
printer, punch, reader |
$T set device options |
printer, punch |
$Z halt |
printer, punch |
The $A command releases a job under the operators jurisdiction from hold. The job resumes normal processing. The operator can specify a job name or number with the $A command.
$A jobname |
Where jobname is the name of the job to be released from hold. |
$A Jnnnn |
Where nnnn is a single job number to release that job or a range of job numbers to release a series of jobs from hold. |
$A DATA |
Releases the job named DATA. |
$A J245 |
Releases job 245. |
$A J2-70 |
Releases all jobs with numbers ranging from 2 to 70. |
$A J245,J747 |
Releases only jobs 245 and 747. |
The $B command backspaces the job currently printing or punching. Operators can use this command when printer or punch malfunctions produce distorted output. They can reprint or repunch part of the output without restarting the entire job.
The $B command has two operands. The first operand identifies the printer or punch to backspace. The second operand gives the number of pages or lines to reprint or repunch or it tells the device to backspace to the beginning of the current data set.
When the operator backspaces printed output, the $B command counts page ejects (that is, skips to channel 1), not physical pages. If no pages eject, $B backspaces to the beginning of the data set.
$B dev,y |
where dev is a printer (PR1) or punch (PU1) and y is the number of cards to repunch, the number of pages to reprint, or the letter D, which indicates a backspace to the beginning of the data set. The number of cards or pages can range from 1 to 9999. If you do not specify a number, the system backspaces the printer one page or one line. |
$B PR1 |
Backspaces printer 1 one page (to the last page eject). |
$B PR2,5 |
Backspaces printer 2 five pages. |
$B PR1,D |
Backspaces printer 2 to the beginning of the data set. |
$B PU1,5 |
Backspaces punch 1 five cards. |
Operators can use the $C command to cancel a job or device under their jurisdiction. The $C command cancels a job on the printer, punch, or reader or a job awaiting execution.
When operators use the $C command on an output device, the command cancels only the active SYSOUT group on that device, it does not cancel other SYSOUT data sets for that job. To cancel a job on the output queue, use the $P command.
If the $C command does not cancel the job, the operator must reenter the command.
Operators can specify a job number or device with the $C command.
$C Jnnnn |
Where nnnn is the number of a job to cancel. |
$C dev |
Where dev identifies the device to cancel. For dev, substitute one of the following: RDn to cancel reader n. PRn to cancel printer n. PUn to cancel punch n. |
$C J545 |
Cancels job 545. |
$C PR1 |
Cancels the output currently printing on printer 1 and deletes other SYSOUT data sets for the job that matches the current setup for the printer. |
$C RD1 |
Cancels the job on reader 1. |
The $D command displays information about the system, a job, a device, or a set of devices.
The $D command format depends on the type of information the operator requests.
The Troubleshooting: Receiving jobs from the host topic provides examples of common uses for some of the $D commands.
$D F |
Displays the number of special forms jobs (and their job classes) waiting to print at the operators remote. |
$D Jnnnn |
Displays information about a job or a range of jobs under the operators jurisdiction. If nnnn is a single number, only job nnnn displays. If nnnn is a range of numbers, all jobs in that range display. For example, an operator can type $D J1-32767 and receive a list of all jobs in the system under that operators jurisdiction. If a job is not printing, make sure the jobs criteria (for example, form or class) matches the printers criteria with the $LJnnnn command. |
$D MRx,message |
Sends a message to the remote specified by x. The message can contain up to 53 characters. If x=0, the message goes to the host computer console. |
$D N,Q=y |
Displays the queued jobs, where y describes the type of jobs to display. For y, substitute one of these parameters: XEQ displays only jobs awaiting execution. XEQc displays only jobs awaiting execution that have the job class specified by c. PPU displays only jobs waiting for the printer or punch. HOLD displays jobs on hold. OUT displays jobs awaiting output processing. Job information and the percentage of spool use display. |
$D Q,Q=y |
Identical to $D N except that only the number of jobs displays rather than the job names and other information. |
$D U,RMTnnnn |
Displays information about the devices attached to the operators remote, where nnnn is the operators remote number. Information includes the STATUS (active, inactive, or drained), the current settings for FORMS and QUEUE, and WS (work selection criteria). |
$D jobname |
Displays a list of all jobs in the system with that job name, including jobs not under the operators jurisdiction. |
$D F |
Displays the forms queue for the remote. |
$D J244 |
Displays job 244. |
$D J234,J534 |
Displays jobs 234 and 534. |
$D J1-32767 |
Displays all jobs in the system under the operators jurisdiction. |
$D MR0,yes |
Sends a yes message to the host computer operator. |
$D N,Q=PPU |
Displays the jobs waiting to print or punch at the operators remote terminal. |
$D Q,Q=PPU |
Displays the number of jobs waiting to print or punch. |
$D U,LGN |
Displays the VTAM APPLID for JES2. |
$D U,PR1 |
Displays the parameters for printer 1. |
$D U,RMT4 |
Displays the status of devices at remote 4. |
$D DATA |
Displays information about the job(s) named DATA. |
The $E command restarts the job currently printing or punching. The operator can restart job output when print or punch output becomes damaged.
The $E commands single operand is the device to restart.
$E dev |
Where dev is the device. This command terminates current printing or punching and re-queues the print or punch output. |
$E PR1 |
Stops the current job printing on printer 1 and re-queues the entire print output. |
$E PU1 |
Stops the current job on punch 1 and re-queues the entire punch output. |
The $F command advances the job currently printing or punching. Operators can advance the job a specified number of pages or cards or to the end of the current data set. For example, they can forward space over a long program listing to print only the programs output data set.
The $F command has two operands. The first operand identifies the device. The second operand gives the number of pages or cards to forward space or tells the device to forward space to the end of the current data set.
When the operator forward spaces printed output, the $F command counts page ejects (that is, skips to channel 1), not physical pages. If no pages eject in the data set being printed, $F forward spaces to the end of the data set.
$F dev,y |
Where dev is the output device and y is either a number indicating the number of pages or cards to skip or the letter D to forward space to the end of the data set. If the device encounters the end of a data set during a forward space, printing or punching resumes at the beginning of the next data set. If the operator does not specify a y operand, a 1 is assumed. |
$F PR1 |
Forward spaces the output one page on printer 1. |
$F PR1,5 |
Forward spaces the output five pages on printer 1. |
$F PR2,D |
Forward spaces the output to the end of the data set on printer 2. |
$F PU1,6 |
Forward spaces the output six cards on punch 1. |
The $H command puts a job under the operators jurisdiction on hold. If a job is queued and on hold, the job remains queued and the system takes no action on the job. If the job is active, the job finishes its current activity and then re-queues. If a job is awaiting print, punch, or execution, it remains in that state until it is released. If a job is being read, it finishes being read and then enters the execution queue on hold. A job currently executing finishes execution and enters the print queue on hold.
The operator can specify a job name or number with the $H command.
$H jobname |
Where jobname is the name of the job to place on hold. |
$H Jnnnn |
Where nnnn can be a single job number to place that job on hold or a range of job numbers to place a series of jobs on hold. |
$H MYJOB |
Places the job named MYJOB on hold. |
$H J357 |
Places job 357 on hold. |
$H J240-500 |
Places all jobs ranging from 240 to 500 on hold. |
$H J250,J630 |
Places only jobs 250 and 630 on hold. |
The $I command interrupts the job currently printing or punching and queues the remaining portion for later printing or punching. The job resumes output according to job priority. The output automatically backspaces one page or card to prevent data loss.
The $I command allows the operator to interrupt a large job and print smaller jobs of higher priority. When the small jobs complete, the operator can resume printing the large job.
$I dev |
Where dev is the device to interrupt. |
$I PR1 |
Interrupts the job currently printing on printer 1 and re-queues the rest of the job for later printing. |
To print a short job with a priority lower than or equal to the job currently printing, complete the following steps.
Hold the job currently printing.
Interrupt the printer.
Start the short job and then release the job on hold.
The $L command displays output attributes for a job, including form name, FCB name, and class. JES displays the status of any jobs submitted from the remote that issued the command, regardless of the output's destination. Operators can use this command to print applications requiring special forms.
This command is particularly useful for determining why jobs are not printing. Typically, printing problems occur when the job criteria (form and class) do not match the printer criteria. Issue the $DJ1-32767 command to access the job name, then issue the $L command to view the job criteria.
$L Jnnnn,ALL |
Where Jnnnn is the job name. Operators can only specify one job name with this command. The ALL operand displays all attributes. |
$D J1-32767 |
Displays a list of queued jobs so the operator can obtain the job number (see $D). |
$L J1845,ALL |
Displays the attributes for job 1845. |
The $N command requests another copy of the output currently printing or punching. It does not terminate the activity in progress. If another output device is available, the copy begins printing or punching concurrently. If only one device is available, the copy prints or punches after the current activity completes.
Only the SYSOUT data sets that match the current output setup (class, forms, and so forth) will be duplicated. Operators can use this command to make copies of special forms output (for example, mailing labels) without duplicating all the job output or rerunning the job.
$N dev |
Where dev is the device. |
$N PR1 |
Places a copy of the output currently printing on printer 1 in the print queue to create duplicate output. |
$N PU2 |
Places a copy of the output currently being punched on punch 2 into the punch queue to create a duplicate deck. |
The $O command releases the output of a job under the operators jurisdiction from hold.
Operators can specify a job name or number with the $O command.
$O jobname |
Where jobname is the name of the job output to release from hold. |
$O Jnnnn |
Where nnnn can be a single job number to release that jobs output or a range of job numbers to release a series of jobs output from hold. |
$O MYJOB |
Releases the output of the job named MYJOB from hold. |
$O J357 |
Releases the output of job 357 from hold. |
The $P command stops device or job activity after the device or job completes the current activity.
If the operator specifies a job, the software flags it for purging. If the job is inactive, the software purges it. If the job is active, it completes its current activity and then the software purges it.
If the operator specifies a device, the software drains the device if it is inactive. If the device is active, the software sets it to drain. Then the device completes its current activity and drains. A device in the drained state will not start until the operator starts it.
Operators must use the $P command to cancel a job on the output queue because $C will not work.
Operators can specify a job number to purge or device to drain with the $P command.
$P Jnnnn |
Where nnnn is the number of the job to purge. |
$P dev |
Where dev is the device (for example, PR1, RD1, or PU1) to drain. |
$P J333 |
purges job 333. |
$P PR2 |
drains printer 2. |
$P RD1 |
drains reader 1. |
The $R command routes a jobs output the same way a /*ROUTE statement in JCL does. Operators can route the print or punch output of a job under their jurisdiction to another remote or to the host computer.
The operator can route jobs of a certain type or all jobs with the $R command.
$R type,J=Jnnnn,D=Ryy |
Where type is the type of output to route, nnnn is the number of the job to route, and yy is the destination of the routed output. For the operand type, substitute one of these values: PRT to route print output. PUN to route punch output. ALL to route both print and punch output. For the operand Ryy, substitute one of these values: LOCAL to route the output to the host computer. Rnnnn to route the output to another remote specified by nnnn. |
$R ALL,R=Rx,D=Ry |
Allows jobs routed to remote Rx to print at either Rx or Ry, whichever is available first. If the operator at remote Ry types this command: $R PRT,R=Ry,D=Rx The two remotes share a common print queue. The operator can negate this command by typing the following command: $R type,R=Rx,D=Rx This command only affects jobs currently in the queue. |
$R PUN,J=J234,D=LOCAL |
Routes the punch output of job 234 to the host computer. |
$R ALL,J=J345,D=R3 |
Routes all job 345s output to remote 3. |
$R PRT,J=J345,D=LOCAL |
Routes job 345s print output to the host computer. |
$R ALL,R=R2,D=R4 |
Allows jobs routed to remote 2 to print at remote 2 or remote 4. |
$R All,R=R2,D=R2 |
Cancels the alternate option. |
$R PRT,R=R1,D=R4 |
Routes all jobs originally routed to remote 1 to remote 4, including jobs awaiting execution. |
The $S command starts the specified device. This command negates a $P command for devices. If a job is awaiting processing, it becomes active.
$S dev |
Where dev identifies the device. Substitute one of these values: RDn to start reader n. PRn to start printer n. PUn to start punch n. |
$S RD1 |
Starts reader 1. |
$S PR1 |
Starts printer 1. |
The $T command sets the devices attributes. The $T command has several operands and uses.
$T dev,K=1 |
Causes the job currently printing on dev to single space after each print line to the end of the data set and ignore carriage control information supplied by the program. Operators can use this command to prevent a job from skipping lines between data lines because of a programming error. It single spaces to the end of the data set currently printing and can be negated by the $T dev,K=R command. |
$T dev,F=ffffffff |
Sets the printer to the special form specified by ffffffff, an eight-character special form name. The printer then only prints jobs with that special form name. STD indicates the printer will print only standard or regular forms (no special form was specified in the job). The printer must be inactive for this command to work. Drain the printer first with the $P command and wait until the printer drains before issuing the $T command. After each change of forms from the $T command, the system displays a LOAD FORMS message on the console when the next job starts on the printer. Reply with the $S command. |
$T dev,S=ddd |
Tells the system whether to print or punch separator (banner and trailer) pages or lines at the beginning and end of each job. The operand ddd is either YES or NO. Operators can use this option to write output to a computer disk. |
$T dev,Q (class) |
Where class lists from one to eight SYSOUT classes to be processed by this device. The default class is A for printers and B for punches. |
$T dev,WS=(criteria) |
Specifies the work selection criteria to determine which jobs will be allowed to print on a device and in what order. You can put one slash before or after a selection criterion. A minus sign before the criterion removes that criterion from the list. These criteria are commonly used: W Before the slash, the writer name for the output group must match the devices writer name. After the slash, matching is preferred but not necessary. Q (class) Unless you specify output classes, JES will search all output classes for work; therefore, always use the Q criterion. Before the slash, JES searches output classes in the order specified. After the slash, JES does not prioritize classes. R (destination/route) Before the slash, the output groups destination must match the devices route code (R=). If you specify multiple route codes, JES considers them to be in priority order and prefers a match with the first route code. After the slash, the output groups destination must match the devices route code, but if you specify multiple route codes, JES does not prioritize them. PRM (process mode) Before the slash, the output groups process mode must match the devices process mode (PRMODE=). If you specify multiple process modes, JES considers them to be in priority order. After the slash, the output groups process mode must match the devices process mode, but if you specify more than one mode, JES does not prioritize them. LIM (limit) Before the slash, the amount of output generated by an output group must be within the limits set for the device. JES checks page limits if the data set is in page mode and record limits if the data set is in line mode. After the slash, the limit is preferred but not necessary. F (forms) Before the slash, the forms specification of the output group and output device must match. After the slash, matching is preferred but not necessary. If the two do not match, a setup message ($HASP190) will be sent. FCB Before the slash, the output groups FCB must match the output devices FCB. After the slash, a setup message ($HASP190) will be sent if there are differences in both the FCB and FORMS specifications. UCS/ The output groups UCS must match the devices UCS (UCS=). |
$T PR2,F=2031 |
Sets printer 2 to form 2031. |
$T PR1,F=STD |
Sets printer 1 to the standard form. |
$T PR3,R=XYZ |
Sets printer 3 to route code XYZ. |
$T PR2,Q=ACDJS |
Sets printer 2 to classes A, C, D, J, and S. |
$T PR2,F=STD,Q=AC |
Sets printer 2 to the standard form and print classes A and C. |
$T PR1,S=N |
Deletes header and trailer pages from each job on printer 1. |
$T PR2,S=Y |
Causes header and trailer pages to print for each job on printer 2. |
$T PR1,X=N |
Suppresses JES2 translation of lowercase characters and control characters. |
$T PR2,S=Y |
Causes header and trailer pages to print for each job on printer 2. |
$T PR1,WS=(-F) |
Removes forms from printer 1s work selection, which means all forms can print. |
$T PR1,WS=(F) |
Adds forms to printer 1s work selection, and the form on the output group and output device must match (before the slash). |
$T PR1,WS=(/F) |
Adds forms to printer 1s work selection (after the slash). |
The $Z command immediately stops a printer or punch. After the device stops, the operator can restart it one of these ways:
The $E command starts reprinting or repunching the job from the beginning.
The $S command causes the job to resume where the operator stops it.
The operator can use $Z to check items like form alignment and paper feed without affecting the printed output.
$Z dev |
Where dev is the device to stop. |
$Z PR2 |
Stops printer 2 immediately. |