I have another set of GDG base with limit of 180 files (resides on tape - LRECL=410, RECFM=FB) that contain several entries for the key value at 5th position. Let us assume this as File-B. If I have to pull these entries from File-B depending on key value of File-A, I would go to File-B.G0104 file and given an INCLUDE COND.
Suppose, somebody asks for 'ABXZ12' to be searched in 20 files of File-A and find its corresponding entries from File-B. How to automate this process like after knowing the particular generation from File-A and use that generation number to search from File-B generation to write records to output.
Please help.
Thanks. _________________ Ranga
*****
None of us is as smart as all of us - Ken Blanchard
1. First step is a sort which finds all record containing "ABXZ12" and writes an output file containing these records. Sort these records by positions 55-58.
2. Second step reads the file written in step 1 as input and writes JCL to the internal reader using the value in 55-58 to build the GDG names. I would include logic so that if the same GDG number is encountered twice, you would only write out one record.
Ans-1: The search key is located in 4th position in File-A. Its length is 6.
Ans-2: It is a 4 byte filed (Ex.: G9999V00 - only 9999 appears at 55th pos)
Ans-3: If the search key is not found in any of the 20 generations then search on File-B should not happen
Ans-4: It is not possible because system is written that way.
Ans-5: I tried it once and was successful.
Thanks. _________________ Ranga
*****
None of us is as smart as all of us - Ken Blanchard
Now look at the output from SORTOUT. It should have generated the JCL need to copy the records from the main GDG file. If the generated JCL looks good then change the following statement
Code:
//SORTOUT DD SYSOUT=*
to
Code:
//SORTOUT DD SYSOUT=(*,INTRDR)
You can pass the SRCHKEY anything you want as a parm via JCL _________________ Kolusu
www.linkedin.com/in/kolusu
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum