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 WA CA 7 Edition 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|nnnnnnnn}]
       [,STEPNUM=step number]
       [,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 7 job name.

nnnnn

Identifies the five-digit CA 7 job number.

system

Identifies the CA WA CA 7 Edition system name or SYSTEM, if none.

sssss

Identifies the five-digit CA WA CA 7 Edition schedule ID.

yydddhhmm

Identifies the queue entry date and time.

The following name 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 listed information 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 WA CA 7 Edition status queues (ACT, RDY, REQ, and PRN) and the CA7AGNT VSAM file. Specify JOB=jobname.

HIS

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

Q

Displays a list of job executions. Builds the list from the CA WA CA 7 Edition status queues (ACT, RDY, REQ, and PRN). 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 before the job completes execution. This process applies to all AGFILE functions.

Spool file retrieval can take longer for PROXY_JOB than retrievals for other job types.

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 direct way to retrieve an AS400_JOB spool file 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 direct way to retrieve an AS400_JOB spool file 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 selected job is the one that the subfields define in the object name. The following values are valid:

SPOOL

Displays the spool file of the job. SPOOL is the default.

CHLOG

Displays the log file of a process chain. 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 scheduling database of the agent. Applies only to PS_JOB, SAP_JOB and SAPA_JOB.

DELETE1

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

DELETE2

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

DELETEB

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

DUMP

Displays the dump file of a job. 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 jobs executed on the i5/OS (AS400) platform, such as an AS400_JOB or an FTP_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 log file of the job. Applies only to NONSTOP_JOB, OA_JOB, OAC_JOB, and PROXY_JOB.

OUTPUT

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

SPOOLREF

Displays the spool file location of the job. Applies only to PROXY_JOB.

TRACE

Displays the trace file of the job. Applies only to PS_JOB.