home *** CD-ROM | disk | FTP | other *** search
- Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
- Path: sparky!uunet!darwin.sura.net!paladin.american.edu!auvm!COMPUSERVE.COM!76350.1604
- Message-ID: <920729213244_76350.1604_EHJ52-3@CompuServe.COM>
- Newsgroups: bit.listserv.sas-l
- Date: Wed, 29 Jul 1992 17:32:44 EDT
- Reply-To: Andy Norton <76350.1604@COMPUSERVE.COM>
- Sender: "SAS(r) Discussion" <SAS-L@UGA.BITNET>
- From: Andy Norton <76350.1604@COMPUSERVE.COM>
- Subject: File date in SAS 6.07 VMS
- Comments: To: SAS-L <SAS-L@AWIIMC12.IMC.UNIVIE.AC.AT>
- Lines: 46
-
- ----------------------------------------------------------------------
- CONTENT: Response
- SUMMARY: Response to Mark Shaffer (obtaining sas dataset creation)
- Use version 6.07 SQL Dictionary Views
- REL/PLTF: 6.07.01/CMS, 6.04/PC-DOS
- E-ADDR: 76350.1604@compuserve.com
- NAME: Andy Norton
- ADDRESS: Trilogy Consulting, 5822 Lovers Lane, Kalamazoo MI 49002
- PHONE: (616) 344-2191
- ----------------------------------------------------------------------
- Marc Schaeffer (mschaeff@PILOT.NJIN.NET) asked
- > Is there a macro, like &sysdate, which I can use to insert the
- > filedate (i.e., the date the file was last refreshed) in a footer
- > in my reports?
-
- On page 289 of Technical Report P-222 ("Changes and Enhancements to
- BASE SAS Software, Release 6.07") it describes SQL dictionary views.
- These let you get at internal dataset header information that was
- previously only printed on PROC CONTENTS listings.
-
- Using SQL,
- proc sql noprint;
- select CRDATE
- into :CRDATE
- from DICTIONARY.TABLES
- where LIBNAME = 'WHATEVER'
- and MEMNAME = 'WHATELSE';
- quit;
- proc print data=WHATEVER.WHATELSE;
- footnote "Created on &CRDATE";
- run;
-
- Note that CRDATE yields a formatted DATETIME value. You might want to
- use the DATEPART function to get a DATE value.
-
- You can also do it without PROC SQL (no particular advantage):
-
- data _null_;
- set SASHELP.VTABLE;
- where LIBNAME='WHATEVER' and MEMNAME='WHATELSE';
- call symput ('CRDATE', put(CRDATE, DATETIME.));
- run;
-
- Note: SASHELP.VTABLE is a built-in kludge allowing you to access
- Dictionary views from outside of SQL (after all, DICTIONARY is an
- invalid libname). See page 290 of Tech Rpt P-222.
-