cancel
Showing results for 
Search instead for 
Did you mean: 

Error when passing dynamic script to logic

Former Member
0 Kudos

Hi all

I have read many of the posts on this topic but just cant get it right. I need for the user to enter a year and then to use the year in the logic file PUSH_DATA.LGF

I have added YE to the run logic variant and my dynamic script looks as follows:

 

PROMPT(TEXT,%YE%,"Please enter the year",)

INFO(%EQU%,=)

TASK(/CPMB/PUSH_FROM_RAW_LOGIC,SUSER,%USER%)
TASK(/CPMB/PUSH_FROM_RAW_LOGIC,SAPPSET,%APPSET%)
TASK(/CPMB/PUSH_FROM_RAW_LOGIC,SAPP,%APP%)
TASK(/CPMB/PUSH_FROM_RAW_LOGIC,SELECTION,%SELECTION%)
TASK(/CPMB/PUSH_FROM_RAW_LOGIC,LOGICFILENAME,PUSH_DATA.LGF)
TASK(/CPMB/PUSH_FROM_RAW_LOGIC,REPLACEPARAM,YE%EQU%%YE%)

My Script logic then needs to use $YE$ like


*FUNCTION FCN_YEAR = $YE$

*SELECT(%TIME_LIST%, "[ID]", TIME, "[YEAR] = 'FCN_YEAR'") 

*XDIM_MEMBERSET TIME = %TIME_LIST%

The error message on the package is as follows:



/CPMB/MODIFY completed in 0 seconds
/CPMB/PUSH_FROM_RAW_LOGIC completed in 0 seconds
/CPMB/CLEAR completed in 0 seconds
[Selection]
------------------------------------------------------------
YE=2011
[Messages]
------------------------------------------------------------
Invalidate selection condition
Application: RAW Package status: ERROR

Any help would be appreciated

Byron

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Remove the below line:

TASK(/CPMB/PUSH_FROM_RAW_LOGIC,SELECTION,%SELECTION%)

from the dynamic script.

Hope this helps.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi, removing (SELECTION,%SELECTION%) task solved my similar issue.

But I am not sure why? What should be passed in the %SELECTION% variable?

Regards,

Denis

former_member186338
Active Contributor
0 Kudos

Hi Denis,

If you have some prompt like SELECTINPUT with the variable %SELECTION% then this variable will receive user input for number of dimensions (number of members for each dimension).

With the line:

TASK(/CPMB/SOME_CHAIN_NAME,SELECTION,%SELECTION%)

this variable will be passed to the script logic script as a default script scope. Individual dimension members of this scope can be accessed in the script using variables like %DIMNAME_SET%.

Vadim

Former Member
0 Kudos

Hi Vadim,

my script doesn't have any prompts so I guess this is the cause for the error I was getting.

Thanks for the explanation.

Regards,

Denis

former_member186338
Active Contributor
0 Kudos

Yes, without initiating %SELECTION% variable with something the command:

TASK(/CPMB/SOME_CHAIN_NAME,SELECTION,%SELECTION%)

generates error.

Former Member
0 Kudos

Hi Nilanjan

Thanks that solved it - i can't believe i missed that.

Byron