Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
CONTINUE without END-IF

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
GAFUR

New User


Joined: 19 May 2005
Posts: 31

PostPosted: Thu May 19, 2005 11:33 am    Post subject: CONTINUE without END-IF
Reply with quote

Hi ,

Can i use a CONTINUE statement in if-loop with out scope terminator END-IF. Will it show any compilation error? If Not ,What happen to that if-loop while executing the program?

Shall any body explain.

Regards
Gafur.
Back to top
View user's profile Send private message

subhasis_50

Moderator


Joined: 09 Mar 2005
Posts: 363
Location: Earth

PostPosted: Thu May 19, 2005 7:56 pm    Post subject: Re: CONTINUE without END-IF
Reply with quote

Hi,
If you use continue without END-IF you will not get any compile error. The control passes during the time of execution until it finds any terminator. So continue will start after that statement.
For example:
IF VAR1 = 0
CONTINUE
ELSE
PERFORM 111-PARA
END-IF.
DISPLAY 'HELLO'
PERFORM 222-PARA.
DISPLAY 'WORLD'

In normal condition if condition is satisfied the control passed to first display statement and continue execution. If you will not code END-IF, control comes in the 2nd display directly if the condition matches in the IF statement.
Please let me know if you have any doubt
Back to top
View user's profile Send private message
GAFUR

New User


Joined: 19 May 2005
Posts: 31

PostPosted: Fri May 20, 2005 12:30 pm    Post subject:
Reply with quote

Hi Subhasis,


That means if you code period instead of END-IF, Control will goes to the statement following this period.Am i right?

Then for following the result is 'HELLO' if the IF condition pass.

IF VAR1 = 0
CONTINUE
ELSE
PERFORM 111-PARA.

DISPLAY 'HELLO' .

Regards
Gafur.
Back to top
View user's profile Send private message
subhasis_50

Moderator


Joined: 09 Mar 2005
Posts: 363
Location: Earth

PostPosted: Fri May 20, 2005 1:01 pm    Post subject: Re: CONTINUE without END-IF
Reply with quote

Hi,
Yes u r right. It is better that u should write the code and test it.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Job to wait and continue based on reply yugendran COBOL Programming 5 Wed Oct 05, 2016 1:46 pm
No new posts Not enough virtual memory is availabl... Vinay Pushpala IBM Tools 16 Tue Sep 13, 2016 4:37 pm
No new posts How to continue ftp line when the fil... jasorn JCL & VSAM 1 Fri Mar 14, 2014 5:47 am
No new posts Continue PARM in SYSIN DD * vishalbshah DB2 9 Thu Apr 19, 2012 3:23 pm
No new posts How to continue message while using O... ppandey07 JCL & VSAM 3 Wed Sep 21, 2011 4:21 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us