The subject of macros is reasonably complex (but well worth learning) please ensure you have at least read the macro introduction before reading this section.
The following example uses the "#evaluate" command and the
"Standard Definition" of
"<?OutputFile>" as well as demonstrating the use of
using rexx code to include logic.
;--- Capture some HTML information ------------------------------------------
#evaluate ShortNameHtml "_filespec('name', '<?OutputFile>')"
#evaluate ShortNameHtmlLowerCase "ToLowerCase('<$ShortNameHtml>')"
The above defined two macros, the first is the short name of the output file (no path or drive attached) and the second is the same short name but all lower case.
Notice that the
first parameter to the rexx translate function above is surrounded by
single quotes, we could safely do this only because we know that a
filename can't contain single quotes! You need to be careful with
your use of quotes etc as the macro replacement simply places the
correct text where requested. We could have used the
PPWIZARD "MacroGet" function if we
were not sure about the quote situation as demonstrated below:
;--- Capture some HTML information ------------------------------------------
#evaluate ShortNameHtmlLowerCase "ToLowerCase(MacroGet('ShortNameHtml'))"
There is another (probably better way) of handling the quote
'problem' as in:
;--- Capture some HTML information ------------------------------------------
#evaluate ShortNameHtmlLowerCase "ToLowerCase('<$ShortNameHtml $$SQX2>')"