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 2006, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 20 Dec 2006 11:55:44 -0000
Reply-To:     Ian Wakeling <ian.wakeling@HANANI.QISTATS.CO.UK>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Ian Wakeling <ian.wakeling@HANANI.QISTATS.CO.UK>
Subject:      Re: Macro help
Content-Type: text/plain; format=flowed; charset="Windows-1252";
              reply-type=original

Hema,

I believe %SYMDEL only operates on global macro variables. As dsid and rc are local to the macro %temp they will not persist after the macro has been processed and so there is no need to try to delete them.

Ian.

----- Original Message ----- From: "hema" <hema_dave15@YAHOO.COM> To: <SAS-L@LISTSERV.UGA.EDU> Sent: Wednesday, December 20, 2006 11:38 AM Subject: Macro help

> Hi, > > I am running the below code... but getting problem .. > > > %macro temp(data); > %global cnt; > %let dsid=%sysfunc(open(&data)); > %let cnt=%sysfunc(attrn(&dsid,NOBS));%let rc=%sysfunc(close(&dsid)); > %symdel dsid; > %symdel rc; > %put &cnt; > %mend; > %temp(items); > > The error i am getting is > > MLOGIC(TEMP): Beginning execution. > MLOGIC(TEMP): Parameter DATA has value items > MLOGIC(TEMP): %GLOBAL CNT > MLOGIC(TEMP): %LET (variable name is DSID) > MLOGIC(TEMP): %LET (variable name is CNT) > MLOGIC(TEMP): %LET (variable name is RC) > MLOGIC(TEMP): %SYMDEL DSID > WARNING: Attempt to delete macro variable DSID failed. Variable not found. > MLOGIC(TEMP): %SYMDEL RC > WARNING: Attempt to delete macro variable RC failed. Variable not found. > MLOGIC(TEMP): %PUT &cnt > 14 > MLOGIC(TEMP): Ending execution > > > > > Help appreciated :) > > Regards, > Hema > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com >


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