Hi Everybody!
I am trying directly to import from tilde delimited source file to SAS 9.1.
Data Dictionary defines 1st field as char(1) and the next field as a long integer.
After I ran my code I found out that SUMMARY_TYPE_NM field was populated while the next
field END_PERIOD_ID which is numeric was not filled at all. Data in the next one should have looked like 200801
I have no idea what I am doing wrong. How can I fix it? Could you please give me a hand?
Thank you in advance
Iren
1 data IP;
2 infile 'p:\Ir\temp\ip\200801_IP.txt'
3 delimiter = '~' MISSOVER DSD lrecl=32767 firstobs=3;
4
5 informat SUMMARY_TYPE_NM $1. END_PERIOD_ID ;
6
7
8 format SUMMARY_TYPE_NM $1. END_PERIOD_ID ;
9
10
11 input SUMMARY_TYPE_NM $1 END_PERIOD_ID ;
12
13 obsnum + 1;
14 run;
NOTE: The infile 'p:\Ir\temp\ip\200801_IP.txt' is:
File Name=p:\Ir\temp\ip\200801_IP.txt,
RECFM=V,LRECL=32767
NOTE: 105571 records were read from the infile
'p:\Ir\temp\ip\200801_IP.txt'.
The minimum record length was 183.
The maximum record length was 374.
NOTE: The data set WORK.IP_RAG has 105571 observations and 3 variables.
NOTE: DATA statement used (Total process time):
real time 17.20 seconds
cpu time 2.00 seconds
I am trying directly to import from tilde delimited source file to SAS 9.1.
Data Dictionary defines 1st field as char(1) and the next field as a long integer.
After I ran my code I found out that SUMMARY_TYPE_NM field was populated while the next
field END_PERIOD_ID which is numeric was not filled at all. Data in the next one should have looked like 200801
I have no idea what I am doing wrong. How can I fix it? Could you please give me a hand?
Thank you in advance
Iren
1 data IP;
2 infile 'p:\Ir\temp\ip\200801_IP.txt'
3 delimiter = '~' MISSOVER DSD lrecl=32767 firstobs=3;
4
5 informat SUMMARY_TYPE_NM $1. END_PERIOD_ID ;
6
7
8 format SUMMARY_TYPE_NM $1. END_PERIOD_ID ;
9
10
11 input SUMMARY_TYPE_NM $1 END_PERIOD_ID ;
12
13 obsnum + 1;
14 run;
NOTE: The infile 'p:\Ir\temp\ip\200801_IP.txt' is:
File Name=p:\Ir\temp\ip\200801_IP.txt,
RECFM=V,LRECL=32767
NOTE: 105571 records were read from the infile
'p:\Ir\temp\ip\200801_IP.txt'.
The minimum record length was 183.
The maximum record length was 374.
NOTE: The data set WORK.IP_RAG has 105571 observations and 3 variables.
NOTE: DATA statement used (Total process time):
real time 17.20 seconds
cpu time 2.00 seconds