Hello!
For example, if I import a text file like this, if my text file has a large number of columns,
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Save( "D:\Big.txt" );
Close( dt, nosave );
dt = Open(
"D:\Big.txt",
Charset( "gb2312" ),
columns(
New Column( "name", Character, "Nominal" ),
New Column( "age", Numeric, "Continuous", Format( "Best", 12 ) ),
New Column( "sex", Character, "Nominal" ),
New Column( "height", Numeric, "Continuous", Format( "Best", 12 ) ),
New Column( "weight", Numeric, "Continuous", Format( "Best", 12 ) )
),
Import Settings(
End Of Line( CRLF, CR, LF ),
End Of Field( Comma, CSV( 0 ) ),
Strip Quotes( 1 ),
Use Apostrophe as Quotation Mark( 0 ),
Use Regional Settings( 0 ),
Scan Whole File( 1 ),
Treat empty columns as numeric( 0 ),
CompressNumericColumns( 0 ),
CompressCharacterColumns( 0 ),
CompressAllowListCheck( 0 ),
Labels( 1 ),
Column Names Start( 1 ),
Data Starts( 2 ),
Lines To Read( "All" ),
Year Rule( "20xx" )
)
);
can these repeated letters be replaced by variables?
abc="Numeric, \!"Continuous\!", Format( \!"Best\!", 12 )"
dt = Open(
"D:\Big.txt",
Charset( "gb2312" ),
columns(
New Column( "name", Character, "Nominal" ),
New Column( "age",abc ),
New Column( "sex", Character, "Nominal" ),
New Column( "height",abc ),
New Column( "weight",abc )
),
Import Settings(
End Of Line( CRLF, CR, LF ),
End Of Field( Comma, CSV( 0 ) ),
Strip Quotes( 1 ),
Use Apostrophe as Quotation Mark( 0 ),
Use Regional Settings( 0 ),
Scan Whole File( 1 ),
Treat empty columns as numeric( 0 ),
CompressNumericColumns( 0 ),
CompressCharacterColumns( 0 ),
CompressAllowListCheck( 0 ),
Labels( 1 ),
Column Names Start( 1 ),
Data Starts( 2 ),
Lines To Read( "All" ),
Year Rule( "20xx" )
)
);
??
Thanks!