From: mark on
Hello ,

please help me . I'm getting an error in the code :-


data sales;
infile 'c:\Sas\sales.sas7bdat';
input Score Ghz Price Processor Memory Disk Video Battery;
proc reg simple corr;
model Score = Ghz Price Processor Memory Disk Video Battery / stb
tol vif collin;
proc print data = sales;
run;

Error-

NOTE: Invalid data for Score in line 1 1-87.
NOTE: Invalid data for Ghz in line 1 89-97.
NOTE: Invalid data for Price in line 1 157-160.
NOTE: Invalid data for Processor in line 1 165-256.
NOTE: Invalid data for Memory in line 2 1-10.
NOTE: Invalid data for Disk in line 2 12-74.
NOTE: Invalid data for Video in line 2 76-78.
NOTE: Invalid data for Battery in line 2 80-88.
RULE: ----+----1----+----2----+----3----+----4----+----5----
+----6----+----7----+----8----+----9--

2 CHAR .......... ...à...................ä...0.......´...0.......
´...........rupt the executing pro
ZONE
00000000002000E0000000100000000000E00030000000B00030000000B000000000007777276626766776662776
NUMR
00026050000E00010000004E00C00000004C00010000004C00000001004C00000010002504048505853549E7002F

93
gram.........................................................................................
ZONE
67662000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
NUMR
721DE000000000000000000000000000000000000000000000000000000000000000000000000000000000000000


RULE: ----+----1----+----2----+----3----+----4----+----5----
+----6----+----7----+----8----+----9--


185 .........................................................................
ZONE
000000000000000000000000000000000000000000000000000000000000000000000000
NUMR
000000000000000000000000000000000000000000000000000000000000000000000000
NOTE: Invalid data errors for file ''c:\Cwa\sales.sas7bdat'' occurred
outside the printed range.
NOTE: Increase available buffer lines with the INFILE n= option.
Score=. Ghz=. Price=. Processor=. Memory=. Disk=. Video=. Battery=.
_ERROR_=1 _N_=1
NOTE: Invalid data for Score in line 3 1-256.
NOTE: Invalid data for Ghz in line 4 1-40.
NOTE: LOST CARD.
NOTE: Invalid data errors for file ''c:\Cwa\sales.sas7bdat'' occurred
outside the printed range.
NOTE: Increase available buffer lines with the INFILE n= option.
Score=. Ghz=. Price=. Processor=. Memory=. Disk=. Video=. Battery=.
_ERROR_=1 _N_=2
NOTE: 4 records were read from the infile 'c:\Cwa\sales.sas7bdat'.
The minimum record length was 40.
The maximum record length was 256.
One or more lines were truncated.
NOTE: SAS went to a new line when INPUT statement reached past the end
of a line.
NOTE: The data set WORK.SALES has 1 observations and 8 variables.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.04 seconds


18 proc reg simple corr;
19 model Score = Ghz Price Processor Memory Disk Video Battery /
stb tol vif collin;

ERROR: No valid observations are found.


I had an excel file which i converted it to "laptop_review.sas" and
then to "sales.sas7bdat".

Kind Regards ,
markc
From: Tom Abernathy on
Mark -
The INPUT statement is for reading from a text file. If your file
has extension sas7bdat then it is already a dataset.
Eliminate the DATA step and just add DATA='c:\Sas\sales.sas7bdat'
option to your PROC REG statement.
- Tom

On Mar 1, 8:53 pm, mark <mark.chas...(a)yahoo.in> wrote:
> Hello ,
>
> please help me . I'm getting an error in the code :-
>
> data sales;
> infile 'c:\Sas\sales.sas7bdat';
> input Score Ghz Price Processor Memory Disk Video Battery;
> proc reg simple corr;
>   model Score = Ghz Price Processor Memory Disk Video Battery / stb
> tol vif collin;
> proc print data = sales;
> run;
>
> Error-
>
> NOTE: Invalid data for Score in line 1 1-87.
> NOTE: Invalid data for Ghz in line 1 89-97.
> NOTE: Invalid data for Price in line 1 157-160.
> NOTE: Invalid data for Processor in line 1 165-256.
> NOTE: Invalid data for Memory in line 2 1-10.
> NOTE: Invalid data for Disk in line 2 12-74.
> NOTE: Invalid data for Video in line 2 76-78.
> NOTE: Invalid data for Battery in line 2 80-88.
> RULE:     ----+----1----+----2----+----3----+----4----+----5----
> +----6----+----7----+----8----+----9--
>
> 2   CHAR  .......... ...à...................ä...0.......´...0........
> ´...........rupt the executing pro
>     ZONE
> 00000000002000E0000000100000000000E00030000000B00030000000B0000000000077772­76626766776662776
>     NUMR
> 00026050000E00010000004E00C00000004C00010000004C00000001004C000000100025040­48505853549E7002F
>
>       93
> gram........................................................................­.................
>     ZONE
> 676620000000000000000000000000000000000000000000000000000000000000000000000­00000000000000000
>     NUMR
> 721DE0000000000000000000000000000000000000000000000000000000000000000000000­00000000000000000
>
> RULE:     ----+----1----+----2----+----3----+----4----+----5----
> +----6----+----7----+----8----+----9--
>
> 185  .........................................................................
>     ZONE
> 000000000000000000000000000000000000000000000000000000000000000000000000
>     NUMR
> 000000000000000000000000000000000000000000000000000000000000000000000000
> NOTE: Invalid data errors for file ''c:\Cwa\sales.sas7bdat'' occurred
> outside the printed range.
> NOTE: Increase available buffer lines with the INFILE n= option.
> Score=. Ghz=. Price=. Processor=. Memory=. Disk=. Video=. Battery=.
> _ERROR_=1 _N_=1
> NOTE: Invalid data for Score in line 3 1-256.
> NOTE: Invalid data for Ghz in line 4 1-40.
> NOTE: LOST CARD.
> NOTE: Invalid data errors for file ''c:\Cwa\sales.sas7bdat'' occurred
> outside the printed range.
> NOTE: Increase available buffer lines with the INFILE n= option.
> Score=. Ghz=. Price=. Processor=. Memory=. Disk=. Video=. Battery=.
> _ERROR_=1 _N_=2
> NOTE: 4 records were read from the infile 'c:\Cwa\sales.sas7bdat'.
>       The minimum record length was 40.
>       The maximum record length was 256.
>       One or more lines were truncated.
> NOTE: SAS went to a new line when INPUT statement reached past the end
> of a line.
> NOTE: The data set WORK.SALES has 1 observations and 8 variables.
> NOTE: DATA statement used (Total process time):
>       real time           0.03 seconds
>       cpu time            0.04 seconds
>
> 18   proc reg simple corr;
> 19     model Score = Ghz Price Processor Memory Disk Video Battery /
> stb tol vif collin;
>
> ERROR: No valid observations are found.
>
> I had an excel file which i converted it to "laptop_review.sas" and
> then to "sales.sas7bdat".
>
> Kind  Regards ,
> markc