Parameters

jobname
The name of the batch job, started task, or APPC/MVS transaction program you want to end.

The name of a started task is based on whether the JOBNAME= keyword was specified on the START command.

If JOBNAME= was specified, jobname is the name assigned to the started task.

If JOBNAME= was not specified and the source JCL for the started task is
  • A job, the system will use the job name from the JCL JOB statement.
  • A procedure, the system will use the member name as the job name.
Notes:
  1. When you use the FORCE command to end a job in execution, you also terminate the address space for the job and any other tasks executing in that address space. If you use FORCE for a job running under an initiator, you terminate the initiator along with the job. With JES2 on your system, you must issue another START command to recover use of such an initiator. With JES3 on your system, this additional START command might not be necessary.
  2. When you force an APPC/MVS transaction program, you can find jobname (the transaction program's name as specified in the TP PROFILE in the address space) on the output by issuing a DISPLAY ASCH,A command.
  3. Entering FORCE for an external writer while the system is allocating the writer to a job terminates both the device allocation and the writer itself. Entering FORCE for an external writer while the writer is processing output for a job terminates both the output processing and the writer itself.
[jobname.]identifier
The identifier for the unit of work to terminate, optionally preceded by the job name. You can specify the following types of identifiers:
  • The identifier that was specified on the START command.
  • [/]devnum, the device number that was specified when the START or MOUNT command was entered. The device number is 3 or 4 hexadecimal digits, optionally preceded by a slash (/). You can precede the device number with a slash to prevent ambiguity between the device number and a device type or identifier.
  • devicetype, the type of device specified when the START or MOUNT command was issued.
If no identifier was specified on the START command, the system assigns temporary identifier “STARTING” to the unit of work, until the system can assign an identifier according to the following order of precedence:
  1. If an identifier was not specified on the START command, the identifier is the device type (for instance, 3410) or device number (for instance, X'0000') specified on the START or MOUNT command.
  2. If an identifier, a device type, or a device number was not specified on the START or MOUNT command, the identifier is the device type specified on an IEFRDER DD statement (invoking a cataloged procedure) in the JCL.
  3. If none of the above was specified, the identifier defaults to the job name.

Specifying both the job name and the entire identifier causes the command to take effect if one and only one work unit with that combination of job name and identifier is running. If two or more work units with the same combination of job name and identifier are running, see the A=asid below.

U=userid
The user ID of the timesharing user to terminate.
If the user is just logging on and does not yet have a unique name, you must find out the address space identifier for the user (as explained under the A=asid parameter) and use the following version of the command:
FORCE U=*LOGON*,A=asid
Start of changeARMEnd of change
Start of changeThe system is to terminate the specified job, timesharing user, or started procedure if it is non-cancelable. If the FORCE ARM command fails to terminate the address space within a reasonable time, reissue the FORCE ARM command. The ARM parameter executes normal task termination routines without causing address space destruction. The system rejects this parameter if the address space for the specified job, timesharing user, or started procedure cannot be terminated or should be terminated using the CANCEL command. If the FORCE command still fails after several attempts, try issuing the FORCE command without the ARM parameter.
Note: This keyword is not related to the ARMRESTART parameter and the functions of the automatic restart manager.
End of change
A=asid
The hexadecimal address space identifier of the work unit to terminate.

If two or more work units are running with the same job name, identifier, combination of job name and identifier, or user ID that you specified on the FORCE command, the system rejects the command because it does not know which work unit to terminate. To avoid this, you must add the parameter A=asid to your original FORCE command in order to specify the address space identifier of the work unit.

To find out the address space identifier for a unit of work, you can use the DISPLAY command in one of the following ways:

DISPLAY JOBS,ALL
Lists the address space identifiers for all batch jobs and started tasks.
DISPLAY ASCH,ALL
Lists the address space identifiers for all APPC/MVS transaction programs.
DISPLAY TS,ALL
Lists the address space identifiers for all logged-on timesharing users.
DISPLAY OMVS,ASID=ALL or
DISPLAY OMVS,A=ALL
Lists the address space identifiers for all z/OS UNIX processes.
Start of changeARMRESTARTEnd of change
Start of changeIndicates that the batch job or started task should be automatically restarted after the force has completed, if it is registered as an element of the automatic restart manager. If the job or task is not registered, or if you do not specify the ARMRESTART parameter, the system will not automatically restart the job or task. The ARMRESTART parameter is not valid with the U=userid parameter.End of change
Start of changeTCB=ttttttEnd of change
Start of changeThe 6-digit hexadecimal TCB address of the task to terminate. Exactly six digits are required; leading zeroes are permitted. This command is rejected if the address space in which the task is running does not support the FORCE TCB command. Only use this command with the guidance of IBM Support.
RETRY=NO|YES
Only accepted for FORCE TCB. Indicates whether retry will be attempted on ABTERM. The default for RETRY is NO.
End of change

Examples

Example 1: To terminate an earlier MOUNT command for a 3380 device, enter:
FORCE 3380
Example 2: To terminate an earlier MOUNT command for the device number 3380, enter:
FORCE /3380
Example 3: To remove job JOBXYZ from the system, enter:
FORCE JOBXYZ
Example 4: To stop device allocation for writer 1AF and terminate the writer itself, enter during device allocation for writer 1AF:
FORCE 1AF
Example 5: To stop the output processing on a writer with device number B1AF and terminate the writer itself, enter:
FORCE /B1AF
Example 6: To log user A237 off the system, enter:
FORCE U=A237
Example 7: To terminate the non-cancelable job BIGTASK, enter:
FORCE BIGTASK,ARM
Example 8: To terminate the non-cancelable job SERVICE with the address space identifier of 1A8, enter:
FORCE SERVICE,ARM,A=1A8
Example 9: To FORCE an APPC/MVS transaction program whose job name is CALENDAR and whose address space identifier is 3B, enter:
FORCE CALENDAR,A=3B
Start of changeExample 10: To end the task whose TCB address is X'5E6D90' in the JOBA1 address space issue:
FORCE JOBA1,TCB=5E6D90
End of change