Skip to main content

Using XPSTRACK

What is it?

XPSTRACK is a job step program that adds jobs to OpCon as tracked external jobs. When a job runs XPSTRACK, the program creates a tracking record in the agent's job queue and sends a $JOB:TRACK event to OpCon, so the job's status and completion can be monitored.

Example
//OPCON EXEC PGM=XPSTRACK,
// PARM='[[$NOW]],L1Test,IVPJOB08,ONRequest,PROP1=Val1'
JES3

XPSTRACK is the supported way to track jobs under JES3. It does not rely on the IEFUJV exit, so it works where the TRACMASK, TRACLASS, TRACLAS8 and column 72 recognition methods do not. Refer to Known issues.

The parameters are separated by commas, and are similar to those used in $JOB:ADD events:

PositionParameterMax LengthDescription
1Schedule date20Schedule date or keyword (CURRENT, [[$NOW]], etc.)
2Schedule name40OpCon schedule name
3Job name64OpCon job name. If omitted, the z/OS job name is used
4Frequency20OpCon frequency code
5Job instance properties100Name=value pairs separated by semicolons

All parameters are optional, but if later parameters are needed, any skipped parameters must be added by commas (e.g.: To specify job instance variables but accept the defaults for everything else, specify: PARM=',,,,,MyParm=MyValue')

Example

Track the current job with only job instance properties:

//OPCON EXEC PGM=XPSTRACK,
// PARM=',,,,PROP1=Val1;PROP2=Val2'

If XPSTRACK is run in a job already being tracked, it will be ignored (RC=0 with message "exists").

Prerequisites

  • The agent must be active (XPCB must be initiated).
  • XPSTRACK must be in an APF-authorized library (LINKLIB or authorized STEPLIB), as it requires KEY=ZERO to write to the ECSA job tracking queue.

Return codes

RCMessageDescription
0XPS100I - jobname: Tracking record added.Job tracking record was created and the $JOB:TRACK event was sent
0XPS100I - jobname: exists.Job is already being tracked — no action taken
4XPS050E - XPSTRACK PARM or MSGIN ErrorParameter processing error
8XPS051E - XPSTRACK Tracking Error.Agent is not active or the PCB could not be located