View previous topic :: View next topic
|
Author |
Message |
sunilmfs
New User
Joined: 09 Nov 2010 Posts: 20 Location: hyderabad
|
|
|
|
Hi,
I have one JCL and Proc . Proc having only one step.if the step will successfully excute output will be written into new GDG genaration. when program abend also (i.e, step fail) empty GDG version is creating.
My requirement is that when the step fails.new genaration should not be created.
Please help me |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
Note that "step fails" ¬= "step abends".
Now, if the step actually abends, is the standard conditional disposition of the data set unsuitable for some reason? If the step does not abend, but instead terminates with, e.g., a non-zero condition code, what code(s) should trigger the error processing?
Think your requirement through, and set it out more rigorously. Try to overcome the terminological and conceptual errors inculcated by incompetent and uneducated teachers and colleagues. |
|
Back to top |
|
|
kratos86
Active User
Joined: 17 Mar 2008 Posts: 148 Location: Anna NGR
|
|
|
|
I assume that the step inside the proc is executing a program. On its successful completion the output of the program is written to a GDG.
If what i assumed is correct, you need to brush up your basics on DISP parameter. |
|
Back to top |
|
|
sunilmfs
New User
Joined: 09 Nov 2010 Posts: 20 Location: hyderabad
|
|
|
|
we are here to share the knowledge...so that it will help others..don't say uneducated teachers or colleagues.
if you know the answer .. just reply otherwise leave it... |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
sunilmfs wrote: |
we are here to share the knowledge...so that it will help others..don't say uneducated teachers or colleagues. |
Why don't you get one of those competent and educated teachers and colleagues to give you the answer, then? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
when program abend also (i.e, step fail) empty GDG version is creating.
My requirement is that when the step fails.new genaration should not be created. |
We cannot help it if you did not learn the basics -- and one basic thing you do not understand is that a step of a batch job that starts execution has THREE possible outcomes (and this does not include if the step is flushed due to condition codes and never executes):
1. the program may abend (further broken into system abends and user abends),
2. the program may generate a non-zero return code (but not abend), or
3. the program may generate a zero return code.
You have not defined which of these three conditions you mean when you say "when the step fails" -- so the first thing for YOU to do is to decide what you mean by "when the step fails". We cannot read your mind and figure that out, you must tell us. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
They're telling you the answer, don't get all hot about it.
Look at the DISP paramater of your DD with for the GDG.
DISP=(status at the start of the step,what to do on normal completion,what to do on abnormal completion)
If you specify just one or two sub-parameters of DISP, you'll get default actions for the second and/or third.
JCL manual. You must be telling the system, implicitly or explicitly, to catalogue the GDG if the job fails. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
sunilmfs
As kratos86 has stated, you really do need to brush up on the very basics of JCl DISP=, rather than throwing your toys out of the pram when you do not get the answer which is easily available in the JCL reference manual.
If your skills really are that basic, then perhaps you should join the students and freshers forum instead.
Have you looked at the DISP statement for the dataset in question, and what did you find out about it. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Quote: |
we are here to share the knowledge |
no, you are here because you are either too lazy to look in a manual,
and/or to lazy/afraid to ask a co-worker for fear of resume fraud acusations.
those who answer are here to share knowledge with those willing to learn.
when someone does not know the answer to a simple question as yours,
if is obvious that you have done nothing to solve the problem yourself
instead of complaining about posters who call you on your BS,
spend some time following the forum rules:
look at manuals
search the forum
search the internet
and you have nothing to share with us except your indignation. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
sunilmfs wrote: |
I have one JCL and Proc . Proc having only one step.if the step will successfully excute output will be written into new GDG genaration. when program abend also (i.e, step fail) empty GDG version is creating. |
For the gdg-in-question what do you have for the bold text in DISP=(NEW,CATLG,DELETE) - if it's CATLG, you've a problem!
By the way, when talking about GDGs -- Generations and versions both have some meaning, but in the context of your question, you meant generation, for sure, not the version. |
|
Back to top |
|
|
sunilmfs
New User
Joined: 09 Nov 2010 Posts: 20 Location: hyderabad
|
|
|
|
Thanks for ur reply...
Actual i know about DISP parameter.. even i am specifing DISP=(NEW,CATLG,DELETE) , when step abends...data set is not deleting ..new data set existing like that..it may be evniroment problem which we are using |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Have you read and re-read Roberts post.
Do you have an ABEND or a non zero return code.
There is an enormous difference between the two. |
|
Back to top |
|
|
sunilmfs
New User
Joined: 09 Nov 2010 Posts: 20 Location: hyderabad
|
|
|
|
abend only SOC4 |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Well, You know there are many Sys-programers around on this Forum and usually the "Environment" is built by them, they might just not like your previous comment...
Are you sure, your step gets an abend and you are looking at correct step? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
Quote: |
we are here to share the knowledge...so that it will help others..don't say uneducated teachers or colleagues.
if you know the answer .. just reply otherwise leave it... |
remember ... replying on a forum is/depends
on voluntary basis
on our own time
free of charge
on the interest of the topic
the attitude of the TS ( Topic starter )
the benevolence factor toward the TS
( Your last quoted sentence made Your BF drop dramatically )
for most basics questions it is safer to assume ( based on the number of posts many of us have replied to )
that the TS has not done his/her basic homework
to make the most out of the questions YOu ask
it would be wise for You to read and meditate on
How to ask questions the smart way
catb.org/~esr/faqs/smart-questions.html |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
sunilmfs wrote: |
abend only SOC4 |
Show the Job and the SYSOUT messages from the failed Job. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
If you have a S0C4 then you had better share your JCL and the JES messages for the step. A S0C4 should abend your job and DISP=(,CATLG,DELETE) should delete the dataset. |
|
Back to top |
|
|
sunilmfs
New User
Joined: 09 Nov 2010 Posts: 20 Location: hyderabad
|
|
|
|
I have only one step in my proc |
|
Back to top |
|
|
kratos86
Active User
Joined: 17 Mar 2008 Posts: 148 Location: Anna NGR
|
|
|
|
If you don't provide us the information we had asked, we cannot help you much on resolving the issue. Share you JCL and JES message of your abended step. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Quote: |
I have only one step in my proc |
therefore there is no need to provide any of the requested info? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
since, if everything is as you say it is,
the file should be deleted.
but, it isn't.
therefore, everything is not as you say it is.
that is why we need to see the output of jesmsg,
which will tell us why the dataset is not being deleted. |
|
Back to top |
|
|
|