The SAS Output Delivery System and reporting techniques

ODS Options parameter

Reply
N/A
Posts: 0

ODS Options parameter

Saw David Kelly do an ODS talk here yesterday and am trying something he suggested but I'm getting an error message. (v9.12 on XP)

182 ods csv file="csvsemi.csv" options(Delimiter=';');
--------
22 200
ERROR 22-322: Syntax error, expecting one of the following: ;, (, ANCHOR, ARCHIVE, ATTRIBUTES, AUTHOR, BASE, BODY, CHARSET, CLOSE, CODE, CONTENTS, DATA, ENCODING, EVENT, FILE, FRAME, GFOOTNOTE, GPATH, GTITLE, HEADTEXT, METATEXT, NEWFILE, NOGFOOTNOTE, NOGTITLE, OPERATOR, PAGE, PARAMETERS, PATH, RECORD_SEPARATOR, STYLE, STYLESHEET, TAGSET, TEXT, TRANTAB, TYPE.
ERROR 200-322: The symbol is not recognized and will be ignored.

Tried this with doc='help' on the ExcelXP tagset and it also didn't work. Is this a v9.12 problem, or is my syntax incomplete?

TIA

Paul Choate
N/A
Posts: 0

Re: ODS Options parameter

Posted in reply to deleted_user
found my answer:

< The Beginners Guide to ODS MARKUP: Don't Panic! Eric Gebhart, SI
http://www2.sas.com/proceedings/sugi31/263-31.pdf >

Our soon-to-be best selling Beginners Guide to ODS MARKUP says this about the OPTIONS option:

The OPTIONS option was introduced in the ODS MARKUP statement in SAS 9.1.3. There was a recognized need for more dynamic control over the behavior of the tagsets. The options are really an arbitrary list of name value pairs. The names can be any valid name, and the values are any string that’s enclosed in quotation marks. The options appear to the tagset as an associative array named $OPTIONS. The fully capitalized names become the keys in the array. It is up to the tagset to look at the $OPTIONS array and use the values as it sees fit. After more than a few options were added, it became obvious that a DOCUMENTATION option might be a good idea. For tagsets that have options, options (doc='help') will give documentation for all the options that are available. One of the more peculiar aspects of the $OPTIONS array is that it’s just like any other tagset variable, its values can be set, modified, and deleted within the tagset.

The OPTIONS option is only available in SAS 9.1.3, but there are ways around that. One way is to use the same methodology that the CSV tagsets use. Create a new tagset with inheritance that sets the options the way that you want them. This is the complete source code for the CSVALL tagset.
SAS Employee
Posts: 95

Re: ODS Options parameter

Posted in reply to deleted_user
That's a better response than I would have written... :-)
Ask a Question
Discussion stats
  • 2 replies
  • 191 views
  • 0 likes
  • 2 in conversation