How to Empty a VSAM or PS



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

How to Empty a VSAM or PS

Postby Ramkumarsony » Wed Jan 28, 2009 9:15 pm

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.
Ramkumarsony
 
Posts: 11
Joined: Wed Jun 25, 2008 10:12 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to Empty a VSAM or PS

 

Re: How to Empty a VSAM or PS

Postby expat » Thu Jan 29, 2009 5:15 pm

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.
expat
 
Posts: 382
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 1 time


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post