View previous topic :: View next topic
|
Author |
Message |
wicked1925
New User
Joined: 12 Mar 2007 Posts: 15 Location: Philippines
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Sort and idcams are two, maybe gener too. |
|
Back to top |
|
|
timburkart
New User
Joined: 17 Mar 2007 Posts: 29 Location: USA
|
|
|
|
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 |
|
|
guptaa
New User
Joined: 22 Feb 2007 Posts: 10 Location: pune
|
|
|
|
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 |
|
|
|