Date: Tue, 19 Aug 1997 13:39:01 -0500
Reply-To: Girish S Patel <girish.s.patel@CCMAIL.CENSUS.GOV>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Girish S Patel <girish.s.patel@CCMAIL.CENSUS.GOV>
Subject: Re[2]: Reading GDG files
Content-Type: text/plain; charset=US-ASCII
There is a another utility, that deletes any numbers of files.
Sample JCL follows :
//xxxxxxxx JOB (UMxxxx,UMxxxxxxx),'N2332-AUG97',NOTIFY=UMxxxx,
// CLASS=A,MSGCLASS=9
/*ROUTE PRINT RMT83
//STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE filename1 >>>> NO OTHER PARAMETERS
DELETE filename2 >>>> NO OTHER PARAMETERS
DELETE filename3 >>>> NO OTHER PARAMETERS
I hope, this might be useful to anybody at anytime..........
Just sharing........
______________________________ Reply Separator _________________________________
Subject: Re: Reading GDG files
Author: <lbertoli@pop.service.ohio-state.edu> at SMTP-GATEWAY
Date: 8/19/97 8:34 AM
Annabel820 wrote:
>
> I need to read a number of generations of a sas dataset which can vary
> from day to day. Does anyone have any idea how I could read all the
> generations that exist into one sas file then delete the gdg files so that
> I can read all the ones that get created the next day etc. Tried DSNEXST,
> but that needs to know the actual generation number. Thanks in advance
To read all generations in a GDG, code a DD card that contains
the GDG base name, without specifying a generation:
//FRED DD DSN=A.B.FRED,DISP=SHR
(Note that the generations will be read in LIFO order. If you
need to read them in FIFO order, you may need to use some code
that reads the catalog, and generates DD cards in FIFO order.
Let me know if you need code to do that.)
To delete all the generations:
// EXEC PGM=IEFBR14
//DD1 DD DSN=A.B.FRED,DISP=(OLD,DELETE)
--
Larry Bertolini : Larry.Bertolini@osu.edu : "220, 221...
University Technology Services : 1121 Kinnear Rd : whatever it
Ohio State University : Columbus, OH 43212-1153 : takes."