Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading dataline items and eliminating items to create dataset

Status
Not open for further replies.

sap1958

Technical User
Oct 22, 2009
138
US
I am trying to use an absolute positioning to create a dataset. My problem is I want to eliminate the (#) Notice #5 and #6 entries. I chose absolute positioning because when I establish a length for the Drug and Company, the program did not produce desired results. Here is the code:

data FileIn1;
input #1 Rank 3. #5 Drug $10. #20 Company $20. #40 Sales :dollar12.2 #52 Percent :percent4.2;
datalines;
1 Lipitor Pfizer Inc 5,363,193 -8.8%
2 Nexium AstraZeneca Pharmaceuticals 5,014,827 4.6%
3 Plavix Bristol-Myers Squibb Company 4,223,124 11.2%
4 Advair Diskus GlaxoSmithKline 3,653,410 2.3%
5 (1) Seroquel AstraZeneca Pharmaceuticals 3,117,591 7.2%
6 (6) Abilify Bristol-Myers Squibb Company 3,083,351 30.0%
run;

Desired output is to list
Rank
Drug (I want to eliminate the (#))
Company
Sales
Percent
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top