Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 4650
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: 8618
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 File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Rexx - File tailoring samzee71 CLIST & REXX 10 Thu Nov 30, 2017 10:47 pm
No new posts Compare VSAM files using DFSORT pshongal DFSORT/ICETOOL 5 Thu Nov 23, 2017 10:24 am
No new posts Moving a PS file as body of a mail! Vignesh Sid JCL & VSAM 4 Tue Nov 21, 2017 9:23 pm
No new posts unable to set RC = 4 when empty file migusd SYNCSORT 1 Tue Nov 21, 2017 1:21 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us