on ‎2015 Dec 03 3:30 PM
Hi,
I have a question about the default logic. In my case it includes a bit of code that copies data from one account to another. The source account is a LEQ account, the target account is an AST account.
the script uses this:
*REC(FACTOR=1,ACCTDETAIL=F_CLO_INTCO,ACCOUNT=ACCOUNT.PMATCH_ACCOUNT)
When the default is run automatically after I enter data and save it to the database I get a negative value on my target account. When I then run the default logic as a package, the value becomes a positive value.
Why is that so and how can I change it so I always have the same sign?
Thanks,
Arnold
Request clarification before answering.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
By the way, it's possible to create script with conditional execution of some code blocks. For example in DM package we can set variable using REPLACEPARAM:
INFO(%EQU%,=)
INFO(%TAB%,;)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,EQU,%EQU%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,TAB,%TAB%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,REPLACEPARAM,T%EQU%2010.01)
$T$ will be passed to the script equal to 2010.01
Then the script will be:
//For DM package $T$ has to be assigned some valid TIME member ex.: 2010.01
*SELECT(%DM%,[ID],TIME,[ID]=$T$)
*SELECT(%DL%,[ID],TIME,[ID]=%DM%2010.01)
//For DM package
*FOR %M%=%DM% // Not empty for DM, empty for default.lgf
*WHEN ACCOUNT
*IS PL110
*REC(EXPRESSION=%VALUE%*2,ACCOUNT=PL120)
*ENDWHEN
*NEXT
//For default.lgf
*FOR %N%=%DL% // Not empty for default.lgf, empty for DM
*WHEN ACCOUNT
*IS PL110
*REC(EXPRESSION=%VALUE%*3,ACCOUNT=PL120)
*ENDWHEN
*NEXT
Unfortunately this workaround will not help if default.lgf is called with chains that have the option to run default logic - the variable will not be passed...
Vadim
| User | Count |
|---|---|
| 40 | |
| 9 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.