BookmarkSubscribeRSS Feed
new_sasi
Calcite | Level 5
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
5 REPLIES 5
David_SAS
SAS Employee
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
deleted_user
Not applicable
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?
David_SAS
SAS Employee
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
David_SAS
SAS Employee
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
deleted_user
Not applicable
Glad to see my book has made this forum. Hope to see many of you at SUGI this week.

Jonas V. Bilenas

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 1240 views
  • 0 likes
  • 3 in conversation