BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Steelers_In_DC
Barite | Level 11

I am trying to input some stock data like below, I've dropped the infile statement, removed the dlm from the input statement and get the same message every time.  The output shows up with the headers but empty, log is below.  I haven't done this in a while, so I think it might be a simple syntax error but I'm not seeing it.  Appreciate any help in loading this data

 

Thanks:

 

data nflx;
infile cards dsd dlm=',';
informat date mmddyy10. close 8.;
format date mmddyy10. close 8.;
cards;
8/22/2017,169.34
8/23/2017,169.06
8/24/2017,168.13
8/25/2017,165.95

 

log:

 

74 data nflx;
75 infile datalines dsd dlm=',';
76 informat date mmddyy10. close 8.;
77 format date mmddyy10. close 8.;
78 datalines;
 
NOTE: Variable date is uninitialized.
NOTE: Variable close is uninitialized.
NOTE: The data set WORK.NFLX has 1 observations and 2 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
1 ACCEPTED SOLUTION

Accepted Solutions
Steelers_In_DC
Barite | Level 11

I caught my own issue, simple error, I forgot the input statement:

 

data nflx;
infile cards dsd dlm=',';
input date close;
informat date mmddyy10. close 8.;
format date mmddyy10. close 8.;
cards;
8/22/2017,169.34
8/23/2017,169.06
8/24/2017,168.13

View solution in original post

1 REPLY 1
Steelers_In_DC
Barite | Level 11

I caught my own issue, simple error, I forgot the input statement:

 

data nflx;
infile cards dsd dlm=',';
input date close;
informat date mmddyy10. close 8.;
format date mmddyy10. close 8.;
cards;
8/22/2017,169.34
8/23/2017,169.06
8/24/2017,168.13

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

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.

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
  • 1 reply
  • 1009 views
  • 0 likes
  • 1 in conversation