casout

Starts a batch service execution process or administers a batch job.

Syntax:

casout {/res-name|/sprototype:host:port|/lservername}
       [/uuserid]
       [/ppassword]
       [/cgroup]
       [/gnumber]
       [/gnumber:reldd]
       [/doutput-dsn]
       [/iclasses]
       [/jjobnumber:step[:procstep]]
       [/knumber]
       [/mnumber]
       [/fnumber]

       [/qmessage-classes] 
       [/eIMScommand]
       [/wmpr-name]
       [/tprocess-ID]       
       [/v]
       [/nprinter-name]
       [/boutput-classes]
       [/xprinter-exit]

Connection parameters

Important: You must include only one of the following connection options.
/res-name
Connect to the named enterprise server. Defaults to ESDEMO.
Restriction: When calling this utility from JCL or from a WEB service (that is, when you are running the utility within a SEP) you cannot use the /r option to connect to the server. Where this is the case, you must use the /s or /l options to connect to the server.
/sprototype:host:port
Use the specified URL to find the enterprise server to connect to, for example stcp:localhost:9003.
/lservername
Look up the specified server name to find the enterprise server to connect to.

Security parameters

Important: You must include these details when the specified enterprise server is secure.
/uuserid
Authorization user ID.
/ppassword
Authorization password.
/cgroup
The sign-on group to be used when running commands.

Categories

JCL parameters
/gnumber
/gnumber:reldd
Display all sysout for job number number, or retrieve the relative DD for job number number.
/doutput-dsn
Output DSN for sysout retrieval. The /d option must precede the /g option.
/iclasses
Start an initiator to run jobs of the named classes.
/jjobnumber:step:procstep
Restart the job at the specified step/procstep. The procstep is optional.
/knumber
Kill job number number.
/mnumber:class
Modify job number number to use the specified class.
/fnumber
Flush the output of job number number.
IMS parameters
/qmessage-classes
Start an IMS Message Processing Region for the specified classes.
/eIMScommand
Execute the specified IMS command.
/wmpr-name
Name of the IMS MPR to be used.
Generic parameters
/tprocess-ID
Terminate the batch initiator, batch printer or IMS MPR that has the specified process ID.
/v
List all batch initiators, batch printers and IMS MPRs.
Printer parameters
/nprinter-name
Specifies the name of the physical device to be used by a new batch printer. This option is used with the /b and /x options.
/boutput-classes
Specifies the output classes to be handled by a new batch printer. This option is used with the /n and /x options.
/xprinter-exit
Specifies the name of the name of a printer exit to be associated with a new batch printer. Used with the /n and /b options.

Dependencies

  • You must have started the enterprise server before you can issue a casout command.
  • In order to successfully run the casout command, you must have execute permissions on the casout resource within the OPERCMDS resource class.

Comments

The /r, /s and /l options are alternatives and are mutually exclusive.

Examples

Starting an initiator for classes EFG on Enterprise Server JCLT:

casout /rJCLT /iEFG

Start a batch printer using the physical device "TestPrinter" for classes EFG on Enterprise Server JCLT:

casout /rJCLT /bEFG /n"TestPrinter"

Start a batch printer as in the previous example, but this time associate it with a printer exit (sampprnx):

casout /rJCLT /bEFG /n"TestPrinter" /xsampprnx

Start an IMS Message Processing Region for specified message classes:

casout /rJCLTT /q001

Return codes

When running casout from a command line, get the return code by running the following command:

echo %ERRORLEVEL% 
All functions
Code Description
0 Successful completion
Codes relating to job modification
Code Description
5 The job is actively processing, requeued
8 The job is not in the Output Hold status, or does not exist
8 The job is in the Output Hold status, requeued
8 The job is not in the Input Hold queue or does not exist for Release command
16 The job does not exist for Class command
99 You have attempted to invoke a sub-command that is not yet implemented
Codes relating to flushing jobs
Code Description
4 Job flushed
16 Job not flushed - see secondary error code returned in message
Codes relating to job output
Code Description
< 9 The job's log was retrieved
1 Job is in the Input Hold Queue
2 Job is being parsed for syntax
3 Job is in the Input Queue
4 Job is moving from Input Queue to "Actively processing"
5 Job is being processed
7 Job is complete and is in the Held Output status
8 Job is in the Complete queue, with an Output status
16 Invalid job number - you have attempted to retrieve sysout data for a non-existent job
16 Invalid job number or DD for job, retrieval request ignored
Codes relating to restarting jobs
Code Description
16 The job does not exist for restart
32 Restart processing is not turned on. You must set the ES_JES_RESTART environment variable in order to enable restart processing.
Codes relating to killing jobs
Code Description
16 The job is not active. Kill request ignored.
Codes relating to IMS command execution
Code Description
15 Commands must be preceded by a / (forward slash)
16 IMS command failed, no response from TMC
Codes relating to process termination
Code Description
8 SEP is not an initiator, printer, or IMS MPR
Codes relating to JES and IMS functions
Code Description
99 JES/IMS support is not enabled for the region, request rejected
Codes relating to security
Code Description
199 User specified is either not authorized to work with JCL or their password is not correct. Provide valid credentials.
Codes relating to connectivity
Code Description
15 Cannot connect to region. This might be because the region is not started, or the IP address or port are wrong.