DEFINE PATH (for Beginners)
Summary
For extensive information, go through the DEFINE PATH (for Experienced)
The AIX requires the path between the alternate index and base cluster to access the data faster from the dataset. So PATH needs to be defined before building the index for an alternate index.
DEFINE PATH command is used to define an path between AIX and its base cluster or a path directly over a base cluster.
Detailed syntax -
//JOBNAME JOB job-card-parameters
//STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEFINE PATH
(NAME(alternate-index-path-name)
PATHENTRY(alternate-index-name)
[MODEL(model-dataset-name[ catlog-name])]
[OWNER(owner-id)]
[TO(date)|FOR(days)]
[UPDATE|NOUPDATE])
[CATALOG(catname)]
/*
Parameters
The DEFINE PATH command uses to create the path, and below are the mandatory and optional parameters.
Mandatory Parameters
Parameters | Description |
---|---|
PATH | Specifies path should be defined, or a path entry should be recataloged. |
NAME (alternate-index-path-name) | Specifies the alternate index path name. |
PATHENTRY (alternate-index-name) | Specifies the alternate index name defined with DEFINE ALTERNATEINDEX. |
Optional Parameters
Parameters | Description |
---|---|
OWNER (owner-id) | Specifies the AIX cluster owner id. |
TO (date) | FOR (days) | Specifies the retention period for the cluster being defined. |
UPDATE | NOUPDATE | These parameters specify whether the alternate indexes should update or not when the base cluster is updated. Short Description: UPD Short Description: NUPD |
Example -
Requirement - Define path for alternate index on the employee KSDS file.
Input KSDS File - MATEPK.EMPL.KSDS
Input Alternate Index - MATEPK.EMPL.DEPTAIX
Code -
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
***************************** Top of Data ******************************
//MATEPKP JOB (123),'MTH',CLASS=A,MSGCLASS=A,MSGLEVEL=(1,1),
// NOTIFY=&SYSUID
//************************************************************
//* DEFINE PATH
//************************************************************
//STEP10 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEFINE PATH (NAME(MATEPK.EMPL.DEPTAIX.PATH) -
PATHENTRY(MATEPK.EMPL.DEPTAIX) -
UPDATE)
/*
//*
**************************** Bottom of Data ****************************
In the above JCL, MATEPK is the userid and change it as required.
Output -
Once the above JCL is submitted, check the MAXCC of the job for any errors. If the MAXCC is 00 or 04, then DEFINE PATH is successful..
********************************* TOP OF DATA **********************************
IDCAMS SYSTEM SERVICES TIME: 10:59:36
DEFINE PATH (NAME(MATEPK.EMPL.DEPTAIX.PATH) -
PATHENTRY(MATEPK.EMPL.DEPTAIX) -
UPDATE)
IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 0
IDC0002I IDCAMS PROCESSING COMPLETE. MAXIMUM CONDITION CODE WAS 0
******************************** BOTTOM OF DATA ********************************
Verify the path in 3.4 (Dataset List utility) or any File management tools.

Explaining Example -
In the above example,
- NAME(MATEPK.EMPL.DEPTAIX.PATH) specifies the AIX path.
- PATHENTRY(MATEPK.EMPL.DEPTAIX) specifies alternate index defined earlier.
- UPDATE specifies the alternate indexes should be updated when records are added, modified, or deleted to the base cluster.