View previous topic :: View next topic
|
Author |
Message |
cvishu
Active User
Joined: 31 Jul 2007 Posts: 136 Location: india
|
|
|
|
Hi ,
I have a GDG base as input to a sort step.
The generations of the GDG will be created and deleted in an upstream process. So i will not know if for a given day , there were any generations left or not.
The problem is when there are no generations for a given day , my job abend with "No input dataset". Is there any way to put some check, so that my job runs only if generations are available. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Can you show the exact messages you get please. "No input dataset" is not an abend and, as it contains lower case, is not an actual message from anything. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
LISTCAT on GDG Base, SORT-NULLOUT RC=0/4? |
|
Back to top |
|
|
cvishu
Active User
Joined: 31 Jul 2007 Posts: 136 Location: india
|
|
|
|
@ bill, i just typed a info
This is the mesage "S010 IN - DATA SET NOT FOUND"
@ Anuj
i came acrross some sites suggesting the LISTCAT option , but i am not very clear as to how to use it . Could you please throw some light.
I tried the LISTCAT , and the sysprint was something like below, how should i prceed after this.
LISTCAT ENT('xxx.xxx.xxxxx') GDG ALL
GDG BASE ------ xxx.xxx.xxxxx
IN-CAT --- CATALOG.DWR.TSO2
HISTORY
DATASET-OWNER-----P13BNC CREATION--------2012.121
RELEASE----------------2 LAST ALTER------2012.121
ATTRIBUTES
LIMIT------------------5 SCRATCH NOEMPTY
ASSOCIATIONS
NONVSAM--xxx.xxx.xxxxx.G0001V00
NONVSAM--xxx.xxx.xxxxx..G0002V00
IDCAMS SYSTEM SERVICES TIME: 06:38:06
THE NUMBER OF ENTRIES PROCESSED WAS:
AIX -------------------0
ALIAS -----------------0
CLUSTER ---------------0
DATA ------------------0
GDG -------------------1
INDEX -----------------0
NONVSAM ---------------0
PAGESPACE -------------0
PATH ------------------0
SPACE -----------------0
USERCATALOG -----------0
TAPELIBRARY -----------0
Thanks for the response |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1049 Location: Richmond, Virginia
|
|
|
|
You see
Code: |
ASSOCIATIONS
NONVSAM--xxx.xxx.xxxxx.G0001V00
NONVSAM--xxx.xxx.xxxxx..G0002V00
|
in the report.
Use the program of your choice to see if one or more of these lines are present. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
if there are files 'associated' with the GDG,
then:
Code: |
ASSOCIATIONS
NONVSAM--xxx.xxx.xxxxx.G0001V00
NONVSAM--xxx.xxx.xxxxx..G0002V00 |
will appear.
create a base, but no 'associated' files
and compare the listcats.
you will then know what to look for in a listcat to see if there are any files.
the output of a listcat for a gdg could be the input to a sort
that looks for the "no dataset condition" and sets a return code, accordingly,
and have the dependent scheduled job either submitted or not by the scheduler. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
One easy way to resolve this is to create a new +1 generation that is empty, with an end-of-file mark. Then, if this the only generation cataloged, there will be no problem.
Many places i've supported have situations where there may be dozens/hundreds of "input" files and rarely there are none. This approach works well for them. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Dick,
exactly what I have used in the past and was about to suggest |
|
Back to top |
|
|
cvishu
Active User
Joined: 31 Jul 2007 Posts: 136 Location: india
|
|
|
|
Thnks for all the suggestions, as the gdg is owned by an upstream application , i dont think i would be able to drive them to implement the last two suggestions(which obviously seems to be the simplest) . I will go ahead with the liscat option for now . Thnks again all |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
There is nothing to stop you creating a +1 before your sort step - or even concatenating a non-gdg empty file to SORTIN. You can delete the +1 afterwards if you want. If 'they' object then raise a priority 1 change request on them as they are breaking your application. |
|
Back to top |
|
|
cvishu
Active User
Joined: 31 Jul 2007 Posts: 136 Location: india
|
|
|
|
lol @ Nic , it may sound a lot easier than it actually is . There is always a politics among different applications and you can always raise a Pri 1 to resolve it ;) |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Even if there is politics, there has to be coordination.
What the heck are you doing, anyway, if sometimes there is data, but sometimes they've removed everything? Don't you have to look at all the data that they produce? Or is it OK for you to go with random bits of data, like crumbs fallen from the table?
Do you have a "window" to run your stuff while there is no activity "upstream". If not, then you will be heading for confusion.
Your job checks. Finds associations. Kicks off the Sort job. Sort job fails as microseconds after you checked they deleted. Or vice versa. No associations found by your checker, but microseconds later...
Don't, please, go cataloging/deleting a +1 just to make your job "work". Even if you can do that, it will potentially leave a "hole" that will bug the upstream guys at some point.
There sounds like there is more to this than the "technicality" of getting your sort job to work. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
It is NOT lol, it is ds - deadly serious. You and your clients are being mucked about - and possibly charged - because something is not right. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
My suggestion is NOT to catalog a new +1 and then uncatalog it later. . .
When we've used the method i suggested, all of the cataloged generations (including the generation that is only an end-of-file) are deleted by the job that reads them. . . This way everything in the gdg is processed only one time.
What purpose does processing all generations serve if they are not then deleted? Sounds like a whole boatload of problems. Things run at different times will have different content. This could make your accounting people, inventory control people, shipping department people and the auditors (to name a few) somewhat crazy. . .
As we don't have much of an understanding about the entire process, it is difficult make suggestions. |
|
Back to top |
|
|
cvishu
Active User
Joined: 31 Jul 2007 Posts: 136 Location: india
|
|
|
|
ok , i am not exactly sure for the reason of deletion , but to my guess its like this.
For a give day the job runs thrice creating 3 generations ( runs at different times ). Some days there could be chances of some aben or for any other reason the jobs could be restarted resulting in addidtional generations.
Now there are different down streams, which need to process data from generations for that day alone , since they cant go by the generations ( -1, -2 ... because there could be addtional genrations) . They are clearing up the generations every day , so the downstreams could directly use the GDG base instead of giving the generation numbers.
Note : I never said this is the best practice, all i am saying is i cant go for a upstream change withough roughing up with other teams , which we are trying to avoid .
Thanks for all your valuable comments |
|
Back to top |
|
|
David Robinson
Active User
Joined: 21 Dec 2011 Posts: 199 Location: UK
|
|
|
|
You don't even need to read the output from the LISTCAT. If you append .* on to the end of your base GDG name, it will return a code 4 if there are no generations present, or 0 if there are. |
|
Back to top |
|
|
cvishu
Active User
Joined: 31 Jul 2007 Posts: 136 Location: india
|
|
|
|
David sorry , am not clear, you mean to say if i code a jcl with gdg name xxxx.* , and if no generation are avalable it will return a cc 4 ?
I am away from my mainframe desktop will give it a try and let you know. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
If you run the listcat as David suggest, you'll get a 0 RC if generations are present, a 4 rc if they are not. |
|
Back to top |
|
|
Pete Wilson
Active Member
Joined: 31 Dec 2009 Posts: 590 Location: London
|
|
|
|
Be aware that if you have multiple 'down-streams' trying to access the same GDG's they can get locked out by any process that is reading the whole base, or anything creating a new (+1) because the GDG base gets exclusively ENQ'd. So you have to be careful with your scheduling as well. |
|
Back to top |
|
|
|