cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
NoName
Level I

How to save the sas7bdat files made when a study is added in JMP Clinical?

I just upgraded to JMP Clinical 7 from 5.  I used to be able to add a study from a folder of xpt files, and JMP Clinical would write as the sas7bdat version of each xpt file back into the same folder on my computer.  This was useful when the original xpt files had dates in SAS format not readable in JMP; the sas7bdat files would have JMP-readable dates.

 

Using JMP Clinical 7, I can see the sas7bdat files being written in the temp folder while the study is being added, and if I am fast enough, I can even open and save one or two of them, but then they are deleted when the study add is complete.  

 

How do I configure JMP Clinical 7 to save those sas7bdat files instead of deleting them?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to save the sas7bdat files made when a study is added in JMP Clinical?

Hi Noname?

 

You are correct that we have changed the fact that we don't write the sas7bdat files to the study folder any longer.  Many of our customers set their study folders to "read only" and additionally we we're technically modifying the input files in that folder (xpt->sas7bdat).  Therefore we changed to read the xpt files directly when performing our metadata collection as well as our analyses.  I will see if I can find some code to post an addin that performs the functionality that you are looking for.  Sorry for the inconvenience that it has caused you.

 

Stay tuned,

Geoff

View solution in original post

5 REPLIES 5

Re: How to save the sas7bdat files made when a study is added in JMP Clinical?

Hi Noname?

 

You are correct that we have changed the fact that we don't write the sas7bdat files to the study folder any longer.  Many of our customers set their study folders to "read only" and additionally we we're technically modifying the input files in that folder (xpt->sas7bdat).  Therefore we changed to read the xpt files directly when performing our metadata collection as well as our analyses.  I will see if I can find some code to post an addin that performs the functionality that you are looking for.  Sorry for the inconvenience that it has caused you.

 

Stay tuned,

Geoff

NoName
Level I

Re: How to save the sas7bdat files made when a study is added in JMP Clinical?

Much appreciated!  Thank you!

Re: How to save the sas7bdat files made when a study is added in JMP Clinical?

Hi @NoName,

 

I have a simple JSL script that could help. All you need to do is select the directory of where the .xpt files are and the script with create a folder called SAS Data Sets and save all the .xpt files as .sas7bdat files into that new directory. Below is the code.

Names Default To Here( 1 );
xptDir = Pick Directory( "Select a directory with XPT files" );
Create Directory( xptDir || "SAS Data Sets" );
convertedDir = xptDir || "SAS Data Sets/";
xptFiles = Files In Directory( xptDir );
For( i = 1, i <= N Items( xptFiles ), i++,
	If( Ends With( xptFiles[i], "xpt" ),
		dtconvert = Open( xptDir || xptFiles[i], invisible );
		name = dtconvert << Get Name();
		dtconvert << Save As( convertedDir || name || ".sas7bdat" );
		Close( dtconvert, NoSave );
	)
);
Close All( Data Tables, NoSave );

Hope that helps.

Chris Kirchberg, M.S.2
Data Scientist, Life Sciences - Global Technical Enablement
JMP Statistical Discovery, LLC. - Denver, CO
Tel: +1-919-531-9927 ▪ Mobile: +1-303-378-7419 ▪ E-mail: chris.kirchberg@jmp.com
www.jmp.com
NoName
Level I

Re: How to save the sas7bdat files made when a study is added in JMP Clinical?

I've tried the script on a number of files, in JMP15 and in JMP Clinical 7.  It does indeed save the xpt data set as a sas7bdat data set.  But it does not change the date format so that it is readable in JMP15 in the sas7bdat file.  This result would be similar to when one uses "save as" in JMP and puts in sas7bdat. 

 

Even just trying to open the file in JMP Clinical 7 doesn't do it, so I am thinking that the data set has to be loaded into JMP Clinical 7 using the SAS engine for the date format to change.  Thank you for the try, though.   

Re: How to save the sas7bdat files made when a study is added in JMP Clinical?

HI @NoName,

 

Well darn it.  I think you may be on to something.  I will have to leave it to @geoffrey_mann to find the code to convert and save like the older versions of JMP Clinical. Otherwise, the script I sent would have to be modified to scan through to find the date time columns, convert the format and then save.

Chris Kirchberg, M.S.2
Data Scientist, Life Sciences - Global Technical Enablement
JMP Statistical Discovery, LLC. - Denver, CO
Tel: +1-919-531-9927 ▪ Mobile: +1-303-378-7419 ▪ E-mail: chris.kirchberg@jmp.com
www.jmp.com