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.

PATH name only have a catalog entry, but the path does not contain any records. When path is opened to process data records, both alternate index and base cluster opened.

High-level 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))
/*

Detail 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


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)


  • The path consists of an alternate index and its base clusters.
  • The entryname identifies the alternate index name defined with DEFINE ALTERNATEINDEX.

Optional Parameters


MODEL (model-dataset-name[ catlog-name])


  • The MODEL parameter is used to specify an already-defined cluster entry is to be used as a model for the entry being built.
  • The entry using as a model should be of the same entry type as the new entry being built.

entryname

  • Specifies the name of the cluster or component entry to be used as a model.

catname

  • Names the model entry's catalog.

OWNER (owner-id)


  • Specifies the AIX cluster owner id.
  • If the dataset is created in TSO/E, the TSO/E user's userid becomes the ownerid.

TO (date) | FOR (days)


  • This parameter specifies the retention period for the cluster being defined.
  • If neither TO nor FOR is used, the cluster can be deleted at any time.

TO (date)

  • TO parameter specify the date up to which to keep the cluster before it is allowed to be deleted.
  • The date is given in the form [yy]yyddd, in which yyyy is a four-digit year, yy is a two-digit year, and ddd is a three-digit day of the year (001 through 366).

FOR (days)

  • FOR parameter shows the number of days to keep the cluster being defined.
  • The maximum number is 9999.
  • If the number is 0 through 9998, the cluster is retained for the number of days.
  • If the number is 9999, the cluster is retained indefinitely.

UPDATE | NOUPDATE


  • These parameters specify whether the alternate indexes should update or not when the base cluster is updated.
  • The alternate indexes are opened whenever the base cluster is opened.

UPDATE

  • The UPDATE parameter specifies that the alternate indexes should be updated when records are added, modified, or deleted to the base cluster.

Short Description: UPD

NOUPDATE

  • The NOUPDATE parameter specifies that the alternate indexes are not updated when the base cluster records are added, modified, or deleted.

Short Description: NUPD

CATALOG (catname)


  • Specifies the catalog name in which the cluster is to be defined.

Short Description: CAT

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.

Verify Path

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.