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! Sincerely, Joe Hoffman ====================================== Joseph H Hoffman Data Analyst Research Institute on Addictions State University of New York at Buffalo 1021 Main Street Buffalo NY 14203 phone 716-887-2219 FAX 716-887-2510 e-mail [hidden email] ====================================== |
"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. -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Joseph Hoffman Sent: Wednesday, July 26, 2006 9:25 AM To: [hidden email] 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! Sincerely, Joe Hoffman ====================================== Joseph H Hoffman Data Analyst Research Institute on Addictions State University of New York at Buffalo 1021 Main Street Buffalo NY 14203 phone 716-887-2219 FAX 716-887-2510 e-mail [hidden email] ====================================== |
Richard,
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... Hector -----Mensaje original----- De: SPSSX(r) Discussion [mailto:[hidden email]] En nombre de Oliver, Richard Enviado el: Wednesday, July 26, 2006 3:27 PM Para: [hidden email] 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. -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Joseph Hoffman Sent: Wednesday, July 26, 2006 9:25 AM To: [hidden email] 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! Sincerely, Joe Hoffman ====================================== Joseph H Hoffman Data Analyst Research Institute on Addictions State University of New York at Buffalo 1021 Main Street Buffalo NY 14203 phone 716-887-2219 FAX 716-887-2510 e-mail [hidden email] ====================================== |
In reply to this post by Joseph Hoffman
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. -----Original Message----- From: Hector Maletta [mailto:[hidden email]] Sent: Wednesday, July 26, 2006 4:01 PM To: Oliver, Richard; [hidden email] Subject: RE: SPSS Macro error Richard, 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... Hector -----Mensaje original----- De: SPSSX(r) Discussion [mailto:[hidden email]] En nombre de Oliver, Richard Enviado el: Wednesday, July 26, 2006 3:27 PM Para: [hidden email] 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. -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Joseph Hoffman Sent: Wednesday, July 26, 2006 9:25 AM To: [hidden email] 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! Sincerely, Joe Hoffman ====================================== Joseph H Hoffman Data Analyst Research Institute on Addictions State University of New York at Buffalo 1021 Main Street Buffalo NY 14203 phone 716-887-2219 FAX 716-887-2510 e-mail [hidden email] ====================================== |
I have SET PRINTBACK ON always on, too. But no, error messages may appear
not immediately after the offending line, especially when running a long command or a long succession of commands. It is as if some additional syntax lines get printed on the output page before the software manages to print the error message. And no, error messages are often cryptic. A list of error messages with their detailed explanation and possible remedies would be very handy. Underline VERY. Hector -----Mensaje original----- De: Oliver, Richard [mailto:[hidden email]] Enviado el: Wednesday, July 26, 2006 6:13 PM Para: Hector Maletta; [hidden email] Asunto: RE: SPSS Macro error 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. -----Original Message----- From: Hector Maletta [mailto:[hidden email]] Sent: Wednesday, July 26, 2006 4:01 PM To: Oliver, Richard; [hidden email] Subject: RE: SPSS Macro error Richard, 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... Hector -----Mensaje original----- De: SPSSX(r) Discussion [mailto:[hidden email]] En nombre de Oliver, Richard Enviado el: Wednesday, July 26, 2006 3:27 PM Para: [hidden email] 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. -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Joseph Hoffman Sent: Wednesday, July 26, 2006 9:25 AM To: [hidden email] 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! Sincerely, Joe Hoffman ====================================== Joseph H Hoffman Data Analyst Research Institute on Addictions State University of New York at Buffalo 1021 Main Street Buffalo NY 14203 phone 716-887-2219 FAX 716-887-2510 e-mail [hidden email] ====================================== |
In reply to this post by Joseph Hoffman
I didn't mean to imply that there's no room for improvement in error messages. I meant that, IMHO, if the error messages need further explanation, then the best place to put that further explanation is in the text of the error messages. To put it another way: The best way to deal with a cryptic error message is to make it less cryptic.
And while it's true that error messages won't necessarily appear on the line immediately after the line that contains the cause of the error, they will usually appear immediately after the command that contains the line that caused the error. In a "long succession of commands", error messages should still normally appear immediately after the command that caused the error. But there are undoubtedly exceptions. There is, of course, always room for improvement, and you have perfectly valid criticisms. I'm just trying to offer some tips for working within the constraints of how the system works today. -----Original Message----- From: Hector Maletta [mailto:[hidden email]] Sent: Wednesday, July 26, 2006 4:20 PM To: Oliver, Richard; [hidden email] Subject: RE: SPSS Macro error I have SET PRINTBACK ON always on, too. But no, error messages may appear not immediately after the offending line, especially when running a long command or a long succession of commands. It is as if some additional syntax lines get printed on the output page before the software manages to print the error message. And no, error messages are often cryptic. A list of error messages with their detailed explanation and possible remedies would be very handy. Underline VERY. Hector -----Mensaje original----- De: Oliver, Richard [mailto:[hidden email]] Enviado el: Wednesday, July 26, 2006 6:13 PM Para: Hector Maletta; [hidden email] Asunto: RE: SPSS Macro error 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. -----Original Message----- From: Hector Maletta [mailto:[hidden email]] Sent: Wednesday, July 26, 2006 4:01 PM To: Oliver, Richard; [hidden email] Subject: RE: SPSS Macro error Richard, 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... Hector -----Mensaje original----- De: SPSSX(r) Discussion [mailto:[hidden email]] En nombre de Oliver, Richard Enviado el: Wednesday, July 26, 2006 3:27 PM Para: [hidden email] 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. -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Joseph Hoffman Sent: Wednesday, July 26, 2006 9:25 AM To: [hidden email] 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! Sincerely, Joe Hoffman ====================================== Joseph H Hoffman Data Analyst Research Institute on Addictions State University of New York at Buffalo 1021 Main Street Buffalo NY 14203 phone 716-887-2219 FAX 716-887-2510 e-mail [hidden email] ====================================== |
Of course, Richard. The Olympic gods forbid that I imply any criticism of
your advice, which was perfectly valid. Anyway, especially in the case of long commands (e.g. an AGGREGATE creating a hundred or so new variables) an error message at the end for a mistake made at the 14th line is cryptic enough (if the line number if not mentioned) to be of little use. In one occasion I recall now, I had to scroll down the syntax for about a hundred lines, looking at every line for "column 25" or whatever it was, in search of an error which was, moreover, very obscurely described to begin with. Cheers. Hector -----Mensaje original----- De: Oliver, Richard [mailto:[hidden email]] Enviado el: Wednesday, July 26, 2006 6:42 PM Para: Hector Maletta; [hidden email] Asunto: RE: SPSS Macro error I didn't mean to imply that there's no room for improvement in error messages. I meant that, IMHO, if the error messages need further explanation, then the best place to put that further explanation is in the text of the error messages. To put it another way: The best way to deal with a cryptic error message is to make it less cryptic. And while it's true that error messages won't necessarily appear on the line immediately after the line that contains the cause of the error, they will usually appear immediately after the command that contains the line that caused the error. In a "long succession of commands", error messages should still normally appear immediately after the command that caused the error. But there are undoubtedly exceptions. There is, of course, always room for improvement, and you have perfectly valid criticisms. I'm just trying to offer some tips for working within the constraints of how the system works today. -----Original Message----- From: Hector Maletta [mailto:[hidden email]] Sent: Wednesday, July 26, 2006 4:20 PM To: Oliver, Richard; [hidden email] Subject: RE: SPSS Macro error I have SET PRINTBACK ON always on, too. But no, error messages may appear not immediately after the offending line, especially when running a long command or a long succession of commands. It is as if some additional syntax lines get printed on the output page before the software manages to print the error message. And no, error messages are often cryptic. A list of error messages with their detailed explanation and possible remedies would be very handy. Underline VERY. Hector -----Mensaje original----- De: Oliver, Richard [mailto:[hidden email]] Enviado el: Wednesday, July 26, 2006 6:13 PM Para: Hector Maletta; [hidden email] Asunto: RE: SPSS Macro error 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. -----Original Message----- From: Hector Maletta [mailto:[hidden email]] Sent: Wednesday, July 26, 2006 4:01 PM To: Oliver, Richard; [hidden email] Subject: RE: SPSS Macro error Richard, 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... Hector -----Mensaje original----- De: SPSSX(r) Discussion [mailto:[hidden email]] En nombre de Oliver, Richard Enviado el: Wednesday, July 26, 2006 3:27 PM Para: [hidden email] 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. -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Joseph Hoffman Sent: Wednesday, July 26, 2006 9:25 AM To: [hidden email] 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! Sincerely, Joe Hoffman ====================================== Joseph H Hoffman Data Analyst Research Institute on Addictions State University of New York at Buffalo 1021 Main Street Buffalo NY 14203 phone 716-887-2219 FAX 716-887-2510 e-mail [hidden email] ====================================== |
Free forum by Nabble | Edit this page |