Date: Tue, 15 Jun 1999 12:24:21 -0400
Reply-To: WHITLOI1 <WHITLOI1@WESTAT.COM>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: WHITLOI1 <WHITLOI1@WESTAT.COM>
Subject: Re: Proc format question
Content-Type: text/plain; charset=US-ASCII
Subject: Proc format question
Summary: Use the system option, FMTSEARCH, to tell SAS how to find formats.
Respondent: Ian Whitlock <email@example.com>
Malcolm Bavington <m.bavington@MEDEVAL.COM> produced the error
> ERROR: Unknown exception (80000602)
> ERROR: A severe error occurred in task FORMAT for module
> executing in module SASFORMA at address 00011342.
> Please contact Technical Support to report this error.
> ERROR: Generic critical error.
> ... with value statements employing the picture 'definitions'.
by changing the libref of the format catalog.
Note that SAS has to know how to find formats. Here is an example
producing the error under Windows with SAS 6.12.
1 libname q "c:\my documents\junk" ;
NOTE: Directory for library Q contains files of mixed engine types.
NOTE: Libref Q was successfully assigned as follows:
Physical Name: c:\my documents\junk
3 proc format lib = q ;
4 picture lookpic low -< 0 = "99999" ;
NOTE: Format LOOKPIC has been written to Q.FORMATS.
5 value chekpic 0 - high = "POS"
6 -20 -< 0 = [lookpic5.]
NOTE: Format CHEKPIC has been written to Q.FORMATS.
8 run ;
NOTE: The PROCEDURE FORMAT used 0.6 seconds.
10 proc format lib = q fmtlib ;
11 select chekpic ;
12 run ;
ERROR: Unknown exception (80000602)
ERROR: A severe error occurred in task FORMAT for module
SASFORMA executing in module
SASFORMA at address 00011342.
Please contact Technical Support to report this error.
ERROR: Generic critical error.
NOTE: The SAS System stopped processing this step because of
NOTE: The PROCEDURE FORMAT used 3.12 seconds.
The problem in this case is that the second PROC FORMAT wants a
report on the format CHEKPIC from library Q. But CHEKPIC uses
another format LOOKPIC. Where is it to be found? It is actually in
the same catalog, Q.FORMATS, but SAS does not know where to look for
this missing format. By default SAS looks for the FORMATS catalog
in WORK and LIBRARY and doesn't find the needed picture format.
One can cure the problem by spelling out the search list with
14 options fmtsearch = ( work q library ) ;
16 proc format lib = q fmtlib ;
17 select chekpic ;
18 run ;
NOTE: The PROCEDURE FORMAT used 0.11 seconds.
or as Malcom observed
> 1) the picture format is not used in subsequent VALUE statements,
> 2) the format catalog is put in the WORK library, or
> 3) the libname to specify where the format catalog is to be put
> is called LIBRARY, or
> 4) (strangest of all) #3) above has occurred at some point in
> the past of the current SAS session, even though it is not the
> case for the current job.
The explanation for 1) is that if you don't use it, SAS doesn't have
to find it. For 2) and 3) these libraries are on the default seach
list. 4) is not strange, if we assume Malcom is working
interactively. Now, there is no concept of a "current job". If the
libref, LIBRARY, has not been cleared then it is still available
later in the session.