Allan Bowe
Allan Bowe

Reputation: 12691

How to trace a SAS FCMP Compilation Error?

I get the below after compiling around 70 or 80 inter-connected FCMP functions. The weird thing is, it doesn't happen at one particular function - it only happens when exiting (quitting) the FCMP procedure, and if I instantiate / quit after every single function, the function on which it occurs will change depending on the order of the functions. So it doesn't appear to be related to a particular line of code, nor the total number of functions.

How to debug further? I only see trace options for execution, not compilation.

ERROR: Parsing error generating code.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE FCMP used (Total process time):
      real time           0.10 seconds
      cpu time            0.11 seconds

Upvotes: 2

Views: 41

Answers (1)

Allan Bowe
Allan Bowe

Reputation: 12691

I was able to compile in the end by simply sorting the functions alphabetically. I had previously arranged things such that if f(a) called f(b) then I would call f(b) first. This avoided the type conversion messages in the log (eg if f(b) returned a char value, f(a) would assume numeric).

I guess that compilation in an 'out of order' sequence forces placeholders which gets around the compilation issue. It just results in lots of messages like this:

NOTE: Numeric value converted to character.
NOTE: Numeric value converted to character for argument 1 of 'UPCASE' operation.
NOTE: Numeric value converted to character for argument 1 of 'UPCASE' operation.
NOTE: Numeric value converted to character.

Upvotes: 3

Related Questions