Doubt in Cataloged Procedure

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
User avatar
Gurugars
Active Member
Posts: 107
Joined: Sat Oct 23, 2010 2:17 pm
Location: Chennai,India.

Doubt in Cataloged Procedure

Post by Gurugars » Thu Jun 07, 2012 3:32 pm

Hi,

I am having a doubt in cataloged Proc,

I have a cataloged Procedure which has 3 steps like
1. unloading a fileA,
2. COBBATDB - process using fileA,
3. Dummy out the fileA. moving dummy file to the fileA in order to make it as empty.

Now what I need to know is that can I add a step in between the existing steps thru calling jcl so that I can take the backup of fileA.

----
Actual intention is ' Can we add a step in proc thru calling jcl ? like we are over riding dd name, cond code JCL- Can we add steps also in the called proc'


Sorry if the above question doesn't make any development/business sense. Just wanted to know whether it is possible.
Guru:-)

You're never fully dressed without a smile :)

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Thu Jun 07, 2012 8:41 pm

Incorrect suggestion removed . . .
Last edited by DikDude on Thu Jun 07, 2012 10:52 pm, edited 1 time in total.
Have a good one

NicC
Active Member
Posts: 650
Joined: Sun Jul 24, 2011 5:27 pm
Location: Down on the pig farm

Post by NicC » Thu Jun 07, 2012 10:40 pm

No - you have to amend the procedure. You can add extra steps before or after but not in the middle. Actually, there is a way with your 3 stepper if you make the program name of the 3rd step a symbolic parameter. Change the default program name to the name of the program you want to execute 3rd (your backup program); override all relevant ddnames to either dummy or datasets that your new program wants; add extra JCL cards for ddnames that your program requires but are not in the procedure; add jcl for your original 3rd step at the end.
Regards
Nic

User avatar
Gurugars
Active Member
Posts: 107
Joined: Sat Oct 23, 2010 2:17 pm
Location: Chennai,India.

Post by Gurugars » Fri Jun 08, 2012 2:44 pm

Thanks Nic for your suggestion.

I got one more suggestion as follow from one of my co-worker. That is,

in Calling jcl

Step01 exec caldproc, over ride the cond of step 3 as failing one,
step02 exec sort step to back up the FileA
step03 exec caldproc over ride the cond of step1 & 2 as failing and step 3 as EVEN.

I believe this will also meet the goal..!! Any suggestion/advice in this?

Thanks in advance!!
Guru:-)

You're never fully dressed without a smile :)

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Fri Jun 08, 2012 9:02 pm

The proper solution is (of course) to modify the PROCedure . . .
Have a good one

NicC
Active Member
Posts: 650
Joined: Sun Jul 24, 2011 5:27 pm
Location: Down on the pig farm

Post by NicC » Sat Jun 09, 2012 8:11 pm

Definitely modify the procedure. If this is a one off then simply clone the procedure and modify the clone.
Regards
Nic

User avatar
Gurugars
Active Member
Posts: 107
Joined: Sat Oct 23, 2010 2:17 pm
Location: Chennai,India.

Post by Gurugars » Mon Jun 11, 2012 12:00 pm

Yes I accept.. Thanks Dikdude and NicC!!
Guru:-)

You're never fully dressed without a smile :)

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