I'm having issues with stating my informat on the input statment. If I just use an INFORMAT statement, it works and I get no errors/warnings. Does anybody know what the difference is in the following two statements?\
DATA work.DATA1;
INFILE "&Lnx_File"
DELIMITER=','
MISSOVER
FIRSTOBS=2
DSD
LRECL=32767;
INPUT
Policy_Number $
Incurred_Date
Paid_Date
Amount_Paid_per_Claim
;
INFORMAT
Incurred_Date YYMMDD8.
Paid_Date YYMMDD8.
;
FORMAT
Policy_Number $9.
Incurred_Date MMDDYY10.
Paid_Date MMDDYY10.
Amount_Paid_per_Claim 10.2
;
The below code seems to be not reading in the data correctly and I get a ton of warnings and notes.
DATA work.DATA1;
INFILE "&Lnx_File"
DELIMITER=','
MISSOVER
FIRSTOBS=2
DSD
LRECL=32767;
INPUT
Policy_Number $
Incurred_Date YYMMDD8.
Paid_Date YYMMDD8.
Amount_Paid_per_Claim
;
FORMAT
Policy_Number $9.
Incurred_Date MMDDYY10.
Paid_Date MMDDYY10.
Amount_Paid_per_Claim 10.2
;
Hi:
Read about the colon format modifer for the INPUT statement. If you are going to specify an INFORMAT on your INPUT statement, you need the colon format modifier, such as:
input ID $ Date : mmddyy.;
Cynthia
Hi:
Read about the colon format modifer for the INPUT statement. If you are going to specify an INFORMAT on your INPUT statement, you need the colon format modifier, such as:
input ID $ Date : mmddyy.;
Cynthia
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.