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
 

 

GDG base as inout to sort step

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
cvishu

Active User


Joined: 31 Jul 2007
Posts: 136
Location: india

PostPosted: Mon Apr 30, 2012 4:53 pm    Post subject: GDG base as inout to sort step
Reply with quote

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
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Mon Apr 30, 2012 4:56 pm    Post subject: Reply to: GDG base as inout to sort step
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon Apr 30, 2012 5:55 pm    Post subject:
Reply with quote

LISTCAT on GDG Base, SORT-NULLOUT RC=0/4?
Back to top
View user's profile Send private message
cvishu

Active User


Joined: 31 Jul 2007
Posts: 136
Location: india

PostPosted: Mon Apr 30, 2012 6:12 pm    Post subject:
Reply with quote

@ bill, i just typed a info icon_smile.gif

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 icon_smile.gif
Back to top
View user's profile Send private message
Phrzby Phil

Active Member


Joined: 31 Oct 2006
Posts: 961
Location: Richmond, Virginia

PostPosted: Mon Apr 30, 2012 6:35 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Mon Apr 30, 2012 6:44 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Mon Apr 30, 2012 9:00 pm    Post subject:
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue May 01, 2012 12:07 pm    Post subject:
Reply with quote

Dick,

exactly what I have used in the past and was about to suggest
Back to top
View user's profile Send private message
cvishu

Active User


Joined: 31 Jul 2007
Posts: 136
Location: india

PostPosted: Wed May 02, 2012 2:36 pm    Post subject:
Reply with quote

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 icon_smile.gif
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1712
Location: UK

PostPosted: Wed May 02, 2012 2:44 pm    Post subject:
Reply with quote

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
View user's profile Send private message
cvishu

Active User


Joined: 31 Jul 2007
Posts: 136
Location: india

PostPosted: Wed May 02, 2012 3:02 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Wed May 02, 2012 3:18 pm    Post subject: Reply to: GDG base as inout to sort step
Reply with quote

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
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1712
Location: UK

PostPosted: Wed May 02, 2012 7:13 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Wed May 02, 2012 7:13 pm    Post subject:
Reply with quote

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
View user's profile Send private message
cvishu

Active User


Joined: 31 Jul 2007
Posts: 136
Location: india

PostPosted: Thu May 10, 2012 5:35 pm    Post subject:
Reply with quote

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
View user's profile Send private message
David Robinson

Active User


Joined: 21 Dec 2011
Posts: 175
Location: UK

PostPosted: Thu May 10, 2012 7:17 pm    Post subject:
Reply with quote

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
View user's profile Send private message
cvishu

Active User


Joined: 31 Jul 2007
Posts: 136
Location: india

PostPosted: Fri May 11, 2012 3:55 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Fri May 11, 2012 5:51 pm    Post subject: Reply to: GDG base as inout to sort step
Reply with quote

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
View user's profile Send private message
Pete Wilson

Active User


Joined: 31 Dec 2009
Posts: 437
Location: London

PostPosted: Tue May 15, 2012 8:41 pm    Post subject: Reply to: GDG base as inout to sort step
Reply with quote

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
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 Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm


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