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