Page 1 of 1

FileAid Batch - Search a string in all GDG generations

PostPosted: Thu Aug 14, 2014 3:15 pm
by agentskywalker
Hi,

My requirement is, I need to search for a string in all GDG generations(appx 100). I need the name of the dataset/generation in spool.
The string is at a specific position.
The search should start from (Latest Gen - 1) up to oldest generation present.
Each generation is of almost 15 GB size.

I have a working code using FilaAid which works for some other GDG, relatively small generations(15) and smaller sized generations.
But it starts from the latest gen to oldest one.
Is there a way of skipping the latest gen ???

//FILEAID  EXEC PGM=FILEAID             
//SYSPRINT DD SYSOUT=*                 
//SYSLIST  DD SYSOUT=*                 
//DD01     DD DSN=my.gdg.base,
//            DISP=SHR                 
//SYSIN    DD *                         
$$DD01 LIST OUT=0,                     
            IF=(33,EQ,C'my_string')   
/*                                     
//*                                     


This utility gives GDG generation name in the spool, more like a dump, but it does(for the smaller GDG).
However, it just hangs/does nothing for the bigger GDG.

Any suggestion on getting this work?

Any other tool that can be used for this scenario ? :idea:

Best regards.

Re: FileAid Batch - Search a string in all GDG generations

PostPosted: Fri Aug 15, 2014 2:55 pm
by NicC
You can either use he gdg base as in your other job and then edit your output to remove any finds on the latest generation or you will have to do it the hard way - code each generation manually. That is based on your current solution but I do not know of alternatives that are viable but maybe someone else has experience of other tools or has a better ability to 'think outside the box'.

Re: FileAid Batch - Search a string in all GDG generations

PostPosted: Fri Aug 15, 2014 9:27 pm
by Ed Goodman
I THINK that either the PRINT or LIST commands will show the dataset in which a string was found.

Re: FileAid Batch - Search a string in all GDG generations

PostPosted: Mon Aug 18, 2014 5:58 pm
by agentskywalker
Thanks NicC.

I tried the job with some generations of the GDG, and the job ran fine.

As Goodman said, the LIST cmd got me the GDG gen names in SYSLIST in spool.
So, I guess I will be using the hardcoded-way, but use a REXX to do the coding for me. Instead of GDG base, I'll be entering Latest-1 gen to REXX. 8-)

Got a way-around, without solving the original problem. :)

Re: FileAid Batch - Search a string in all GDG generations

PostPosted: Tue Aug 19, 2014 2:49 pm
by agentskywalker
Thanks a lot NicC.

Here is what was happening.

The JCL, prior to actually start executing(and printing SYSOUT/SYSLIST... in spool), was recalling all the GDG generations. And THAT TOOK TIME.
I was never patient enough to wait for that amount of time and cancelled the job.

Today it took almost 1 hour just to recall all the gens ( as they are pretty big I guess), and then I saw all the read counts in spool.
After the job ran for almost 1.5 hours, it completed and I got my needed results in SYSLIST.

So, although the job is fine, still I have to go with the way-around I got earlier because of the time factor. :P