Raw file to be read using SAS has following records:
123,"Harold Wilson",Acct,01/15/1989,$78,123
128,"Julia Child",Food,08/29/1988,$89,123
007,"James Bond",Security,02/01/2000,$82,100
828,"Roger Doger",Acct,08/15/1999,$39,100
900,"Earl Davenport",Food,09/09/1989,$45,399
906,"James Swindler",Acct,12/21/1978,$78,200
SAS CODE :
options nocenter;
filename file1 'D:\files\SAS\raw-files\employee.csv';
data Employ;
infile file1 dsd;
input id : $3.
name : $20.
depart : $8.
datehire : mmddyy10.
salary : dollar8.
;
format datehire mmddyy10.
salary dollar8.;
run;
title 'Employee details';
proc print data=Employ;
run;
OUTPUT
Employee details
Obs id name depart datehire salary
1 123 Harold Wilson Acct 01/15/1989 $78
2 128 Julia Child Food 08/29/1988 $89
3 007 James Bond Security 02/01/2000 $82
4 828 Roger Doger Acct 08/15/1999 $39
5 900 Earl Davenport Food 09/09/1989 $45
6 906 James Swindler Acct 12/21/1978 $78
ISSUE :
How to get the salary in the same format as in the raw file as the salary part after the comma is ignored.