On Mon, 12 Apr 2021 05:14:13 -0700 (PDT), Ruud Steltenpool
Post by Ruud Steltenpool
In every row I have a Key, IndexXwithinKey, prop1, prop2, prop3, repetitionsNeeded
For every Key the repetitionsNeeded is the same, so for that Key the number of rows should go from Max(IndexXwithinKey) to times repetitionsNeeded that.
What's the easiest way?
And the most efficient?
I /think/ you are trying to create dummy records.
If the Maxrep in every record is a fixed value, you could
write a loop with the fixed value instead of the variable.
More generally -
For a record with Keyv, Lastseen, [some varlist], Maxrep -
Loop LineNo= Lastseen to Maxrep.
+xsave outfile= * /vars= Keyv to Maxrep, LineNo.
Xsave does not count as a procedure, so you want to have
either the exe line or some procedure. I would probably be
interested in a FREQ on Lastseen.
There might be faster, easier, or more efficient ways to get
to whatever analysis or listing you are interested in, but this
is a quick solution to what I think you have asked.