Skip to Content
0
Former Member
Dec 19, 2011 at 06:39 AM

Issue with Script logic

25 Views

Hello friends,

Here is the issue I am having with script logic:

I have a script logic that basically flags #ABC=1 for all records followed by GO. Here it is:

*WHEN DATASRC

*IS PCA

*REC(EXPRESSION=1,DATASRC=#ABC)

*ENDWHEN

*GO

Now, if account=123, it should clear this flag. Here is the script:

*WHEN ACCOUNT

*IS 123

*WHEN DATASRC

*IS #ABC

*REC(FACTOR=0)

*ENDWHEN

*ENDWHEN

*GO

Now for all records that doesnt have #ABC=0, I want to clear them.

*WHEN DATASRC

*IS #ABC

*REC(FACTOR=0,DATASRC=PCA)

*ENDWHEN

*COMMIT

The problem is this script also removes Account=123 records as well. Where as it shouldnt. because the Account=123 records' #ABC flag was cleared beforehand. Please note that my code is far more complex than this, but this was easier to explain.

Please advise.