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

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1417 views
  • 0 likes
  • 1 in conversation