PROC

In this Mainframe Forum - You can post your queries on JCL, OS/390 JCL, MVS JCL, z/OS JCL, JES2 & JES3

Moderators: Frank Yaeger, DikDude, Moderator Group

Post Reply
rajkumarprajapati
Member
Posts: 40
Joined: Tue Sep 18, 2007 1:17 pm

PROC

Post by rajkumarprajapati » Fri Feb 27, 2009 2:07 pm

How can we call a PROC from other PROC?

User avatar
Natarajan
Moderator
Posts: 537
Joined: Fri Oct 10, 2008 12:57 pm
Location: chennai
Contact:

Post by Natarajan » Fri Feb 27, 2009 3:09 pm

i never tried this, but, my guess is we can call proc from another proc.
we may need to use same line which we use in job for calling proc.

EXEC PROC=procname.
Natarajan
Chennai

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Sun Mar 01, 2009 1:11 pm

Yes that's very much possible - that is called as "Nested Procedure". . .
Regards,
Anuj

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Sun Mar 01, 2009 1:12 pm

and the problem with nested-procedures is you can't restart from some step of inner PROCs.. :(
Regards,
Anuj

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Sun Mar 01, 2009 1:28 pm

Hi agan,

Just check with the "z/OS V1R6.0 JCL Reference":

http://publibz.boulder.ibm.com/cgi-bin/ ... /CCONTENTS
5.3 Nested Procedures

Cataloged and in-stream procedures can invoke other procedures (up to 15 levels of nesting). In a procedure, an EXEC statement can invoke another procedure, which can contain an EXEC statement to invoke another procedure, and so on.

Note that an in-stream procedure cannot be defined within another procedure. The sequence PROC, PROC, PEND, PEND is not valid.
Regards,
Anuj

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others