Hi Guyz, I'm new to SAS programming. I'm writing an instream program in sas studio 9.4. The ename variable consists of variable length characters. I don't know which informat to use. When I'm running the program, SAS is throwing me an error message. Please someone help me out in writing the program in a correct way.
data temp;
input Empid Ename $char16. Salary 6. Loc $char10. ;
datalines;
101 Vamshi Gulaigiri 60000 Hyderabad
102 Aditya Vanipenta 70000 Bangalore
103 Keerthi Perala 35000 Hyderabad
104 Kesav Murari 80000 Newyork
105 Gopala Krishna 50000 Hyderabad
;
run;
proc print data = temp;
run;
Error Message [log]: 1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK; 55 56 data temp; 57 infile datalines; 58 input Empid Ename $char16. Salary 6. Loc $char10. ; 59 datalines; NOTE: Invalid data for Salary in line 62 22-27. RULE: ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0 62 103 Keerthi Perala 35000 Hyderabad Empid=103 Ename=Keerthi Perala 3 Salary=. Loc=yderabad _ERROR_=1 _N_=3 NOTE: The data set WORK.TEMP has 5 observations and 4 variables. NOTE: DATA statement used (Total process time): real time 0.00 seconds user cpu time 0.01 seconds system cpu time 0.00 seconds memory 784.15k OS Memory 28580.00k Timestamp 03/21/2016 03:14:34 PM Step Count 70 Switch Count 50 Page Faults 0 Page Reclaims 377 Page Swaps 0 Voluntary Context Switches 146 Involuntary Context Switches 0 Block Input Operations 0 Block Output Operations 264 63 ; 64 run; 65 proc print data = temp; 66 67 run; NOTE: There were 5 observations read from the data set WORK.TEMP. NOTE: PROCEDURE PRINT used (Total process time): real time 0.02 seconds user cpu time 0.03 seconds system cpu time 0.00 seconds memory 1649.87k OS Memory 28836.00k Timestamp 03/21/2016 03:14:34 PM Step Count 71 Switch Count 28 Page Faults 0 Page Reclaims 155 Page Swaps 0 Voluntary Context Switches 57 Involuntary Context Switches 0 Block Input Operations 0 Block Output Operations 8 68 69 70 71 72 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK; 84
... View more