BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
kamlesh_suthar
Fluorite | Level 6

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Amir
PROC Star

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.

 

View solution in original post

3 REPLIES 3
Amir
PROC Star

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.

 

 

kamlesh_suthar
Fluorite | Level 6

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.

 

Amir
PROC Star

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.

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

Multiple Linear Regression in SAS

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.

Discussion stats
  • 3 replies
  • 931 views
  • 0 likes
  • 2 in conversation