View previous topic :: View next topic
|
Author |
Message |
genesis786
Active User
Joined: 28 Sep 2005 Posts: 210 Location: St Katherine's Dock London
|
|
|
|
Hi,
I am faced with a problem of searching a record in various KSDS files of same format. Can someone throw some light as to how can i search for a record in different VSAM files of same format by writing a JCL?
Thanx in advance.
Rahul. |
|
Back to top |
|
|
kick Warnings : 1 New User
Joined: 12 Apr 2005 Posts: 24 Location: shanghai china
|
|
|
|
can u write your info more clear ?? |
|
Back to top |
|
|
genesis786
Active User
Joined: 28 Sep 2005 Posts: 210 Location: St Katherine's Dock London
|
|
|
|
I have a set of files:
Pcc.REF1.KSDS
in which only the cc thing is variable. eg( US, IN, PK ...) and rest is same.
Format of all the files is same. I want to find out a particular string "1Z 11" in these particular files (which would be the primary key) and output which files contain this string as the primary key.
can i write a JCL for doing so? If yes, then how?
I hope i am clear this time? |
|
Back to top |
|
|
swapnilverma
New User
Joined: 10 Oct 2005 Posts: 4 Location: bangalore,india
|
|
|
|
Hi
Wt i think is u can do it in two step
in 1st step :- concatinate all three ksds fine into a singal ksds file
and in step 2 :- simply search ur desired thing.
But ksds file wont accept dupication of key fields so .....
other way is u can use sort utility.....
u can give multipal sortins all ur ksds files and one sortout .use" include condition". to shorten the sort process
plz do let me know if any of them is usefull or u.
ENjoy!!
|
|
Back to top |
|
|
paulstephen
New User
Joined: 20 Oct 2005 Posts: 20 Location: Chennai
|
|
|
|
Concatinating to a KSDS would not be possible.
But do concatinate to a flat file and use dfsort |
|
Back to top |
|
|
genesis786
Active User
Joined: 28 Sep 2005 Posts: 210 Location: St Katherine's Dock London
|
|
|
|
hI
I think i didn't make myself clear before.
Actually i have 33 such files. and each one's size is quite large, so merging them would not be effective way. instead of that i would rather search each file individually.
is there any other way? |
|
Back to top |
|
|
nikyojin
New User
Joined: 05 Oct 2005 Posts: 94
|
|
|
|
Pls try the following steps in ur JCL
1) Copy Each Vsam File to a sequential file.
2) Using DFSORT "INCLUDE" parameter specify the condition reqired.
3) Chk the o/p of DFSORT step which will give the result.
Print command of the IDCAMS can also be added to check if the o/p of DFSORT is empty or not
Hope this helps. |
|
Back to top |
|
|
|