how to read contents of ksds
Posted:
Tue Jul 20, 2010 11:34 am
by nagendra
how to view contents of a ksds file.
Re: how to read contents of ksds
Posted:
Tue Jul 20, 2010 11:57 am
by smita257
If you want to read the KSDS, do you want to read it sequentially or randomly?
If sequential then perform a startbrowse in your program checking the key value and then read.
If random directly move the value into key and read the file.
Re: how to read contents of ksds
Posted:
Tue Jul 20, 2010 12:37 pm
by smita257
You can also view by print the contents through IDCAMS.
//PRINT EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//INPUT DD DSN=YOUR.KSDS,DISP=OLD
//SYSIN DD *
PRINT
INFILE(INPUT)
/*
Re: how to read contents of ksds
Posted:
Tue Jul 20, 2010 7:29 pm
by NicC
//INPUT DD DSN=YOUR.KSDS,DISP=OLD
I would change the DISP to SHR unless you have a real need to have exclusve use of the dataset
Re: how to read contents of ksds
Posted:
Wed Jul 21, 2010 1:50 pm
by nagendra
smita257 wrote:You can also view by print the contents through IDCAMS.
//PRINT EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//INPUT DD DSN=YOUR.KSDS,DISP=OLD
//SYSIN DD *
PRINT
INFILE(INPUT)
/*
yaa, i just testd it, i got the concept... thanx a lot..