Getsystemval?

GJohnson gjohnson at mbfoster.com
Wed Jul 16 13:25:30 CDT 2008


Is it possible that the variable created, perhaps in a sub-process, is
not passed back? You may have to send the output to a file and check
that. 

Gerry Johnson


-----Original Message-----
From: powerh-l-bounces+gjohnson=mbfoster.com at lists.sowder.com
[mailto:powerh-l-bounces+gjohnson=mbfoster.com at lists.sowder.com] On
Behalf Of Thomson, Martyn EDUC:EX
Sent: July 16, 2008 2:04 PM
To: powerh-l at lists.sowder.com
Subject: Getsystemval?


Hello Listers,
I'm trying to add a check to initialize procedure of a QUICK screen to
check for the existence of a file using "RUN COMMAND", and testing
$STATUS indirectly with GETSYSTEMVAL. Something like this - 

DEFINE t_SRB_FILES CHAR*10 = GETSYSTEMVAL("SRB_FILES",SYMBOL)

  RUN COMMAND "dir/sin/out=sys$login:srblist.tmp xtr$srb"
  RUN COMMAND "SRB_FILES == $STATUS"
  IF t_SRB_FILES = "%X00000001"
  THEN BEGIN
      WARNING = "ERROR: Cannot proceed: Vouchers posted to CAS already
today" &
        NOW RESPONSE
      RETURN
  END

Although this works fine interactively in DCL the GETSYSTEMVAL returns
an empty string. 
I've tried making it a TEMP and using LET t_SRB_FILES =
GETSYSTEMVAL("SRB_FILES",SYMBOL)
 
I've tried using logicals - RUN COMMAND "DEFINE/GROUP SRB_FILES
'$STATUS"  
                            LET t_SRB_FILES =
GETSYSTEMVAL("SRB_FILES",LOGICAL,"(LNM$GROUP")

I've tried interrogating $STATUS directly - LET t_SRB_FILES =
GETSYSTEMVAL("$STATUS",SYMBOL)
A value is returned but is the same irrespective of whether the file
exists! Any ideas how to make this work?

Martyn Thomson
PowerHouse 7.10G1 on OpenVMS 8.3

-- 
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l at lists.sowder.com
Subscribe: 'subscribe' in message body to
powerh-l-request at lists.sowder.com
Unsubscribe: 'unsubscribe <password>' in message body to
powerh-l-request at lists.sowder.com
http://lists.sowder.com/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.
Add 'site:lists.sowder.com powerh-l' to your search terms to search the
list archive at Google.



More information about the powerh-l mailing list