Help using Base SAS procedures

proc format does not recognise character value (bug?)

Not applicable
Posts: 0

proc format does not recognise character value (bug?)

Can anyone tell me if there is a known bug which causes this to intermittently occur?........

912 proc format;
913 value $pol_num
914 '10'='0'
ERROR: The quoted string '10' is not acceptable to a numeric format or informat.
915 '11'='1'
916 '12'='2'
917 '13'='3'
918 '14'='4'
919 '15'='5'
920 '16'='6'

Clearly it is a character format so why does SAS think it's a numeric? It usually works but every so often throws a wobbler.
Super Contributor
Super Contributor
Posts: 3,176

Re: proc format does not recognise character value (bug?)

Posted in reply to deleted_user
Clearly there is some SAS code executed ahead of your PROC FORMAT, which is likely contributing to this condition. Share more info about this code and also info about your SAS environment (OS, version and SP level -- from SASLOG). And any info about what conditions the problem occurs would also be useful. And it may help by coding a SAS RUN; statement ahead of a PROC execution so that SAS compiles the code up to that point before it interprets the next PROC / DATA step.

Scott Barry
SBBWorks, Inc.
Not applicable
Posts: 0

Re: proc format does not recognise character value (bug?)

Thanks Scott,

It's XP Professional, SP2.

I'm certain it is not a code issue as simply restarting SAS and runinng the same code causes no issue most of the time. It seems completely random. IN other words. probably windows related.

All the steps before the proc have run; statements.
Ask a Question
Discussion stats
  • 2 replies
  • 2 in conversation