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 (July 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, 15 Jul 2004 15:44:17 -0400
Reply-To:   Pat Moore <anpam@UAA.ALASKA.EDU>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Pat Moore <anpam@UAA.ALASKA.EDU>
Subject:   Change text in a macro variable

SAS Gurus,

I have a variable called ay which looks like this: 2001-2002. I want to use it as part of a filename, so I need to get rid of the hyphen or (preferably) replace the hyphen with an underline. I'm doing this in a macro, so I need a step that does something like this:

data &c&cno&(translate(&ay,'-','_')); set etc...

So that the macro creates a filename like:

data ART1022001_2002;

How does one accomplish this feat?

Pat Moore


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