Question

You are given a text file where dollar signs were used as delimiters. To indicate missing...

  1. You are given a text file where dollar signs were used as delimiters. To indicate missing values, two dollars signs were entered. Values in this file represent last name, employee number, and annual salary.

Here is a listing of this file:

File company.txt

Roberts$M234$45000

Chien$M74777$$

Walters$$75000

Rogers$F7272$78131                                                  

Using this data file as input, create a temporary SAS data set called Company with the variables LastName (character), EmpNo (character), and Salary (numeric).

0 0
Add a comment Improve this question Transcribed image text
Answer #1
data company; 

infile 'c:\books\learning\company.txt' dsd dlm= ' $ ' ; 
input LastName $ EmpNo $ Salary; 

format Salary dollarlO.; /* optional statement */ 
run; 

title "Listing of COMPANY"; 
proc print data=company noobs ; 
run; 
Add a comment
Know the answer?
Add Answer to:
You are given a text file where dollar signs were used as delimiters. To indicate missing...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT