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

In a catalog procedure PROC statement is mandatory or not


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
chandrasekhar

New User


Joined: 29 Sep 2004
Posts: 35
Location: bangalore

PostPosted: Tue Oct 12, 2004 7:53 pm
Reply with quote

Q1. In a catalog procedure PROC statement is mandatory or not??
If not then how we call it.
[/img][/list]
Back to top
View user's profile Send private message
anuradha

Active User


Joined: 06 Jan 2004
Posts: 247
Location: Hyderabad

PostPosted: Tue Oct 12, 2004 9:05 pm
Reply with quote

Hi chandrasekhar,

If proc statement is not given in catalog procedures then how come it will recognize the Proc name?

So it is required.

Thanks,
Anu
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Oct 13, 2004 12:17 am
Reply with quote

Please check with the JCL Reference Manual before posting:

Quote:

Optionally,
a cataloged procedure can begin with a PROC statement and end with a PEND statement. If coded, PROC must be the first statement in the procedure.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Oct 13, 2004 12:21 am
Reply with quote

By the way, this is the manual I'm referring to:

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2B650/CCONTENTS?DT=20040712170508
Back to top
View user's profile Send private message
anuradha

Active User


Joined: 06 Jan 2004
Posts: 247
Location: Hyderabad

PostPosted: Wed Oct 13, 2004 2:34 pm
Reply with quote

Thanks a lot Kevin for correcting me.

So, chandrasekhar Proc statement is optional. Job will recognize the proc by the proc name.

Hope your doubt is clarified.
Back to top
View user's profile Send private message
chandrasekhar

New User


Joined: 29 Sep 2004
Posts: 35
Location: bangalore

PostPosted: Wed Oct 13, 2004 9:01 pm
Reply with quote

Hi friends

Thanks for help to clear my doubt.But still something is left.
you mean if PROC isnot mention then the syntex may be like this. Is it correct???Still a little confussion is here.Need some more guidence.

//myproc
//step1 exec ....
//dd1 dd .....
//



THANKS
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Oct 14, 2004 2:17 am
Reply with quote

If you choose not to use the PROC statement at the beginning of a cataloged procedure, then the procedure would look like this:

//PROCSTEP EXEC PGM=
//DD1 DD DSN=...
//DD2 DD DSN=...
Back to top
View user's profile Send private message
chandrasekhar

New User


Joined: 29 Sep 2004
Posts: 35
Location: bangalore

PostPosted: Thu Oct 14, 2004 7:32 pm
Reply with quote

hi superk
Thanks for the answer but one more thing is that how u call a PROCEDURE.Generally we call by it name which is a part of PROC statement.isn't it??But our program does n't contain any such thing.


THANKS
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Oct 16, 2004 5:24 am
Reply with quote

Hi Chandra,

To invoke an in-stream procedure you use up to 8 positions beginning at pos 3 in the PROC stmt when you code the invoking EXEC stmt.

For a PROC residing in a PDS use the membername of the procedure as created in the PDS. Using the procname in the PROC stmt in this case is just a useful convention, but is not mandatory.
Back to top
View user's profile Send private message
chandrasekhar

New User


Joined: 29 Sep 2004
Posts: 35
Location: bangalore

PostPosted: Sat Oct 16, 2004 3:44 pm
Reply with quote

Thanks to all the member of this forum who help me a lot to understand the concept of PROCEDURE.
THANKS AND REGARDS

chandrasekhar
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts JOIN STATEMENT PERFORMANCE. DFSORT/ICETOOL 12
No new posts DASD - non SMS - volser change - VSAM... JCL & VSAM 2
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 Relate COBOL statements to EGL statement All Other Mainframe Topics 0
Search our Forums:

Back to Top