Hi:
In order for the footnote statement to work, you must declare what the ODS ESCAPECHAR value is. ODS ESCAPECHAR is the special character that lets ODS know that you want to do something special (like use the {thispage} and/or {lastpage} Escapechar functions. Something along the lines of:
[pre]
ods pdf file='wombat.pdf';
ods escapechar='^';
footnote1 j=right height=1 "Page ^{thispage} of ^{lastpage}";
.... more code ....
ods pdf close;
[/pre]
Generally, I recommend the use of ~ (tilde) or ^ (caret) or # (sharp/pound sign) for the Escape character, because you are unlikely to have them in a title or footnote text. Or conversely, avoid any punctuation that you might find in an operating system path or title text or urls or email addresses, such as : \ / ; ! @ $ % & * < > (not a comprehensive list of all punctuation that I avoid). Mostly I use ~ or ^ or #.
cynthia