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 run the same job multiple times if a condition is met.

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

New User


Joined: 20 Sep 2007
Posts: 17
Location: cheenai

PostPosted: Sat Jun 18, 2011 12:30 pm    Post subject: To run the same job multiple times if a condition is met.
Reply with quote

We have a problem that I have explained below.

We have a job that reads records from the file and writes it to the MQ. Sometimes, the job fails because the MQ that it is writing to is full. If the job is restarted after some time, the job will run successfully because by that time the MQ woud have become available.

As the job frequently abends , we are looking for a permanent solution.

1. The program will set a particular return code when the MQ is full and end.
2. The subsequent step in the proc will check for this return code, it will create a new GDG version.
3. This new GDG version should trigger the same job again via CA7 and the triggered job should run after some time delay.

Is it achievable via CA7.Is there any other solution to the problem?

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

dbzTHEdinosauer

Global Moderator


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

PostPosted: Sat Jun 18, 2011 1:05 pm    Post subject:
Reply with quote

instead of trying to fix the symptom - job ending because mq full,
either
  1. cure the illness - insure the process that reads the queue is provided the resources to keep it empty
  2. insure the 'write' job does not simply end, but waits and retries until the queue has room and successfully PUTs to the queue


explanations for the above:


1. you do not want a queue to fill-up. using mqs to warehouse messages is not good. you can add another task to 'read' the queue.
you are using mqs because it facilitates the process of moving 'important information' from one place to another in a timely manner. Otherwise you would just send datafiles.

2. you can put a 'WAIT' on an mq GET, probably can put a 'WAIT' on an mq PUT. if not, use an assembler routine to 'WAIT' without using resources. makes no sense to stop a job that encounters something that 'time' will cure. If the queue is not there, that is one thing, but if it is full, it makes not sense to stop, create yet another file and start another task. That is too resource intensive. Plus, since you are working with GDG's, you are running the risk of losing a file due to jcl construct error.

Increase your resouces for 'draining' the queue.
Back to top
View user's profile Send private message
yogalakshmi

New User


Joined: 20 Sep 2007
Posts: 17
Location: cheenai

PostPosted: Sun Jun 19, 2011 7:19 pm    Post subject: Reply to: To run the same job multiple times if a condition
Reply with quote

Hi Dick,

There is a server program that reads the messages in the MQ parallely. The speed at which it reads the messages from the MQ is slower than the speed at which the messages are put to the MQ. We have checked with server side if they can run multiple instances that will read messages from the MQ.They said it is very difficult and it requires a huge design change. The reading application is powercentre component and the putting application is mainframe batch.So, we are left with fixing the problem.

Yes. We are thinking of introducing the WAIT. But we are not sure if it is acceptable as per our standards, and we are yet to check it with our Batch Service Team.

Meanwhile, we are thinking of some other solutions that are feasible.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Sun Jun 19, 2011 7:58 pm    Post subject:
Reply with quote

is this question the same as this thread? http://ibmmainframes.com/viewtopic.php?t=53926

sounds as if Powercenter is a piece of crap.

you never design a system where the receiver cannot drain the queue in an adequate timeframe.

just because the powercenter people are incompetent,
does not mean that the batch side has to make concessions.

why don't you do this:

when powercenter realizes that the que is empty, send a message to batch, which will trigger a job to start the puts.

but, if this question is the same as the other thread - where the online is also PUTting, you are going to reach a point where the batch will never run.

this reminds me of Mcmillan's Joke:
could not fix the breaks, so we made your horn louder.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Sun Jun 19, 2011 7:59 pm    Post subject:
Reply with quote

as an answer to your basic question:

can ca7 be set up to re-run all the time.

yeah, but, you are going to reach a point of saturation where the batch will never be able to run.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Mon Jun 20, 2011 3:29 am    Post subject:
Reply with quote

the WAIT option is not available for an MQPUT.

so, either CALL an assembler routine which CALLs BPX1SLP (sleep/WAIT macro),
or figure out a good restart strategy which adequately handles gdg's properly.

the problems to surmount with the later are insuring that you are accessing the appropriate generation.

the reason I continually reiterate the gdg problem is that potentially you could have more than one job that needs to be restarted due to the queue full problem.

i would not place the 'messages to be sent' into a gdg until the messages were sent. (second step in the MQPUT job to be executed upon successful completion of the MQPUT).

you could generate a multiple node dsn based on date and time,
that would be constant until the messages are written. then the date&time ds would be copied to a gdg and then deleted.

This method would make the restart process very easy and you would never have to worry that the proper generation is being referenced,
especially if you had, e.g. 3 files to transfer.
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 Changeman get multiple "Browse C... elixir1986 Compuware & Other Tools 4 Fri Jul 14, 2017 1:48 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Reduce CPU Times for Join Sort santoshn SYNCSORT 12 Sat Jun 10, 2017 1:40 pm
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm


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