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 (February 2004, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 19 Feb 2004 09:55:18 -0500
Reply-To:     "Droogendyk, Harry" <Harry.Droogendyk@CIBC.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Droogendyk, Harry" <Harry.Droogendyk@CIBC.COM>
Subject:      Re: %SYSFUNC, TRANWRD, and quoting
Content-Type: text/plain; charset="iso-8859-1"

Yes. From Online Docs:

Because %SYSFUNC is a macro function, you do not need to enclose character values in quotation marks as you do in DATA step functions. For example, the arguments to the OPEN function are enclosed in quotation marks when the function is used alone, but do not require quotation marks when used within %SYSFUNC. These statements show the difference:

dsid=open("sasuser.houses","i");

dsid=open("&mydata","&mode");

%let dsid = %sysfunc(open(sasuser.houses,i));

%let dsid=%sysfunc(open(&mydata,&mode));

All arguments in DATA step functions within %SYSFUNC must be separated by commas. You cannot use argument lists preceded by the word OF.

-----Original Message----- From: Kevin Roland Viel [mailto:kviel@EMORY.EDU] Sent: February 19, 2004 9:39 AM To: SAS-L@LISTSERV.UGA.EDU Subject: %SYSFUNC, TRANWRD, and quoting

Greetings,

Perhaps this is consistent, but still gave me pause. When using the TRANWRD function within a %SYSFUNC call, the arguments do not need to be quoted:

466 %let f1 =fVIII_P04_p12_A39_F_H08_64.ab1; 467 %let f2 = %sysfunc( tranwrd( &f1. , _F_ , _R_ )); 468 469 %put &f1; fVIII_P04_p12_A39_F_H08_64.ab1 470 %put &f2; fVIII_P04_p12_A39_R_H08_64.ab1 471 472 473 data _null_ ; 474 f2 = tranwrd( "fVIII_P04_p12_A39_F_H08_64.ab1" , "_F_" , "_R_" ) ; 475 put f2 ; 476 run;

fVIII_P04_p12_A39_R_H08_64.ab1

Is this the general convention for other functions?

Thanks,

Kevin

Kevin Viel Department of Epidemiology Rollins School of Public Health Emory University Atlanta, GA 30322


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