Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 How to select record x+7 or x+2 based... JoAnn Kulcyk SYNCSORT 6 Tue Jan 16, 2018 10:49 pm
No new posts query to fetch record which has only ... maxsubrat DB2 12 Mon Dec 11, 2017 5:03 pm
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts Extract Record using range of Data scorp_rahul23 DFSORT/ICETOOL 3 Wed Nov 15, 2017 11:54 pm
No new posts Squeeze record left so that zeroes ar... Vignesh Sid SYNCSORT 5 Fri Nov 10, 2017 1:40 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us