IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

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


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
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
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: 8797
Location: Welsh Wales

PostPosted: Mon Mar 26, 2007 1:51 pm
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
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: 8797
Location: Welsh Wales

PostPosted: Mon Mar 26, 2007 2:10 pm
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
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: 8797
Location: Welsh Wales

PostPosted: Mon Mar 26, 2007 2:47 pm
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
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: 8797
Location: Welsh Wales

PostPosted: Mon Mar 26, 2007 3:20 pm
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
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: 8797
Location: Welsh Wales

PostPosted: Mon Mar 26, 2007 4:10 pm
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
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
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: 8797
Location: Welsh Wales

PostPosted: Mon Mar 26, 2007 5:18 pm
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

Moderator Emeritus


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

PostPosted: Mon Mar 26, 2007 7:38 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts How to copy the -1 version of a membe... TSO/ISPF 4
No new posts Copying GDG version(all/few) from pro... CLIST & REXX 13
No new posts XMITIP Latest Version JCL & VSAM 2
No new posts How to determine TLS/SSL version in m... TSO/ISPF 2
Search our Forums:

Back to Top