Unrecoverable application error in the Statistics processor.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Unrecoverable application error in the Statistics processor.

Beckstead, Jason

Hi all,

 

I am working to build a macro. I define it with two tokens, the number of variables and the list of variables.

The first thing that I need is simply to compute a new set of variables that are the old variables squared.

I keep getting the following message: "Unrecoverable application error in the Statistics processor." and then SPSS stops working. At this point all I can figure is that the problem is with the DO REPEAT/END REPEAT, but I’m stumped. I'm working with v24. My syntax is below. Any help will be appreciated.

 

DATASET CLOSE ALL.

DATA LIST FREE/ID   A B C D E F.

BEGIN DATA.

1    4 2 4 1 2 2

2    0 1 2 3 4 5

END DATA.

LIST.

 

DEFINE !BOB (P= !TOKEN(1) /VARS= !CMDEND).

!LET !VLIST = !CONCAT("Y1 TO Y",!P).

DO REPEAT IN=!VARS /OUT=!VLIST.

+ COMPUTE OUT=IN**2.

END REPEAT.

DESCRIPTIVES !VARS !VLIST.

!ENDDEFINE.

 

!BOB P=6 /VARS=A B C D E F.

 

_____________________________________________________________

 Jason W. Beckstead, Ph.D.       

  Associate Professor/Quantitative Methodologist

  University of South Florida College of Public Health

  13201 Bruce B. Downs Blvd., MDC56, Tampa, FL 33612, USA

  Statistical Editor, International Journal of Nursing Studies

  phone: +1.813.974.7667  fax: +1.813.974.4719          

  personal website:  http://personal.health.usf.edu/jbeckste/

  International Journal of Nursing Studies  http://www.elsevier.com/ijns

 

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Unrecoverable application error in the Statistics processor.

Jon Peck
Well, it shouldn't crash, but the macro works if you invoke it as
!BOB P=6 VARS=A B C D E F.

No slash.  If you run SET MPRINT ON before executing the macro, you will see that !VARS expands to nothing in the slash version.

The crash is actually unrelated to macro.  This code crashes, too even before a data pass.
do repeat in = /out= A1 B1 C1.
compute in = out.
end repeat.


On Sun, Nov 18, 2018 at 5:56 AM Beckstead, Jason <[hidden email]> wrote:

Hi all,

 

I am working to build a macro. I define it with two tokens, the number of variables and the list of variables.

The first thing that I need is simply to compute a new set of variables that are the old variables squared.

I keep getting the following message: "Unrecoverable application error in the Statistics processor." and then SPSS stops working. At this point all I can figure is that the problem is with the DO REPEAT/END REPEAT, but I’m stumped. I'm working with v24. My syntax is below. Any help will be appreciated.

 

DATASET CLOSE ALL.

DATA LIST FREE/ID   A B C D E F.

BEGIN DATA.

1    4 2 4 1 2 2

2    0 1 2 3 4 5

END DATA.

LIST.

 

DEFINE !BOB (P= !TOKEN(1) /VARS= !CMDEND).

!LET !VLIST = !CONCAT("Y1 TO Y",!P).

DO REPEAT IN=!VARS /OUT=!VLIST.

+ COMPUTE OUT=IN**2.

END REPEAT.

DESCRIPTIVES !VARS !VLIST.

!ENDDEFINE.

 

!BOB P=6 /VARS=A B C D E F.

 

_____________________________________________________________

 Jason W. Beckstead, Ph.D.       

  Associate Professor/Quantitative Methodologist

  University of South Florida College of Public Health

  13201 Bruce B. Downs Blvd., MDC56, Tampa, FL 33612, USA

  Statistical Editor, International Journal of Nursing Studies

  phone: +1.813.974.7667  fax: +1.813.974.4719          

  personal website:  http://personal.health.usf.edu/jbeckste/

  International Journal of Nursing Studies  http://www.elsevier.com/ijns

 

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD


--
Jon K Peck
[hidden email]

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Unrecoverable application error in the Statistics processor.

Kirill Orlov
In reply to this post by Beckstead, Jason
To be able to use slash as a subcommand serparator in a macro you must register slash first in define command:
DEFINE !BOB (P= !CHAREND('/') /VARS= !CHAREND('/'))
or
DEFINE !BOB (P= !CHAREND('/') /VARS= !CMDEND)

18.11.2018 15:56, Beckstead, Jason пишет:

Hi all,

 

I am working to build a macro. I define it with two tokens, the number of variables and the list of variables.

The first thing that I need is simply to compute a new set of variables that are the old variables squared.

I keep getting the following message: "Unrecoverable application error in the Statistics processor." and then SPSS stops working. At this point all I can figure is that the problem is with the DO REPEAT/END REPEAT, but I’m stumped. I'm working with v24. My syntax is below. Any help will be appreciated.

 

DATASET CLOSE ALL.

DATA LIST FREE/ID   A B C D E F.

BEGIN DATA.

1    4 2 4 1 2 2

2    0 1 2 3 4 5

END DATA.

LIST.

 

DEFINE !BOB (P= !TOKEN(1) /VARS= !CMDEND).

!LET !VLIST = !CONCAT("Y1 TO Y",!P).

DO REPEAT IN=!VARS /OUT=!VLIST.

+ COMPUTE OUT=IN**2.

END REPEAT.

DESCRIPTIVES !VARS !VLIST.

!ENDDEFINE.

 

!BOB P=6 /VARS=A B C D E F.

 

_____________________________________________________________

 Jason W. Beckstead, Ph.D.       

  Associate Professor/Quantitative Methodologist

  University of South Florida College of Public Health

  13201 Bruce B. Downs Blvd., MDC56, Tampa, FL 33612, USA

  Statistical Editor, International Journal of Nursing Studies

  phone: +1.813.974.7667  fax: +1.813.974.4719          

  personal website:  http://personal.health.usf.edu/jbeckste/

  International Journal of Nursing Studies  http://www.elsevier.com/ijns

 

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD


===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD