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 (October 1996, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 7 Oct 1996 10:18:31 -0700
Reply-To:   gxx18300@ggr.co.uk
Sender:   "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:   Bruce Rogers <gxx18300@GGR.CO.UK>
Organization:   Medical IR, Glaxo Wellcome
Subject:   Re: SCL Variables in Submit Blocks
Comments:   To: Kimberly LeBouton <klebouton@AMERHONDA.COM>

Kimberly LeBouton wrote: > > I'm downsizing an AF application from MVS to UNIX. I'm reprogramming the > application to run on both platforms, but have run into a glitch. > > In my respective autoexecs, I have created the following macro variable. > > MVS: %let indroot="&sysjobid"; > UNIX: %let indroot='$HOME/'; > > In my INIT section of my AF program, I created the following SCL variable. > > indroot=&indroot; > > Later in my MAIN section, I have a libname allocated in a SUBMIT BLOCK. > > ... SUBMIT; > libname graph '&indroot.graphv6.sasdata'; > ...ENDSUBMIT; > > Here's how the libname statement resolves. > > MVS: libname graph 'userid.graphv6.sasdata'; > UNIX: libname graph '$HOME/.graphv6.sasdata'; > > I would like my UNIX statement to not include the "." after the "/". > > Can I get this SCL variable to resolve the way a macro variable would, > without the period? The original developer wants the many, many libnames > to stay in the submit blocks. >

Kim,

It seems that you want the variable to resolve differently, depending on which machine you're on, which can't be done. To achieve the same end, however, a conditional assignment could be performed before the libname, something like:

dsn = 'graphv6.sasdata' ; if index("&indroot",'/') then lib = left("&indroot") || '.' || dsn ; else lib = left("&indroot") || dsn ;

submit; libname graph "&lib" ; endsubmit;

Obviously, there are many variations of this (a better way might be to have another variable determine the OS) but it should do what you want as it is.

HTH

Bruce


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