IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Doubt in COND operator: COND=(0,NE)


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Madhanlal
Currently Banned

New User


Joined: 21 Apr 2007
Posts: 23
Location: Chennai

PostPosted: Mon Aug 13, 2007 2:50 pm
Reply with quote

//s1 EXEC PGM=IKJEFT1A,COND=(0,NE)


Can anyone tell me what this step will do...

This is the first step.
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Mon Aug 13, 2007 2:57 pm
Reply with quote

did you refer the manual for this? Have you worked with cond code in jcl before? Please read the manual first and let us know if you still have any confusion.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Aug 13, 2007 2:58 pm
Reply with quote

refer to the jcl ref or guide (manuals button on top of this page), search for COND.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Aug 13, 2007 3:16 pm
Reply with quote

Code:
//s1 EXEC PGM=IKJEFT1A,COND=(0,NE)


From a purely technical point of view it would fail JCL ERROR due to the fact that the stepname includes lower case characters. //s1
Back to top
View user's profile Send private message
Madhanlal
Currently Banned

New User


Joined: 21 Apr 2007
Posts: 23
Location: Chennai

PostPosted: Mon Aug 13, 2007 3:36 pm
Reply with quote

Hi MF gurus,
From the Manual: When you do not code a stepname, the step S1 will execute only when the return codes of all previous steps do not satisfy the test specified by COND.

IN MY JOB THIS IS THE FIRST STEP SO IT WILL NOT HAVE ANY PREVIOUS STEPS.
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Mon Aug 13, 2007 3:55 pm
Reply with quote

Condition will not be checked, s1 should execute unconditionally.
Back to top
View user's profile Send private message
HARLEEN SINGH MANN
Warnings : 2

New User


Joined: 03 Aug 2007
Posts: 17
Location: Pune

PostPosted: Mon Aug 13, 2007 4:47 pm
Reply with quote

the cond wil not even try to check the cond since the step is the first step of the job.
Back to top
View user's profile Send private message
MoganaKumaran

New User


Joined: 26 Jun 2007
Posts: 20
Location: Chennai

PostPosted: Mon Aug 13, 2007 5:12 pm
Reply with quote

Hi,


This step would not be executed since this is first step of ur job.

MOhan

L&T
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Mon Aug 13, 2007 5:21 pm
Reply with quote

MoganaKumaran wrote:
This step would not be executed since this is first step of ur job.
Wrong....
Actually the manual implies that it will be checked and found false, there by not skipping the step.
Back to top
View user's profile Send private message
Madhanlal
Currently Banned

New User


Joined: 21 Apr 2007
Posts: 23
Location: Chennai

PostPosted: Mon Aug 13, 2007 6:02 pm
Reply with quote

Thompson
Any way it will be false for every run... does the COND here in the first stpe serve any purpose?
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Mon Aug 13, 2007 7:20 pm
Reply with quote

Madhanlal wrote:
does the COND here in the first stpe serve any purpose?
Not really, but if that first step is the first step in a proc, who's to say that another proc might be in the job ahead of it?
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Tue Aug 14, 2007 9:03 am
Reply with quote

We're assuming it's the 1st step of the job. It could be any step, including the last.
Back to top
View user's profile Send private message
star_dhruv2000

New User


Joined: 03 Nov 2006
Posts: 87
Location: Plymouth, MN USA

PostPosted: Tue Aug 14, 2007 3:46 pm
Reply with quote

In a NUT SHELL, if u have CONd parameter on first step of a JOB then also first step is executed because we need some condition code to compare with.

Therefore first step is always executed...
Back to top
View user's profile Send private message
bijumon

New User


Joined: 14 Aug 2006
Posts: 20
Location: Pune,India

PostPosted: Tue Aug 14, 2007 4:49 pm
Reply with quote

Hi,

COND skips a step when the condition specified in the COND becomes true.

Since this is the first step it will get executed, because there is no previous step to check the return code with, and the COND will have no effect, if this step was an intermediate step then:

The cond condition specified by you is COND=(0,NE)

This means that skip this step when 0 is not equal to the RETURN code, i.e, if any of the above steps return a value greater that zero the step will be skipped.


Thanks & Regards
---------------------
Biju
Back to top
View user's profile Send private message
antonyjoseph

New User


Joined: 11 Apr 2007
Posts: 28
Location: India

PostPosted: Tue Aug 14, 2007 10:21 pm
Reply with quote

//S1 EXEC PGM=IKJEFT1A,COND=(0,NE,S0) is one way you can write this.

here the conditon checks if '0' {paramter 1} is Not Equal {parameter 2} to return code from STEPNAME S0 {parameter 3}

If this conidtion is true, then the step S1 will be skipped else it will be executed.
If we donot specify the 3rd parameter, then the third paramter will taken as the largest return Return Code the JOB has returned so far.

When starting a program, I believe that '0' will be the largest return code and hence the condition checked would be

Is 0 NE 0; this is false and hence the step is executed

Hope this helps
Back to top
View user's profile Send private message
chandan chowdhury

New User


Joined: 13 Aug 2007
Posts: 3
Location: Bangalore, India

PostPosted: Thu Aug 16, 2007 2:03 pm
Reply with quote

hello friends,

this is my first post on this forum... and i am very new to Mainframe... so please don't mind any foolish replies...

i just want to know will that COND have no effect if there are more steps in the JCL with high priority assigned using DPRTY ?
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Thu Aug 16, 2007 2:43 pm
Reply with quote

Chandan,
Regardless of DPRTY, steps will be executed in order which they are coded in job. Let us know if this answers your question.
Back to top
View user's profile Send private message
chandan chowdhury

New User


Joined: 13 Aug 2007
Posts: 3
Location: Bangalore, India

PostPosted: Thu Aug 16, 2007 5:54 pm
Reply with quote

thanks for your reply,

Yes, this is what i wanted to know...

but this means that DPRTY is of no use in modern JCL, is it true??
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Aug 16, 2007 7:36 pm
Reply with quote

Hello and welcome to the forums,

Quote:
i just want to know will that COND have no effect if there are more steps in the JCL with high priority assigned using DPRTY
COND will have an effect - regardless of what is coded in DPRTY.

DPRTY may be checked for valid syntax, but is ignored for processing. As you say - it is of no use in modern JCL.

COND will be checked wherever it is specified.
Back to top
View user's profile Send private message
chandan chowdhury

New User


Joined: 13 Aug 2007
Posts: 3
Location: Bangalore, India

PostPosted: Fri Aug 17, 2007 11:35 am
Reply with quote

Thank you all, my query is solved now...
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Reference for COND parameter. JCL & VSAM 1
No new posts IEF142I and Cond. Code 12 All Other Mainframe Topics 3
No new posts Cond parameter and Rc code of a proce... JCL & VSAM 5
No new posts Doubt about pl/1 (job offer) General Talk & Fun Stuff 5
Search our Forums:

Back to Top