Re: Parse a Data Table Name or File Name; Extract; Split; Worddtd00 has reference to the datatable you did open. You have to get the name of datatable, which you can do with
dtd00 << Get Name;
Parse a Data Table Name or File Name; Extract; Split; WordHello,
Haven't yet figured out how to parse fields in a file name or use word() function with the text argument a variable rather than a true text string.
Example:
dtd00 = Open(
"$0802\field1_field2_field3.txt",
Import Settings( End Of Field( Spaces, Space, CSV( 0 ) ) )
); //
my_fld1 = Word( 1, "field1_field2_field3.txt", "_" ); //
// This does set my_fld1 = field1
my_fld2 = Word( 2, (dtd00), "_" ); //
// This doesn't set my_fld2 = field2
Reaching out for suggestions,
JohnM
Advanced Statistical ModelingRe: Parse a Data Table Name or File Name; Extract; Split; WordWith some more JSL manual surfing, found an approach.
my_file_name = dtd00 << get name;
// then add a column for example;
dtd00 << New Column( "my_fld2", formula( Word( 2, my_file_name, "_" ) ) );