Subscribe Bookmark RSS Feed

Loop doesn't function


I'm new with jmp and I have some difficulties to finish my script.
In few words, I wish to subset some tables from a source table.
So, I use "select where" first to determine subsets, then I'm trying to concatenate subsets according to a condition (value present or not in subset).

What's wrong ? Your help will be deeply appreciated.

I don't have enough time to finish my work.

Here's my script:

//open the sources tables

dt = Open( "...." );
transit_A = Open( "..." );
transit_B= Open( "..." );

For( i = 1, i <= 500, i++,
dt << select where( (:"Number" == i) );
subdt = dt << subset( Column() );
subdt << Select All Rows;
subdt = Current Data Table();

if((:"PC" == "......."),
(final_A = transit_A<< Concatenate(subdt , "Final_A" ) ; transit_A = final_P1400),

(:"PC" != "......."),
(final_B = transit_B<< Concatenate( subdt, "FinalB" ) ; transit_B= final_B);


Close( subdt );
Close( transit_A );
Close( transit_B);


final_A << Set Name( "...." );
final_A = Open( "......" );

final_B<< Set Name( "....." );
final_B = Open( "......" );

Here's my script:
For( i = 1, i <= 30, i++,
dt << Clear Select; dt << select where( (:"Number" == i) );subdt = dt << subset( Column() );
If((:"PC" == list1);P1400 = subdt << Set Name( "P1400" );transitA = debutA << Concatenate( P1400, "transitA" );debutA = transitA;finalA = transitA << Set Name( "...." ); condition 2 etc.
What's wrong ? Your help will be deeply appreciated.
Message was deleted by user. Something was messing up my post in forum.

Message was edited by: KaptainKodie
Here is how the for loop works. The first chunk is the initialization part (cnt = 1). The second chunk is the conditional. ( cnt LESS THAN N Items(headers ) ) The third chunk is the "Do after one loop" chunk ( cnt++ ). Here is where the syntax gets wierd. The fourth chunk is everything that goes into the for loop. It just needs to have a semicolon ( createJPEG( headers[cnt], files[int] ); )

Here is some synax

For( cnt = 1, cnt LESS THAN N Items( headers ), cnt++,
print (cnt);
createJPEG( headers[cnt], files[int] );
blah blah blha );

Note: I used LESS THAN because the less than sign was messing up my post, I dont know HTML.

My description isnt too technical, but I think it gets the point across. If this doesn't help feel free to reply and ill give you more help / examples.




Jun 23, 2011

The forum software doesn't seem to like JSL punctuation, but it will take it if bracketed by , such as:

Indentation is lost though.