The SAS Output Delivery System and reporting techniques

Proc Format

Reply
N/A
Posts: 1

Proc Format

Hallo NG,
as new sasii, i was trying to run some examples from "Power of Proc Format." One example will not run correctly. This is the:
proc format;
value score_f low-<160 = ‘INCA’
160-179 = ‘INCB’
180-199 = ‘INCC’
200-219 = ‘INCD’
220-high = ‘INCE’;

value INCA low-<35000=’ 500’ 35000-<45000=’750’ 45000-<55000=’1000’
55000-high=’1250’;
value INCB low-<35000=’1500’ 35000-<45000=’2000’ 45000-<55000=’2500’
55000-high=’3000’;
value INCC low-<35000=’4000’ 35000-<45000=’4500’ 45000-<55000=’5000’
55000-high=’6000’;
value INCD low-<35000=’7000’ 35000-<45000=’7500’ 45000-<55000=’8000’
55000-high=’8500’;
value INCE low-<35000=’9000’ 35000-<45000=’10000’ 45000-<55000=’15000’
55000-high=’20000’;


data scorestt;
set scores;

fmtuse = put(score,score_f.);

line = input(put(income_est,fmtuse),best12.0);
run;

The following error occurred:

id=19 x=-1.226326813 score=176 lnest=0.777661291 pbad=0.6851758499 a=0.9131872989 bad=1
income_est=23806 fmtuse=‘INCB’ line= _ERROR_=1 _N_=19
NOTE: Argument 2 to function PUTC at line 389 column 8 is invalid.

Has anybody an idea?Can i not use strings as format name?Must they end with a period.
Message was edited by: new_sasi at Mar 12, 2006 2:37 PM
SAS Employee
Posts: 174

Re: Proc Format

Hello,

This question is not related to ODS and Base reporting, and is best answered by our excellent technical support staff. See http://support.sas.com/techsup/intro.html .

Good luck with learning and using SAS!

-- David Kelley, SAS
N/A
Posts: 0

Re: Proc Format

Quote: "This question is not related to ODS and Base reporting, ..."

There seems to be a lot of topics for discussion that do not fit into any of the topics setup in the forum. Could this suggest a new topic forum: "Base SAS discussions" or "ETL" possibly?
SAS Employee
Posts: 174

Re: Proc Format

Please submit your suggestions for improvements or additional forums using the form available at http://support.sas.com/contact/comment-form.html .

-- David Kelley, SAS
SAS Employee
Posts: 174

Re: Proc Format

I went back and looked at the SAS code for the BBU (book by user)
The Power of PROC FORMAT, which you can find at http://www.sas.com/apps/pubscat/bookdetails.jsp?pc=59498&promo=BS

The snippet in question is:
[pre]
data scores;
set bbu.scores;
fmtuse = put(score,score_f.);
line = input(putn(income_est,fmtuse),best12.);
run;
[/pre]
Notice that the code does PUTN, not PUT. "new_sasi", can you fix up your code and retry?

-- David Kelley, SAS
N/A
Posts: 0

Re: Proc Format

Glad to see my book has made this forum. Hope to see many of you at SUGI this week.

Jonas V. Bilenas
Ask a Question
Discussion stats
  • 5 replies
  • 219 views
  • 0 likes
  • 3 in conversation