BookmarkSubscribeRSS Feed
nagmani
Calcite | Level 5

Hello team

 

please help me in this resolve this problem

how to know, if client has sent same last month file this time too.

 

 

Thanks

nagmani 

8 REPLIES 8
Reeza
Super User

PROC COMPARE

 


@nagmani wrote:

Hello team

 

please help me in this resolve this problem

how to know, if client has sent same last month file this time too.

 

 

Thanks

nagmani 


 

nagmani
Calcite | Level 5
Thanks Reeza, but how to know it has been already sent my client last month. Plz give code.
Reeza
Super User

Explain your situation.

ckkumar3
Calcite | Level 5

 

Your requirement:

please help me in this resolve this problem

how to know, if client has sent same last month file this time too.

 

Need more information on your query.

 

1. Last month file data available with you or not

2. If yes read the current month file and stored the data in temparory dataset and compare with last month loaded data

 

Regards,

Kishore

 

RW9
Diamond | Level 26 RW9
Diamond | Level 26

First, do you have a proper data import process, i.e. do you have an import agreement setup between you and the supplier?  If not this would be first port of call, without an agreement you will never know what you get, maybe next month they print the output, stick it onto the back of a cornflake box and post it to you??  

Secondly, in your post, you really give no information.  What type of file is it that is being sent.  What environment are you working in?   If its a text file and you have a version control system, then drop the file over the previous received file and then do a diff in the version control software.  If its a PDF file then use PDF diff.  If its a dataset then use proc compare.

Can you see how from the above alone, providing enough information helps answer the question?

Reeza
Super User
I've modified your subject line, please try to use a descriptive subject line in the future.
Shmuel
Garnet | Level 18

When you get a client's file you probably save it on your computer.

Do you know from whom you got it and for which month?

Can you check that file data relate to that same month?

Is it possible that the file contains data from more than one month?

 

How do you name the file? Can you recognize client and month according to file name?

 

To answer "how to detect if files are same", your better have answers to those questions first,

then use, as proposed by @Reeza, PROC COMPARE to compare current file to lprevious

if client and declared month are the same or suspicious to be the same.

 

the code for proc compare (there are more options):

proc compare data = old_file_name
                compare = new_file_name;
    id  <list of ID variable names, assumed data is sorted by IDs >;
run;
ballardw
Super User

If this were a concern I would be strongly tempted to use an OS tool before reading into SAS. FC in windows from a command prompt for example.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 8 replies
  • 1413 views
  • 4 likes
  • 6 in conversation