Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

MOVE-JOBS

&pagelevel(3)&pagelevel

Import or export job descriptions

Component:

BS2000

Functional area:

Job processing

Domain:

JOB

Privileges:

TSOS

Function

The systems support staff can export or import job descriptions with the MOVE-JOBS command:

  • Job descriptions may be exported from an active job pool into an interim file. Batch jobs whose data is being transferred into the destination file, are deleted from the active job pool, i.e. waiting jobs are not started and active jobs are canceled.

  • Job descriptions may be imported again into an active job pool from a file or from an inactive job pool. Batch jobs whose data is being transferred into the active job pool, are deleted from the source file (interim file or inactive job pool).

Method

The command realizes the following two functions:

  • extracts jobs from the job pool and places them in an interim file

  • imports jobs from an interim file or an inactive job pool into an active job pool.

The interim file has the same format as a job pool file. Jobs may also be imported directly from an accessible inactive job pool file, without the use of an interim file. Either function may be started at any time in the course of a system run, provided that “Batch-System-Ready” has been reached during startup or system shutdown has not been initiated yet. No further instance of the MOVE-JOBS command is allowed while jobs are being exported.

When a batch job is exported it is always simultaneously eliminated from the active job pool (the user job is canceled) unless the job is currently being processed and *NO has been specified in CANCEL-RUNNING-JOBS.

This implicit cancellation differs from a cancellation using the CANCEL-JOB command, however. Temporary files, for instance, that may have been created by the JMS (S.IN, S.E, S.PROC files) are not deleted. A job variable that may be monitoring the job, receives the status ’$M’. The jobs are exported one after another, according to the selection criteria specified, i.e. the job descriptions are removed from the job pool and written into the specified file one after another.

The active JMS job scheduling is not affected by a lengthy export process. Jobs accepted in the course of an export process will also be considered. The JMS shows the same behavior as in a warm start as regards the import function. In contrast to a warm start, however, the JMS may not be able to take over the original TSN of a batch job, because it has already been assigned in the current system run. A new TSN will then be assigned. 

Format

MOVE-JOBS                                                                                                                   

Alias: MVJ

FROM-FILE = *STD (...) / <filename 1..54 without-gen> / *INACTIVE-SYSTEM-JOBPOOL(...)


*STD (...)



|

CANCEL-RUNNING-JOBS = *Y ES / *NO


*INACTIVE-SYSTEM-JOBPOOL(...)



|

PUBSET = <alphanum-name 1..4>

, TO-FILE = *STD / <filename 1..54 without-gen>(...)


<filename 1..54 without-gen>(...)



|

WRITE-MODE = *CREATE / *EXTEND

, SELECT = *BY-ATTR IBUTES(...) / *BY-TSN(...) / *ALL


*BY-ATTR IBUTES(...)



|

JOB-STATE = *ANY / list-poss(3): *INAC TIVE / *EXECUTING / *REPEAT



|

,PUBSET = *ANY / list-poss(16): <alphanum-name 1..4>



|

,JOB-NAME = *ANY / list-poss(16): *NONE / <alphanum-name 1.8>



|

,USER-IDENTIFICATION = *ANY / list-poss(16): <alphanum-name 1.8>



|

,JOB-CLASS = *ANY / list-poss(16): <alphanum-name 1.8>


*BY-TSN(...)



|

TSN = *ALL / list-poss(28): <alphanum-name 1..4>

, OUTPUT = <filename 1..54 without-gen>(...) / *DUMMY(...)


<filename 1..54 without-gen>(...)



|

SYSOUT = *Y ES / *NO



|

,SYSLST = *NO / *YES


*DUMMY(...)



|

SYSOUT = *Y ES / *NO



|

,SYSLST = *NO / *YES

, DIALOG-CONTROL = STD / *YES / *NO

Operands

FROM-FILE = *STD(...) / <filename 1..54 without-gen> / *INACTIVE-SYSTEM-JOBPOOL(...)
Source file from which the job descriptions are to be imported or exported.

FROM-FILE = *STD(...)
The job descriptions are exported from the current job pool file
($TSOS.SYSTEM.JOBPOOL on the home pubset).

CANCEL-RUNNING-JOBS = *YES / *NO
Specifies whether batch jobs that are to be moved and that are already being processed, are to be canceled or not.

CANCEL-RUNNING-JOBS = *YES
Batch jobs that are already being moved, are canceled.

CANCEL-RUNNING-JOBS = *NO
Batch jobs that are already being moved, continue as normal. They cannot be moved again.
In the case of repeat and calendar jobs, however, this only applies to the current instance of the job. Further repeats are not started.

FROM-FILE = <filename 1..54 without-gen>
The job descriptions are imported from the specified interim file (for inactive job pool files).

FROM-FILE = *INACTIVE-SYSTEM-JOBPOOL(...)
The job descriptions are imported from the inactive job pool file of another imported pubset.

PUBSET = <alphanum-name 1..4>
Catalog ID of the imported pubset.

TO-FILE = *STD / <filename 1..54 without-gen-vers>(...)
Name of the file into which the batch jobs are to be moved. This must be a file other than the file specified in the FROM-FILE operand.

TO-FILE = *STD
The batch jobs are moved (imported) into the current job pool file
($TSOS.SYSTEM.JOBPOOL on the home pubset).

TO-FILE = <filename 1..54 without-gen-vers>(...)
The batch jobs are moved into the specified destination file (export, e.g. into the job pool file of another pubset or into an interim file).

WRITE-MODE = *CREATE / *EXTEND
Specifies whether a new destination file is to be created or an existing one extended.

WRITE-MODE = *CREATE
A new destination file is created. If the file already exists the command is canceled.

WRITE-MODE = *EXTEND
The destination file is extended. If the file does not already exist, a warning is issued after which it is created.

SELECT = *BY-ATTRIBUTES(...) / *ALL / *BY-TSN(...) /
Specifies whether the number of batch jobs to be moved is to be restricted.

   
Note

When exporting from the active job pool, it is also possible to select, export or delete jobs that are essential for the normal operation of the system. Job management merely stops the job scheduler and the task under which the command is currently running from being exported.

SELECT = *BY-ATTRIBUTES(...)
Only jobs with the specified attributes may be moved.

JOB-STATE = *ANY / list-poss(3): *INACTIVE / *EXECUTING / *REPEAT
Specifies whether the job status may be a selection attribute. By default, only the inactive jobs may be selected.

JOB-STATE = *ANY
Jobs may be selected regardless of their status.

JOB-STATE = *INACTIVE
Inactive jobs that are not repeat jobs are selected.

JOB-STATE = *EXECUTING
Active jobs that are not repeat jobs are selected.

JOB-STATE = *REPEAT
All repeat jobs are selected.

PUBSET = *ANY / list-poss(16): <alphanum-name 1..4>
Specifies whether the pubset on which the command file for the job is located is to be the selection attribute.

PUBSET = *ANY
The pubset is not a selection attribute.

PUBSET = list-poss(16): <alphanum-name 1..4>
All jobs whose command files are on one of the specified pubsets are selected. As many as 16 pubsets can be specified in a list.

JOB-NAME = *ANY / list-poss(16): *NONE / <alphanum-name 1.8>
Specifies whether the job name is to be a selection attribute.

JOB-NAME = *ANY
The job name is not a selection attribute.

JOB-NAME = list-poss(16): *NONE / <alphanum-name 1.8>
The jobs with the specified names are all selected. Jobs without a job name are selected with *NONE. As many as 16 job names can be specified in a list.

USER-IDENTIFICATION = *ANY / list-poss(16): <alphanum-name 1.8>
Specifies whether the user ID under which a job is running is to be the selection attribute.

USER-IDENTIFICATION = *ANY
The user ID is not a selection attribute.

USER-IDENTIFICATION = list-poss(16): <alphanum-name 1.8>
All jobs with one of the specified user IDs are selected. As many as 16 user IDs can be specified in a list.

JOB-CLASS = *ANY / list-poss(16): <alphanum-name 1.8>
Specifies whether the job class is to be the selection attribute.

JOB-CLASS = *ANY
The job class is not a selection attribute.

JOB-CLASS = list-poss(16): <alphanum-name 1.8>
All jobs that are to run in one of the specified job classes are selected. As many as 16 job classes can be specified in a list.

SELECT = *ALL
All jobs are moved.

SELECT = *BY-TSN(...)
Only jobs with the specified TSN are moved.

TSN = list-poss(128): <alphanum-name 1..4>
TSN of the job to be moved. The default is *ALL, i.e. all jobs are moved.

OUTPUT = <filename 1..54 without-gen>(...) / *DUMMY(...)
Specifies whether and to which destination the result of the command (import or export) is to be output.

OUTPUT = <filename 1..54 without-gen>(...)
The command result is to be logged in the specified file (see section "MOVE-JOBS" for output format).

SYSOUT = *YES / *NO
Specifies whether the output is also to be copied to SYSOUT.
The default value is *YES, i.e. output is also copied to SYSOUT.

SYSLST = *YES / *NO
Specifies whether the output is also to be copied to SYSLST.
The default value is *NO, i.e. output is not also copied to SYSLST.

OUTPUT = *DUMMY(...)
The result of the command execution is not copied into a file. By default, the result is output only to SYSOUT.

SYSOUT = *YES / *NO
Specifies whether the log is to be output to SYSOUT.
The default is *YES, i.e. output is directed to SYSOUT.

SYSLST = *YES / *NO
Specifies whether the log is to be output to SYSLST.
The default is *NO, i.e. no output to SYSLST.

DIALOG-CONTROL = *STD / *YES / *NO
Specifies whether a dialog should be conducted with the user for control purposes during execution of the command in order to permit step-by-step command processing. If command processing is interrupted with [K2] then the control dialog is started. A control dialog is only possible in dialog mode but, in this mode, may also be used in procedures. In batch mode, all operand values have the same effect as *NO.

In the control dialog, the user is asked, following the successful processing of a batch job or interruption with [K2], by means of message JMS0523 whether command processing is to be continued. The SDF abbreviation rules apply to the entered response. To display the possible responses, enter a question mark. If the response contains a syntax error the query will be repeated up to 10 times. 

Syntax of the response to message JMS0523 (control dialog)

possible responses: *NO / *YES(...)


*YES(...)



|

DIALOG-CONTROL = *UNCHA NGED / *YES / *NO

Meaning of the responses

Response *NO
Processing of the MOVE-JOBS command is interrupted.

Response *YES(...)
Processing of the MOVE-JOBS command is continued. The subordinate operand DIALOG-CONTROL corresponds to the operand of the same name in the command and makes it possible to modify the associated settings. The operand value *UNCHANGED leaves the previous setting unchanged.

DIALOG-CONTROL = *STD
In the interactive dialog (SYSCMD is assigned to the operator terminal), the default value STD corresponds to the value *YES in procedures, and in batch mode to the value *NO.

DIALOG-CONTROL = *NO
The selected batch jobs are processed without any control query.

DIALOG-CONTROL = *YES

Whenever a batch job has been terminated successfully, a query is issued to ask whether processing should be continued.

Return codes

(SC2)

SC1

Maincode

Meaning


0

CMD0001

No error

2

0

CMD0002

Command executed with a warning


32

CMD0221

System error


64

JMS0630

Semantic error or privilege error (see SYSOUT message; e.g. processor or catalog ID unknown or MONJV not accessible)


64

JMS0640

File defective or not accessible, e.g. empty, not a PAM file, no access authorization


130

JMS0620

No storage space or no TSN available


130

JMS0660

Function currently not executable

 

Notes

  1. When job description data is transferred into the active job pool, the availability of resources or the authorization of the job issuer is not checked (as is the case when a job is accepted). Basically, the behavior of the JMS is identical to that in the event of a warm start, here. It is up to the systems support staff to make sure that the system environment is identical at the time the task is started to that at the time the job was initially accepted (command file, user attributes, default catalog, etc.). Before the job is imported, the system merely checks whether the job class and the user ID under which the job is to run are available. If they are not available, the job is not imported. JMS cancels the job, if inconsistencies are encountered when it is underway. Before the MOVE-JOBS command is used in a network, the job environment needs to be checked carefully. If JMS cannot start a job because the necessary conditions are not met, this is regarded as an abnormal termination from the viewpoint of JMS, i.e. the job is deleted from the job pool.

  2. JMS attempts to retain the TSN of a job. However, this cannot always be achieved, in particular when a job has been moved from another computer.

  3. The “Current image” and the “Next image” of a repeat job are treated as pertaining to one single job, i.e. both will be deleted from the active job pool, but only the next image will be imported into the interim file. The entire repeat job is then reconstructed from the next image when it is imported (same as startup). If the current image was in the system at the time of export and was then selected in the import, the next image will be changed back into its predecessor.

  4. After an export the S. files belonging to the jobs that were moved are released. During the import they will be locked again.

  5. The interim file created when jobs were exported can be used as a job pool in a warm start. In addition to the name convention for system job pool files and Note 1, the following must be observed:

    • In the case of a warm start, jobs cannot be taken over into the system if their TSN is already occupied by SPOOL. This situation is avoided if start-up is performed with the same EQUISAMQ that was active at the time of the export.
    • The jobs’ monitoring JVs are initially closed and have the status “$M”. Only when a job is terminated is the associated JV opened and the status reset to “$R”.

Format of the log file

The log file that is generated is an SAM file with a variable record length. The events that are logged, are contained in a record and can be identified by means of a four-position record type code. A sample export log and import log with explanations follow below. 

Example 1 (export log)
*HDR >  MOVE-JOBS   Date: 2012-03-23    Time: 13:50   ————————————————————————————   (1) 

*CMD >  FROM-FILE = *STD          ————————————————————————————————————————————————   (2) 
*CMD >                  ( CANCEL-RUNNING-JOBS = *YES )
*CMD >  TO-FILE   = JOBPOOL.112
*CMD >                  ( WRITE-MODE = *EXTEND )
*CMD >  SELECT    = *BY-ATTRIBUTES (
*CMD >                  JOB_STATE = *ANY
*CMD >                  PUBSET    = *ANY
*CMD >                  JOB-NAME  = *ANY
*CMD >                  USER-ID   = *ANY
*CMD >                  JOB-CLASS = *ANY
*CMD >                             )
*CMD >  OUTPUT    = HEMUL
*CMD >                  ( SYSOUT = *YES, SYSLST = *NO  )
*CMD >  DIA-CONTR = *NO

+KEY >    TSN   JSTATE    CAT   JNAME     UID       JCLASS       O-TSN  ——————————   (3) 

 EXT >    0AQS  *INACT    2V24  HEM11     TSOS      JCJS2XSB   ———————————————————   (4) 
 EXT >    0AQT  *INACT    2V24  HEM22     TSOS      JCJS2XSB
 EXT >    0AAK  *INACT    A     LUCKI     TSOS      JCJS2XSB
 EXT >    0CTC  *INACT    2V27  ENTPE     TSOS      JCJS2XSB
 EXT >    0AAL  *INACT    A     LUCKI     TSOS      JCJS2XSB
 EXT >    0AAM  *INACT    A     LUCKI     TSOS      JCJS2XSB
 EXT >    0AAN  *REPEAT   A     LUCKI     TSOS      JCJS2XSB
 EXT >    0AAQ  *REPEAT   A     LUCKI     TSOS      JCJS2XSB
 EXT >    0CUY  *INACT    2V27  ENTPE     TSOS      JCJS2XSB
 EXT >    0AEG  *INACT    G               TSOS      JCJS2XSB
 EXT >    0AEH  *INACT    G               TSOS      JCJS2XSB
 EXT >    0AEI  *REPEAT   G               TSOS      JCJS2XSB
 EXT >    0AEK  *INACT    G               TSOS      JCJS2XSB
 EXT >    0APY  *REPEAT   G               TSOS      JCJS3XSB   ———————————————————   (5) 
*REM >    0APX   CURRENT IMAGE OF      0APY                    ———————————————————   (6) 
 EXT >    0APU  *REPEAT   G               TSOS      JCJS3XSB

*REM >    0APT   CURRENT IMAGE OF      0APU
 EXT >    0APW  *REPEAT   G               TSOS      JCJS3XSB
*REM >    0APV   CURRENT IMAGE OF      0APW
#SYS >           RC FROM PAM WRITE     5678                   ————————————————————   (7) 
*WAR >           SOME JOBS COULD NOT BE PROCESSED             ————————————————————   (8) 
*WAR >    0APP 

Explanation

(1)

Heading line (record type *HDR)

(2)

Command entered (record type *CMD)

(3)

Normally (import or export successful) the information per job is output to the following columns:

TSN:

the job’s TSN at the time of export or assigned at the time of import (see also O-TSN)

JSTATE:

Job status

CAT:

Catalog ID of the pubset where the job’s command file is located

JNAME:

Job name

UID:

User ID under which the job runs

JCLSS:

Job class

O-TSN:

Only relevant for import. If a new TSN has to be assigned when the job is imported, because the TSN already exists in the system, the O-TSN (original TSN) column contains the job’s original TSN.

(4)

The information lines that follow begin with a process identification (record type *EXT for successful export or *IMP for successful import).

(5)

Export of a repeat job. Repeat jobs may exist in two forms, namely current image and next image. The MOVE-JOBS command only exports the next image, in order to avoid job duplication. If a current image exists during the export process, that will be deleted and reconstructed again from the next image on import. If possible, the current image will retain its TSN.

(6)

A current image existed when the repeat jobs was exported and was deleted (see item 5).

(7)

Example of a system error during command execution; it was not possible to read a PAM page.

(8)

Comprehensive warning message on command conclusion.

Example 2 (export log)
*HDR >  MOVE-JOBS   Date: 2012-03-24    Time: 08:49            ———————————————————   (1) 

*CMD >  FROM-FILE = *STD
*CMD >                  ( CANCEL-RUNNING-JOBS = *NO )
*CMD >  TO-FILE   = JOBPOOL.1
*CMD >                  ( WRITE-MODE = *EXTEND )
*CMD >  SELECT    = *BY-TSN ( TSN =
*CMD >                     0XXX,0YYY,0ZZZ,0APP,0APR,0APS
*CMD >                      )
*CMD >  OUTPUT    = HEMUL
*CMD >                  ( SYSOUT = *YES, SYSLST = *NO  )
*CMD >  DIA-CONTR = *NO

+KEY >    TSN   JSTATE    CAT   JNAME     UID       JCLASS       O-TSN

#ERR >    0APS   IS CALLER TASK              —————————————————————————————————————   (2) 
#ERR >    0APR   IS ALREADY EXTRACTED
#ERR >    0APP   IS JOB-SCHEDULER
*NFD >    0ZZZ   IN SYSTEM JOBPOOL           —————————————————————————————————————   (3) 
*NFD >    0YYY   IN SYSTEM JOBPOOL
*NFD >    0XXX   IN SYSTEM JOBPOOL

#SYS >           RC FROM JOBP BOURSE   01234567
*WAR >           SOME JOBS COULD NOT BE PROCESSED
*WAR >    0XXX
*WAR >    0YYY
*WAR >    0ZZZ
*WAR >    0APP
*WAR >    0APR
*WAR >    0APS

 EXT >    0APR  *INACT    G               TSOS      JCJS2XSB
#ERR >    0APR   RC FROM CANCEL        09
 EXT >    0APQ  *INACT    G               TSOS      JCJS2XSB
 EXT >    0APP  *INACT    G               TSOS      JCJS2XSB 
Explanation

(1)

This sample log shows a further export. A new log file is created for each execution of the MOVE-JOBS command.

(2)

The information lines are identified by IMP (for import). See item 3 above for details. Specific user jobs cannot be exported, because this would mean that they would be removed completely from the system and that is not desirable (e.g. the task under which the MOVE-JOBS command is currently running or the scheduler task of the JMS). The MOVE-JOBS command cannot, however, avoid all essential tasks from being exported. If the MOVE-JOBS command is not used with the utmost care, then important user-specific jobs may be canceled causing serious disruption to system operation.

(3)

The TSN of a job to be exported is not known to the JMS (record type *NFD).

Example 3 (import log)
*HDR >  MOVE-JOBS   Date: 2012-03-23    Time: 13:50
*CMD >  FROM-FILE = JOBPOOL.GROSS
*CMD >  TO-FILE   = *STD
*CMD >  SELECT    = *BY-ATTRIBUTES (
*CMD >                  JOB_STATE = ( *INACTIVE, *REPEAT )
*CMD >                  PUBSET    = (
*CMD >                     A   ,G   ,L   ,2V24,2V27
*CMD >                              )
*CMD >                  JOB-NAME  = *ANY
*CMD >                  USER-ID   = *ANY
*CMD >                  JOB-CLASS = (
*CMD >                     JCJS2XSB,JCJS3XSB,J1      ,J2      ,
*CMD >                     J3      ,J4      ,J5
*CMD >                              )
*CMD >                             )
*CMD >  OUTPUT    = HEMUL
*CMD >                  ( SYSOUT = *YES, SYSLST = *NO  )
*CMD >  DIA-CONTR = *NO
+KEY >    TSN   JSTATE    CAT   JNAME     UID       JCLASS       O-TSN
 IMP >    0AQS  *INACT    2V24  HEM11     TSOS      JCJS2XSB    ——————————————————   (1) 
 IMP >    0AQT  *INACT    2V24  HEM22     TSOS      JCJS2XSB
 IMP >    0AQU  *INACT    2V24  HEM33     TSOS      JCJS2XSB
 IMP >    0AQV  *INACT    2V24  HEM44     TSOS      JCJS2XSB
 IMP >    0AQW  *REPEAT   2V24  HEM55     TSOS      JCJS2XSB
 IMP >    0AQY  *REPEAT   2V24  HEM66     TSOS      JCJS2XSB
 IMP >    0AQ0  *REPEAT   2V24  HEM77     TSOS      JCJS2XSB
 IMP >    0AQ2  *REPEAT   2V24  HEM88     TSOS      JCJS2XSB
#ERR >    0AP0   UNDEFINED USER-ID     HEMUL                   ———————————————————   (2) 
#ERR >    0AP1   UNDEFINED USER-ID     HEMUL
#ERR >    0AP2   UNDEFINED USER-ID     HEMUL
#ERR >    0AP3   UNDEFINED USER-ID     HEMUL
#ERR >    0AP4   UNDEFINED USER-ID     HEMUL
#ERR >    0AP5   UNDEFINED USER-ID     HEMUL
*MOD >    0AP7   TO CURRENT IMAGE      0AP6
#ERR >    0AP6   UNDEFINED JOB-CLASS   JCJS3XSB                 ——————————————————   (3) 
*MOD >    0AP9   TO CURRENT IMAGE      0AP8
#ERR >    0AP8   UNDEFINED JOB-CLASS   JCJS3XSB
*MOD >    0AQB   TO CURRENT IMAGE      0AQA
 IMP >    0AQA  *REPEAT   G               TSOS      JCJS2XSB    ——————————————————   (4) 
#ERR >    0AQC   UNDEFINED JOB-CLASS   JCJS3XSB
 IMP >    0AAK  *INACT    A     LUCKI     TSOS      JCJS2XSB
 IMP >    0CTC  *INACT    2V27  ENTPE     TSOS      JCJS2XSB
 IMP >    0AAL  *INACT    A     LUCKI     TSOS      JCJS2XSB
 IMP >    0AAM  *INACT    A     LUCKI     TSOS      JCJS2XSB
 IMP >    0AAN  *REPEAT   A     LUCKI     TSOS      JCJS2XSB
 IMP >    0AAQ  *REPEAT   A     LUCKI     TSOS      JCJS2XSB
 IMP >    0CUY  *INACT    2V27  ENTPE     TSOS      JCJS2XSB
 IMP >    0AEG  *INACT    G               TSOS      JCJS2XSB
 IMP >    0AEH  *INACT    G               TSOS      JCJS2XSB
 IMP >    0AEK  *INACT    G               TSOS      JCJS2XSB
#SYS >    0AEG   RC FROM JMS JMJENQ    04                        —————————————————   (5) 
#SYS >    0AEE   RC FROM TSN REASSIGN  FFFF
#SYS >           RC FROM PAM READ      4567
#ERR >           WRONG VERSION ENTRY ON JOBPOOL PAGE 0005
#SYS >           RC FROM PAM WRITE     5678 
Explanation

(1)

Example of a successfully imported job. The information lines are identified by IMP (for import). For the meaning of output columns see item3 of "Example 1 (export log) in section "MOVE-JOBS"".

(2)

It was not possible to import the job because the user ID HELMUL was not defined in the system.

(3)

It was not possible to import the job because the job class JCJS3XSB was not defined in the system.

(4)

Example of a successfully imported repeat job whose current image has been reconstructed.

(5)

Example of another error situation reported in the log. It is not always possible to allocate an error to a specific job.