The next step in setting up the basic SAS environment is to extract information from the instrument housekeeping files and from the calibration database and incorporate this information to what is referred to as the ODF summary file. This task is done through the SAS command odfingest, resulting in an extended SAS summary file needed for subsequent data processing. The task odfingest is run without additional parameters and the resulting file will be produced in the directory from which is run (/my_work), and named as:
'REV'_'OBS'_SCX00000SUM.SAS
where REV is the revolution number and OBS is the observation identification number.
The ODF summary file is an ASCII file. It contains a lot of information necessary to run SAS, including the path to the ODF files (changing the location of the ODF files after this file is produced makes necessary to edit the file accordingly or run the odfingest command again). Once this file has been produced, SAS needs to know its location. The SAS_ODF environment variable needs to be re-pointed to the newly created ODF summary file:
export SAS_ODF=/my_work/'REV'_'OBS'_SCX00000SUM.SAS [sh, bash, ksh] setenv SAS_ODF /my_work/'REV'_'OBS'_SCX00000SUM.SAS [csh, tcsh]
where it is important to include the full path and file name of the ODF summary file.
The configuration setting, as described above, is the recommended one, where a working directory is created per observation, and where all the SAS analysis products will be located (unless explicitly stated differently). At this point, the working directory should have two files: the calibration index file and the ODF summary file.
All the steps listed above could be summarized in a setup script that could be called the first time one works on a particular dataset. The following is an example of such a script (csh/tcsh shell), where the path of the directory containing the ODF is the only input parameter $1. It is assumed that the script will be ran from the working directory /my_work:
source /top_dir/xmmsas_YYYYMMDD_HHMM/setsas.csh setenv SAS_ODF $1 setenv SAS_CCFPATH /path/to/repository/CCF cifbuild setenv SAS_CCF $PWD/ccf.cif odfingest set sumfile=`ls -1 *SUM.SAS` setenv SAS_ODF $PWD/$sumfile
For further information, a SAS Start-Up thread guides you on how to initialize SAS as it has just been described.