LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (June 2001, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 4 Jun 2001 14:08:09 -0600
Reply-To:     Michael Gibson <michael_gibson@NOSPAM.STORTEK.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Michael Gibson <michael_gibson@NOSPAM.STORTEK.COM>
Organization: Storage Technology Corporation
Subject:      Re: Overview of Data _Null_

Data _NULL_ can be used for generating dates used for selection or report headers. This is very handy for creating dynmic running reports that run each month, without having to change the code.

It can also be used to create MACRO variables that are used for addational processing else where in the code. These can be record counts or any other type of information from a table.

Example of getting Dates: -------------------------------- data _null_; cur_date = today(); last_mth = intnx( MONTH, cur_date, -1);

call symput( 'curdte', put( cur_date, date9.)); call symput( 'lstdte',put( last_mth, date9.)); call symput( 'rpthead', put( last_mth, month. )); run;

proc sql; create table work.selected as select * from database where row_add_dte between "&lstdte" and "curdte"; quit;

title1 "my report for the month of &rpthead";

Michael G.


Back to: Top of message | Previous page | Main SAS-L page