Viewing the Scoring Files

When using the SAS Embedded Process, the %INDOR_PUBLISH_MODEL macro produces two scoring files for each model:
  • sasscore_modelname.ds2. This file contains code that is executed by the SASEPFUNC table function.
  • sasscore_modelname_ufmt.xml. This file contains user-defined formats for the scoring model that is being published. This file is used by the SASEPFUNC table function.
These files are published to the model table that you specify in the %INDOR_PUBLISH_MODEL macro. See Scoring File Examples for an example of each of these files.
The SampleSQL.txt file is produced when the %INDOR_PUBLISH_MODEL macro is successfully run. This file can be found in the output directory (OUTDIR argument) that you specify in the %INDOR_PUBLISH_MODEL macro. The SampleSQL.txt file contains basic code that, with modifications, can be used to run your score code inside Oracle.
A message that indicates whether the scoring files are successfully or not successfully created is printed to the SAS log.
Although you cannot view the scoring files directly, there are two ways to see the models whose files are published:
  • Log on to the database using SQLPlus and submit an SQL statement. The following example assumes that the model table where the scoring files were published is register and the model name is reg1.
    sqlplus userid/pwd@address
    select modelname, modelDS2 from sas_model_table 
       where modelname like '%reg1%';
    The model name and the model .ds2 filename are listed.
  • From SAS, use SQL procedure code that produces output in the LST file. The following example assumes that the model name that you used to create the scoring files is reg.
    proc sql noerrorstop;
      connect to oracle (user=username password=xxxx path=mypath);
      
    select * from connection to oracle
          (select modelname, modelDS2
             from sasmodeltablename
                where modelname like '%reg%');
    disconnect from oracle;
    quit;
    
    You can also use the SASTRACE and SASTRACELOC system options to generate tracing information. For more information about these system options, see the SAS System Options: Reference.