cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • DownloadSemiconductor Toolkit: Tools to create wafer maps, add wafer geometry to graphics, explore die defects & compare wafers.
  • Discovery Summit 2026: Early User Edition - September 23-24.Register. It's free.
  • Use JMP Clinical with CDISC-compliant data. Review studies, ID safety and efficacy signals & communicate findings with interactive graphics. Register to see how. Aug. 27, 2 pm US ET.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
djhanson
Level VI

How to Open() only specific columns

Hi, if I have a large JMP data table is there a way I can send a message to Open() that only loads in specific column(s)?  This would greatly reduce file loading time for a large file.  For example if I have this file:

Open("c:\temp\fruit.jmp");

Lets say fruit.jmp contains 200 columns of different fruit types and I may need access to all of these, but for the moment I only need load in one column "Apple" thereby reducing file load time.  Doing a subsequent Subset() defeats the purpose, as the large data file needs to be opened first and the objective here is to reduce file load times by only loading in what column(s) are needed.  I was hoping something like the following would work, which doesn't of course:

Open("c:\temp\fruit.jmp",columns("Apple"));

suggestions?  thx... dj

1 ACCEPTED SOLUTION

Accepted Solutions
djhanson
Level VI

How to Open() only specific columns

Ok, I think I may have figured this out.  I eventually found a helpful post from the past.  I searched all of the Open() attributes in the scripting guide and there is no way to do this without using the Open Database() command instead.  Basically, just need to convert the source .jmp to an .xls file first.  Just wanted to post this in case it helps anyone else out.  dj

http://communities.sas.com/message/50379#50379

So first I convert the "fruit.jmp" into a "fruit.xls".  That way I can have JSL use the Excel ODBC DSN connection and a little bit of SQL code to pull only the column(s) I need.  So lets say my Excel data table has a worksheet "Sheet1" and within it a column called "Apple" and I only want to load this column and none of the others in this worksheet in order to save time.  This code below does the trick:

dt=Open Database("DSN=Excel Files;DBQ=c:\temp\fruit.xls;DriverId=790;MaxBufferSize=2048;PageTimeout=5;","SELECT Apple FROM `Sheet1$`" , "Fruit Table" );

View solution in original post

1 REPLY 1
djhanson
Level VI

How to Open() only specific columns

Ok, I think I may have figured this out.  I eventually found a helpful post from the past.  I searched all of the Open() attributes in the scripting guide and there is no way to do this without using the Open Database() command instead.  Basically, just need to convert the source .jmp to an .xls file first.  Just wanted to post this in case it helps anyone else out.  dj

http://communities.sas.com/message/50379#50379

So first I convert the "fruit.jmp" into a "fruit.xls".  That way I can have JSL use the Excel ODBC DSN connection and a little bit of SQL code to pull only the column(s) I need.  So lets say my Excel data table has a worksheet "Sheet1" and within it a column called "Apple" and I only want to load this column and none of the others in this worksheet in order to save time.  This code below does the trick:

dt=Open Database("DSN=Excel Files;DBQ=c:\temp\fruit.xls;DriverId=790;MaxBufferSize=2048;PageTimeout=5;","SELECT Apple FROM `Sheet1$`" , "Fruit Table" );

Recommended Articles