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
 

 

How to trigger a job when a new version of a GDG created?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
Shobana

New User


Joined: 22 Mar 2005
Posts: 15
Location: Chennai

PostPosted: Mon Mar 26, 2007 11:28 am    Post subject: How to trigger a job when a new version of a GDG created?
Reply with quote

Hi,

I could able to trigger a job using ESP menu when a new flat file is created.

The event i used

EVENT ID(JS7462.TEST) SYSTEM(SLT1) REPLACE
SUBMIT 'JS7462.UTIL.JCL(KY028RUN)'
DSTRIG JS7462.SORDA.UMUS.MSTRFIL ANYCLOSE
ENDDEF

But I was not able to trigger for a new GDG version. I was not able to mention the GDG name instead of the flat file 'JS7462.SORDA.UMUS.MSTRFIL'.
Kindly help me out in this.

Regards,
Shobana
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: Mon Mar 26, 2007 1:51 pm    Post subject:
Reply with quote

Why not just append an IEFBR14 step to create a dummy flat file when the latest version of GDG is created in the job, and use the flat file as the trigger.

I'm pretty sure that most scheduling softwares are able to recognise a new GDG version. Have you tried with using the GDG base as the trigger.
Back to top
View user's profile Send private message
Shobana

New User


Joined: 22 Mar 2005
Posts: 15
Location: Chennai

PostPosted: Mon Mar 26, 2007 2:05 pm    Post subject: Re: How to trigger a job when a new version of a GDG created
Reply with quote

The file is being NDM from another region and created as a new version of the GDG. So the new version needs to trigger a set of jobs.

I tried giving the base version of the GDG instead of the flat file, but its not working. I also tried giving ( 1) along with the GDG but it says invalid dataset while defining the event.
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: Mon Mar 26, 2007 2:10 pm    Post subject:
Reply with quote

Why not receive the file as a standard file and use that as a trigger with the triggered job creating the +1 version GDG.

There you go, problem solved.
Back to top
View user's profile Send private message
Shobana

New User


Joined: 22 Mar 2005
Posts: 15
Location: Chennai

PostPosted: Mon Mar 26, 2007 2:16 pm    Post subject:
Reply with quote

Good idea!!!

But the GDG is being created by an external system, I dont think they'll accept this icon_sad.gif. Is there any other way to trigger the job while the new version created?
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: Mon Mar 26, 2007 2:47 pm    Post subject:
Reply with quote

Why would they not accept this ?

They are sending data to your system, and in doing so should adhere to the standards and practices that you want to implement. Not them.

It is a simple change that would take no more than a few seconds.

Which scheduling package are you using ?
Back to top
View user's profile Send private message
mallikannasagaram

New User


Joined: 21 Feb 2006
Posts: 9
Location: india

PostPosted: Mon Mar 26, 2007 2:49 pm    Post subject:
Reply with quote

Hi Shobana,

I suppose you will be deleting all the GDG versions after your processing. If that is the case then you can use the following procedure:

STEP1: Try to repro first record of the current version to a temporary file. REPRO will give you the return code of 4 if input file is empty.
STEP2: execute processing step only when LASTCC = 0
STEP3: Delete all the generations & Create new empty generation only when STEP2 executed successfully.


I suppose above process can fulfill your requirement without going for triggering jobs.


Regards
Mallik
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: Mon Mar 26, 2007 3:20 pm    Post subject:
Reply with quote

mallikannasagaram,

The whole idea of this post is to trigger further processing after an acknowledged event, i.e. the creation of a new dataset.

What you have suggested is a manual process not an automated one. The automated process is not dependant on any time constraints and will occur when the event is satisfied.

How will you know when the dataset has been created ???
Back to top
View user's profile Send private message
Shobana

New User


Joined: 22 Mar 2005
Posts: 15
Location: Chennai

PostPosted: Mon Mar 26, 2007 3:36 pm    Post subject: Re: How to trigger a job when a new version of a GDG created
Reply with quote

Yeah receiving the data as a flat file would solve this problem. As you said we can have a new step to create that +1 version of the GDG using that flat file and continue the process as such.

BTW we are using ESP (Enterprise System Platform) for scheduling.
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: Mon Mar 26, 2007 4:10 pm    Post subject:
Reply with quote

I don't know that product.

I'm pretty sure that the likes of CA7 & TWS ( was OPC) were able to recognise +1 GDG versions.

I also recall reading somewhere that using a GDG version for a job trigger was a bad idea.

If you can explain the problem and then get the sender to make a minimal change in the NDM cards to send it to a flat file you can then trigger quite hapilly.

Usually when you explain a technical problem that affects you, most people are happy to help resolve it if they can.
Back to top
View user's profile Send private message
Shobana

New User


Joined: 22 Mar 2005
Posts: 15
Location: Chennai

PostPosted: Mon Mar 26, 2007 4:57 pm    Post subject: Re: How to trigger a job when a new version of a GDG created
Reply with quote

Hi,

I could able to trigger set of jobs while a new version of a GDG is created icon_smile.gif.
Find below the event.

EVENT ID(JS7462.TEST) SYSTEM(SLT1) REPLACE
SUBMIT 'JS7462.UTIL.JCL($0604UL)'
SUBMIT 'JS7462.UTIL.JCL(KY028RUN)'
SUBMIT 'JS7462.UTIL.JCL(KAT400LD)'
SEND 'TESTING ESP' USER(PP1595)
DSTRIG 'PP1595.LIVEDEF.KY028.GDGFILE.G-' ANYCLOSE
ENDDEF

I need to run 3 jobs one by one, but according to the above event the 3 jobs are running simultaneously. Any idea how to check the return code of the previous job and submit the next one?
Back to top
View user's profile Send private message
Shobana

New User


Joined: 22 Mar 2005
Posts: 15
Location: Chennai

PostPosted: Mon Mar 26, 2007 4:59 pm    Post subject: Re: How to trigger a job when a new version of a GDG created
Reply with quote

Hi,

I could able to trigger set of jobs while a new version of a GDG is created icon_smile.gif.
Find below the event.

EVENT ID(JS7462.TEST) SYSTEM(SLT1) REPLACE
SUBMIT 'JS7462.UTIL.JCL($0604UL)'
SUBMIT 'JS7462.UTIL.JCL(KY028RUN)'
SUBMIT 'JS7462.UTIL.JCL(KAT400LD)'
SEND 'TESTING ESP' USER(PP1595)
DSTRIG 'PP1595.LIVEDEF.KY028.GDGFILE.G-' ANYCLOSE
ENDDEF

I need to run 3 jobs one by one, but according to the above event the 3 jobs are running simultaneously. Any idea how to check the return code of the previous job and submit the next one?
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: Mon Mar 26, 2007 5:18 pm    Post subject:
Reply with quote

You will need to get the job and event trigger set up correctly.

On event, the first job is triggered, on completeion of first job, second job is submitted, on completeion of second job, third job is submitted.

Of course, you could have all of the steps in one job which gets triggered on event.
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 Mar 26, 2007 7:38 pm    Post subject:
Reply with quote

Hello,

You could also have job1 submit job2, then job2 could submit3. This would be done indelendently of the schedule. Only job1 would be scheduled. You could also schedule job2 dependent on the successful completion of job1 and job3 on the successful completion of job2.

Unless there is some good reason not, i'd combine all 3 and have them run as a single scheduled job.
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 -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Application not run by time HH:MM tri... jzhardy IBM Tools 1 Sun Apr 09, 2017 3:22 pm
No new posts GDG version number PANDU1 JCL & VSAM 4 Sat Mar 04, 2017 8:28 pm
No new posts COBOL Version 6.1 Virendra Shambharkar COBOL Programming 15 Tue Nov 01, 2016 11:24 am
No new posts Is there a time Version of DATEDIFF ? Bill Woodger DFSORT/ICETOOL 1 Wed Aug 17, 2016 7:06 pm
No new posts Syncsort version supporting FINDREP c... juares castro SYNCSORT 9 Tue Aug 09, 2016 6:54 pm


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