Doubt in using multiple keys for same physical file in EZT

Ask/Clarify the questions on EASYTRIEVE

Moderators: DikDude, Moderator Group

Post Reply
sivaguru
Member
Posts: 6
Joined: Fri Sep 09, 2011 9:45 pm
Location: Chennai, India

Doubt in using multiple keys for same physical file in EZT

Post by sivaguru » Mon Sep 12, 2011 12:48 pm

Hi,
I am trying to define multiple keys for the same physical file and the scenario is as explained below:

I have two files: File1 and File2. I am supposed to define a composite key (Field-1+Field2) for both the files. But either of these two fields defined as a key could change (but not both at the same time) as File1 is from yesterday's batch run and File2 is from today's run (some update activity processed in today's run could've changed the value of Field-1 or Field-2 in File2). This change does not happen for all the records, meaning I have to use the originally defined composite key (Field-1+Field-2) for finding the matching records. For the records in File2 with change in the value of Field-1, Field-2 must be used as key and Field-1 for those records with change in the value of Field-2. I have an indicator to identify which record has changes in Field-1 and which has changes in Field-2.

Please help me on how to code multiple keys for the same physical file. I can use different DD name for the same physical file but is it possible to switch to a second key for the record which can not be processed using the first key?

I will be grateful if you could throw some light on handling this scenario in Easytrieve.

Many thanks,
Sivaguru
Thanks,
Sivaguru

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Mon Sep 12, 2011 10:43 pm

It will help if you post some sample data from both input files and the outp file(s) you want when your new process is run using the sample data.

Relate the "rules" to the sample input/output data.
Have a good one

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others