I am using below code .one and two has a column called reporting_date.In one and two , reporting_date is defined with format yymmdd10.I could check that using describe table command.
But, when I try to do append , it is giving warning that format of reporting_date in one is date9
and format of reporting_date in two is yymmdd10.
Why is this happening?
data results;
set one;
run;
proc append base=one data=two;
run;
But, when I try to do append , it is giving warning that format of reporting_date in one is date9
and format of reporting_date in two is yymmdd10.
Why is this happening?
It happens because the formats are different in the two tables.
when I give describe table , I could see format is same (yymmdd10.) in both the tables..I do not understand how this date9. came into picture
I have a rule. When SAS says something is true, and the user says it is not true, my rule is that I believe SAS. I have never seen a case where the user is right and SAS is wrong.
But, feel free to convince me you are right.
Show us PROC CONTENTS output (screen capture is fine, use the "Insert Photos" icon to include your screen captures in your reply; do NOT attach files) from both data sets, which you have named ONE and TWO. Or, if you are working on real data sets that have real names, show us the LOG of the code for PROC APPEND and the PROC CONTENTS on the two real data sets.
Run Proc Contents on both data sets used in proc append. Show us the result.
I strongly suspect that you Proc Append code is using a different data set then you are looking at somewhere.
And are you looking at the SAS data set or something else that SAS may have read to create the data set? The format might have been changed on reading.
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.