Hi there,
I am using SAS forecast studio GUI and batch code for one the integrated solution.
I have created forecast studio projects and updating them every month for a new set of data using macro, %fssetdat, and %fsrunprj.
The above macros run perfectly fine when there is no change in the hierarchy (i.e. moving up and down the hierarchy from SAS FS).
But when I am moving hierarchies up and down, I am getting an error in FSRUNPRJ macro.
Below is the error from log:
s13946 *----------------------------------------------------------------------
s13947 * updating _hpf4.outmodelreject to remove by groups that are not in source data
0t1023 The SAS System Wednesday, 25 July 2018 12:15:00
t
s13948 *---------------------------------------------------------------------;
s13949 %macro _tempDropBy;
s13950 %if %sysfunc(exist(_HPF4.OUTMODELREJECT)) %then %do;
s13951 data _HPF4.OUTMODELREJECT;
s13952 set _HPF4.OUTMODELREJECT;
s13953 by CountryId CompanyId brandid marketinggroupid Tradechannelid notsorted;
s13954 retain __match__ 0;
s13955 drop __match__;
s13956 if first.Tradechannelid then do;
s13957 _iorc_ = 0;
s13958 set _HPF4.OUTSTAT (keep=CountryId CompanyId brandid marketinggroupid Tradechannelid) key= _nodeKey_ ;
s13959 if _iorc_ eq %sysrc(_SOK) then __match__ = 1;
s13960 else __match__ = 0;
s13961 end;
s13962 if __match__ then output _HPF4.OUTMODELREJECT;
s13963 _error_ = 0;
s13964 run;
s13965 %end;
s13966 %mend _tempDropBy;
s13967 %_tempDropBy;
n
eERROR: BY variable brandid is not on input data set _HPF4.OUTMODELREJECT.
nNOTE: The SAS System stopped processing this step because of errors.
wWARNING: The data set _HPF4.OUTMODELREJECT may be incomplete. When this step was stopped there were 0 observations and 8 variables.
wWARNING: Data set _HPF4.OUTMODELREJECT was not replaced because this step was stopped.
I am also attaching the complete log file
Need help.
Thanks in advance.
Hi,
I don't have Forecast Studio, so I don't think I can help you much further (I assume you've checked the log for any drop / keep statements / options).
If no one else can help then try contacting SAS Technical Support:
https://support.sas.com/en/technical-support/contact-sas.html
Regards,
Amir.
Hi,
As the message says, "brandid is not on input data set _HPF4.OUTMODELREJECT", if you think it should be, then trace back to see if brandid is being explicitly dropped or not kept in earlier code (and make sure it is spelled correctly).
I cannot see the attachment due to security restrictions.
Regards,
Amir.
HI,
Thanks a lot for replying.
This file is a part of forecast studio project, and when I run the SAS macro %FSRUNPRJ, it calls some set of codes. The input file "_HPF4.OUTMODELREJECT" is created at the time when the project is created.and it keeps updated. So brandid should automatically get added in the dataset but it is not getting updated.
Hi,
I don't have Forecast Studio, so I don't think I can help you much further (I assume you've checked the log for any drop / keep statements / options).
If no one else can help then try contacting SAS Technical Support:
https://support.sas.com/en/technical-support/contact-sas.html
Regards,
Amir.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.
Find more tutorials on the SAS Users YouTube channel.