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
 

 

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: 4649
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: 4649
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: 4649
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 UNIT=AFF for Easytrieve code gandikk JCL & VSAM 7 Wed Jul 12, 2017 11:42 pm
No new posts DB2 Program abending without giving a... rahulgarg14 DB2 7 Mon May 29, 2017 8:10 pm
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Job failing with USER = 4093 REASON C... Pradeepa S ABENDS & Debugging 1 Wed May 17, 2017 3:35 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am


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