I HAVE A TABLE THAT CONTAIN DATA OF THREE YEAR APPENDED DAY WISE . I HAVETO CHECK WHETHER NEW COLUMN ADDED OR NOT. THE DATA THAT I HAVE IS OF THREE YEAR
@ballardw wrote:
@aanan1417 wrote:
I HAVE A TABLE THAT CONTAIN DATA OF THREE YEAR APPENDED DAY WISE . I HAVETO CHECK WHETHER NEW COLUMN ADDED OR NOT. THE DATA THAT I HAVE IS OF THREE YEAR
"Appended" how? Is an existing text file replaced with a new one? A different text file every day? Are you replacing an existing SAS data set in the process (if so, stop doing that so you have the previous one to compare with).
What is the result of this operation supposed to look like? A report when a "new column" is added? What would that report look like? Or do you want a change data set of some sort to reference?
This is a very broad subject and requires lots of details.
I once upon a time had a job organizing data from a number of collection sites. Since the purpose of the data was partially testing instrumentation data was added and removed from the data files often. In the 250K lines of code maintained to read the 40+ instrument sites I had code that identified changes because I maintained a data base of which report channels and positions were in use. So the code could report when a new channel (record level identifier) or report item (column identifier) were encountered. But that code was very dependent on the type of data collection was performed and identified. Random text may not be amenable to such.
And all that the identification of new data did was tell me when and what the identifiers were. I then had to go to the guys running the data collection to get details like what each channel meant and the values collected in each position. Then updated a data base that was used to write/update code to read the files into usable data sets.
Other people making unannounced changes to data you are expected to process is a traditional definition of job security embedded in a state of annoyance.
Bit more detail please so we don't have to try giving answers based on guessing.
Your caps-lock is stuck. Please check your keyboard.
It's much better to add observations than columns. As a first step, transpose your data to long layout and revise your import process.
@aanan1417 wrote:
I HAVE A TABLE THAT CONTAIN DATA OF THREE YEAR APPENDED DAY WISE . I HAVETO CHECK WHETHER NEW COLUMN ADDED OR NOT. THE DATA THAT I HAVE IS OF THREE YEAR
"Appended" how? Is an existing text file replaced with a new one? A different text file every day? Are you replacing an existing SAS data set in the process (if so, stop doing that so you have the previous one to compare with).
What is the result of this operation supposed to look like? A report when a "new column" is added? What would that report look like? Or do you want a change data set of some sort to reference?
This is a very broad subject and requires lots of details.
I once upon a time had a job organizing data from a number of collection sites. Since the purpose of the data was partially testing instrumentation data was added and removed from the data files often. In the 250K lines of code maintained to read the 40+ instrument sites I had code that identified changes because I maintained a data base of which report channels and positions were in use. So the code could report when a new channel (record level identifier) or report item (column identifier) were encountered. But that code was very dependent on the type of data collection was performed and identified. Random text may not be amenable to such.
And all that the identification of new data did was tell me when and what the identifiers were. I then had to go to the guys running the data collection to get details like what each channel meant and the values collected in each position. Then updated a data base that was used to write/update code to read the files into usable data sets.
@ballardw wrote:
@aanan1417 wrote:
I HAVE A TABLE THAT CONTAIN DATA OF THREE YEAR APPENDED DAY WISE . I HAVETO CHECK WHETHER NEW COLUMN ADDED OR NOT. THE DATA THAT I HAVE IS OF THREE YEAR
"Appended" how? Is an existing text file replaced with a new one? A different text file every day? Are you replacing an existing SAS data set in the process (if so, stop doing that so you have the previous one to compare with).
What is the result of this operation supposed to look like? A report when a "new column" is added? What would that report look like? Or do you want a change data set of some sort to reference?
This is a very broad subject and requires lots of details.
I once upon a time had a job organizing data from a number of collection sites. Since the purpose of the data was partially testing instrumentation data was added and removed from the data files often. In the 250K lines of code maintained to read the 40+ instrument sites I had code that identified changes because I maintained a data base of which report channels and positions were in use. So the code could report when a new channel (record level identifier) or report item (column identifier) were encountered. But that code was very dependent on the type of data collection was performed and identified. Random text may not be amenable to such.
And all that the identification of new data did was tell me when and what the identifiers were. I then had to go to the guys running the data collection to get details like what each channel meant and the values collected in each position. Then updated a data base that was used to write/update code to read the files into usable data sets.
Other people making unannounced changes to data you are expected to process is a traditional definition of job security embedded in a state of annoyance.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.