Page 1 of 1

How to Empty a VSAM or PS

PostPosted: Wed Jan 28, 2009 9:15 pm
by Ramkumarsony
Hi,
I tried to empty a PS file and VSAM (KSDS).
----
For VSAM I used REPRO as given below.

//step exec pgm=IDCAMS
//sysprint dd sysout=(A)
//dd1 dd dummy
//dd2 dd dsn=my Vsam file,disp=shr
//sysin dd *
Repro infile*dd1) outfile(dd2)
/*
//

The Return code was 0. but My vsam file was not get emptied.
----
For PS file Emptying I used the following code.

//step exec pgm=IEBGENER
//sysprint dd sysout=(A)
//sysut1 dd dummy
//sysut2 dd dsn=my PS file,disp=shr
//sysin dd dummy
//
I got some Errors with MAXCC 12.(will post the error codes tommorow :) )

Instead of a Dummy file I have used an Empty file (in both the VSAM and PS) cases.
But the result were same as that of previous case with dummy files.

Can anyone of you please help on this.
Or if you tell any steps or ways to empty an VSAM or PS, then it will be very appreciated.

Thanks,
Ramkumar AG.

Re: How to Empty a VSAM or PS

PostPosted: Thu Jan 29, 2009 5:15 pm
by expat
For VSAM, the records will either be removed programatically or by a DELETE/DEFINE of the cluster and its associated components.

For the PS file, DD DUMMY on SYSUT1 should work as I have used this myself many times. It might help if you also coded the RECFM & LRECL on the SYSUT1 card.

Post the ouput from the jobs.