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
 

 

Connect Direct return code

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
martinho

New User


Joined: 16 Oct 2006
Posts: 3

PostPosted: Mon Oct 16, 2006 5:15 pm    Post subject: Connect Direct return code
Reply with quote

In my jcl, I have 2 jobsteps ; A CD copy step, followed by a non-CD step. I only want the 2nd step to run if the CD copy is successful, i.e. it has run to completion, not just successfully been 'submitted'. Is this possible ?
Thanks
Back to top
View user's profile Send private message

ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Mon Oct 16, 2006 5:59 pm    Post subject:
Reply with quote

You will have to put some in-between step (like REXX) that reads the "real" return code of NDM and exit with the appropriate RC. NDM in batch will always return the result of the submit command.

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

Moderator Team Head


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

PostPosted: Mon Oct 16, 2006 6:08 pm    Post subject: Re: Connect Direct return code
Reply with quote

You probably want to specify MAXDELAY=UNLIMITED when you submit your process.
Back to top
View user's profile Send private message
martinho

New User


Joined: 16 Oct 2006
Posts: 3

PostPosted: Mon Oct 16, 2006 6:34 pm    Post subject:
Reply with quote

Thanks for the previous two replies.
Not a REXX expert - would it be complex ?
What would be the effect of MAXDELAY=UNLIMITED ?
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Mon Oct 16, 2006 7:10 pm    Post subject: Re: Connect Direct return code
Reply with quote

Quote:

You can synchronize Processes by coding the MAXDELAY keyword parameter on either the SUBMIT statement or on the PROCESS statement. The MAXDELAY keyword enables you to suspend the execution of the DMBATCH jobstep until the submitted Process either completes or a specified interval of time elapses.


The following example shows the MAXDELAY keyword coded on the SUBMIT statement:
Code:

//SYSIN DD *
   SIGNON USERID=(USER01,PASSWRD)
   SUBMIT PROC=PROCAAA MAXDELAY=UNLIMITED
   SIGNOFF
/*


You can also place the MAXDELAY keyword on the PROCESS statement for PROCAAA:

Code:

PROCAAA  PROC  SNODE=REMOTE.NODE.B MAXDELAY=UNLIMITED
STEP01  COPY  TO  (DSN=to_dsn -
                       SNODE) -
              FROM (DSN=from_dsn -
                       PNODE)


Quote:

If you code MAXDELAY in a Process and submit it through the IUI, your TSO session hangs until the Process completes.
Back to top
View user's profile Send private message
martinho

New User


Joined: 16 Oct 2006
Posts: 3

PostPosted: Mon Oct 16, 2006 7:53 pm    Post subject:
Reply with quote

Many thanks Superk. So, just to confirm, if I use the MAXDELAY=UNLIMITED parm (assume it doesn't matter which statement I set it on, PROCESS or SUB), any jobsteps after the sub PROC command won't execeute until the CD process successfully completes? The jobstep is IEBGENER in my example....where CDPROC contains the COPY stmts. I'd try this out myself but I've just been informed we need a new part for our test C D environment and it won't be here until tomorrow !
Code:

//NDM      EXEC CDPROC,PROCL=TEST.PROCESS.LIB,COND=(0,NE)
//SYSIN    DD  *                                           
  SIGNON CASE=YES                                           
  SUBMIT PROC=CD1 MAXDELAY=UNLIMITED                       
  SIGNOFF                                                   
/*                                                         
//IEBGENER EXEC PGM=IEBGENER,COND=(0,NE)                     
//SYSIN       DD *                                           
//SYSUT1     DD DUMMY                                       
//SYSUT2     DD DUMMY                                       
//SYSPRINT  DD SYSOUT=*                                     
//SYSOUT     DD SYSOUT=*                                     
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 -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to Capture the Max return code of... anilkumar922 All Other Mainframe Topics 0 Thu Jan 12, 2017 12:02 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 4 Mon Dec 05, 2016 11:57 am
No new posts What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am
No new posts IDEAL - Code Retrieval yugendran CA Products 0 Fri Nov 25, 2016 3:27 pm


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