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: 4649
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 copying data without knowing location arunsoods DFSORT/ICETOOL 6 Thu Jul 20, 2017 1:03 pm
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm


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