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
 

 

Repro command to copy a particular record from VSAM to Flat

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
vinayknj

New User


Joined: 26 May 2008
Posts: 50
Location: Bangalore

PostPosted: Thu Oct 13, 2011 11:14 am    Post subject: Repro command to copy a particular record from VSAM to Flat
Reply with quote

Hi,

I am trying to copy a Particular record from VSAM file to a Flat file using REPRO command. I have used below code to do that but I don't know complete KEY, I only know part of the key and I want to copy the records based on that partial KEY.
Please suggest me how I can achieve this. Thanks

Code:
/* ReXX */                                                           
 MAIN_PROCESSING:                                                     
   " ALLOC DA('VSAM.FILE') DD(INDD) SHR"         
   " ALLOC DA('FLAT.FILE') DD(OUTDD) NEW",
   " SPACE(100,100) DSORG(PS) RECFM(F,B) LRECL(350) BLKSIZE(3500)"   
/* COPY VSAM FILE TO A FLAT FILE */                                   
   " REPRO IFILE(INDD) OFILE(OUTDD) FROMKEY('0000000000XXXXXX')"     
 EXIT                       



KEY length- 16 splitted as 1 - 5, 6 - 10 and 11 - 16. I know the partial key from 11 - 16 and copy the records based on this partial Key. Kindly sugget.
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7251

PostPosted: Thu Oct 13, 2011 11:21 am    Post subject: Reply to: Repro command to copy a particular record from VSA
Reply with quote

Since you don't know the high-order part of the key, I'd suggest SORT, with COPY and INCLUDE for what you do know and STOPAFT if there is really only one and you don't want to continue processing the file.
Back to top
View user's profile Send private message
vinayknj

New User


Joined: 26 May 2008
Posts: 50
Location: Bangalore

PostPosted: Thu Oct 13, 2011 11:25 am    Post subject: Re: Reply to: Repro command to copy a particular record from
Reply with quote

Bill Woodger wrote:
Since you don't know the high-order part of the key, I'd suggest SORT, with COPY and INCLUDE for what you do know and STOPAFT if there is really only one and you don't want to continue processing the file.


Can I do the Sort in Rexx itself because I don't want to use JCL in my tool ? If yes, can you tell me the syntax in REXX. Thanks
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7251

PostPosted: Thu Oct 13, 2011 11:55 am    Post subject: Reply to: Repro command to copy a particular record from VSA
Reply with quote

You can call sort from rexx. Try searching the CLIST/rexx forum or th web, or your sort manual.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Thu Oct 13, 2011 5:59 pm    Post subject: Reply to: Repro command to copy a particular record from VSA
Reply with quote

vinayknj, since you're working with VSAM, don't you think your process might be better suited to an actual program (COBOL or other) rather than to a REXX exec?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Oct 13, 2011 6:16 pm    Post subject:
Reply with quote

Click HERE for an example.
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts Underlying DB2 VSAM LDS - SMF recording vasanthz All Other Mainframe Topics 6 Thu Jan 05, 2017 4:20 am
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 0 Mon Jan 02, 2017 11:16 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm


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