| Date: | Tue, 19 Aug 1997 08:34:28 -0400 |
| Reply-To: | lbertoli@pop.service.ohio-state.edu |
| Sender: | "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU> |
| From: | Larry Bertolini <Larry.Bertolini@OSU.EDU> |
| Organization: | Ohio State University - University Technology Services |
| Subject: | Re: Reading GDG files |
| Content-Type: | text/plain; charset=us-ascii |
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."
|