[Clug-l] Looping in a derive node or something similar inClementine

Ian Daley i.daley at virid.com.au
Wed Jan 11 22:29:53 EST 2006


MessageThanks for all the feedback guys, in the end though I resorted to
doing it using a VBS script and CEMI.

Works pretty well, I haven't had a lot to do with CEMI up to this point, but
used in combination with scripting tools like VBS opens up the possibilities
with Clementine dramatically.
  -----Original Message-----
  From: clug-l-bounces at cammlist1.spss.com
[mailto:clug-l-bounces at cammlist1.spss.com]On Behalf Of Tuchinsky, Phil
(P.M.)
  Sent: Thursday, 12 January 2006 2:42 AM
  To: CLUG-L at spss.com
  Subject: Re: [Clug-l] Looping in a derive node or something similar
inClementine


  Nodes that support looping would be a wonderful addition to Clementine, in
fact, would make it a complete programming language, but there are usually
ways around this limitation.

  Will this work for you? I'd generate an adequate stack of random numbers
in a separate table, one per row in a single column with the row number
(@INDEX) in another column. Then I'd sort them into order and use the CLEM
capability to compare the current-row random value to the one preceding
(@OFFSET). Mark the rows that are duplicates (in a 3rd column) and split the
stream into duplicates vs uniques. Finally, sort the row numbers back to
original order to recover the original order of the (remaining, unique)
random numbers and merge the unique random numbers with the records that
need them.

  HTH,
  Phil Tuchinsky
  Ford Research & Advanced Engineering
  Ford Motor Company

   -----Original Message-----
  From: clug-l-bounces at cammlist1.spss.com
[mailto:clug-l-bounces at cammlist1.spss.com] On Behalf Of Ian Daley
  Sent: Tuesday, January 10, 2006 8:06 PM
  To: CLUG-L at spss.com
  Subject: [Clug-l] Looping in a derive node or something similar in
Clementine


  Hi there,

  I would like to create random number sets of unique numbers in Clementine
for use in a program I am exporting to. I would like to generate a different
set of numbers for each row in the database.

  The problem I am having is that I need to verify the number sets to ensure
they contain unique numbers. To do this I need to loop through the generated
numbers to ensure they are unique, and if not, generate a new number for
that cell to ensure it is unique.

  I can do this in VB but would prefer not to write a 'helper' app accessed
by CEMI to do this so I'm looking for alternatives before I bite the bullet
on this one.

  Any ideas anyone?

  Kind Regards


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cammlist1.spss.com/pipermail/clug-l/attachments/20060111/9460851d/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 15227 bytes
Desc: not available
Url : http://cammlist1.spss.com/pipermail/clug-l/attachments/20060111/9460851d/attachment-0001.gif


More information about the Clug-l mailing list