Hi,
I have a dataset which includes the variable names:
A B C D
the above dataset need to format once in a week.
Everyweek I have to check the order of the variables A B C D
If D comes first or the order changes I need to flag it. The order must be A B C D order.
Can I know the code for this.
thank you in advance.
-Smitha
Hi,
I have a variables list
A B C D
Everytime when I get the data and formatted. I need to check the order is correct. If D comes first then I need to flag it.
The code needs to check the order of the variables "A B C D"
how can I do that?
thank you in advance.
-Smitha
Are A, B, C and D your variable names or your varaible values?
@Smitha9 wrote:
Hi,
I have a dataset which includes the variable names:
A B C D
the above dataset need to format once in a week.
Everyweek I have to check the order of the variables A B C D
If D comes first or the order changes I need to flag it. The order must be A B C D order.
Can I know the code for this.
thank you in advance.
-Smitha
SAS data sets do not care about the order of variables generally. So why is this an issue?
And if your data source is changing the order that is the place to address things, before it gets to you.
Proc contents will tell you the column number of a variable.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.