Disconnect Job (DSCJOB)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Disconnect Job (DSCJOB) command allows the interactive user to disconnect all interactive jobs at the workstation and return to the sign-on display.

Restrictions:

  1. A job being disconnected must be an interactive job.
  2. A job which is being held cannot be disconnected.
  3. A pass-through job cannot be disconnected unless the user has used the system request function to return to the source system from the pass-through target system.
  4. The command must be issued from within the job being disconnected, or the issuer of the command must be running under a user profile which is the same as the job user identity of the job being disconnected, or the issuer of the command must be running under a user profile which has job control (*JOBCTL) special authority. The job user identity is the name of the user profile by which a job is known to other jobs. It is described in more detail in the Work Management book.
  5. A job cannot be disconnected if PC organizer is active.
Top

Parameters

Keyword Description Choices Notes
LOG Job log *NOLIST, *LIST Optional, Positional 1
DROP Drop line *DEVD, *YES, *NO Optional, Positional 2
JOB Job name Single values: *
Other values: Qualified job name
Optional, Positional 3
Qualifier 1: Job name Name
Qualifier 2: User Name
Qualifier 3: Number 000000-999999
DUPJOBOPT Duplicate job option *SELECT, *MSG Optional
Top

Job log (LOG)

Specifies whether the job log for this interactive job is deleted or is included in the job's spooled output for printing. This entry takes precedence over the LOG parameter value specified for the job. This parameter has meaning only if the disconnected job is canceled due to the disconnect time interval being exceeded. The time interval is defined by system value QDSCJOBITV.

*NOLIST
The information in the job log is deleted.
*LIST
The job log, and the rest of the job's spooled output, is spooled for printing.
Top

Drop line (DROP)

Specifies whether the switched line attached to the work station is disconnected (dropped) if no other work stations on the same line are signed on. This parameter is ignored if the work station is attached to a nonswitched line.

*DEVD
The value specified in the Drop line at signoff (DROP) parameter of the work station's device description is used.
*YES
The switched line is disconnected when the job is ended if no other work stations are signed on the line.
*NO
The switched line is not disconnected when the job is ended.
Top

Job name (JOB)

Specifies the name of a job being disconnected from a work station. The job or jobs that are disconnected from a work station can be reconnected if the same user signs on the same work station.

Note: You must have job control (*JOBCTL) special authority to specify the name of an active or interactive job.

Single values

*
The jobs associated with the work station that issued this command are disconnected.

Qualifier 1: Job name

name
Specify the name of the job. If no additional job qualifiers are given, all of the jobs currently in the system are searched for the name of the job. If duplicates of the specified name are found, a qualified job name must be specified.

Qualifier 2: User

name
Specify the user name that identifies the user profile under which the job is started. Specifying the user as a qualifier is only necessary if a duplicate job name exists for different users. If a duplicate job name exists for the same user, the job must be qualified with the job number.

Qualifier 3: Number

000000-999999
Specify the system-assigned job number. Specifying the job number as a qualifier is only necessary if a duplicate job name exists for the same user.
Top

Duplicate job option (DUPJOBOPT)

Specifies the action taken when duplicate jobs are found by this command.

*SELECT
The selection display is shown when duplicate jobs are found during an interactive session. Otherwise, a message is issued.
*MSG
A message is issued when duplicate jobs are found.
Top

Examples

Example 1: Disconnecting All Interactive Jobs

DSCJOB

This command enables the user of the work station to disconnect all the interactive jobs associated with the work station. The switched line is dropped only if that is specified in the work station device description of this work station and if no other work station on this line is active. If the job is disconnected when the disconnect interval in the QDSCJOBITV system value is reached, the job is ended and the job log is not included with the job's spooled output.

Example 2: Disconnecting Job Without Releasing Switched Line

DSCJOB   LOG(*LIST)  DROP(*NO)

This command disconnects the interactive job, but the switched line is not released. If the job is ended due to the QDSCJOBITV system value, the job log is included with the job's spooled output.

Example 3: Deleting Information in Job Log

DSCJOB   LOG(*NOLIST)  DROP(*DEVD)  JOB(123497/DEPT1/DSP04)

This command disconnects the interactive job 123497/DEPT1/DSP04 and any other jobs on that work station, for example, secondary jobs or group jobs. If the job is disconnected when the disconnect interval in the QDSCJOBITV system value is reached, the job is ended and the job log is not included with the job's spooled output. The work station device description is checked to determine whether the switched line is disconnected.

Top

Error messages

*ESCAPE Messages

CPF1317
No response from subsystem for job &3/&2/&1.
CPF1321
Job &1 user &2 job number &3 not found.
CPF1332
End of duplicate job names.
CPF1333
Disconnect Job (DSCJOB) command not allowed for this job at this time.
CPF1344
Not authorized to control job &3/&2/&1.
CPF1351
Function check occurred in subsystem for job &3/&2/&1.
CPF1353
DSCJOB command not allowed for this job now.
CPF1354
DSCJOB command not allowed for this job now.
CPF1355
DSCJOB command not allowed for this job.
CPF1358
DSCJOB not allowed.
CPF1385
Disconnect Job (DSCJOB) command not allowed for this job at this time.
CPF1386
DSCJOB is not valid.
CPF1387
DSCJOB is not valid.
CPF1388
DSCJOB command not allowed at this device.
CPF1389
Disconnect Job (DSCJOB) command not allowed for this job at this time.
CPF1391
DSCJOB command not allowed for this job now.
CPF1656
Disconnect job not allowed for test request jobs.
Top