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
 

 

Converting flat file to VSAM using JCL only

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

New User


Joined: 12 Mar 2007
Posts: 15
Location: Philippines

PostPosted: Fri Mar 23, 2007 2:54 pm    Post subject: Converting flat file to VSAM using JCL only
Reply with quote

Hi guys... i need to convert an input flat file into a VSAM file with the use of JCL only. can anyone suggest to me the utility that i should use. just to be more detailed, i need to convert my input INFILE to OUTFILE.VSAM setting it's first field as the key.


i'll appreaciate your suggestions guys...thanks.
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: Fri Mar 23, 2007 3:03 pm    Post subject:
Reply with quote

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DGT2I230/30.0?DT=20040628101835

Dead easy - there are manuals available with the manuals button at the top of this page[/url]
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Fri Mar 23, 2007 3:04 pm    Post subject:
Reply with quote

Sort and idcams are two, maybe gener too.
Back to top
View user's profile Send private message
timburkart

New User


Joined: 17 Mar 2007
Posts: 30
Location: USA

PostPosted: Fri Mar 23, 2007 8:00 pm    Post subject: Re: Converting flat file to VSAM
Reply with quote

You can code the JCL in a number of different ways but these are the logical steps.

1) Use SORT to sort the flat file by key
2) Use IDCAMS to define the new KSDS cluster
3) Load sorted file (#1) into VSAM file (#2).

regards,

tim
Back to top
View user's profile Send private message
guptaa

New User


Joined: 22 Feb 2007
Posts: 10
Location: pune

PostPosted: Mon Mar 26, 2007 1:53 pm    Post subject:
Reply with quote

a sample code is as follows-

//REPRO EXEC PGM=IDCAMS
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSABOUT DD SYSOUT=*
//IN01 DD DSN=(Input flat file),DISP=SHR
//OUT01 DD DSN=(Output VSAM file name),DISP=OLD
//SYSIN DD *
REPRO INFILE(IN01) OUTFILE(OUT01) REPLACE
/*

if output VSAM file is not defined then you need to define it firsh
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 DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
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