Getsystemval?
Thomson, Martyn EDUC:EX
martyn.thomson at gov.bc.ca
Wed Jul 16 13:04:07 CDT 2008
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
More information about the powerh-l
mailing list