Page 1 of 1

Coding IF condition..

PostPosted: Wed Sep 09, 2009 9:44 pm
by chetan_007
PARA-1.


.......
,.........
............

IF CONDITION

MOVE SPACES TO ...........


IF

ELSE

END-IF

IF

ELSE

END-IF


Move Statements.......

IF
.........
END-IF


IF

ELSE

END-IF


IF

ELSE

END-IF

END-IF

CONTINUE.


In the above code pattern, I need to put the IF condition (before moving spaces), so that it should skip rest of the lines and control shld move next to line after CONTINUE.

So how to code IF statement here.....

I tried with IF condition in the first line and End-if before CONTINUE....
But I'm getting error message as SCOPE TERMINATOR DISCARDED.


Plesae suggest me how to code these IF and END-IF so that it will skip all the lines in between.

IF CONTIION (If condition is statisfied, then it should skip all the lines mentioned above and control should move to next line after CONTINUE Verb).


Thanks in advance.

Re: Coding IF condition..

PostPosted: Thu Sep 10, 2009 12:38 am
by dick scherrer
Hello,

Describe the processing rules (i.e. what should happen and in what order). Show a bit of your actual code and the problem(s) encountered.Please post wthout all of the interleaved space lines.

Use the "Code" tag (and Preview) to create/edit your post. The Code tag preserves alignment and greatly improves readability.

Re: Coding IF condition..

PostPosted: Thu Sep 10, 2009 6:33 pm
by Anuj Dhawan
You show us this
IF

ELSE

END-IF

IF

ELSE

END-IF
and then you ask the question
Plesae suggest me how to code these IF and END-IF so that it will skip all the lines in between.
ah...it's just too tough to suggest something from what you posted. Please post some actual code, as Dick suggested. Possibly post the compiled post which shows
SCOPE TERMINATOR DISCARDED

Re: Coding IF condition..

PostPosted: Fri Sep 11, 2009 1:04 pm
by GuyC
Probably a point still there somewhere.
in the compile listing , left of code/line number you can see the "level of nesting" something like 1122211122233321 (a number in each line).
Check if the nesting matches with what you would expect.

Re: Coding IF condition..

PostPosted: Fri Oct 30, 2009 2:39 pm
by KMG
It seems that there is a period '.' somewhere in between. There should not be any period between outermost IF-ENDIF.
Further I totally agree with Anuj & Dick, please put some piece of code.

Re: Coding IF condition..

PostPosted: Tue Nov 03, 2009 7:24 pm
by Anuj Dhawan
Or go by what GuyC has suggested.

Re: Coding IF condition..

PostPosted: Tue Nov 10, 2009 6:22 am
by ramyasree
Hi ,

Make sure you don't have any full stop '.' in the IF and END-IF .

IF CONDITION

IF CONDITION
NEXT STATEMENT
ELSE
MOVE SPACES TO ...........


IF

ELSE

END-IF

IF

ELSE

END-IF


Move Statements.......

IF
.........
END-IF


IF

ELSE

END-IF


IF

ELSE

END-IF

END-IF

CONTINUE.

Next Statement takes the cursor next statement after the full stop. Hope this helps

:)