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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Doubt in COND operator: COND=(0,NE)
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: 685
Location: Earth

PostPosted: Mon Aug 13, 2007 2:57 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Mon Aug 13, 2007 3:16 pm    Post subject:
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    Post subject:
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: 685
Location: Earth

PostPosted: Mon Aug 13, 2007 3:55 pm    Post subject:
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    Post subject:
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    Post subject:
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: 3158
Location: Tucson AZ

PostPosted: Mon Aug 13, 2007 5:21 pm    Post subject:
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    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Mon Aug 13, 2007 7:20 pm    Post subject:
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    Post subject:
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    Post subject:
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    Post subject: Re: Doubt in COND operator: COND=(0,NE)
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    Post subject:
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    Post subject: Reply to: Doubt in COND operator: COND=(0,NE)
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: 685
Location: Earth

PostPosted: Thu Aug 16, 2007 2:43 pm    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Thu Aug 16, 2007 7:36 pm    Post subject:
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    Post subject:
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    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 Doubt in MFS abdulrafi IMS DB/DC 2 Fri Oct 21, 2016 3:09 pm
No new posts how to DYNAMICALLY write sort cond to... mohamedmubee COBOL Programming 13 Fri Aug 26, 2016 11:46 pm
No new posts COND parameter vs IF THEN ELSE Alks JCL & VSAM 11 Fri Jun 17, 2016 5:28 pm
No new posts Include Cond issue vickey_dw DFSORT/ICETOOL 6 Tue Mar 29, 2016 8:51 pm
No new posts How to detect the Job COND used tdfs JCL & VSAM 28 Tue Feb 09, 2016 8:34 pm


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