BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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
2 REPLIES 2
deleted_user
Not applicable
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.
Eric_SAS
SAS Employee
That's a better response than I would have written... 🙂

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 908 views
  • 0 likes
  • 2 in conversation