BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
jacksonan123
Lapis Lazuli | Level 10
data sampled;
infile datalines truncover;
 input trtgrp subject time  ipred ;
   datalines;
1 1 0 0
;
run;

Log
 NOTE: Invalid data for subject in line 78 3-5.
 RULE:      ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0                     
 
 78  CHAR   1 1.0  0                                                                        
     ZONE   32303223222222222222222222222222222222222222222222222222222222222222222222222222
     NUMR   10190000000000000000000000000000000000000000000000000000000000000000000000000000
 trtgrp=1 subject=. time=0 ipred=. _ERROR_=1 _N_=1
 NOTE: The data set WORK.SAMPLED has 1 observations and 4 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.01 seconds

I have a very short data lines program and am using truncover, but I get an error that subject and ipred is missing.  Can anyone tell me why subject and ipred are missing?   All of the data are numeric.

1 ACCEPTED SOLUTION

Accepted Solutions
novinosrin
Tourmaline | Level 20

Your code worked fine when i tested

data sampled;
infile datalines truncover;
input trtgrp subject time ipred ;
datalines;
1 1 0 0
;
run;

proc print noobs;run;

Log:

832 data sampled;
833 infile datalines truncover;
834 input trtgrp subject time ipred ;
835 datalines;

NOTE: The data set WORK.SAMPLED has 1 observations and 4 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

 

SAS Output

trtgrp subject time ipred
1 1 0 0

View solution in original post

2 REPLIES 2
novinosrin
Tourmaline | Level 20

Your code worked fine when i tested

data sampled;
infile datalines truncover;
input trtgrp subject time ipred ;
datalines;
1 1 0 0
;
run;

proc print noobs;run;

Log:

832 data sampled;
833 infile datalines truncover;
834 input trtgrp subject time ipred ;
835 datalines;

NOTE: The data set WORK.SAMPLED has 1 observations and 4 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

 

SAS Output

trtgrp subject time ipred
1 1 0 0
jacksonan123
Lapis Lazuli | Level 10

I think that for some reason the code was in an area that I had commented.  When I moved the code it did work ok.

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!

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
  • 2 replies
  • 662 views
  • 0 likes
  • 2 in conversation