TSO-ISPF JCL COBOL VSAM DB2 CICS Tools Articles Job Portal Forum Quiz Interview Q&A

Easytrieve JOB Statement


JOB Statement:

The JOB statement identifies the files whose records are automatically provided to your program (automatic input). The next exhibit diagrams the JOB statement and associated parameters.

Syntax:

      [INPUT (file-name [KEY(field-name...)] ...) ]
JOB   [                                           ][NAME job-name]
      [NULL                                       ]

Explanation:

[INPUT]

This parameter is optional. It identifies the automatic input as follows.

  • file-name - Provides the name of the file you want to have controlled automatically. This can be any name previously coded on a FILE statement.

  • KEY field-name - Use this subparameter to identify fields within the above-named file when it is used in synchronized file processing. The files are processed in the order in which these keys appear in the JOB statement. There is no limit on the number of fields that you can use as keys.

  • NULL - Code this subparameter to inhibit automatic input. Normally, a job is implicitly stopped when the automatic input file(s) is exhausted. However, if you code NULL, the program continues running until a STOP statement is executed.

NAME

NAME job-name - Names the JOB activity. Job-name can be up to 40 characters long; the first character must be alphabetic. This parameter is used only for documentation purposes.

Example:

We used Personnel Master File named PERSNL as input file in sample program JOB statment(see below).

JOB INPUT PERSNL

NOTE:

If you do not specify the INPUT parameter, an automatic input file is provided. The default input file is chosen as follows.

  1. First choice is the file created by a SORT operation that immediately preceded this JOB activity. If there is no such SORT file, see number 2 below.

  2. Second choice is the first file that you specified in the library section of this program.


If you have any doubts or queries related to this chapter, get them clarified from our Mainframe experts on ibmmainframer Community!

Are you looking for Job Change? Job Portal