Jump to content

COBOL logic issue

Go to solution Solved by Matthew Waring,
On 12/21/2018 at 9:38 AM, Dat Guy said:

Tried GO TO?

 

On 12/22/2018 at 12:03 AM, Tadiaush said:

Hi!

 

after IF condition try to add GoBack.

 

but I would add a Flag indicator:

01 WS-if-correct-FLAG   PIC X VALUE ‘T’.

      88 WS-if-correct  Pic x value ‘t’.

      88 ws-if-correct-false pic x value ‘f’. 

 

Then after the if condition set this flag to true - SET WS-IF-CORRECT TO TRUE

And with others if condition check this flag. (If you are not using else) 

Hi guys, sorry for the late reply... been rather busy. I managed to fix it by using a GO TO which took me to the end of the section so that it would do not more processing.

Hi!

 

after IF condition try to add GoBack.

 

but I would add a Flag indicator:

01 WS-if-correct-FLAG   PIC X VALUE ‘T’.

      88 WS-if-correct  Pic x value ‘t’.

      88 ws-if-correct-false pic x value ‘f’. 

 

Then after the if condition set this flag to true - SET WS-IF-CORRECT TO TRUE

And with others if condition check this flag. (If you are not using else) 

Link to comment
https://linustechtips.com/topic/1010371-cobol-logic-issue/#findComment-12106328
Share on other sites

Link to post
Share on other sites

  • 3 weeks later...
On 12/21/2018 at 9:38 AM, Dat Guy said:

Tried GO TO?

 

On 12/22/2018 at 12:03 AM, Tadiaush said:

Hi!

 

after IF condition try to add GoBack.

 

but I would add a Flag indicator:

01 WS-if-correct-FLAG   PIC X VALUE ‘T’.

      88 WS-if-correct  Pic x value ‘t’.

      88 ws-if-correct-false pic x value ‘f’. 

 

Then after the if condition set this flag to true - SET WS-IF-CORRECT TO TRUE

And with others if condition check this flag. (If you are not using else) 

Hi guys, sorry for the late reply... been rather busy. I managed to fix it by using a GO TO which took me to the end of the section so that it would do not more processing.

Link to comment
https://linustechtips.com/topic/1010371-cobol-logic-issue/#findComment-12169005
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×