BookmarkSubscribeRSS Feed
aanan1417
Quartz | Level 8

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

4 REPLIES 4
Patrick
Opal | Level 21

Bit more detail please so we don't have to try giving answers based on guessing.

Kurt_Bremser
Super User

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.

ballardw
Super User

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

mkeintz
PROC Star

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

--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

--------------------------

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 416 views
  • 0 likes
  • 5 in conversation