I have the following file that is consists of only 3 records. I made a sas dataset form this file. I list the file and then the code.
1005316134100667496628JAN2019:17:47:49792752
1005938763100631605508FEB2019:19:51:03785599
1006029597100602953903MAR2019:15:17:37802690
Now the code.
%let pidin = /saswrk0/scp/inbox/;
%let filename = PID.00.2019030813093725.00000000;
data pids;
infile "&pidin.&&filename." lrecl=44;
input
prev_ptnt_id $10.
curr_ptnt_id $10.
chg_eff_tmstmp $18.
dw_ld_run_id 6.
;
run;
Now I want to insert the pids dataset into an oracle table to update the table with the 3 records. The problem is that chg_eff_tmstmp in the oracle is datetime20. Since the variable between the two are not compatible no insert is taking place.
I did and it works. Sometimes someone has to give you a hint. Thank you and have a great weekend.
If you want a datetime value why did you read the timestamp as chg_eff_tmstmp $18.
use datetime18. for the informat.
I did and it works. Sometimes someone has to give you a hint. Thank you and have a great weekend.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.