Previous Topic: ADDSCH ExamplesNext Topic: Example: AGFILE Command with LIST Option


AGFILE Command

The AGFILE command displays agent job output data and performs other functions that are related to agent jobs and their executions. This command can also display a historical list of job executions for a specific agent job. The list can be built from the CA Workload Automation SE status queues, the CA7AGNT VSAM file, or both. You can then select a job from the list using a function code to perform the requested function on the selected job.

Note: Not all agent job types support all function types.

This command has the following format:

►►─ AGFILE ─┬─ ,JOB=jobname ────────┬─┬─────────────────────┬─────────────────►
            └─ ,OBJECT=object-name ─┘ └─ ,LIST= ─┬─ NO ◄ ─┬─┘
                                                 ├─ ALL ──┤
                                                 ├─ HIS ──┤
                                                 └─ Q ────┘

 ►─┬───────────────────┬─┬──────────────────────────────┬─────────────────────►
   └─ ,NAME=file name ─┘ └─ ,NUMBER= ─┬─ 1 ◄ ─────────┬─┘
                                      └─ file number ─┘

 ►─┬───────────────────────────┬─┬────────────────────────┬───────────────────►
   └─ ,OFFSET= ─┬─ 0 ◄ ──────┬─┘ └─ ,STEPNUM=step number ─┘
                └─ nnnnnnnn ─┘

 ►─┬───────────────────────┬──────────────────────────────────────────────────►◄
   └─ ,TYPE=function type ─┘
JOB

Defines a specific agent job name. Masking characters are not permitted.

Size/Type: 1 to 8 characters

Limits: Mutually exclusive with OBJECT. Specify either JOB or OBJECT.

OBJECT

Defines the agent object for processing.

Limits: Mutually exclusive with JOB. Specify either JOB or OBJECT.

The object name has the following format:

jobname.Nnnnnn/system.SsssssDyydddhhmm
jobname

Identifies the CA Workload Automation SE job name.

nnnnn

Identifies the five-digit CA Workload Automation SE job number.

system

Identifies the CA Workload Automation SE system name or SYSTEM, if none.

sssss

Identifies the five-digit CA Workload Automation SE schedule ID.

yydddhhmm

Identifies the queue entry date and time.

The following is an example of an object name:

PAYROLL1.N00123/PAYSYS.S00001D092151430
LIST

(Optional) Indicates whether to display the requested information for the specified job or to display a historical list of job executions for the specified job or object. The following values are valid:

NO

Does not display a list of job executions. NO is the default.

When a job name is specified through the JOB keyword, the information that is listed is for the latest job execution in the REQ or PRN status queues.

When an object name is specified through the OBJECT keyword, the information that is listed is for the job execution that the subfields in the object name define.

ALL

Displays a list of job executions. Builds the list from both the CA Workload Automation SE status queues (ACT, RDY, REQ, and PRN) and the CA7AGNT VSAM file. Also specify JOB=jobname.

HIS

Displays a list of job executions. Builds the list from the CA7AGNT VSAM file. Also specify JOB=jobname.

Q

Displays a list of job executions. Builds the list from the CA Workload Automation SE status queues (ACT, RDY, REQ, and PRN). Also specify JOB=jobname.

Note: When retrieving a spool file, if you take the default of LIST=NO or explicitly code LIST=NO and the job is actively executing at an agent, the spool data retrieved is for the previous execution of the job. Spool data for the current job is not retrieved until the job completes execution. This process applies to all AGFILE functions.

NAME

(Optional) Defines the file name for a spool file. Applies only to jobs with a job type of AS400_JOB. When used with NUMBER, provides a way to retrieve an AS400_JOB spool file directly without first retrieving a list of spool files using the TYPE=FILELIST parameter.

Limits: 1 to 10 characters

NUMBER

(Optional) Defines the file number for a spool file. Applies only to jobs with a job type of AS400_JOB. When used with NAME, provides a way to retrieve an AS400_JOB spool file directly without first retrieving a list of spool files using the TYPE=FILELIST parameter.

Default: 1

Limits: 1 to 6 digits

OFFSET

(Optional) Defines the starting offset when requesting display of a related output file for an agent job execution.

Default: 0

Limits: 1 to 8 digits

STEPNUM

(Optional) Defines the step number for a job. Applies only to SAP_JOB.

Default: 1

Limits: 1 to 7 digits

TYPE

(Optional) Defines the type of function to perform. Use this field in combination with LIST=NO and either JOB or OBJECT to act as a shortcut to perform the requested function immediately without going through an intermediate menu. If JOB is specified, the latest job in the REQ or PRN status queues is processed. If OBJECT is specified, the job that is selected is the one that the subfields in the object name define. Valid values are the following:

SPOOL

Displays the job's spool file. SPOOL is the default.

CHLOG

Displays a process chain's log file. Applies only to BWPC_JOB.

CHPROC

Displays a list of chain processes. Applies only to BWPC_JOB.

CHSTART

Displays status for a process chain. Applies only to BWPC_JOB.

DELETE

Deletes a job from the agent's scheduling database. Applies only to PS_JOB, SAP_JOB and SAPA_JOB.

DELETE1

Deletes phase 1 of a job from the agent's scheduling database. Applies only to BDC_JOB.

DELETE2

Deletes phase2 of a job from the agent's scheduling database. Applies only to BDC_JOB.

DELETEB

Deletes phase1 and phase2 of a job from the agent's scheduling database. Applies only to BDC_JOB.

DUMP

Displays a job's dump file. Applies only to SAP_JOB.

ERROR

Displays the job’s error file. The original job definition must have specified the error file location. Applies only to NONSTOP_JOB.

FILELIST

Displays a list of available spool files for a job. Applies only to AS400_JOB.

INFO

Displays information about the job from the CA7AGNT VSAM file.

JOBLIST

Returns ABAP step output. Applies only to SAP_JOB.

LOG

Displays the job's log file. Applies only to NONSTOP_JOB, OA_JOB, and OAC_JOB.

OUTPUT

Displays the job’s output file. The original job definition must have specified the output file location. Applies only to NONSTOP_JOB.

TRACE

Displays the job's trace file. Applies only to PS_JOB.