IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Searching record through JCL.


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
genesis786

Active User


Joined: 28 Sep 2005
Posts: 210
Location: St Katherine's Dock London

PostPosted: Tue Oct 18, 2005 12:56 pm
Reply with quote

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
View user's profile Send private message
kick
Warnings : 1

New User


Joined: 12 Apr 2005
Posts: 24
Location: shanghai china

PostPosted: Tue Oct 18, 2005 2:39 pm
Reply with quote

can u write your info more clear ??
Back to top
View user's profile Send private message
genesis786

Active User


Joined: 28 Sep 2005
Posts: 210
Location: St Katherine's Dock London

PostPosted: Tue Oct 18, 2005 2:49 pm
Reply with quote

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
View user's profile Send private message
swapnilverma

New User


Joined: 10 Oct 2005
Posts: 4
Location: bangalore,india

PostPosted: Thu Oct 20, 2005 4:19 pm
Reply with quote

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. icon_biggrin.gif


ENjoy!!

Quote:
Back to top
View user's profile Send private message
paulstephen

New User


Joined: 20 Oct 2005
Posts: 20
Location: Chennai

PostPosted: Thu Oct 20, 2005 4:25 pm
Reply with quote

Concatinating to a KSDS would not be possible.
But do concatinate to a flat file and use dfsort
Back to top
View user's profile Send private message
genesis786

Active User


Joined: 28 Sep 2005
Posts: 210
Location: St Katherine's Dock London

PostPosted: Fri Oct 21, 2005 11:46 am
Reply with quote

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
View user's profile Send private message
nikyojin

New User


Joined: 05 Oct 2005
Posts: 94

PostPosted: Fri Oct 21, 2005 12:50 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Validating record count of a file is ... DFSORT/ICETOOL 13
Search our Forums:

Back to Top