//////////////////////////////////////////
// Welcome to Galaxy Examinator Script
// Find more on www.galaxysemi.com
//
// File: datalog.csl
//
// Description:
// Creates data logs in CSV format for multiple
// STDF files. This script is intended for
// non-interactive use.
//
// Usage:
// gex -HCS datalogs.csl file1.stdf file2.stdf ...
//
// Can also be executed using '-S' instead of '-HCS'
// to monitor progress.
//
// History:
// 11-OCT-2002 Created. Tom Cobourn, PDF Solutions.
//////////////////////////////////////////
// Function to setup GEX report options
SetReportOptions()
{
// Disable all options so next lines specify exactly what we want
gexOptions('reset','all','clear');
// Define the report type: CSV
gexOptions('output','format','csv');
gexOptions('output','location','./');
// Define the outlier policy : keep all!
gexOptions('outlier','removal','none');
// Datalog options: show comments and Die XY location
gexOptions('adv_datalog','field','comment');
gexOptions('adv_datalog','field','test_name');
gexOptions('adv_datalog','field','die_loc');
}
SetDatalogReport(const vFile)
{
// Erases all groups/file lists structures.
gexGroup('reset','all');
// Print status
sysLog('Processing file:');
sysLog(vFile);
// Create group to hold file
var group_id = gexGroup('insert','Group1');
// Add selected file into that group.
gexFile(group_id,'insert',vFile,'all','all');
// Set datalog report section: show ALL tests
gexReportType('adv_datalog','all');
// Build report and show results on Advanced page.
// Note that this script is typically run in batch mode,
// in which case the Advanced page will not be shown.
gexBuildReport('advanced');
}
main()
{
// Call function to setup GEX report options
SetReportOptions();
// Print a datalog CSV file for each input file
for (var i=3; i<sizeof(mainArgVals); i++)
{
SetDatalogReport(mainArgVals[i]);
// Save CSV report created into target file (works under Windows, Unix and Linux platforms)
#if sysIsUnixFamily
var vCommand = "mv examinator_report.csv " + mainArgVals[i] + ".csv";
#else
var vCommand = "rename examinator_report.csv " + mainArgVals[i] + ".csv";
#endif
sysCommand(vCommand);
}
} |