Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Searching record through JCL.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Searching record through JCL.
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject: Re: Searching record through JCL.
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Record Not found in AlX but record re... mukun264 COBOL Programming 7 Fri Mar 24, 2017 9:28 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts To Merge mutliple records into a sing... anandgbe DFSORT/ICETOOL 6 Wed Feb 22, 2017 8:49 am
No new posts How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us