2007 Apr 18 12:09 PM
Hallow here I have a if statement and I wont that
If no_file = 'X'. do do.. and leave program <b>else.</b> Exit the if and continue in program
How I do that
regards
IF no_file = 'X'.
<b>Do
Leave program!</b>
ELSE.
<b>EXIT(contnue with program).</b>
endif.
2007 Apr 18 12:11 PM
Hi,
U actually dont need to write anything in else.
U can simply write
IF no_file = 'X'.
Do
Leave program!
Endif.
So, if the condition gets satisfied then only it will go inside and after processing leave the program else it will continue with the program.
Regards,
Himanshu
2007 Apr 18 12:11 PM
Hi,
U actually dont need to write anything in else.
U can simply write
IF no_file = 'X'.
Do
Leave program!
Endif.
So, if the condition gets satisfied then only it will go inside and after processing leave the program else it will continue with the program.
Regards,
Himanshu
2007 Apr 18 12:12 PM
Hi,
If No_file = 'X'.
Leave program.
endif.
if the condition is true only then u will leave the program.
santhosh
2007 Apr 18 12:13 PM
Hi,
if i understand your requirement you should do like this...
IF no_file = 'X'.
Do
leave program.
ELSE.
*you don't need something here....
endif.
2007 Apr 18 12:13 PM
Hi
No need to write else statement, if the no_file is not equal to 'X', it will automatically continue with rest of program.
Just use if endif. & write the processing in itself
Thanks
Sandeep
Reward if helpful
2007 Apr 18 12:14 PM
Hi
Dont put else part. Just look at this.
IF no_file = 'X'.
Do
Leave program!
Endif.
Write:/ 'After if statement'.
If this condition get satisfied it will leave the program else it will continue with the program by coming out of if condition.
Do reward points to the suitable answer and close the thread.
Regards
Haritha.
2007 Apr 18 12:14 PM
U can do,
IF no_file = 'X'.
LEAVE PROGRAM.
ELSE.
DO SOMETHING.
ENDIF.regards
2007 Apr 18 12:15 PM
Hi Antonoi,
Here is your code.
IF no_file = 'X'.
Do
Leave program!
ELSE.
EXIT(contnue with program).
endif.
The modified code is
<b>IF no_file = 'X'.
Leave program
endif.</b>
Hope this resolves your query.
Reward all the helpful answers.
Regards