IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Converting flat file to VSAM using JCL only


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 8797
Location: Welsh Wales

PostPosted: Fri Mar 23, 2007 3:03 pm
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: 3156
Location: Tucson AZ

PostPosted: Fri Mar 23, 2007 3:04 pm
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: 29
Location: USA

PostPosted: Fri Mar 23, 2007 8:00 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top