SAS Enterprise Guide 4.1 to 4.2 migration – I hate blind dates

Struck a problem converting some Enterprise Guide projects from 4.1 (SAS 9.1.3) to 4.2 (SAS 9.2) around date prompts.

The EG projects have a large bunch of custom code nodes (so hate those!) and they are all running some macro’s that use a date prompt.

Of course they work fine in 4.1 but fail in 4.2.

Traced it to a change in the way date prompts work in eG 4.2 via this SAS Support note:

Problem Note 36581: Date and Datetime parameters might cause syntax errors after project migration to SAS® Enterprise Guide® 4.2

Followed the fix below and updated the date variable in the code from &date to “&date”d  and the date is back on!

For example, in earlier versions of SAS Enterprise Guide, the correctly generated %LET statement might be %let datevar = '01jan2009'd;. However, after migrating projects to 4.2, the statement is incorrectly generated as %let datevar = 01jan2009;.

To circumvent the problem, open the query in 4.2 and edit the filter by adding quotes around the parameter. For example, use "&YourDateVar"d for dates, and "&YourDateTimeVar"dt for datetime parameters.

Share
Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *

*