Hi All,
In our project we have a variable starting with Wk_1 to Wk_100.
We have to represent it in a single variable in a data step. we have to read all the variables that starts with Wk
Our code goes like this
data test1;
set test2;
keep col1 col2 Wk_:;
run;
This works fine in SAS 9.1.3 but it throws error in SAS 9.3
Could anyone suggest an alternative for this.
Hi,
Example 3 in this paper may help you to find your answer : Use the Full Power of SAS® in Your Function-Style Macros
The syntax looks correct. What is the error?
The variables are not getting resolved in SAS 9.3
It is getting resolved in SAS 9.1.3.
Thats interesting I would have thought it was the other way around ... I thought the colon abbreviation is relative new addition to the code base like in version 9.2.
I use the colon shortcut all the time in 9.3.
EJ
But you didn't show the error message. "not getting resolved" is not an error message.
Hi:
If you have something that works in one version of SAS, but not in another version of SAS, your best resource is to open a track with Tech Support. The doc for SAS 9.3 references name prefix lists as being valid SAS(R) 9.3 Language Reference: Concepts, Second Edition and so, Tech Support has both versions (9.1.3 and 9.3) in which to test your code.
To open a track with Tech Support, you can go to support.sas.com and click on the link for "Submit a Problem" on the left hand navigation pane.
cynthia
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.