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 (March 1996, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Sun, 10 Mar 1996 23:13:02 -0500
Reply-To:   "Andy Barnett (eppard@parsifal.nando.net)" <eppard@NANDO.NET>
Sender:   "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:   "Andy Barnett (eppard@parsifal.nando.net)" <eppard@NANDO.NET>
Subject:   Long SYSPARMs (>247 chars) under VMS?

I am using SAS 6.09 under VMS on an Alpha, and wonder if it is possible to pass a SYSPARM longer than 247 chars to the SAS job. I am not sure if it is VMS or SAS that is the limiting piece in this puzzle, but the limit to the length of a macro variable seems to be quite high (haven't tested to find the max), whereas, of course the length of a character string is 200. I am unsure what the maximum lengths for DCL symbols and the /SYSPARM= option on the SAS command line are.

In any case, when I run the code in part B below with the DCL in part A:

------------------------------------------------------------------------ PART A -- SYSPARM.COM

$! SYSPARM.COM $ n = p1 !p1 = length of SYSPARM to use $!Construct a n-length VMS_SYMBOL by 10 chars, plus the remaining mod10 $ n10 = n/10 !same as SAS INT(N/10) $ nine = "....|...." !tenth character will be the tens place digit $ vms_symbol = "" !length = 0 $ k = 0 $loop: $ if k .ge. n10 then goto loop_end $ k = k + 1 $ lk = f$length(f$string(k)) $ vms_symbol = vms_symbol + nine + f$extract( lk-1, 1, f$string(k) ) $ goto loop $loop_end: $! now do n mod 10 $ nmod10 = n - n10*10 $ if nmod10 .gt. 0 then - vms_symbol = vms_symbol + f$extract( 0, nmod10, nine ) $ sho symbol vms_symbol $ sas sysparm.sas/sysparm='vms_symbol'/log=sysparm.saslog_'n' $ type sysparm.saslog_'n' $ exit

Run above with @SYSPARM 247, or to catch VMS messages: SPAWN/LOG=SYSPARM.VMSLOG_247 @SYSPARM 247

------------------------------------------------------------------------- PART B -- SYSPARM.SAS

%put LSYSPARM=%length(&sysparm);

data _null_; lsysparm = length("&sysparm"); put lsysparm=; stop; run;

------------------------------------------------------------------------ For @SYSPARM 247, I get LSYSPARM=247 for the %PUT and LSYSPARM=200 for the PUT.

When I attempt to use a 248 character string, the program seems to get stuck, and 249 or higher causes an access violation.

So the maximum usable length seems to be 247 (and that is accessible only with macro code, since non-macro code cannot handle characters longer than $200.

My questions then are:

1) What is the maximum length allowed for a VMS symbol? 2) What is the maximum length allowed for the /SYSPARM= option on the $ SAS command? 3) What is the maximum length allowed for a macro variable once inside SAS?

PS - The reason I am exploring this is to avoid writing COM files to pass arguments via VMS symbols to a SAS job, and instead to pass them through SYSPARM. But there just isn't enough room in SYSPARM so far.

Thanks for any comments.

Andy E. Barnett eppard@nando.net Raleigh, NC, USA


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