Automating GPL code

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

Automating GPL code

Anton Bossenbroek
Hi,

I have to generate the same type of graph for various data using SPSS
syntax. My first thought is to create a macro that holds the necessary
GPL code and call this macro with the appropriate arguments. However,
according to the SPSS manual it is not possible to put GPL code in a
DEFINE block.

Given this limitation I thought of two alternatives:
1. put the GPL code in a DO REPEAT block.
2. copy-paste the GPL code for each variable.

I wondered if someone knows a more elegant solution since both
alternatives look very unfriendly and/or cumbersome?


Thanks in advance for your answer,

Anton Bossenbroek

=====================
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: Automating GPL code

ViAnn Beadle
You cannot put GPL code into a do repeat since only transformations go there
and GPL is part of the GGRAPH procedure.
You can put GPL code into a macro. The big problem is that macros change
quotation marks to apostrophes and GPL requires quotation marks. You can get
around it but it really makes for big messy macros. I've addressed this
problem a couple of times --search the archive.

Your best solution is a little python program.

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Anton Bossenbroek
Sent: Wednesday, May 25, 2011 12:49 AM
To: [hidden email]
Subject: Automating GPL code

Hi,

I have to generate the same type of graph for various data using SPSS
syntax. My first thought is to create a macro that holds the necessary GPL
code and call this macro with the appropriate arguments. However, according
to the SPSS manual it is not possible to put GPL code in a DEFINE block.

Given this limitation I thought of two alternatives:
1. put the GPL code in a DO REPEAT block.
2. copy-paste the GPL code for each variable.

I wondered if someone knows a more elegant solution since both alternatives
look very unfriendly and/or cumbersome?


Thanks in advance for your answer,

Anton Bossenbroek

=====================
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