You need to either assign a variable to reference the main table, or reference it using it"s name
Names Default To Here( 1 );
dt =
// Open Data Table: big class.jmp
// → Data Table( "big class" )
Open( "/C:/Program Files/SAS/JMPPRO/16/Samples/Data/big class.jmp" );
ages = Associative Array( dt:age ) << get keys;
For Each( {year}, ages,
dt << select where( :sex == "F" & :age == year );
dt << Subset(
Selected Rows( 1 ),
,
Selected columns only( 0 )
);
);
Or
Names Default To Here( 1 );
// Open Data Table: big class.jmp
// → Data Table( "big class" )
Open( "/C:/Program Files/SAS/JMPPRO/16/Samples/Data/big class.jmp" );
ages = Associative Array( data table("big class"):age ) << get keys;
For Each( {year}, ages,
Data Table( "big class" ) << select where( :sex == "F" & :age == year );
Data Table( "big class" ) << Subset(
Selected Rows( 1 ),
,
Selected columns only( 0 )
);
);
Jim