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

To restart a transaction at 2 AM every Day


IBM Mainframe Forums -> CICS
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
mukun264

New User


Joined: 01 Jan 2008
Posts: 32
Location: Bangalore

PostPosted: Fri Jun 29, 2012 1:58 pm
Reply with quote

How to restart the transaction at 2 AM every day or just after 2 AM?
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Fri Jun 29, 2012 2:09 pm
Reply with quote

Restart the transaction do you mean enable??
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Fri Jun 29, 2012 2:20 pm
Reply with quote

The Friendly Manual would suggest :

EXEC CICS START TRANSID('xxxx') AT HOURS(02) MINUTES (0)

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

New User


Joined: 01 Jan 2008
Posts: 32
Location: Bangalore

PostPosted: Fri Jun 29, 2012 2:23 pm
Reply with quote

I mean suppose:

Today transaction executed at 020000( 02 AM) so after successful execution the transaction should schedule for tomorrow to execute at 02 AM and so on

Hope I explained
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Fri Jun 29, 2012 2:34 pm
Reply with quote

Have a job which executes the command suggested by Garry schedule it
Back to top
View user's profile Send private message
mukun264

New User


Joined: 01 Jan 2008
Posts: 32
Location: Bangalore

PostPosted: Fri Jun 29, 2012 2:40 pm
Reply with quote

I have gone through the manual. there is an drawback of the command.

Suppose the transition execute successfully at 02 and again schedule 02 then cics will execute immediately. i have tested also. the transaction is getting triggered at continuously after 02 AM.


I use below code before end of the transaction XXXX

START TRANSID(XXXX) AT HOURS(02) REQID(‘XXXXID’)



But xxxx is getting triggered every time after 02 AM
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Fri Jun 29, 2012 3:09 pm
Reply with quote

As Pandora-box suggested - have a job submit the command. Have your scheduling software submit the job at 2am.
Back to top
View user's profile Send private message
mukun264

New User


Joined: 01 Jan 2008
Posts: 32
Location: Bangalore

PostPosted: Fri Jun 29, 2012 3:12 pm
Reply with quote

Transaction is getting scheduled in online in same program.
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Fri Jun 29, 2012 3:45 pm
Reply with quote

You could modify the transaction so that, at the end, it issues a (short) EXEC CICS DELAY before issuing the EXEC CICS START ....

Garry.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Jun 29, 2012 4:57 pm
Reply with quote

Why not use
Code:
EXEC CICS START TRANSID(xxxx) INTERVAL(240000)
in your program code? You could create a separate program to add to the PLT to start your transaction at 2 AM for the first execution.
Back to top
View user's profile Send private message
mukun264

New User


Joined: 01 Jan 2008
Posts: 32
Location: Bangalore

PostPosted: Fri Jun 29, 2012 8:52 pm
Reply with quote

in ideal scenario this will work to trigger the transaction at interval of 24 hours ( i mean 2 AM), but assume the transaction failed at 2 AM and after correction the issue its triggered at 3 AM then onward transaction will be triggered every time at 3 am.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Fri Jun 29, 2012 8:55 pm
Reply with quote

Why not disable the transaction after run?
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Fri Jun 29, 2012 8:55 pm
Reply with quote

So extract the command to start it from the online and stick it into a batch job. You have a problem - you need a fix - a proper fix, not a band-aid. It may be a little bit of extra work but it fixes it properly.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Fri Jun 29, 2012 9:01 pm
Reply with quote

What you can do is have an EXCI intetface calls the transaction and have a RC set for the transaction and return it back to EXCI intetface

so based on Rc from transaction set the return code for the step and disable the transaction

Experts would have better solution
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Fri Jun 29, 2012 9:04 pm
Reply with quote

The Batch part of product CAFC can issue START's of transactions in targeted regions or write an EXCI client program which issues a DPL to a target server program in a given region, which issues a START of the transaction.

There are many ways to do this, as others have suggested, but it might be more controllable via Batch.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Jun 29, 2012 9:26 pm
Reply with quote

It sounds like you're trying to do system design on the fly, which rarely has good results. If the timing is that critical, you either need to have a job submitted by your job scheduler at the correct time each day to implement the CICS transaction (which can be done via JCL command, or FEPI, or by vendor product, or possibly even directly by your scheduler), or you need to handle it within CICS -- for example, write a record to a VSAM file that contains the time stamp the tranaction last ran; you can then use that value to verify the timing and even allow for restarts when necessary.

Shooting down the suggestions people on this forum make because you keep adding "requirements" not stated in your initial post, however, is NOT the way to design the system.
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: Fri Jun 29, 2012 10:06 pm
Reply with quote

Hello,

Is there any Business reason this needs to be run in CICS at 2am every day? Please do NOT say "this is the requirement". It is NOT the requirement. The requirement is to get this process accomplished once a day at 2am (whatever this process does).

If we knew why someone believes this is a proper implementation, we might be able to offer different suggestions.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Fri Jun 29, 2012 10:06 pm
Reply with quote

i read back thru this thread (again!)
and a point comes to mind
that I not so politically correctly stated in another thread.

what event occurs at 0200 every night that this CICS transaction satisfies?

you have available about a billion or so years of computer experience,
so one (or many) may have already
bruised their knuckles on stone wheels
while trying to solve this exact same problem.

so, were we to be privy to the reason you need a cics task started every night a 0200 hrs,
there may float to the surface a solution that has been tried before and works.
an by works,
i mean a procedure that underwent the tests of time,
and the little patches here and there were jammed-in
and it doesn't cause any more problems.

but,
that is just me.
Back to top
View user's profile Send private message
DEEPA MANI

New User


Joined: 21 Oct 2022
Posts: 2
Location: India

PostPosted: Fri Oct 21, 2022 2:24 pm
Reply with quote

@Muhun

I have similar requirement to start transaction every at same time. When I give hour as 01, it starts the transaction at 1 and running continous without stopping.

Is there any solution for this

Have you got any solution for your cics transaction
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Fri Oct 21, 2022 2:42 pm
Reply with quote

Don't tag on to 10year old posts - start a new thread and outline your issue clearly.

Garry.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts How to identify the transaction categ... IMS DB/DC 3
No new posts Start CICS transaction every day at 2AM CICS 4
No new posts TWA size of the CPLT transaction CICS 0
No new posts Invoke IMS transaction from .NET IMS DB/DC 1
No new posts COOLGEN - DB2. -927 error while initi... DB2 8
Search our Forums:

Back to Top