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
 

 

Overriding dd statements in cataloged procedure

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Harsha1525

New User


Joined: 22 Dec 2009
Posts: 24
Location: hyderabad

PostPosted: Thu Jul 26, 2012 3:04 pm    Post subject: Overriding dd statements in cataloged procedure
Reply with quote

Hi,
actually I am expecting error with my overriding statement which I have written in my JCL. but surprisingly it is not showing any error icon_sad.gif . I know no error is good but i am trying to understand why I am not getting error with below statement.
my cataloged procedure:
Code:
**********************************
//TESTPROC PROC
//S1             EXEC IEFBR14
//D001     DD DSN = HARSHA.PROC.TEST1,
//                  DISP=(NEW,CATLG,DELETE)
//                  --- DCB AND SPACE STUFF----
//S2             EXEC IEFBR14
//D002     DD DSN = HARSH.PROC.TEST2
//                  DISP=(NEW,CATALG,DELETE)
//                  --- DCB AND SPACE STUFF----
//            PEND
************************************

My Main JCL which call above stored procedure:
Code:
//STEP01    EXEC TESTPROC
//S2.D002  DD DSN=HARSH.PROC.RIDE1
//S1.D001  DD DSN=HARSH.PROC.RIDE2
//
**************************************
Why I am expecting error here is I am not overriding in the order I have defined steps in my procedure. according to my knowledge first i should write override statement for the step "S1" and next I should write for the step "S2". not sure if I understand manual in wrong way. anyone have any comments here please welcome


coded - Anuj
Back to top
View user's profile Send private message

Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Thu Jul 26, 2012 3:49 pm    Post subject:
Reply with quote

I do not see anything in the JCL Reference or User's Guide that suggests that that override statements, when the DD names are properly qualified, cannot be placed out of order. May one ask where you have gotten this idea?
Back to top
View user's profile Send private message
Harsha1525

New User


Joined: 22 Dec 2009
Posts: 24
Location: hyderabad

PostPosted: Thu Jul 26, 2012 4:15 pm    Post subject:
Reply with quote

Akatsukami wrote:
I do not see anything in the JCL Reference or User's Guide that suggests that that override statements, when the DD names are properly qualified, cannot be placed out of order. May one ask where you have gotten this idea?


This is the statement I read

" For all procedure steps in the invoked procedure, place the modifying statements for each procedure step in the same order in which the procedure steps are specified."

May be I interpreted completely in wrong way

this is the link:
Modifying procedures--> explanation

http://publib.boulder.ibm.com/infocenter/zos/v1r11/index.jsp?topic=/com.ibm.zos.r11.ieab600/iea2b69020.htm

Looking at your post what I understood is when the ddnames are properly qualified order of overriding statements does not matter.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Thu Jul 26, 2012 4:25 pm    Post subject:
Reply with quote

Harsha1525 wrote:
Looking at your post what I understood is when the ddnames are properly qualified order of overriding statements does not matter.

That is correct. This topic explicitly states:
Quote:

  1. Overriding statements can appear in any order when they explicitly specify the step that is being overridden. Added statements can appear in any order when they specify the step explicitly.
  2. Overriding and added statements that do not explicitly specify the step are applied to the step named in the previous overriding or added OUTPUT JCL or DD statement. If no previous override statement named a step, then they are applied to the first step in the procedure.

I suspect that you have only been exposed to the second case (which is not a criticism; even I was once inexperienced...in the Upper Pleistocene icon_biggrin.gif) and have therefore misinterpreted it as the only way to write JCL.
Back to top
View user's profile Send private message
Phrzby Phil

Active Member


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

PostPosted: Thu Jul 26, 2012 5:04 pm    Post subject:
Reply with quote

A side note - you seem to have some illegal spaces in your code around the DSN = part.

You should use the code tag and also cut&paste rather than retyping.
Back to top
View user's profile Send private message
Harsha1525

New User


Joined: 22 Dec 2009
Posts: 24
Location: hyderabad

PostPosted: Thu Jul 26, 2012 5:39 pm    Post subject:
Reply with quote

@ Akatsukami: Hmmm I missed the END of the movie Thank you for your time. now I am clear and it is happy ending for me
@ Phrzby Phil: you are correct but due to security reasons I can not cut & paste from my shop but trust me as a software engineer I love cut and paste that is the best feature I ever seen icon_smile.gif
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Thu Jul 26, 2012 5:42 pm    Post subject:
Reply with quote

Quote:
and it is happy ending for me


And what movie was that?
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Thu Jul 26, 2012 6:30 pm    Post subject:
Reply with quote

Harsha1525 wrote:
@ Phrzby Phil: you are correct but due to security reasons I can not cut & paste from my shop but trust me as a software engineer I love cut and paste that is the best feature I ever seen icon_smile.gif
Please have a look at your post now - I've edited it to add the "Code Tags" which Phrzby was talking about. And by "cut/paste" it does not mean that you come under the scanner of copyright/security issues - point is, your post should be readbale and to the point for a third-person.
Back to top
View user's profile Send private message
Harsha1525

New User


Joined: 22 Dec 2009
Posts: 24
Location: hyderabad

PostPosted: Fri Jul 27, 2012 11:49 am    Post subject:
Reply with quote

PeterHolland wrote:
Quote:
and it is happy ending for me


And what movie was that?


Hi peter, yes actually I thought like I have a happy ending. After looking at your question I did check whether I really have the happy ending or not.unfortunately not. I thought like at least below code should give the error but this one is also not giving error.

MY Procedure:

Code:
//PROC001 PROC                                           
//S1   EXEC PGM=IEFBR14                                   
//D001  DD DSN=HARSHA.TESTPROC.TEST1,                     
//         SPACE=(TRK,5),DISP=(NEW,CATLG,DELETE),         
//         DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=800)   
//D002  DD DSN=HARSHA.TESTPROC.TEST2,                     
//         SPACE=(TRK,5),DISP=(NEW,CATLG,DELETE),         
//         DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=800)   
//        PEND
***************************************************                                           
MY JCL:

Code:
//STEP01  EXEC PROC001                     
//S1.D002 DD DSN=HARSHA.TESTPROC.RIDE2     
//S1.D001 DD DSN=HARSHA.TESTPROC.RIDE1     
**************************************************
I thought like atleast I need to follow the order when you are overriding
dd statements of the same procedure step. but if I do not follow the order also I am not getting any error.

what kind of order it is when the manual say " For all procedure steps in the invoked procedure, place the modifying statements for each procedure step in the same order in which the procedure steps are specified."
Simply I am not getting . am I missing anything here?


Coded
Back to top
View user's profile Send private message
Harsha1525

New User


Joined: 22 Dec 2009
Posts: 24
Location: hyderabad

PostPosted: Fri Jul 27, 2012 11:51 am    Post subject:
Reply with quote

Anuj Dhawan wrote:
Harsha1525 wrote:
@ Phrzby Phil: you are correct but due to security reasons I can not cut & paste from my shop but trust me as a software engineer I love cut and paste that is the best feature I ever seen icon_smile.gif
Please have a look at your post now - I've edited it to add the "Code Tags" which Phrzby was talking about. And by "cut/paste" it does not mean that you come under the scanner of copyright/security issues - point is, your post should be readbale and to the point for a third-person.


Thanks Anuj. I understood the problem and I hope I taken care this one In my last post
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Jul 27, 2012 1:07 pm    Post subject:
Reply with quote

Not really, I had to add the code tags again.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Fri Jul 27, 2012 2:01 pm    Post subject:
Reply with quote

In the first place i don't see a UNIT= in your jcl. I guess that would result
in a JCL error. I did 2 tests, look at the following output and you will see
that out of sequence overriding statements result in a jclerror also :

Code:

    1     //XIBFTEST JOB ,MSGCLASS=1,CLASS=A                                      JOB  176
          //PROC001 PROC
          //S1   EXEC PGM=IEFBR14
          //D001  DD DSN=HARSHA.TESTPROC.TEST1,
          //         SPACE=(TRK,5),DISP=(,PASS),UNIT=SYSDA,
          //         DCB=(RECFM=FB,LRECL=80,BLKSIZE=800)
          //D002  DD DSN=HARSHA.TESTPROC.TEST2,
          //         SPACE=(TRK,5),DISP=(,PASS),UNIT=SYSDA,
          //         DCB=(RECFM=FB,LRECL=80,BLKSIZE=800)
          //        PEND
    2     //STEP01  EXEC PROC001
    3     ++PROC001 PROC
    4     ++S1   EXEC PGM=IEFBR14
    5     //S1.D001 DD DSN=HARSHA.TESTPROC.RIDE2
          +/D001  DD DSN=HARSHA.TESTPROC.TEST1,
          ++         SPACE=(TRK,5),DISP=(,PASS),UNIT=SYSDA,
          ++         DCB=(RECFM=FB,LRECL=80,BLKSIZE=800)
    6     //S1.D002 DD DSN=HARSHA.TESTPROC.RIDE1
          +/D002  DD DSN=HARSHA.TESTPROC.TEST2,
          ++         SPACE=(TRK,5),DISP=(,PASS),UNIT=SYSDA,
          ++         DCB=(RECFM=FB,LRECL=80,BLKSIZE=800)



    1     //XIBFTEST JOB ,MSGCLASS=1,CLASS=A                                      JOB  177
          //PROC001 PROC
          //S1   EXEC PGM=IEFBR14
          //D001  DD DSN=HARSHA.TESTPROC.TEST1,
          //         SPACE=(TRK,5),DISP=(,PASS),UNIT=SYSDA,
          //         DCB=(RECFM=FB,LRECL=80,BLKSIZE=800)
          //D002  DD DSN=HARSHA.TESTPROC.TEST2,
          //         SPACE=(TRK,5),DISP=(,PASS),UNIT=SYSDA,
          //         DCB=(RECFM=FB,LRECL=80,BLKSIZE=800)
          //        PEND
    2     //STEP01  EXEC PROC001
    3     ++PROC001 PROC
    4     ++S1   EXEC PGM=IEFBR14
    5     ++D001  DD DSN=HARSHA.TESTPROC.TEST1,
          ++         SPACE=(TRK,5),DISP=(,PASS),UNIT=SYSDA,
          ++         DCB=(RECFM=FB,LRECL=80,BLKSIZE=800)
    6     //S1.D002 DD DSN=HARSHA.TESTPROC.RIDE1
          +/D002  DD DSN=HARSHA.TESTPROC.TEST2,
          ++         SPACE=(TRK,5),DISP=(,PASS),UNIT=SYSDA,
          ++         DCB=(RECFM=FB,LRECL=80,BLKSIZE=800)
    7     //S1.D001 DD DSN=HARSHA.TESTPROC.RIDE2
IEF210I XIBFTEST S1 STEP01 D001 - UNIT FIELD SPECIFIES INCORRECT DEVICE NAME
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Sat Jul 28, 2012 12:55 am    Post subject:
Reply with quote

PeterHolland wrote:
I did 2 tests, look at the following output and you will see that out of sequence overriding statements result in a jclerror also :

And yet when I ran that same JCL, the interpreter correctly re-ordered the overrides and the job ran to CC=0. My system is running z/OS 1.13 with JES3; perhaps you have different software on yours?
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Sat Jul 28, 2012 11:43 am    Post subject:
Reply with quote

Akatsukami wrote:
PeterHolland wrote:
I did 2 tests, look at the following output and you will see that out of sequence overriding statements result in a jclerror also :

And yet when I ran that same JCL, the interpreter correctly re-ordered the overrides and the job ran to CC=0. My system is running z/OS 1.13 with JES3; perhaps you have different software on yours?


Oh yes, im running MVS 3.8J on my PC.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Sat Jul 28, 2012 1:35 pm    Post subject:
Reply with quote

Hi,

running on z/OS 1.11 with JES2, results are the same as Akatsukami. no issues in re-arranging the overrides.

Gerry
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Sat Jul 28, 2012 2:59 pm    Post subject:
Reply with quote

I think the z/OS systems are specially developed for a lot of the people here having skills in JCL. icon_redface.gif
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
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 4 Thu Oct 27, 2016 10:20 am
No new posts Is possible to call subprogram from c... cmsmoon COBOL Programming 3 Fri Aug 05, 2016 6:46 pm
No new posts Symbolic Parameters in SYSIN DD state... madishpa DFSORT/ICETOOL 3 Mon Jun 27, 2016 6:23 pm
This topic is locked: you cannot edit posts or make replies. Stored procedure on Federated thru DB2 arif677 DB2 6 Tue May 31, 2016 11:48 pm


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