View previous topic :: View next topic
|
Author |
Message |
Shirazpasha
New User
Joined: 24 Nov 2006 Posts: 14 Location: India
|
|
|
|
Hi,
I have a requirement where I have to search for a particular dataitem which lies in column 10, having length of 10 characters in a GDG file. There are 50 generations of that GDG base. All these gens are output of the same program and so they have same record layout.
I want to accomplish this in a JCL. Is there a way out?
Thanks, |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
Referencing the base name only in a DD statement implicitly concatenates all extant generations. So reference the base name as the input file in your search JCL.
Note, though, that they are processed in reverse order.
I've been wondering why it's implemented that way - anyone know? |
|
Back to top |
|
|
Shirazpasha
New User
Joined: 24 Nov 2006 Posts: 14 Location: India
|
|
|
|
Phil,
Thanks for the reply.
I wanted to know which JCL utility to use to do this.
In other words, how would my jcl look like. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
Go to 3.14 and set the parms to do a batch search for anything from one dataset.
Then copy the generated JCL to your own PDS and modify it accordingly.
Now you've got search JCL you can modify anytime without using the 3.14 screen.
This general method works for any panel that has foreground and batch options; e.g., 3.13 - file compare. |
|
Back to top |
|
|
krisprems
Active Member
Joined: 27 Nov 2006 Posts: 649 Location: India
|
|
|
|
Shirazpasha
What is the data item Format(CH,PD,ZD..)? |
|
Back to top |
|
|
Shirazpasha
New User
Joined: 24 Nov 2006 Posts: 14 Location: India
|
|
|
|
Phil,
Your approach would require me to change my jcl to search in each gdg version, I guess. But i do not want to do that. I want to search all the versions in one go.
Kris,
My data item formt is character. Actually there are 2 dataitems that i need to look for. serial#, a Packed Decimal item and a customer name, which is of character datatype.
Thanks, |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
I think my suggestion works.
Specifying DSN=<GDG base> effectively gives you the concatenation of all generations (not versions).
Of course, when you find your text you won't know which it is in, so I guess that is your problem.
If you know SAS, a slightly advanced features lets you identify which dataset of a concatenation you are currently reading. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
Quote: |
But i do not want to do that. |
You can run "isrsupc" the ispf search for program , but ,
a concatenation will be seen as a "SINGLE" sequential dataset
and isrsupc will give a RELATIVE line number of the found string,
but You will not have any reference to the dataset were the string was found
So YOU CANNOT HAVE WHAT YOU WANT,
were is the problem in getting the model JCL from a 3.14
and use the model to build the complete job
here is an almost working sample
Code: |
//anyname JOB ....
//* inline proc to invoke srchfor
//SEARCH PROC GEN=
//ISR EXEC PGM=ISRSUPC,PARM=(SRCHCMP,'')
//*
//SYSIN DD DISP=(OLD,PASS),DSN=&&CARDS
//*
//NEWDD DD DISP=SHR,DSN=your_gdgname(&GEN)
//*
//OUTDD DD SYSOUT=*
// PEND
//* first step priming the cards dataset
//PRIME EXEC PGM=IEBGENER
//SYSIN DD DUMMY
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD *
SRCHFOR 'your_char_string'
CMPCOLM first_col:last_col
//SYSUT2 DD DISP=(NEW,PASS),DSN=&&CARDS,
// UNIT=VIO,SPACE=(CYL,(1,1)),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=3120)
//*
//* and here is the rest
// EXEC SEARCH,GDG='0'
// EXEC SEARCH,GDG='-1'
// EXEC SEARCH,GDG='-n'
|
|
|
Back to top |
|
|
|