BookmarkSubscribeRSS Feed
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
You'll notice in my post/reply, there is a SASLOG that demonstrates the conversion technique, which would mimic the IMPORT, I believe. The data-string goes from character, to numeric, and back to character, remaining intact.

Scott Barry
SBBWorks, Inc.
Cynthia_sas
SAS Super FREQ
Hi:
You are showing the log of the original program. I would be more interested in the log of the CHANGED program. For example, if I run THIS program
[pre]
data WORK.TEMP ;
infile datalines
delimiter = ',' DSD firstobs=2 ;
informat FILING_ID $14. ;
informat name $8.;
format filing_id $14.;
input filing_id $ name $;
put _all_;
return;
datalines;
filing_id name
12345678901234,alan
22223333444455,bob
;
run;

proc print data=work.temp;
run;
[/pre]

Which essentially reduces the program to only 2 variables, but uses the INPUT and INFORMAT you -said- you used -- then in the log, I see that the number is a character string. So there's still something happening when you run the CHANGED program that is not right.

My output in the LOG shows the FILING_ID as a character string with ALL digits and no E notation.
[pre]
66 data WORK.TEMP ;
67 infile datalines
68 delimiter = ',' DSD firstobs=2 ;
69 informat FILING_ID $14. ;
70 informat name $8.;
71 format filing_id $14.;
72 input filing_id $ name $;
73 put _all_;
74 return;
75 datalines;

FILING_ID=12345678901234 name=alan _ERROR_=0 _N_=1
FILING_ID=22223333444455 name=bob _ERROR_=0 _N_=2
NOTE: The data set WORK.TEMP has 2 observations and 2 variables.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds


79 ;
80 run;

[/pre]

cynthia

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 16 replies
  • 1818 views
  • 0 likes
  • 5 in conversation