SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 60300: Executing a scoring task in SAS® Model Manager gives a "statement is not valid ..." error for some HP forest models produced by SAS® Enterprise Miner™

DetailsHotfixAboutRate It

In SAS Model Manager, executing  a scoring task that is based on an HP Forest model (which is produced by SAS Enterprise Miner) might fail.  The following error is displayed in the corresponding SAS log file:

 

1943       * Defining New Variables;
1944       * ;
1945       Label REP_paradigm='Replacement: paradigm';
_____
180

ERROR 180-322: Statement is not valid or it is used out of proper order.

To work around this issue, you need to manually edit the scoring task score.sas file that corresponds to this model.  Follow these steps:

  1. Open the model in SAS Model Manager

  2. Click Advanced ► Model Files.
  3. Open score.sas. Click Edit in the top right corner.
  4. Delete these two lines:
%let hpfst_score_input = &_MM_InputDS;
%let hpfst_score_output = &_MM_OutputDS
;

    5. Add these two lines after the line %let EM_USER_OUTMDLFILE=%sysfunc(pathname(mdlout,f));

data &_MM_OutputDS;
set &_MM_InputDS;

    6. Click Save to save your changes.

    7. Re-run the scoring task.

 

Example: this code excerpt illustrates the modification.

 

%sysfunc(ifc(%symexist(_MM_InputDS)=0,%nrstr(%global _MM_InputDS;),%nrstr()));
%sysfunc(ifc(%symexist(_MM_OutputDS)=0,%nrstr(%global _MM_OutputDS;),%nrstr()));
%let hpfst_score_input = &_MM_InputDS;
%let hpfst_score_output = &_MM_OutputDS;

%let em_score_output=&_MM_OutputDS;
filename filesep catalog 'sashelp.modelmgr.mm_set_mmfilesep.source';
%include filesep;
filename filesep;
filename misc catalog 'sashelp.modelmgr.mm_misc.source';
%include misc;
filename misc;
filename mmodel catalog 'sashelp.modelmgr.mm_model.source';
%include mmodel;
filename mmodel;
%mm_set_mmfilesep();
%mm_getModelFileByURL
(
fileType = binary,
URL = %nrstr(http://<host>:<port>/SASContentServer/repository/default/ModelManager/MMRoot/Test/Project/1.0/Models/HPForestModel),
fileName = %nrstr(OUTMDLFILE.bin),
destFolder = %sysfunc(pathname(work)),
dirDel = &_MMfileSep,
fileRef = mdlout);
%let EM_USER_OUTMDLFILE=%sysfunc(pathname(mdlout,f));
data &_MM_OutputDS;
set &_MM_InputDS;

Click the Hot Fix tab in this note to access the hot fix for this issue.



Operating System and Release Information

Product FamilyProductSystemProduct ReleaseSAS Release
ReportedFixed*ReportedFixed*
SAS SystemSAS Model ManagerMicrosoft® Windows® for x6414.19.4 TS1M3
Microsoft Windows 8 Enterprise x6414.19.4 TS1M3
Microsoft Windows 8 Pro x6414.19.4 TS1M3
Microsoft Windows 8.1 Enterprise x6414.19.4 TS1M3
Microsoft Windows 8.1 Pro x6414.19.4 TS1M3
Microsoft Windows 1014.19.4 TS1M3
Microsoft Windows Server 200814.19.4 TS1M3
Microsoft Windows Server 2008 R214.19.4 TS1M3
Microsoft Windows Server 2008 for x6414.19.4 TS1M3
Microsoft Windows Server 2012 Datacenter14.19.4 TS1M3
Microsoft Windows Server 2012 R2 Datacenter14.19.4 TS1M3
Microsoft Windows Server 2012 R2 Std14.19.4 TS1M3
Microsoft Windows Server 2012 Std14.19.4 TS1M3
Windows 7 Enterprise x6414.19.4 TS1M3
Windows 7 Home Premium x6414.19.4 TS1M3
Windows 7 Professional x6414.19.4 TS1M3
Windows 7 Ultimate x6414.19.4 TS1M3
64-bit Enabled AIX14.19.4 TS1M3
64-bit Enabled Solaris14.19.4 TS1M3
HP-UX IPF14.19.4 TS1M3
Linux for x6414.19.4 TS1M3
Solaris for x6414.19.4 TS1M3
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.