jayakumar
Answered On : Sep 9th, 2006
STEP1:Sort the input flat file in an ascending sequence//step1 exec pgm=sort//sysout dd sysout=*//sysin dd * sort fields=(starting location of the key field,length in bytes,sort seq(asc or desc),format(ch))/*step2;create the VSAM cluster using idcams//step2 exec pgm=idcams//sysprint dd sysout=*//sysin dd *define cluster(name(your.base.cluster) -volumes(*) - keys(length in bytes,starting position of key field) - recordsize(avg,max) -freespace(20 ,20)) - data(name(your.base.data) -)index(name(your.base.index) -controlintervalsize(4096)))Step3:Use repro to load the flat file to vsam file//step3 exec pgm=idcams.//sysprint dd sysout =*//sysin dd *REPRO INDATASET("FLAT FILE") OUTDATASET("YOUR BASE CLUSTER FILE")//
Login to rate this answer.
manoj
Answered On : Sep 29th, 2006
Actually , the question asked how to create vsam file from a flat file,
let me clear we can not create flat file to vsam dataset, only we can copy records of flat file to vsam dataset using repro command.
the above example shows copy of flat file to vsam not conversion.
thanks
manoj
Login to rate this answer.
TUSHAR
Answered On : Oct 27th, 2006
yes manoj is right.
Login to rate this answer.
Shrikant
Answered On : Mar 30th, 2007
No Jayakumar is right, that is the way of conversion of flat file to KSDS. First sort, then copy to KSDS.
Login to rate this answer.