With my code I am having a missing value on Salary column. I am trying to understand why?
data sales_staff2;
infile "&path/sales2.dat";
input Employee_ID 6. @21 Last_Name $ 18. /
Job_Title $ 20. @22 Hire_Date mmddyy10. /
@ 33 Salary dollar8. ;
run;
title 'Australian and US Sales Staff';
proc print data=sales_staff2;
run;
This is the partial result :
Australian and US Sales Staff
Obs Employee_ID Last_Name Job_Title Hire_Date Salary1234567
120102 | Zhou | Sales Manager | 12205 | . |
120103 | Dawes | Sales Manager | 6575 | . |
120121 | Elvish | Sales Rep. II | 6575 | . |
120122 | Ngan | Sales Rep. II | 8217 | . |
120123 | Hotstone | Sales Rep. I | 18901 | . |
120124 | Daymond | Sales Rep. I | 18687 | . |
120125 | Hofmeister | Sales Rep. IV | 8460 | .
|
The raw data has 3 lines of code! You will need the #3 even if there is no data to read in.
data sales_staff2;
infile "&path/sales2.dat";
input #1 Employee_ID 6. @21 Last_Name $ 18.
#2 Job_Title $ 20. @22 Hire_Date mmddyy10. @ 33 Salary dollar8.
#3 ;
run;
and use the termstr option if the raw data is a Unix file.
If you had posted the SAS log we could have looked at the notes and helped you debug this. Also you should have posted example lines from the data file into the Insert Code pop-up box (to prevent it being formatted into paragraphs).
A couple of possible things to check.
If the value of the salary was less than 8 characters then because you did not include TRUNCOVER option on your INFILE statement SAS would have tried to find 8 characters for it by going to the next line. You would have seen a note to that effect.
It is possible you are reading a file from a PC on a UNIX system and the salary value is followed by a Carriage Return character which the informat does not understand. You should have seen notes about invalid value in the log You might need to add TERMSTR=CRLF to your INFILE statement if that is case.
Hi Tom.
Thanks for helping. In fact the log mentions no error as you can see below.
SAS Studio
Australian and US Sales Staff
120102 | Zhou | Sales Manager | 12205 | . |
120103 | Dawes | Sales Manager | 6575 | . |
120121 | Elvish | Sales Rep. II | 6575 | . |
120122 | Ngan | Sales Rep. II | 8217 | . |
120123 | Hotstone | Sales Rep. I | 18901 | . |
120124 | Daymond | Sales Rep. I | 18687 | . |
120125 | Hofmeister | Sales Rep. IV | 8460 | . |
120126 | Denny | Sales Rep. II | 18475 | . |
120127 | Clarkson | Sales Rep. II | 15645 | . |
120128 | Kletschkus | Sales Rep. IV | 18567 | . |
120129 | Roebuck | Sales Rep. III | 10866 | . |
120130 | Lyon | Sales Rep. I | 18748 | . |
120131 | Surawski | Sales Rep. I | 18628 | . |
120132 | Kaiser | Sales Rep. III | 8309 | . |
120133 | Soltau | Sales Rep. II | 18536 | . |
120134 | Shannan | Sales Rep. II | 6575 | . |
120135 | Platts | Sales Rep. IV | 15249 | . |
120136 | Leyden | Sales Rep. I | 18659 | . |
120137 | Iyengar | Sales Rep. III | 18322 | . |
120138 | Duckett | Sales Rep. I | 18809 | . |
120139 | Wilson | Sales Rep. II | 18506 | . |
120140 | Minas | Sales Rep. I | 18901 | . |
120141 | Liebman | Sales Rep. II | 18383 | . |
120142 | Eastley | Sales Rep. III | 18444 | . |
120143 | Sloey | Sales Rep. II | 9770 | . |
120144 | Barbis | Sales Rep. III | 18536 | . |
120145 | Aisbitt | Sales Rep. II | 10744 | . |
120146 | Cederlund | Sales Rep. I | 18840 | . |
120147 | Rusli | Sales Rep. II | 18536 | . |
120148 | Zubak | Sales Rep. III | 8187 | . |
120149 | Chantharasy | Sales Rep. I | 18628 | . |
120150 | Filo | Sales Rep. III | 9709 | . |
120151 | Phaiyakounh | Sales Rep. II | 6575 | . |
120152 | Dives | Sales Rep. I | 18718 | . |
120153 | Waal | Sales Rep. I | 18628 | . |
120154 | Hayawardhana | Sales Rep. III | 6575 | . |
120155 | James | Sales Rep. III | 18353 | . |
120156 | Snellings | Sales Rep. I | 18687 | . |
120157 | Karavdic | Sales Rep. II | 18597 | . |
120158 | Pilgrim | Sales Rep. III | 11504 | . |
120159 | Phoumirath | Sales Rep. IV | 11139 | . |
120160 | Segrave | Sales Rep. I | 18901 | . |
120161 | Martines | Sales Rep. III | 18536 | . |
120162 | Scordia | Sales Rep. I | 18659 | . |
120163 | Magrath | Sales Rep. II | 12784 | . |
120164 | Stamalis | Sales Rep. II | 9528 | . |
120165 | Pretorius | Sales Rep. I | 18687 | . |
120166 | Nowd | Sales Rep. IV | 6575 | . |
120167 | Tilley | Sales Rep. I | 18659 | . |
120168 | Barcoe | Sales Rep. I | 18932 | . |
120169 | Tannous | Sales Rep. III | 18383 | . |
120170 | Kingston | Sales Rep. III | 13423 | . |
120171 | Moody | Sales Rep. II | 18506 | . |
120172 | Comber | Sales Rep. III | 6575 | . |
120173 | Osborn | Sales Rep. I | 18779 | . |
120174 | Simms | Sales Rep. I | 18628 | . |
120175 | Conolly | Sales Rep. I | 18901 | . |
120176 | Pa | Sales Rep. I | 18932 | . |
120177 | Kierce | Sales Rep. III | 15372 | . |
120178 | Plested | Sales Rep. II | 6665 | . |
120179 | Wills | Sales Rep. III | 17532 | . |
120180 | George | Sales Rep. II | 8370 | . |
120198 | Body | Sales Rep. III | 18597 | . |
120261 | Highpoint | Chief Sales Officer | 11535 | . |
121018 | Magolan | Sales Rep. II | 6575 | . |
121019 | Desanctis | Sales Rep. IV | 17684 | . |
121020 | Ridley | Sales Rep. IV | 16922 | . |
121021 | Farren | Sales Rep. IV | 13939 | . |
121022 | Stevens | Sales Rep. IV | 16833 | . |
121023 | Fuller | Sales Rep. I | 18748 | . |
121024 | Westlund | Sales Rep. II | 17653 | . |
121025 | Cassey | Sales Rep. II | 7183 | . |
121026 | Jaime | Sales Rep. IV | 18353 | . |
121027 | Rudder | Sales Rep. II | 12388 | . |
121028 | Smades | Sales Rep. I | 18932 | . |
121029 | Mcelwee | Sales Rep. I | 18962 | . |
121030 | Areu | Sales Rep. I | 18659 | . |
121031 | Filan | Sales Rep. III | 10805 | . |
121032 | Smith | Sales Rep. IV | 18322 | . |
121033 | Snitzer | Sales Rep. III | 17684 | . |
121034 | Kirkman | Sales Rep. II | 18628 | . |
121035 | Blackley | Sales Rep. II | 6575 | . |
121036 | Mesley | Sales Rep. I | 18901 | . |
121037 | Miketa | Sales Rep. III | 16861 | . |
121038 | Anstey | Sales Rep. I | 18840 | . |
121039 | Washington | Sales Rep. II | 8887 | . |
121040 | Darrohn | Sales Rep. III | 9801 | . |
121041 | Wetherington | Sales Rep. II | 6575 | . |
121042 | Robbin-Coker | Sales Rep. III | 16010 | . |
121043 | Kagarise | Sales Rep. II | 13209 | . |
121044 | Abbott | Sales Rep. I | 18840 | . |
121045 | Hampton | Sales Rep. II | 13880 | . |
121046 | Mandzak | Sales Rep. I | 18809 | . |
121047 | Grzebien | Sales Rep. I | 18871 | . |
121048 | Clark | Sales Rep. I | 18871 | . |
121049 | Bataineh | Sales Rep. I | 18962 | . |
121050 | Capristo-Abramczyk | Sales Rep. II | 18597 | . |
121051 | Myers | Sales Rep. I | 18932 | . |
121052 | Fay | Sales Rep. II | 18567 | . |
121053 | Mcdade | Sales Rep. III | 6606 | . |
121054 | Pulliam | Sales Rep. III | 7610 | . |
121055 | Davis | Sales Rep. III | 18475 | . |
121056 | Lyszyk | Sales Rep. II | 17287 | . |
121057 | Voron | Sales Rep. I | 18962 | . |
121058 | Kohake | Sales Rep. I | 18901 | . |
121059 | Carhide | Sales Rep. II | 9222 | . |
121060 | Spofford | Sales Rep. III | 6575 | . |
121061 | Hassam | Sales Rep. III | 10409 | . |
121062 | Armant | Sales Rep. IV | 18475 | . |
121063 | Kinol | Sales Rep. II | 18110 | . |
121064 | Polky | Sales Rep. I | 18871 | . |
121065 | Malta | Sales Rep. III | 18353 | . |
121066 | Norman | Sales Rep. II | 6575 | . |
121067 | Macnair | Sales Rep. IV | 18322 | . |
121068 | Osuba | Sales Rep. II | 13393 | . |
121069 | Lapsley | Sales Rep. II | 12692 | . |
121070 | Holthouse | Sales Rep. III | 18294 | . |
121071 | Hoppmann | Sales Rep. III | 7914 | . |
121072 | North | Sales Rep. I | 18871 | . |
121073 | Court | Sales Rep. I | 18628 | . |
121074 | Michonski | Sales Rep. I | 18901 | . |
121075 | Sugg | Sales Rep. II | 6575 | . |
121076 | Cobb | Sales Rep. II | 9862 | . |
121077 | Smotherly | Sales Rep. III | 18536 | . |
121078 | Wende | Sales Rep. I | 18932 | . |
121079 | Mees | Sales Rep. I | 18932 | . |
121080 | Chinnis | Sales Rep. I | 18871 | . |
121081 | Knudson | Sales Rep. III | 7396 | . |
121082 | Debank | Sales Rep. III | 7944 | . |
121083 | Sutton | Sales Rep. I | 18687 | . |
121084 | Ould | Sales Rep. I | 18628 | . |
121085 | Huslage | Sales Rep. IV | 18628 | . |
121086 | Plybon | Sales Rep. I | 18628 | . |
121087 | O'Suilleabhain | Sales Rep. II | 15765 | . |
121088 | Kernitzki | Sales Rep. I | 18628 | . |
121089 | Sauder | Sales Rep. II | 6756 | . |
121090 | Klibbe | Sales Rep. I | 18659 | . |
121091 | Kadiri | Sales Rep. II | 12054 | . |
121092 | Pritt | Sales Rep. I | 18840 | . |
121093 | Vasconcellos | Sales Rep. I | 18628 | . |
121094 | Tate | Sales Rep. I | 18871 | . |
121095 | Kratzke | Sales Rep. II | 12965 | . |
121096 | Newstead | Sales Rep. I | 18748 | . |
121097 | Chernega | Sales Rep. II | 14518 | . |
121098 | Heatwole | Sales Rep. I | 18748 | . |
121099 | Mrvichin | Sales Rep. IV | 16192 | . |
121100 | Cormell | Sales Rep. II | 7396 | . |
121101 | Buckner | Sales Rep. I | 18932 | . |
121102 | Flammia | Sales Rep. I | 18779 | . |
121103 | Farnsworth | Sales Rep. I | 18871 | . |
121104 | Johnson | Sales Rep. II | 11048 | . |
121105 | Savacool | Sales Rep. III | 17167 | . |
121106 | Hilburger | Sales Rep. I | 18659 | . |
121107 | Anger | Sales Rep. IV | 18444 | . |
121108 | Levi | Sales Rep. I | 18932 | . |
121109 | Boulus | Sales Rep. I | 18748 | . |
121135 | Ruta | Sales Rep. I | 18840 | . |
121136 | Galarneau | Sales Rep. I | 18962 | . |
121137 | Boocks | Sales Rep. I | 18718 | . |
121138 | Tolley | Sales Rep. I | 18628 | . |
121139 | Mckee | Sales Rep. II | 11504 | . |
121140 | Briggi | Sales Rep. I | 18718 | . |
121143 | Favaron | Senior Sales Manager | 15157 | . |
121144 | Capachietti | Sales Manager | 13088 | . |
121145 | Lansberry | Sales Manager | 7396 | . |
WORK.SALES_STAFF2 |
Column names |
Employee_ID | Employee_ID |
Last_Name | Last_Name |
Job_Title | Job_Title |
Hire_Date | Hire_Date |
Salary | Salary |
Label |
Name |
Length |
Type |
Format |
Informat |
1 | 120102 | Zhou | Sales Manager | 12205 | . |
2 | 120103 | Dawes | Sales Manager | 6575 | . |
3 | 120121 | Elvish | Sales Rep. II | 6575 | . |
4 | 120122 | Ngan | Sales Rep. II | 8217 | . |
5 | 120123 | Hotstone | Sales Rep. I | 18901 | . |
6 | 120124 | Daymond | Sales Rep. I | 18687 | . |
7 | 120125 | Hofmeister | Sales Rep. IV | 8460 | . |
8 | 120126 | Denny | Sales Rep. II | 18475 | . |
9 | 120127 | Clarkson | Sales Rep. II | 15645 | . |
10 | 120128 | Kletschkus | Sales Rep. IV | 18567 | . |
11 | 120129 | Roebuck | Sales Rep. III | 10866 | . |
12 | 120130 | Lyon | Sales Rep. I | 18748 | . |
13 | 120131 | Surawski | Sales Rep. I | 18628 | . |
14 | 120132 | Kaiser | Sales Rep. III | 8309 | . |
15 | 120133 | Soltau | Sales Rep. II | 18536 | . |
16 | 120134 | Shannan | Sales Rep. II | 6575 | . |
17 | 120135 | Platts | Sales Rep. IV | 15249 | . |
18 | 120136 | Leyden | Sales Rep. I | 18659 | . |
19 | 120137 | Iyengar | Sales Rep. III | 18322 | . |
20 | 120138 | Duckett | Sales Rep. I | 18809 | . |
21 | 120139 | Wilson | Sales Rep. II | 18506 | . |
22 | 120140 | Minas | Sales Rep. I | 18901 | . |
23 | 120141 | Liebman | Sales Rep. II | 18383 | . |
24 | 120142 | Eastley | Sales Rep. III | 18444 | . |
25 | 120143 | Sloey | Sales Rep. II | 9770 | . |
26 | 120144 | Barbis | Sales Rep. III | 18536 | . |
27 | 120145 | Aisbitt | Sales Rep. II | 10744 | . |
28 | 120146 | Cederlund | Sales Rep. I | 18840 | . |
29 | 120147 | Rusli | Sales Rep. II | 18536 | . |
30 | 120148 | Zubak | Sales Rep. III | 8187 | . |
31 | 120149 | Chantharasy | Sales Rep. I | 18628 | . |
32 | 120150 | Filo | Sales Rep. III | 9709 | . |
33 | 120151 | Phaiyakounh | Sales Rep. II | 6575 | . |
34 | 120152 | Dives | Sales Rep. I | 18718 | . |
35 | 120153 | Waal | Sales Rep. I | 18628 | . |
36 | 120154 | Hayawardhana | Sales Rep. III | 6575 | . |
37 | 120155 | James | Sales Rep. III | 18353 | . |
38 | 120156 | Snellings | Sales Rep. I | 18687 | . |
39 | 120157 | Karavdic | Sales Rep. II | 18597 | . |
40 | 120158 | Pilgrim | Sales Rep. III | 11504 | . |
41 | 120159 | Phoumirath | Sales Rep. IV | 11139 | . |
42 | 120160 | Segrave | Sales Rep. I | 18901 | . |
43 | 120161 | Martines | Sales Rep. III | 18536 | . |
44 | 120162 | Scordia | Sales Rep. I | 18659 | . |
45 | 120163 | Magrath | Sales Rep. II | 12784 | . |
46 | 120164 | Stamalis | Sales Rep. II | 9528 | . |
47 | 120165 | Pretorius | Sales Rep. I | 18687 | . |
48 | 120166 | Nowd | Sales Rep. IV | 6575 | . |
49 | 120167 | Tilley | Sales Rep. I | 18659 | . |
50 | 120168 | Barcoe | Sales Rep. I | 18932 | . |
51 | 120169 | Tannous | Sales Rep. III | 18383 | . |
52 | 120170 | Kingston | Sales Rep. III | 13423 | . |
53 | 120171 | Moody | Sales Rep. II | 18506 | . |
54 | 120172 | Comber | Sales Rep. III | 6575 | . |
55 | 120173 | Osborn | Sales Rep. I | 18779 | . |
56 | 120174 | Simms | Sales Rep. I | 18628 | . |
57 | 120175 | Conolly | Sales Rep. I | 18901 | . |
58 | 120176 | Pa | Sales Rep. I | 18932 | . |
59 | 120177 | Kierce | Sales Rep. III | 15372 | . |
60 | 120178 | Plested | Sales Rep. II | 6665 | . |
61 | 120179 | Wills | Sales Rep. III | 17532 | . |
62 | 120180 | George | Sales Rep. II | 8370 | . |
63 | 120198 | Body | Sales Rep. III | 18597 | . |
64 | 120261 | Highpoint | Chief Sales Officer | 11535 | . |
65 | 121018 | Magolan | Sales Rep. II | 6575 | . |
66 | 121019 | Desanctis | Sales Rep. IV | 17684 | . |
67 | 121020 | Ridley | Sales Rep. IV | 16922 | . |
68 | 121021 | Farren | Sales Rep. IV | 13939 | . |
69 | 121022 | Stevens | Sales Rep. IV | 16833 | . |
70 | 121023 | Fuller | Sales Rep. I | 18748 | . |
71 | 121024 | Westlund | Sales Rep. II | 17653 | . |
72 | 121025 | Cassey | Sales Rep. II | 7183 | . |
73 | 121026 | Jaime | Sales Rep. IV | 18353 | . |
74 | 121027 | Rudder | Sales Rep. II | 12388 | . |
75 | 121028 | Smades | Sales Rep. I | 18932 | . |
76 | 121029 | Mcelwee | Sales Rep. I | 18962 | . |
77 | 121030 | Areu | Sales Rep. I | 18659 | . |
78 | 121031 | Filan | Sales Rep. III | 10805 | . |
79 | 121032 | Smith | Sales Rep. IV | 18322 | . |
80 | 121033 | Snitzer | Sales Rep. III | 17684 | . |
81 | 121034 | Kirkman | Sales Rep. II | 18628 | . |
82 | 121035 | Blackley | Sales Rep. II | 6575 | . |
83 | 121036 | Mesley | Sales Rep. I | 18901 | . |
84 | 121037 | Miketa | Sales Rep. III | 16861 | . |
85 | 121038 | Anstey | Sales Rep. I | 18840 | . |
86 | 121039 | Washington | Sales Rep. II | 8887 | . |
87 | 121040 | Darrohn | Sales Rep. III | 9801 | . |
88 | 121041 | Wetherington | Sales Rep. II | 6575 | . |
89 | 121042 | Robbin-Coker | Sales Rep. III | 16010 | . |
90 | 121043 | Kagarise | Sales Rep. II | 13209 | . |
91 | 121044 | Abbott | Sales Rep. I | 18840 | . |
92 | 121045 | Hampton | Sales Rep. II | 13880 | . |
93 | 121046 | Mandzak | Sales Rep. I | 18809 | . |
94 | 121047 | Grzebien | Sales Rep. I | 18871 | . |
95 | 121048 | Clark | Sales Rep. I | 18871 | . |
96 | 121049 | Bataineh | Sales Rep. I | 18962 | . |
97 | 121050 | Capristo-Abramczyk | Sales Rep. II | 18597 | . |
98 | 121051 | Myers | Sales Rep. I | 18932 | . |
99 | 121052 | Fay | Sales Rep. II | 18567 | . |
100 | 121053 | Mcdade | Sales Rep. III | 6606 | . |
Hi.
Here is the log:
Your very hard to read and follow data layout does not mention a line three so you probably don't actually want that second / on the input statement.
Post some example data in a code box opened using the forum menu {I} icon so we can see plain text as read by the infile statement.
Replace any sensitive values such as names with dummy values if needed but keep the same format.
In your code you are reading 3 lines of data not 2. The second "/" is unnecessary. The second line holds Job Title, HireDate and Salary.
You may prefer to use input #1 for line1 and #2 for line 2.
eg.
data sales_staff2;
infile "&path/sales2.dat";
input #1 Employee_ID 6. @21 Last_Name $ 18.
#2 Job_Title $ 20. @22 Hire_Date mmddyy10. @ 33 Salary dollar8. ;
run;
Hi Sue.
Here is the revised code:
data sales_staff2;
infile "&path/sales2.dat";
input #1 Employee_ID 6. @21 Last_Name $ 18. /
#2 Job_Title $ 20. @22 Hire_Date mmddyy10. @ 33 Salary dollar8. ;
run;
title 'Australian and US Sales Staff';
proc print data=sales_staff2;
run;
The result is not quiet there yet:
Australian and US Sales Staff
Obs Employee_ID Last_Name Job_Title Hire_Date Salary123456789101112
120102 | Zhou | Sales Manager | 12205 | 108255 |
. | 120103 Wilson | . | . | |
. | 01/01/1978 $87,9 | M 01/22/1953 AU | . | . |
120121 | Elvish | Sales Rep. II | 6575 | 26600 |
. | 120122 Christina | . | . | |
. | 07/01/1982 $27,4 | F 07/27/1958 AU | . | . |
120123 | Hotstone | Sales Rep. I | 18901 | 26190 |
. | 120124 Lucian | . | . | |
. | 03/01/2011 $26,4 | M 05/13/1963 AU | . | . |
120125 | Hofmeister | Sales Rep. IV | 8460 | 32040 |
. | 120126 Satyakam | . | . | |
. | 08/01/2010 $26,7 | M 09/20/1992 AU | . | . |
Sorry the "/" is no longer needed with the #line numbering.
Do you have a sample of the raw data because this would help. Needn't be the "live" data - make something up!
I do not have a sample of the raw data. But the partial proc print output is shown.
You likely want to add a date format for the date variable so you can see if your values are as need. I suggest adding:
Format date date9. ;
@Gillo wrote:
I do not have a sample of the raw data. But the partial proc print output is shown.
Pretty obviously not quite accurate. The raw data is in the file your are reading. If you don't have access to that file how are you reading it?
Copy and paste 8 lines or so from the start of the file and paste into the code box as mentioned.
Hi.
Here below is a copy of the raw data.
Edited to place the data into a code box so that formatting is not lost.
120102 Tom Zhou
Sales Manager 06/01/1993 $108,255
M 08/11/1973 AU
120103 Wilson Dawes
Sales Manager 01/01/1978 $87,975
M 01/22/1953 AU
120121 Irenie Elvish
Sales Rep. II 01/01/1978 $26,600
F 08/02/1948 AU
120122 Christina Ngan
Sales Rep. II 07/01/1982 $27,475
F 07/27/1958 AU
120123 Kimiko Hotstone
Sales Rep. I 10/01/2011 $26,190
F 09/28/1968 AU
120124 Lucian Daymond
Sales Rep. I 03/01/2011 $26,480
M 05/13/1963 AU
120125 Fong Hofmeister
Sales Rep. IV 03/01/1983 $32,040
M 12/06/1958 AU
120126 Satyakam Denny
Sales Rep. II 08/01/2010 $26,780
M 09/20/1992 AU
120127 Sharryn Clarkson
Sales Rep. II 11/01/2002 $28,100
F 01/04/1983 AU
120128 Monica Kletschkus
Sales Rep. IV 11/01/2010 $30,890
F 07/14/1990 AU
120129 Alvin Roebuck
Sales Rep. III 10/01/1989 $30,070
M 11/22/1968 AU
120130 Kevin Lyon
Sales Rep. I 05/01/2011 $26,955
M 12/14/1988 AU
120131 Marinus Surawski
Sales Rep. I 01/01/2011 $26,910
M 09/25/1983 AU
120132 Fancine Kaiser
Sales Rep. III 10/01/1982 $28,525
F 04/05/1953 AU
120133 Petrea Soltau
Sales Rep. II 10/01/2010 $27,440
F 04/22/1990 AU
120134 Sian Shannan
Sales Rep. II 01/01/1978 $28,015
M 06/06/1953 AU
120135 Alexei Platts
Sales Rep. IV 10/01/2001 $32,490
M 01/26/1973 AU
120136 Atul Leyden
Sales Rep. I 02/01/2011 $26,605
M 09/16/1983 AU
120137 Marina Iyengar
Sales Rep. III 03/01/2010 $29,715
F 03/12/1983 AU
120138 Shani Duckett
Sales Rep. I 07/01/2011 $25,795
F 07/11/1983 AU
120139 Fang Wilson
Sales Rep. II 09/01/2010 $26,810
F 08/18/1990 AU
120140 Michael Minas
Sales Rep. I 10/01/2011 $26,970
M 08/03/1992 AU
120141 Amanda Liebman
Sales Rep. II 05/01/2010 $27,465
F 03/12/1992 AU
120142 Vincent Eastley
Sales Rep. III 07/01/2010 $29,695
M 06/14/1990 AU
120143 Phu Sloey
Sales Rep. II 10/01/1986 $26,790
M 05/17/1963 AU
120144 Viney Barbis
Sales Rep. III 10/01/2010 $30,265
M 03/07/1990 AU
120145 Sandy Aisbitt
Sales Rep. II 06/01/1989 $26,060
M 01/22/1968 AU
120146 Wendall Cederlund
Sales Rep. I 08/01/2011 $25,985
M 10/02/1963 AU
120147 Skev Rusli
Sales Rep. II 10/01/2010 $26,580
F 01/19/1992 AU
120148 Michael Zubak
Sales Rep. III 06/01/1982 $28,480
M 09/13/1953 AU
120149 Judy Chantharasy
Sales Rep. I 01/01/2011 $26,390
F 11/21/1978 AU
120150 John Filo
Sales Rep. III 08/01/1986 $29,965
M 07/09/1958 AU
120151 Julianna Phaiyakounh
Sales Rep. II 01/01/1978 $26,520
F 11/21/1948 AU
120152 Sean Dives
Sales Rep. I 04/01/2011 $26,515
M 05/01/1983 AU
120153 Samantha Waal
Sales Rep. I 01/01/2011 $27,260
F 05/07/1983 AU
120154 Caterina Hayawardhana
Sales Rep. III 01/01/1978 $30,490
F 07/20/1948 AU
120155 Narelle James
Sales Rep. III 04/01/2010 $29,990
F 04/22/1988 AU
120156 Gerry Snellings
Sales Rep. I 03/01/2011 $26,445
F 09/01/1992 AU
120157 Leonid Karavdic
Sales Rep. II 12/01/2010 $27,860
M 02/21/1990 AU
120158 Daniel Pilgrim
Sales Rep. III 07/01/1991 $36,605
M 07/14/1968 AU
120159 Lynelle Phoumirath
Sales Rep. IV 07/01/1990 $30,765
F 02/24/1968 AU
120160 Chuck Segrave
Sales Rep. I 10/01/2011 $27,115
M 09/09/1958 AU
120161 Rosette Martines
Sales Rep. III 10/01/2010 $30,785
F 03/07/1992 AU
120162 Randal Scordia
Sales Rep. I 02/01/2011 $27,215
M 09/05/1992 AU
120163 Brett Magrath
Sales Rep. II 01/01/1995 $26,735
M 05/22/1968 AU
120164 Ranj Stamalis
Sales Rep. II 02/01/1986 $27,450
F 11/26/1963 AU
120165 Tadashi Pretorius
Sales Rep. I 03/01/2011 $27,050
M 03/19/1988 AU
120166 Fadi Nowd
Sales Rep. IV 01/01/1978 $30,660
M 06/14/1948 AU
120167 Kimiko Tilley
Sales Rep. I 02/01/2011 $25,185
F 05/04/1958 AU
120168 Selina Barcoe
Sales Rep. I 11/01/2011 $25,275
F 03/24/1988 AU
120169 Cos Tannous
Sales Rep. III 05/01/2010 $28,135
M 01/02/1988 AU
120170 Alban Kingston
Sales Rep. III 10/01/1996 $28,830
M 02/25/1978 AU
120171 Alena Moody
Sales Rep. II 09/01/2010 $26,205
F 07/19/1988 AU
120172 Edwin Comber
Sales Rep. III 01/01/1978 $28,345
M 04/01/1948 AU
120173 Hernani Osborn
Sales Rep. I 06/01/2011 $26,715
M 02/23/1958 AU
120174 Doungkamol Simms
Sales Rep. I 01/01/2011 $26,850
F 01/10/1948 AU
120175 Andrew Conolly
Sales Rep. I 10/01/2011 $25,745
M 08/18/1992 AU
120176 Koavea Pa
Sales Rep. I 11/01/2011 $26,095
M 11/09/1990 AU
120177 Franca Kierce
Sales Rep. III 02/01/2002 $28,745
F 04/05/1983 AU
120178 Billy Plested
Sales Rep. II 04/01/1978 $26,165
M 11/23/1958 AU
120179 Matsuoka Wills
Sales Rep. III 01/01/2008 $28,510
M 03/15/1978 AU
120180 Vino George
Sales Rep. II 12/01/1982 $26,970
M 06/27/1958 AU
120198 Meera Body
Sales Rep. III 12/01/2010 $28,025
F 01/21/1992 AU
120261 Harry Highpoint
Chief Sales Officer 08/01/1991 $243,190
M 02/21/1973 US
121018 Julienne Magolan
Sales Rep. II 01/01/1978 $27,560
F 01/03/1948 US
121019 Scott Desanctis
Sales Rep. IV 06/01/2008 $31,320
M 06/25/1990 US
121020 Cherda Ridley
Sales Rep. IV 05/01/2006 $31,750
F 02/23/1988 US
121021 Priscilla Farren
Sales Rep. IV 03/01/1998 $32,985
F 12/10/1978 US
121022 Robert Stevens
Sales Rep. IV 02/01/2006 $32,210
M 10/28/1983 US
121023 Shawn Fuller
Sales Rep. I 05/01/2011 $26,010
M 03/13/1968 US
121024 Michael Westlund
Sales Rep. II 05/01/2008 $26,600
M 09/21/1988 US
121025 Barnaby Cassey
Sales Rep. II 09/01/1979 $28,295
M 10/10/1953 US
121026 Terrill Jaime
Sales Rep. IV 04/01/2010 $31,515
M 11/08/1990 US
121027 Allan Rudder
Sales Rep. II 12/01/1993 $26,165
M 05/05/1968 US
121028 William Smades
Sales Rep. I 11/01/2011 $26,585
M 04/27/1992 US
121029 Kuo-Chung Mcelwee
Sales Rep. I 12/01/2011 $27,225
M 12/22/1968 US
121030 Jeryl Areu
Sales Rep. I 02/01/2011 $26,745
M 11/12/1983 US
121031 Scott Filan
Sales Rep. III 08/01/1989 $28,060
M 07/09/1968 US
121032 Nasim Smith
Sales Rep. IV 03/01/2010 $31,335
M 02/24/1992 US
121033 Kristie Snitzer
Sales Rep. III 06/01/2008 $29,775
F 11/06/1990 US
121034 John Kirkman
Sales Rep. II 01/01/2011 $27,110
M 08/23/1992 US
121035 James Blackley
Sales Rep. II 01/01/1978 $26,460
M 03/25/1948 US
121036 Teresa Mesley
Sales Rep. I 10/01/2011 $25,965
F 07/18/1992 US
121037 Muthukumar Miketa
Sales Rep. III 03/01/2006 $28,310
M 06/12/1978 US
121038 David Anstey
Sales Rep. I 08/01/2011 $25,285
M 02/13/1992 US
121039 Donald Washington
Sales Rep. II 05/01/1984 $27,460
M 06/03/1958 US
121040 Brienne Darrohn
Sales Rep. III 11/01/1986 $29,525
F 07/06/1963 US
121041 Jaime Wetherington
Sales Rep. II 01/01/1978 $26,120
F 02/04/1948 US
121042 Joseph Robbin-Coker
Sales Rep. III 11/01/2003 $28,845
M 04/04/1983 US
121043 Sigrid Kagarise
Sales Rep. II 03/01/1996 $28,225
F 11/09/1973 US
121044 Ray Abbott
Sales Rep. I 08/01/2011 $25,660
M 12/11/1958 US
121045 Cascile Hampton
Sales Rep. II 01/01/1998 $28,560
F 06/13/1968 US
121046 Roger Mandzak
Sales Rep. I 07/01/2011 $25,845
M 09/07/1988 US
121047 Karen Grzebien
Sales Rep. I 09/01/2011 $25,820
F 11/26/1983 US
121048 Lawrie Clark
Sales Rep. I 09/01/2011 $26,560
F 06/24/1988 US
121049 Perrior Bataineh
Sales Rep. I 12/01/2011 $26,930
F 02/14/1990 US
121050 Patricia Capristo-Abramczyk
Sales Rep. II 12/01/2010 $26,080
F 01/12/1990 US
121051 Glorina Myers
Sales Rep. I 11/01/2011 $26,025
F 05/02/1953 US
121052 Richard Fay
Sales Rep. II 11/01/2010 $26,900
M 01/09/1990 US
121053 Tywanna Mcdade
Sales Rep. III 02/01/1978 $29,955
F 09/23/1948 US
121054 Daniel Pulliam
Sales Rep. III 11/01/1980 $29,805
M 11/12/1958 US
121055 Clement Davis
Sales Rep. III 08/01/2010 $30,185
M 01/08/1992 US
121056 Stacey Lyszyk
Sales Rep. II 05/01/2007 $28,325
F 07/05/1988 US
121057 Tachaun Voron
Sales Rep. I 12/01/2011 $25,125
M 12/26/1963 US
121058 Del Kohake
Sales Rep. I 10/01/2011 $26,270
M 07/12/1978 US
121059 Jacqulin Carhide
Sales Rep. II 04/01/1985 $27,425
F 10/25/1963 US
121060 Elizabeth Spofford
Sales Rep. III 01/01/1978 $28,800
F 06/08/1948 US
121061 Lauris Hassam
Sales Rep. III 07/01/1988 $29,815
M 07/16/1958 US
121062 Debra Armant
Sales Rep. IV 08/01/2010 $30,305
F 10/28/1988 US
121063 Regi Kinol
Sales Rep. II 08/01/2009 $35,990
M 07/27/1983 US
121064 Asishana Polky
Sales Rep. I 09/01/2011 $25,110
M 01/28/1968 US
121065 Corneille Malta
Sales Rep. III 04/01/2010 $28,040
F 09/05/1988 US
121066 Ceresh Norman
Sales Rep. II 01/01/1978 $27,250
F 08/23/1948 US
121067 Jeanilla Macnair
Sales Rep. IV 03/01/2010 $31,865
F 01/18/1990 US
121068 Salaheloin Osuba
Sales Rep. II 09/01/1996 $27,550
M 12/02/1973 US
121069 Jason Lapsley
Sales Rep. II 10/01/1994 $26,195
M 03/19/1973 US
121070 Agnieszka Holthouse
Sales Rep. III 02/01/2010 $29,385
F 11/04/1988 US
121071 John Hoppmann
Sales Rep. III 09/01/1981 $28,625
M 09/10/1963 US
121072 Christer North
Sales Rep. I 09/01/2011 $26,105
M 01/10/1983 US
121073 Donald Court
Sales Rep. I 01/01/2011 $27,100
M 05/15/1953 US
121074 Eric Michonski
Sales Rep. I 10/01/2011 $26,990
M 03/01/1963 US
121075 Kasha Sugg
Sales Rep. II 01/01/1978 $28,395
F 12/23/1948 US
121076 Micah Cobb
Sales Rep. II 01/01/1987 $26,685
M 10/09/1968 US
121077 Bryce Smotherly
Sales Rep. III 10/01/2010 $28,585
M 09/05/1988 US
121078 Lionel Wende
Sales Rep. I 11/01/2011 $27,485
M 05/01/1953 US
121079 Azmi Mees
Sales Rep. I 11/01/2011 $25,770
M 06/03/1978 US
121080 Kumar Chinnis
Sales Rep. I 09/01/2011 $32,235
M 01/24/1963 US
121081 Susie Knudson
Sales Rep. III 04/01/1980 $30,235
F 03/28/1953 US
121082 Richard Debank
Sales Rep. III 10/01/1981 $28,510
M 07/05/1953 US
121083 Tingmei Sutton
Sales Rep. I 03/01/2011 $27,245
F 03/11/1963 US
121084 Tulsidas Ould
Sales Rep. I 01/01/2011 $22,710
M 08/16/1968 US
121085 Rebecca Huslage
Sales Rep. IV 01/01/2011 $32,235
M 11/12/1990 US
121086 John-Michael Plybon
Sales Rep. I 01/01/2011 $26,820
M 12/16/1948 US
121087 Virtina O'Suilleabhain
Sales Rep. II 03/01/2003 $28,325
F 12/07/1978 US
121088 Momolu Kernitzki
Sales Rep. I 01/01/2011 $27,240
M 06/10/1992 US
121089 Gregory Sauder
Sales Rep. II 07/01/1978 $28,095
M 08/21/1958 US
121090 Betty Klibbe
Sales Rep. I 02/01/2011 $26,600
F 06/19/1958 US
121091 Ernest Kadiri
Sales Rep. II 01/01/1993 $27,325
M 02/19/1973 US
121092 Gynell Pritt
Sales Rep. I 08/01/2011 $25,680
F 03/08/1978 US
121093 Carl Vasconcellos
Sales Rep. I 01/01/2011 $27,410
M 07/18/1968 US
121094 Larry Tate
Sales Rep. I 09/01/2011 $26,555
M 01/07/1958 US
121095 Sara Kratzke
Sales Rep. II 07/01/1995 $28,010
F 04/14/1973 US
121096 Robert Newstead
Sales Rep. I 05/01/2011 $26,335
M 05/18/1973 US
121097 Willeta Chernega
Sales Rep. II 10/01/1999 $26,830
F 10/23/1978 US
121098 Hal Heatwole
Sales Rep. I 05/01/2011 $27,475
M 03/22/1992 US
121099 Royall Mrvichin
Sales Rep. IV 05/01/2004 $32,725
M 03/19/1983 US
121100 Tzue-Ing Cormell
Sales Rep. II 04/01/1980 $28,135
M 04/27/1953 US
121101 Burnetta Buckner
Sales Rep. I 11/01/2011 $25,390
F 08/28/1990 US
121102 Rocheal Flammia
Sales Rep. I 06/01/2011 $27,115
F 06/26/1983 US
121103 Brian Farnsworth
Sales Rep. I 09/01/2011 $27,260
M 04/28/1992 US
121104 Leoma Johnson
Sales Rep. II 04/01/1990 $28,315
F 11/12/1968 US
121105 Jessica Savacool
Sales Rep. III 01/01/2007 $29,545
F 05/09/1983 US
121106 James Hilburger
Sales Rep. I 02/01/2011 $25,880
M 02/02/1973 US
121107 Rose Anger
Sales Rep. IV 07/01/2010 $31,380
F 04/24/1990 US
121108 Libby Levi
Sales Rep. I 11/01/2011 $25,930
F 07/04/1992 US
121109 Harold Boulus
Sales Rep. I 05/01/2011 $26,035
M 11/05/1973 US
121135 Tammy Ruta
Sales Rep. I 08/01/2011 $27,010
F 06/07/1958 US
121136 Lesia Galarneau
Sales Rep. I 12/01/2011 $27,460
F 07/15/1978 US
121137 Michael. R. Boocks
Sales Rep. I 04/01/2011 $27,055
M 01/18/1992 US
121138 Hershell Tolley
Sales Rep. I 01/01/2011 $27,265
M 02/28/1953 US
121139 Diosdado Mckee
Sales Rep. II 07/01/1991 $27,700
F 08/19/1963 US
121140 Saunders Briggi
Sales Rep. I 04/01/2011 $26,335
M 01/23/1983 US
121143 Louis Favaron
Senior Sales Manager 07/01/2001 $95,090
M 11/26/1973 US
121144 Renee Capachietti
Sales Manager 11/01/1995 $83,505
F 06/28/1968 US
121145 Dennis Lansberry
Sales Manager 04/01/1980 $84,260
M 11/22/1953 US
The raw data has 3 lines of code! You will need the #3 even if there is no data to read in.
data sales_staff2;
infile "&path/sales2.dat";
input #1 Employee_ID 6. @21 Last_Name $ 18.
#2 Job_Title $ 20. @22 Hire_Date mmddyy10. @ 33 Salary dollar8.
#3 ;
run;
and use the termstr option if the raw data is a Unix file.
Hi:
If you are using the Programming 2 course data, then you DO have the data or else the program would not work. When you ran the program to initially make the date in the Programming 2 course, it created SALES2.DAT. So if you used this INFILE statement:
infile "&path/sales2.dat";
And, IF you ran the setup code that included the %LET statement for PATH, then that is the location of your SALES2.DAT file.
When you are working on the practices in the e-learning course, there is always a button for you to reveal the solution to the exercise. As shown by the postings you've received, there are 2 possible solutions -- one using the / to go to the next input line and one using the # to point to the specific input line.
As shown from the screen shot inside the course, the data layout is revealed to you and both solutions:
If you are uncertain about the difference between using / or # in your INPUT statement, you could go back and listen to the lecture again on Line Pointer Controls. There is a lesson on each of them in the Table of Contents for Lesson 3.
Cynthia
If you are read a UNIX file under windows OS, you need specify TERMSTR option: termstr=lf termstr=crlf. data sales_staff2; infile "&path/sales2.dat" termstr=lf ;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.