Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

GOTO to a label inside a procedure

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
Appu

New User


Joined: 26 Apr 2010
Posts: 74
Location: India

PostPosted: Tue Sep 07, 2010 12:24 pm    Post subject: GOTO to a label inside a procedure
Reply with quote

Hello Team,

Is it possible to make a GOTO statement to a label inside a procedure.

eg:-
PROC1: PROCEDURE;
LABEL1:
PUT SKIP LIST('inside label1 of proc1');
END PROC1;
GOTO LABEL1;

It is giving compile time error as the label LABEL1 is inside the proc. Anyother way to make this call happen ?
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10272
Location: italy

PostPosted: Tue Sep 07, 2010 12:38 pm    Post subject: Reply to: GOTO to a label inside a procedure
Reply with quote

since PL/I is a block structured language jumping in/out of a block
IS as You already noticed FORBIDDEN

no reason to ask how to do it
Back to top
View user's profile Send private message
Appu

New User


Joined: 26 Apr 2010
Posts: 74
Location: India

PostPosted: Tue Sep 07, 2010 12:52 pm    Post subject:
Reply with quote

thanks for the confirmation
Back to top
View user's profile Send private message
Phrzby Phil

Active Member


Joined: 31 Oct 2006
Posts: 962
Location: Richmond, Virginia

PostPosted: Tue Sep 07, 2010 5:13 pm    Post subject:
Reply with quote

From the perspective of a cleanly written program, why would you want to do this? I presume you have defined the block of code to perform some specific task.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Tue Sep 07, 2010 11:00 pm    Post subject: Reply to: GOTO to a label inside a procedure
Reply with quote

Would the RECURSIVE option work for what you're trying to do?

Bill
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 -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Calling procedure with multiple entri... steve-myers PL/I & Assembler 5 Fri Jan 27, 2017 3:33 pm
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm
No new posts Access SQLCA fields inside a stored p... gangapd DB2 6 Thu Oct 27, 2016 10:20 am
No new posts Add system date inside of a PS file a... pramitdas DFSORT/ICETOOL 5 Sun Aug 28, 2016 12:06 am
No new posts Is possible to call subprogram from c... cmsmoon COBOL Programming 3 Fri Aug 05, 2016 6:46 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us