Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Condition Code Help

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

New User


Joined: 27 May 2005
Posts: 4

PostPosted: Fri May 27, 2005 10:46 pm    Post subject: Condition Code Help
Reply with quote

I have to implement a JCL driven email using BATCHTMP.But this is the 5th step in the Job and i need execute this step on failure on any step, Unabel to set it up using COND=XXXX steps. PLease help
Back to top
View user's profile Send private message

superk

Moderator Team Head


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

PostPosted: Fri May 27, 2005 10:51 pm    Post subject: Re: BATCHTMP Help
Reply with quote

COND=EVEN should make it work.
Back to top
View user's profile Send private message
abhi2879

New User


Joined: 27 May 2005
Posts: 4

PostPosted: Sat May 28, 2005 12:35 am    Post subject: Re: Condition Code Help
Reply with quote

My criteria is if any step fails then only the BATCHTMP step shud execute. COND=EVEN will execute in any COndition
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Sat May 28, 2005 1:17 am    Post subject: Re: Condition Code Help
Reply with quote

Guess it should be COND=ONLY then.
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Sat May 28, 2005 1:51 am    Post subject: Re: Condition Code Help
Reply with quote

I think that if it was up to me, I'd rather use IF/THEN statements so I could handle both step abends and steps with non-acceptable return codes:
Code:

// IF (ABEND=TRUE | RC > 4) THEN
//BATCHTMP EXEC PGM=BATCHTMP
//...
// ENDIF
Back to top
View user's profile Send private message
abhi2879

New User


Joined: 27 May 2005
Posts: 4

PostPosted: Sat May 28, 2005 3:54 am    Post subject:
Reply with quote

My constraints are

1. If STEP010 fails STEP020 will not be executed, but STEP030 which is the BATCHTMP step should be executed to send the mail.
2. If all the steps are with RC=0, the BATCHTMP Step should not be executed.

Is there any cond where in if a step fails, the successive step instead of checking the RC and not executing ,it will check the RC and transfer the JCL execution control to the particular step which has the BATCHTMP step.

I know i am asking for more
Back to top
View user's profile Send private message
jkbytes

Active User


Joined: 19 Feb 2005
Posts: 141
Location: South Africa

PostPosted: Sat May 28, 2005 9:55 am    Post subject: Re: Condition Code Help
Reply with quote

Hi,

You can check for the return code of STEP010 IN STEP020 using a condition or you can also use an if statement as superk told for STEP020, and have a COND=ONLY IN STEP030.

I guess this would work fine for you.
Back to top
View user's profile Send private message
Suresh Antony
Warnings : 1

New User


Joined: 27 May 2005
Posts: 3
Location: Bangalore

PostPosted: Sat May 28, 2005 12:24 pm    Post subject:
Reply with quote

Hi Abhi,
Your question is that u need to execute 5th step(BATCHTMP) in the job only if any of the above steps fails...

If so... u can use the condition in the 5ht step as COND=(0,LE).. i think it should work

Thanks,
Suresh Antony
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat May 28, 2005 9:31 pm    Post subject:
Reply with quote

Hi Ahbi,

If you want an appropriate ans to your ques you have to invest the time to precicely define the problem.

Show us the JCL. Tell us exactly what "fails" means - a certain RC (GT 0;4, 12, and 16?); an abend; both? Multiple examples of what the solution should accomplish can be of help.

Expecting people supply solutions based on inadequate info and then rejecting them because they don't address a scenerio you neglected to mention is rude, because it expects them to spend more time on the problem than you do.
Back to top
View user's profile Send private message
abhi2879

New User


Joined: 27 May 2005
Posts: 4

PostPosted: Sat May 28, 2005 9:50 pm    Post subject: Re: Condition Code Help
Reply with quote

I am sorry if my post was rude and was no detailed.
My condition is if the RC of any step is greater than Zero, the jcl should execute only the last step which is the BATCHTMP step.

Sorry again :!:
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sun May 29, 2005 9:19 am    Post subject:
Reply with quote

What do you want to do if any step abends?
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 Speed-up/reduce CPU use of code prino PL/I & Assembler 0 Tue Sep 26, 2017 12:05 am
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
This topic is locked: you cannot edit posts or make replies. how to code for GDG in Rexx cvnlynn CLIST & REXX 13 Wed Aug 09, 2017 9:13 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am
No new posts I want to retire TRX and use only Rex... Abhinav Sharma CLIST & REXX 6 Sat Jul 29, 2017 2:53 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us