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
 

 

Copying a Flatfile to a VSAM file.

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

New User


Joined: 09 Apr 2007
Posts: 25
Location: Chennai,India

PostPosted: Mon Feb 25, 2008 3:55 am    Post subject: Copying a Flatfile to a VSAM file.
Reply with quote

Hi,

I need to copy a flat file to a vsam file which is being created at the time of the run.

Basically i am creating a VSAM file and copying the data from flat file to it.
Can you please tell me if the syntax that follows is correct?

Code:

//LOADSORT EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//IN01  DD DSN=COL.FLAT.FILE,
//             DISP=SHR
//OUT01 DD DSN=COL.VSAM.FILE,
//            DISP=(NEW,CATLG,DELETE),
//            DCB=LRECL=29,
//            RECORG=KS,KEYLEN=29,KEYOFF=0,
//            UNIT=SYSDA,SPACE=(TRK,(10,10),RLSE)
//SYSIN    DD *
      REPRO  INFILE(IN01) OUTFILE(OUT01) REUSE
//*


Thanks,
Shahul
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: Mon Feb 25, 2008 4:42 am    Post subject:
Reply with quote

Hello,

You might need to DELETE/DEFINE the vsam file before you REPRO into it.

There are multiple topics on how to define a vsam file in the forum (use "Search"). Here is the link to one of them:
http://ibmmainframes.com/viewtopic.php?t=17867&highlight=delete+define
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Mon Feb 25, 2008 4:52 am    Post subject:
Reply with quote

Isn't there a REUSE verb for IDCAMS?
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: Mon Feb 25, 2008 6:26 am    Post subject: Reply to: Copying a Flatfile to a VSAM file.
Reply with quote

Off hand, without actually running the code, it looks to me like it should work. Shahul, did you experience any problems with it?
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: Mon Feb 25, 2008 3:24 pm    Post subject:
Reply with quote

And is the data sorted in key sequence ?
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 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 Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm


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