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: 7315

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: 7315

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: 4649
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 Need to write record of PS File in ex... Chandan1993 JCL & VSAM 1 Wed Jun 07, 2017 1:35 am
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts copy SEQ to PDS and create stats steve-myers JCL & VSAM 7 Thu Apr 27, 2017 1:15 am
No new posts VSAM Space Allocation mrgnndhmk JCL & VSAM 7 Sat Apr 22, 2017 12:42 am


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