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 ercent4.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
data FileIn1;
input #1 Rank 3. #5 Drug $10. #20 Company $20. #40 Sales :dollar12.2 #52 Percent ercent4.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