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 (November 2003, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 11 Nov 2003 10:40:34 +0100
Reply-To:     "Groeneveld, Jim" <jim.groeneveld@VITATRON.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Groeneveld, Jim" <jim.groeneveld@VITATRON.COM>
Subject:      Re: A Macro Problem (ref.: SUGI Paper 100-27)
Comments: To: A Druga <antoniamarija@NET.HR>
Content-Type: text/plain; charset="iso-8859-1"

Hi A Druga,

It depends how you use, how you call the macro. If you just call it from within a data step that will generate the error as you just would generate the statement «1;» which on itself is illegal of course. You should instead code something like: «Existing = %exists(temp1e);»

Regards = Jim. -- . . . . . . . . . . . . . . . .

Jim Groeneveld, MSc. Biostatistician Science Team Vitatron B.V. Meander 1051 6825 MJ Arnhem Tel: +31/0 26 376 7365 Fax: +31/0 26 376 7305 Jim.Groeneveld@Vitatron.com www.vitatron.com

My computer has the solutions, I have the problems.

[common disclaimer]

-----Original Message----- From: A Druga [mailto:antoniamarija@NET.HR] Sent: Tuesday, November 11, 2003 10:15 To: SAS-L@LISTSERV.UGA.EDU Subject: A Macro Problem (ref.: SUGI Paper 100-27)

Hi out there!

I found this little Macro in SUGI Paper 100-27 (Carpenter).

%macro exists(dsn); %sysfunc(exist(&dsn)); %mend exists;

As one can see it is very simple and it's task is easy to understand.

I'm quite new to SAS and now I'm getting following log messages which I don't know to interpret:

5285 %exists(temp1e); MLOGIC(EXISTS): Beginning execution. MLOGIC(EXISTS): Parameter DSN has value temp1e SYMBOLGEN: Macro variable DSN resolves to temp1e NOTE: Line generated by the macro function "SYSFUNC". 1 1 - 180 MPRINT(EXISTS): 1;

ERROR 180-322: Statement is not valid or it is used out of proper order.

MLOGIC(EXISTS): Ending execution.

The Dataset exists, the macro resolves to the right value and give the right output but there is some error which I don't know to eliminate. Any hints what I'm doing wrong?

Thank You in advance.


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