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
 

 

To Check the previously ran GDG no.
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Saurabh Pune

New User


Joined: 26 May 2009
Posts: 23
Location: USA

PostPosted: Tue May 03, 2011 3:22 am    Post subject: To Check the previously ran GDG no.
Reply with quote

Hi,
I have a requirement in which I have to:
1.) Have a check where we have to check if a new GDG generation is created or not. If not we have to send a empty file.
If yes we have to carry on with the business processing.

Is there a way out for how to check whether a new GDG has been created since the last run ??

Thanks.
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Tue May 03, 2011 6:43 am    Post subject: Reply to: To Check the previously ran GDG no.
Reply with quote

Keep a logfile, and update it on the last run. For the current run, check against the logfile, and see if they match or not. Or, use it to see if there is more than one generation in between the runs.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1715
Location: UK

PostPosted: Tue May 03, 2011 10:59 am    Post subject:
Reply with quote

Or create an empty GDG dataset at start of cycle which will then be filled with data - if data exists for it. When the send job comes along it will find the GDG with or without data.
Back to top
View user's profile Send private message
Phrzby Phil

Active Member


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

PostPosted: Tue May 03, 2011 5:44 pm    Post subject:
Reply with quote

Run IDCAMS LISTCAT report to a file and analyze it programatically.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Tue May 03, 2011 6:22 pm    Post subject:
Reply with quote

Or maintain control flag... set the flag when gdg generation is created...

Before processing your business logic check for flag if set do business process and reset the flag....
Else send empty file....
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 03, 2011 6:31 pm    Post subject:
Reply with quote

Why not use a fixed file name and then check on the contents of a name that will not change.

If the file is populated then create the GDS from that file, else send that empty file.
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 645
Location: Pennsylvania

PostPosted: Tue May 03, 2011 8:41 pm    Post subject:
Reply with quote

I vote for expat's solution.

Very strait forward and easy to implement.
Back to top
View user's profile Send private message
Saurabh Pune

New User


Joined: 26 May 2009
Posts: 23
Location: USA

PostPosted: Wed May 04, 2011 12:03 am    Post subject:
Reply with quote

Hi,
Thanks All for the suggestions...
Expat : I see that could be a easier one...Could you explain a littele more to help me with the implementation part...
Back to top
View user's profile Send private message
Saurabh Pune

New User


Joined: 26 May 2009
Posts: 23
Location: USA

PostPosted: Wed May 04, 2011 4:23 am    Post subject:
Reply with quote

Hi Sambhaji,
Could you please explain, how can we implement this....

Thanks.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Wed May 04, 2011 4:37 am    Post subject: Reply to: To Check the previously ran GDG no.
Reply with quote

Saurabh, do you think that maybe you could explain the situation a little more clearly, what happens betwen runs that causes a problem? Why do you send an empty file and not the one with actual data in it?
Back to top
View user's profile Send private message
Saurabh Pune

New User


Joined: 26 May 2009
Posts: 23
Location: USA

PostPosted: Wed May 04, 2011 10:11 am    Post subject:
Reply with quote

Hi,
Sure I would like to explain more….

We have a job which runs daily, now there is something happening on our source system which causes the Input file to be irregular , i.e it won't come on daily basis and might come irregularly. So we plan to have a check on the GDG generation, i.e if a new GDG generation is created by the source, we would do the processing or else send an empty file.

I hope this clarifies.

Thanks.
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: Wed May 04, 2011 12:50 pm    Post subject:
Reply with quote

Has your shop not heard of dataset triggering, although a GDS is probably not the best type of dataset to use for this.

When a dataset is created, the scheduling software can submit a job for processing that dataset.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Wed May 04, 2011 2:30 pm    Post subject:
Reply with quote

I agree with Expat,
CA7(I strongly believe other schedulers also have this) tracks the creation of GDG generations once the GDG is defined on CA7. And CA7 can be made to trigger a job when a new GDG generation is created.

Code:
 LCTLG,DSN=ABCDE.SOME.GDG                                               
DSN=ABCDE.SOME.GDG                                 DATE 11.124    PAGE 0001
                                                                               
--------------- DATASET NAME ---------------     DSNBR    POSTTM  TYPE         
                    DATE    TIME      GDG#   #VOL    VOLSER    DEV-TYPE    SEQ 
                                                                               
ABCDE.SOME.GDG     ........................   DS00000016 JTERM   GDG           
                   11105    1148      2227    001    A67335    78048081    0001
                   11105    1141      2226    001    A64129    78048081    0001
                   11105    1129      2225    001    A63793    78048081    0001
                                                                               
SLID-00 REQUEST COMPLETED AT 03:52:38 ON 11.124 


The above snapshot of CA7 shows that ABCDE.SOME.GDG is defined on CA7 and CA7 tracks the generations ( here 2227 is the latest generation).

Hope it helps.
Back to top
View user's profile Send private message
kratos86

Active User


Joined: 17 Mar 2008
Posts: 148
Location: Anna NGR

PostPosted: Wed May 04, 2011 4:11 pm    Post subject:
Reply with quote

If you want it to be simple follow this procedure,


1. Delete all the GDG generations after the file is sent
2. Create an empty GDG generation.

Next day when the process starts
Even though the file is not received we have an empty GDG entry and would be sending the empty file. If the file is received we anyways send the latest generation.

This is always a safe handling. In case you have restriction to use only GDG files.
Back to top
View user's profile Send private message
Saurabh Pune

New User


Joined: 26 May 2009
Posts: 23
Location: USA

PostPosted: Wed May 04, 2011 10:32 pm    Post subject: Reply to: To Check the previously ran GDG no.
Reply with quote

Hi,
I do agree with EXPAT...
But not sure of whether the Schedular thing is applicable in our case as while scheduling a job I am not getting any such option in our interface.

kratos86: Nice Simple solution, Nice logic. BUT I really CANNOT Either Create or DELETE the Source GDG, So won't be able to implement that.

I would relly love to implement EXPAT's earlier solution

Quote:
Why not use a fixed file name and then check on the contents of a name that will not change.

If the file is populated then create the GDS from that file, else send that empty file.


If you could assist a lil more with the implementation part..

Thanks.
Back to top
View user's profile Send private message
kratos86

Active User


Joined: 17 Mar 2008
Posts: 148
Location: Anna NGR

PostPosted: Thu May 05, 2011 8:19 am    Post subject:
Reply with quote

Quote:
But not sure of whether the Schedular thing is applicable in our case as while scheduling a job I am not getting any such option in our interface.

Please note that, always do check with peers and try searching the forums before posting. This way issues will be resolved in a timely manner.
Quote:
really CANNOT Either Create or DELETE the Source GDG

I am not saying to delete the GDG but to delete its generations.
Back to top
View user's profile Send private message
Saurabh Pune

New User


Joined: 26 May 2009
Posts: 23
Location: USA

PostPosted: Thu May 05, 2011 8:25 am    Post subject:
Reply with quote

Hi kratos86 :

I did this
Quote:
Please note that, always do check with peers and try searching the forums before posting. This way issues will be resolved in a timely manner.


I meant the same
Quote:
I am not saying to delete the GDG but to delete its generations.
.. As this GDG is being used by other jobs as well ,So can't delete the generations...

Regret for the misunderstanding…

Would like to implement his with the JCL itself….
Back to top
View user's profile Send private message
kratos86

Active User


Joined: 17 Mar 2008
Posts: 148
Location: Anna NGR

PostPosted: Thu May 05, 2011 10:07 am    Post subject:
Reply with quote

Quote:
.. As this GDG is being used by other jobs as well ,So can't delete the generations...

If the generations are not deleted you would have issue by sending the duplicate information whenever the the new file did not arrive. So, I assume the GDS are getting deleted somewhere in the end of your batch run. May be someother job - Check whether it deletes all the generations.

Quote:
I would relly love to implement EXPAT's earlier solution

You told you cannot create/delete a GDG, But planning to implement expat solution which actually requires you to create a GDS. Be sure which are all the constraints you have and what all you don't have.

If you are able to create a GDS, then the job which clears the GDG can be used to create a empty entry.
Back to top
View user's profile Send private message
Saurabh Pune

New User


Joined: 26 May 2009
Posts: 23
Location: USA

PostPosted: Thu May 05, 2011 11:50 am    Post subject:
Reply with quote

Hi,

Quote:
If the generations are not deleted you would have issue by sending the duplicate information whenever the the new file did not arrive. So, I assume the GDS are getting deleted somewhere in the end of your batch run. May be someother job - Check whether it deletes all the generations.


Mine is a new job yet to be implemented, and the GDG's are certainly not being deleted in the other jobs also.

About EXPAT's Solution I didn't knew that…

Reiterating Would like to implement his with the JCL itself……

Let me know if you have any idea…
Thanks for your assistance..kratos86
Back to top
View user's profile Send private message
kratos86

Active User


Joined: 17 Mar 2008
Posts: 148
Location: Anna NGR

PostPosted: Thu May 05, 2011 12:03 pm    Post subject:
Reply with quote

Quote:
Mine is a new job yet to be implemented, and the GDG's are certainly not being deleted in the other jobs also.


This being the case, i would suggest to go with the CA7 Virtual dataset trigger option. This requires change in the CA7 of the job which actually sends the file and your job. You can check the CA7 reference manuals of your site. Or else wait for others to provide you a better solution.
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
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
No new posts Check System time(Minute) Using TIME1... balaji81_k DFSORT/ICETOOL 5 Fri Nov 11, 2016 10:53 am
No new posts Syntax to check the first 4 digits of... kshirabdhi DFSORT/ICETOOL 10 Tue May 03, 2016 12:21 pm
No new posts Check special resource availability w... pinimo JCL & VSAM 8 Fri Apr 15, 2016 8:18 pm
No new posts check nth row from a PS file bachi234 DFSORT/ICETOOL 2 Fri Feb 19, 2016 5:31 pm


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