View previous topic :: View next topic
|
Author |
Message |
Madhanlal Currently Banned New User
Joined: 21 Apr 2007 Posts: 23 Location: Chennai
|
|
|
|
//s1 EXEC PGM=IKJEFT1A,COND=(0,NE)
Can anyone tell me what this step will do...
This is the first step. |
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
refer to the jcl ref or guide (manuals button on top of this page), search for COND. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
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 |
|
|
Madhanlal Currently Banned New User
Joined: 21 Apr 2007 Posts: 23 Location: Chennai
|
|
|
|
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 |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
Condition will not be checked, s1 should execute unconditionally. |
|
Back to top |
|
|
HARLEEN SINGH MANN Warnings : 2 New User
Joined: 03 Aug 2007 Posts: 17 Location: Pune
|
|
|
|
the cond wil not even try to check the cond since the step is the first step of the job. |
|
Back to top |
|
|
MoganaKumaran
New User
Joined: 26 Jun 2007 Posts: 20 Location: Chennai
|
|
|
|
Hi,
This step would not be executed since this is first step of ur job.
MOhan
L&T |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
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 |
|
|
Madhanlal Currently Banned New User
Joined: 21 Apr 2007 Posts: 23 Location: Chennai
|
|
|
|
Thompson
Any way it will be false for every run... does the COND here in the first stpe serve any purpose? |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
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 |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
We're assuming it's the 1st step of the job. It could be any step, including the last. |
|
Back to top |
|
|
star_dhruv2000
New User
Joined: 03 Nov 2006 Posts: 87 Location: Plymouth, MN USA
|
|
|
|
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 |
|
|
bijumon
New User
Joined: 14 Aug 2006 Posts: 20 Location: Pune,India
|
|
|
|
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 |
|
|
antonyjoseph
New User
Joined: 11 Apr 2007 Posts: 28 Location: India
|
|
|
|
//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 |
|
|
chandan chowdhury
New User
Joined: 13 Aug 2007 Posts: 3 Location: Bangalore, India
|
|
|
|
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 |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
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 |
|
|
chandan chowdhury
New User
Joined: 13 Aug 2007 Posts: 3 Location: Bangalore, India
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
chandan chowdhury
New User
Joined: 13 Aug 2007 Posts: 3 Location: Bangalore, India
|
|
|
|
Thank you all, my query is solved now... |
|
Back to top |
|
|
|