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
 

 

To download records from VSAM

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
ursvmg

New User


Joined: 24 May 2007
Posts: 52
Location: Chennai

PostPosted: Tue Jun 26, 2007 2:05 am    Post subject: To download records from VSAM
Reply with quote

Hi,
I have 2 questions reg VSAM.....
1. Is it possible to download records from a VSAM file to a text file in anyway?

2. Is it possible to compare two records of a VSAM file?

Help me in this regard.......


Please correct me if I'm wrong
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Tue Jun 26, 2007 2:50 am    Post subject:
Reply with quote

The short answer is:
Yes
&
Yes....

But that is not quite the answer you are looking for....

Interview? Requirement? What is the conditions surounding these questions?
Back to top
View user's profile Send private message
ursvmg

New User


Joined: 24 May 2007
Posts: 52
Location: Chennai

PostPosted: Tue Jun 26, 2007 2:58 am    Post subject:
Reply with quote

Thanks William,

Definitely it is both for requirement and learning. I know it is easy to download records from seq or pds. But i wanted to do for VSAM records.....

I would be thankful if you gimme the possible ways of achieving the task.....
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Tue Jun 26, 2007 3:24 am    Post subject:
Reply with quote

IDCAMS export....
IDCAMS repro....
Assembler....
COBOL....
SORT (either)....
Dang, any other other script or programming language....

Again,
Quote:
Interview? Requirement? What is the conditions surounding these questions?
Back to top
View user's profile Send private message
ursvmg

New User


Joined: 24 May 2007
Posts: 52
Location: Chennai

PostPosted: Tue Jun 26, 2007 3:35 am    Post subject:
Reply with quote

Hi,

I have a VSAM file which contains more than 10000 records.... I wanted to compare the every fields of say 10th and 2000th record. it is not possible to check simultaneously. If it is possible to export those two records alone in to a text file, it would be easier to compare them. Also i want to print certain records, for that i would need it in a text file.

This is the actual reason and i'm not hiding anything. icon_sad.gif

Both the questions are asked for the same reason. But if both the ways are possible, then i could learn something.....

Thank You,
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Jun 26, 2007 3:48 am    Post subject:
Reply with quote

Hello,

Is there some particular "key" value in those records or do you just happen to know that you want the 10th and 2000th records?

Which sort product does your organization use? If you have DFSORT and only 10000 records, you could run pass the vsam file 2 times creating a singe-record file each time for comparison. For normal use i'd not make 2 passes but for what you want, the expense will not be significant. Look at the DSFORT forum for examples of copying only a certain record from a larger group. I believe the parms you want are SKIPREC and STOPAFT (or something quite similar. The DFSORT manuals are available vial the "Manuals" link at the top of the web page.

Once you have created the 2 single-record files, you can compare them in tso/ispf (superc).
Back to top
View user's profile Send private message
ursvmg

New User


Joined: 24 May 2007
Posts: 52
Location: Chennai

PostPosted: Tue Jun 26, 2007 3:52 am    Post subject:
Reply with quote

Yes, My VSAM is having keys values. I just said the number for example. Actually i have to select two recs with the key values.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Jun 26, 2007 7:33 am    Post subject:
Reply with quote

Hello,

Then, if i understand more now, there really is no need for a text file.

If you know 2 keys, you could write a small program to read each and then compare the fields you want.
Back to top
View user's profile Send private message
ursvmg

New User


Joined: 24 May 2007
Posts: 52
Location: Chennai

PostPosted: Wed Jun 27, 2007 1:05 am    Post subject:
Reply with quote

Thanks dick,

Can you please gimme a sample piece of code to do that? Also tell me how to download a record to a text file for a particular key..... Give sample code for that too......

Thanks in advance,
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Jun 27, 2007 1:29 am    Post subject:
Reply with quote

Hello,

If you want to pull the records out of the VSAM file look at this from earlier
Quote:
If you have DFSORT and only 10000 records, you could run pass the vsam file 2 times creating a singe-record file each time for comparison. For normal use i'd not make 2 passes but for what you want, the expense will not be significant. Look at the DSFORT forum for examples of copying only a certain record from a larger group. I believe the parms you want are SKIPREC and STOPAFT (or something quite similar. The DFSORT manuals are available vial the "Manuals" link at the top of the web page.


If you want to use COBOL, there are examples in the documentation available from the "Manuals" link at the top of these web pages.

When you have something to compile/run, regardless of which approach you choose, we will be here to help with questions/problems.
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 Updating a VSAM file with DISP=OLD sheersh JCL & VSAM 8 Tue Mar 14, 2017 6:14 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts VSAM RLS=NRI while doing IDCAMS sheersh JCL & VSAM 1 Tue Mar 07, 2017 1:55 pm


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