IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

GOTO to a label inside a procedure


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Appu

New User


Joined: 26 Apr 2010
Posts: 73
Location: India

PostPosted: Tue Sep 07, 2010 12:24 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Sep 07, 2010 12:38 pm
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: 73
Location: India

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

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

Senior Member


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

PostPosted: Tue Sep 07, 2010 5:13 pm
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: 2501
Location: Atlanta, Georgia, USA

PostPosted: Tue Sep 07, 2010 11:00 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts calling a JCl inside a JCL JCL & VSAM 3
No new posts SRCHFOR ‘string’ command inside P... TSO/ISPF 14
No new posts Invoke stored procedure via batch JCL. DB2 2
No new posts Calling COBOL DB2 program from a COBO... COBOL Programming 2
No new posts To find an array of words (sys-symbol... JCL & VSAM 9
Search our Forums:

Back to Top