Date: Tue, 14 Apr 2009 08:10:41 -0700
Reply-To: "Terjeson, Mark" <Mterjeson@RUSSELL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Terjeson, Mark" <Mterjeson@RUSSELL.COM>
Subject: Re: Problems with informats
In-Reply-To: A<200904141446.n3EAlefG019825@malibu.cc.uga.edu>
Content-Type: text/plain; charset="us-ascii"
Hi Bob,
There will other good ideas forthcoming,
but just to get started. Yes, you would
think that "other" should pick up the slack.
However, what I propose to have you check
may possibly send the routine into spasm and
account for both (even though it shouldn't).
The verbage you provide hints at some 'CPROB'
being found as a match and possibly some not.
I think I would utilize an editor that allows
viewing in hex or write another SAS program
to *read* all the characters in that field and
doublecheck that 'CPROB' only contains 'CPROB'
and rule out that there may be unprintable
characters contained in the string. i.e. the
length should only be 5 and only consist of
C P R O B letters. Typical ASCII viewable
characters will be byte values 32-126. The
0-31,127-255 values m,ay or maynot show some
symbol for the character set you are using but
this test would rule out any unexpected byte
value that is 1) occasionally not providing a
match, and 2) somehow,someway is confusing the
behavior of the routine being run.
Hope this is helpful.
Mark Terjeson
Senior Programmer Analyst
Investment Management & Research
Russell Investments
253-439-2367
Russell
Global Leaders in Multi-Manager Investing
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Bob
LaRue
Sent: Tuesday, April 14, 2009 7:46 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Problems with informats
Hello all,
Perhaps you can give me some suggestions on a problem which seems to
have
stumped SAS support. I have a program which uses an informat called
STATS
to create an order variable as follows:
proc format;
invalue STATS
'CN'=1
'CMEAN'=2
'CMEDIAN'=4
'CMIN'=5
'CPROB'=6
other=0
;
This is used to create an order variable as follows
ord3 = input(stats,STATS.);
The problem is that on some runs there are messages generated in the log
regarding invalid values for this informat. According to the log, the
value 'CPROB' is not recognized as valid. But the problem is not
consistent. Sometimes the code runs fine, and then later we get the
error
messages even though the data has not changed.
What is most puzzling to me is that even is a value is not recognized as
part of the list, shouldn't the use of other = 0 prevent it from falling
over with an error? Also I have checked the actual datasets and found
the
values for 'CPROB' present as expected.
Any thoughts?
Bob LaRue