Date: Wed, 26 Jul 2006 16:13:10 -0500
Reply-To: "Oliver, Richard" <roliver@SPSS.COM>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: "Oliver, Richard" <roliver@SPSS.COM>
Subject: Re: SPSS Macro error
Content-Type: text/plain; charset="US-ASCII"
Personally, I always use SET PRINTBACK ON -- and MPRINT ON if I'm debugging macros or Python program blocks.
When commands are echoed to the log (with PRINTBACK ON), then error messages usually appear in the log right after the offending command. So, that often eliminates the need to figure out which line the error occurred on.
If there's some better explanation of the error messages than the error messages themselves, I'm not aware of it -- and if better explanations did exist, I would think the best place to put them would be right in the error messages.
MPRINT ON will display the syntax generated by macro expansion and by program blocks (Begin-End Program) that build command syntax using Python.
From: Hector Maletta [mailto:firstname.lastname@example.org]
Sent: Wednesday, July 26, 2006 4:01 PM
To: Oliver, Richard; SPSSX-L@LISTSERV.UGA.EDU
Subject: RE: SPSS Macro error
Would that setting (SET PRINTBACK ON MPRINT ON) clarify error ordinary messages as the one posted by Joseph, outside of debugging macros? I often find incomprehensible error messages not referring to any line or column at all, or mentioning the column but not the line. This is, IMHO, one the most annoying things I ever encounter while using SPSS. If only line and column were mentioned one may find one's way using the status bar, but otherwise the message is Ancient Greek (or Egyptian) to me.
I also vaguely remember someone saying on this list that a list of error numbers with the corresponding explanations existed somewhere, but I cannot remember where. Could it not be made more accessible? Perhaps in a context-sensitive right-click menu? I would love right-clicking on an error message in the output window, causing a menu to drop down, then choosing something like 'Look up error' and finding a clear explanation of the error (plus possible suggestions for fixing it). A less ambitious option might be a de-contextualized Utilities menu option for looking up a list of error numbers and their explanations.
Hope never dies, but takes a beating every day...
De: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] En nombre de Oliver, Richard Enviado el: Wednesday, July 26, 2006 3:27 PM
Asunto: Re: SPSS Macro error
"column 25" is a position within a line. If you increase the width of the syntax window, in the lower right portion of the status bar, you'll see both line and column numbers displayed, indicating the current cursor location.
When debugging macros use
SET PRINTBACK ON MPRINT ON.
to display the generated code in the output window. That will often make error messages easier to interpret.
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of Joseph Hoffman
Sent: Wednesday, July 26, 2006 9:25 AM
Subject: SPSS Macro error
Dear SPSS Listers:
I am trying to write my first SPSS macro with v. 13.0 for Windows. I got the following error message:
>Error # 6839 in column 25. Text: (
>In a macro expression, a left parenthesis immediately follows an operand.
>This command not executed.
Where do I look for "column 25"? The message doesn't reference line numbers, like usual error messages.
Thanks for any help!
Joseph H Hoffman
Research Institute on Addictions
State University of New York at Buffalo
1021 Main Street
Buffalo NY 14203