Page 2 of 2

Re: IFTHEN clauses execution order

PostPosted: Mon Aug 20, 2012 7:43 pm
by dick scherrer
Hello,

And I don't think using EXEC PGM=SYNCSORT or EXEC PGM=SYNCTOOL will make any difference because SYNCTOOL internally invokes SYNCSORT.
No, it should not make a difference. I only mentioned it because this system is "bent" a bit. Unless/until there is a need to get the Syetem Support people involved, i suspect we will use SORT instead of TOOL.

150 million is a fair number of records and i'd suggest running a timing test of the way the works correctly versus the incorrect answers that do not have the proper HIT=NEXTs. Yes, doing it so that it works may take some more cpu time, but probably not enough to be alarming. . . And you will have the needed results.

Re: IFTHEN clauses execution order

PostPosted: Tue Aug 21, 2012 11:13 am
by mfrookie
Thanks Dick & Bill for your inputs.

I will definitely run a test to see the impact of more IFTHEN conditions. As far as possibility of avoiding WHEN=ANY is concerned, yes I can put the HIT=NEXT clause on the main IFTHEN clauses and then repeat the same condition so that I can put anything what I wanted to put in WHEN=ANY. For my case the fields that I am using in IFTHEN tests remain unimpacted by the IFTHEN processing (BUILD/OVERLAY). This will definitely reduce the number of tests that the record will go thru. But as you said it all depends on how much extra time is takes.

Its just that apart from this, in general I wanted to know more about WHEN=ANY clause execution.

Maybe Alissa can reply if she sees this thread.

Thanks.

Re: IFTHEN clauses execution order

PostPosted: Tue Aug 21, 2012 2:11 pm
by BillyBoyo
As I said, I think you have discovered yourself how WHEN=ANY works.

Maybe we'll find out why it works that way :-)

If you do the INREC followed by OUTREC that I suggested, you'd not need HIT=NEXT. However, without seeing your cards, don't know if this is possible in your case...