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
 

 

Copy some records from Master VSAM file to Test VSAM file

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

New User


Joined: 14 Jan 2007
Posts: 33
Location: USA

PostPosted: Fri Feb 23, 2007 5:09 am    Post subject: Copy some records from Master VSAM file to Test VSAM file
Reply with quote

I need copy some records from Master VSAM file to Test VSAM file based on Orig-date condition(Orig-date must be greater than or equal to 01-01-2007 (01-01-2007 is stored as 1070101 in the master file). Orig-date is declared as PIC S9(3) COMP-3.

For this I used the following method.

1. Defined TEST VSAM file using DEFINE CLUSTER

2. Copied the 30000 records from Master file using IDCAMS and REPRO into a Sequential file.

3. Used Sequential file as SORTIN file and sorted records based on condition into SORTOUT(TEST VSAM file). Used INCLUDE COND (1,11,PD,GE,10701).

Is there any other method to do the above procedure?. Please let me know.

Thanks,
Back to top
View user's profile Send private message

William Thompson

Global Moderator


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

PostPosted: Fri Feb 23, 2007 5:40 am    Post subject: Re: Copying VSAM file
Reply with quote

Jeya Raj wrote:
(01-01-2007 is stored as 1070101 in the master file). Orig-date is declared as PIC S9(3) COMP-3.
Quote:
Used INCLUDE COND (1,11,PD,GE,10701)
If you are going to do the include cond against a comp-3 field, and declare it as such, you have to give it the full field, i.e., INCLUDE COND (1,11,PD,GE,1070101)
Give that a try and let us know, good or bad, how it turns out.
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: Fri Feb 23, 2007 5:50 am    Post subject:
Reply with quote

Hello,

The digits 1070101 will not fit into a field that is PIC S9(3) comp-3 icon_confused.gif
Back to top
View user's profile Send private message
Jeya Raj

New User


Joined: 14 Jan 2007
Posts: 33
Location: USA

PostPosted: Fri Feb 23, 2007 6:30 am    Post subject: Re: Copying VSAM file
Reply with quote

I actually created the TEST file based on the condition and checked at the data in that file, it looked good. My question is, is there any other way to copy the VS AM file with condition?. Instead of using the sequential file, is there any way to copy from master file using that condition?. Any CL utilities available to copy vsam to vsam based on condition.

Thanks,
Back to top
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Fri Feb 23, 2007 6:30 am    Post subject:
Reply with quote

good point, I didn't think of that....My ex-wife would refer to it as "male vision".... icon_redface.gif
I must have been suckered in by the 1,11,PD..... icon_smile.gif
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: Fri Feb 23, 2007 9:23 am    Post subject:
Reply with quote

Hello,

You could read the vsam file with Easytrieve or a little COBOL program and either create a flat file to load or write the new records into a new vsam file.

Does your site use DFSORT or Syncsort?

I seem to recall that with both sorts you can process vsam in and back out to a new vsam file. The DFSORT manual shows an example of vsam in and vsam out in a sort. I may be mistaken about Syncsort as i have no doc here for Syncsort. If you are interested and send a reply, i'll check tomorrow when i've all the doc available.
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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am


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