Can't get symbol to work in procedure

March 8, 2010 at 09:56:01
Specs: OpenVMS 7.3-2
Hello, I'm new to OpenVMS and need some basic help with a procedure. I'm not able to get the search command to use a symbol I've defined. It just uses the actual symbol name. Here's a relevant excerpt from the procedure:

$ dayy = F$EXTRACT(8,2,F$CVTIME("yesterday",,"date"))
$ mony = F$EXTRACT(2,3,F$CVTIME("yesterday","absolute","date"))
$ space = " "

$ datey = F$FAO("!3(AS)",mony,space,dayy)
$ SEARCH ETU.LOG 'datey'

$! Note: the datey symbol doesn't work with the single quotes at all. The parameter is only taken if it's without quotes, but then as mentioned before the actual symbol name is searched for.


See More: Cant get symbol to work in procedure

Report •

#1
March 8, 2010 at 23:41:55
rewrite the the command to read shorter like this:

$ dayy = F$CVTIME("yesterday",,"day")
$ mony = F$CVTIME("yesterday","absolute","month")
$ datey = mony+" "+dayy
$ SEARCH ETU.LOG "''datey'"


The datey symbol in the search command has to be in double string quotes, because it contains a space, and the substitution within the string quotes has to be doubled
( ''datey' ) .

Joseph Huber, http://www.huber-joseph.de
ITRC


Report •

#2
March 9, 2010 at 05:47:35
Ty Joseph, that worked.

Report •
Related Solutions


Ask Question