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 (December 1996, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 12 Dec 1996 14:15:07 +0500
Reply-To:   Bernard Tremblay <bernard@CAPITALE.QC.CA>
Sender:   "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:   Bernard Tremblay <bernard@CAPITALE.QC.CA>
Subject:   Re: macro question
Comments:   To: mhollifi@POST.CIS.SMU.EDU

Hi,

Your code is a little bit confusing, but I can tell you why you don't get the results in your macro variable. Just try to put a "run;" statement before your "%put" then you will have your data step executed and the macro will be resolved at execution time of the %put statement.

Regards, Benard Tremblay

\\\|/// \\ - - // ( @ @ ) +------oOOo-(_)-oOOo----------+---------------------------------+ | Bernard Tremblay | Bureau: (418) 646-2401 | | La Capitale | Maison: (418) 878-4447 | | |Internet: bernard@capitale.qc.ca | | | bertrem@quebectel.com | +---------------Oooo----------+---------------------------------+ oooO ( ) ( ) ) / \ ( (_/ \_)

>>>From owner-sas-l@UGA.CC.UGA.EDU Thu Dec 12 11:55 EST 1996 >>>Nntp-Posting-Host: post.cis.smu.edu >>>Xref: paladin.american.edu comp.soft-sys.sas:33626 >>>Date: Wed, 11 Dec 1996 16:43:02 -0600 >>>From: Machiko Hollifield <mhollifi@POST.CIS.SMU.EDU> >>>Subject: macro question >>>To: Multiple recipients of list SAS-L <SAS-L@UGA.CC.UGA.EDU> >>> >>>Hi everyone, >>>I have a problem with macro program. I cannot create a macro variable >>>using "call symput". Is anyone help me where did I do wrong. >>>What I'm trying to do is move the sas variable (date) to macro variable. >>>This is the output. >>> >>> >>>Thank you for your help. >>> >>>Machiko Hollifield >>> >>>P.S. Since we are stack with "trn" as a news reader and it's very hard >>>to find the mail through it, if you can send me reply directly to me >>>instead of the group, I really appriciate it. >>> >>>By the way, is anyone has good primer of "trn"? At Southern Methodist >>>University, they don't supply any course or handout. >>>**************************output*************************************** >>>MPRINT(MONTHLY): * THIS MACRO CALCULATE LAST DAY OF THE MONTH. THEN >>>FIND THE F >>>SATURDAY TO FRIDAY * THE INPUT DATA SHOULD BE THE TODAY''S DATE EITHER * >>>TODAY() >>>REPORT SHOULD BE COVER *; >>>MPRINT(MONTHLY): DATA _NULL_; >>>MPRINT(MONTHLY): RDATE = TODAY()-15; >>>MPRINT(MONTHLY): LBEGIN = '01'|| SUBSTR(PUT(RDATE,DATE9.),3); >>>MPRINT(MONTHLY): NBEGIN = INPUT(LBEGIN,DATE10.); >>>MPRINT(MONTHLY): CALL SYMPUT('bday',PUT(NBEGIN,MMDDYY10.)); >>>MPRINT(MONTHLY): THISMON = '01'|| SUBSTR(PUT(TODAY(),DATE9.),3); >>>MPRINT(MONTHLY): LEND = INPUT(THISMON,DATE10.) - 1; >>>MPRINT(MONTHLY): CALL SYMPUT('eday',PUT(LEND,MMDDYY10.)); >>>MPRINT(MONTHLY): PUT _ALL_; >>>MLOGIC(MONTHLY): %PUT &bday = &eday= >>>WARNING: Apparent symbolic reference BDAY not resolved. >>>WARNING: Apparent symbolic reference EDAY not resolved. >>>&bday = &eday= >>>MPRINT(MONTHLY): * CALL SYMPUT('BDAY',PUT(BEGIN,MMDDYY10.)); >>>MPRINT(MONTHLY): * CALL SYMPUT('EDAY',PUT(END,MMDDYY10.)); >>>MLOGIC(MONTHLY): Ending execution. >>> >>>RDATE=13479 LBEGIN=01NOV1996 NBEGIN=13454 THISMON=01DEC1996 LEND=13483 >>>_ERROR_=0 >>> >>>********************************************************************** >>>


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