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.
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!
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.