CICS Transaction at fix interval



Support for CICS/ESA, CICS/TS & Transaction Gateway, CICS Configuration Manager and CICS Performance Analyzer

CICS Transaction at fix interval

Postby sinmani » Mon Jun 04, 2012 3:36 pm

Suppose I have a process which write a VSAM file (KSDS).

Now I want that after say every 30 minutes another transaction should get initiated which uses this VSAM file as input and processes the records.

How many ways I there to achieve this??
===============
What I beleive is I can code a transaction like
START
EXEC CICS START
TRANSID (AAAAA)
TERMID (BBBBB)
FROM (CCCCC)
LENGTH (LENGTH OF CCCCC)
INTERVAL(003000)
RESP (WS-RESP)
END-EXEC.

Here Interval would be 30 minutes between this transaction is initiated. This could be one way. Any other??

================
Secondly when the next time the transaction pick up the VSAM file it will again process the records which it already processed during the first processing.
how can I ensure that the next time when the transaction gets initiated it should start processing only the new records which got added to the file in teh duration between 2 transactions??
-----------------------------------------
As long as you think you are a student, you are doing well.
The day you consider yourself as the master of the game..........well
sinmani
 
Posts: 93
Joined: Thu Mar 22, 2012 10:02 am
Has thanked: 14 times
Been thanked: 0 time

Re: CICS Transaction at fix interval

 

Re: CICS Transaction at fix interval

Postby Monitor » Mon Jun 04, 2012 7:43 pm

Exec CICS Start Transid() Interval() FROM(varname) - save some info in the varname and use the Exec CICS Retrieve Into(varname) to get the data in the started transaction. Issue the Retrieve again, to have CICS give you condition ENDDATA, otherwise the transaction will be restarted over and over.
If you had looked up the command in the manual, you would have found this!
Monitor
 
Posts: 98
Joined: Wed Jan 18, 2012 8:59 pm
Has thanked: 0 time
Been thanked: 7 times

Re: CICS Transaction at fix interval

Postby dick scherrer » Tue Jun 05, 2012 8:06 am

Hello,

You should be able to do what you want using the system scheduling software and have a batch job initiate the cics transaction periodically as is needed.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6308
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 90 times

Re: CICS Transaction at fix interval

Postby Monitor » Tue Jun 05, 2012 10:07 am

Dick, what do you mean with "keeping alive" ?
The start command is an simple way och scheduling new tasks in CICS and could be done without involving any scheduling software and the overhead of a batch job with EXCI-interface.
The Interval Control Element has to taken care of by CICS, but any scheduling, CICS or other software, needs a timer. The first occurance of the transaction could easily be started as a PLTPI-program, which makes the CICS solution independent of other software.
All to my opinion, but there are always a few alternatives!
Monitor
 
Posts: 98
Joined: Wed Jan 18, 2012 8:59 pm
Has thanked: 0 time
Been thanked: 7 times

Re: CICS Transaction at fix interval

Postby sinmani » Tue Jun 05, 2012 5:41 pm

Yes,

The DELAY , INTERVAL etc these commands have been specifically designed so save CICS resources.

They go in sleep mode and are triggered only at the specified time interval.
-----------------------------------------
As long as you think you are a student, you are doing well.
The day you consider yourself as the master of the game..........well
sinmani
 
Posts: 93
Joined: Thu Mar 22, 2012 10:02 am
Has thanked: 14 times
Been thanked: 0 time

Re: CICS Transaction at fix interval

Postby dick scherrer » Tue Jun 05, 2012 10:10 pm

Hello,

Someone more familiar with this than i am will reply (i'm sure).

They go in sleep mode and are triggered only at the specified time interval
.
I suspect that having a process "sleep" does tie up some resources. The scheduler is already running all of the time, so there would be nearly no additional "cost" to schedule this.
See next post - Looks like tying up resources does NOT happen - Thanks Robert!

I also suspect that nearly everything that runs regularly is controlled by the schedule. IMHO, it is better to manage all of this in one place.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6308
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 90 times

Re: CICS Transaction at fix interval

Postby Robert Sample » Tue Jun 05, 2012 10:43 pm

Interval started tasks don't "waste" resources -- CICS is able to handle starting a task at a particular time in the future without keeping anything active. However, i see a few issues: (1) are you planning doing interval starts throughout the day -- if so, what if a transaction dies before starting the next one? (2) How will your initial transaction be started (the usual method is to build a PLT entry for it)? (3) Your START uses a terminal id and most interval started tasks run unattached to a terminal (what happens if the terminal is in use when it is time for the transaction to start)? (4) Your post has 5 bytes for terminal id and 5 bytes for transaction id -- are you aware that neither value can have 5 bytes?

There are three common methods for handling your second question about the VSAM file records: (1) have a flag in the record to indicate your program has processed the record, and update that flag during your processing, (2) have the time stored in the record and each transaction outputs a record (to TSQ, to a VSAM record, or whatever) with the last time value processed, (3) if the VSAM file is KSDS, have the last record key processed saved (again, to TSQ or whatever) before the transaction ends. There are other ways, of course.
Robert Sample
Global moderator
 
Posts: 3121
Joined: Sat Dec 19, 2009 8:32 pm
Location: Bellevue, Iowa
Has thanked: 1 time
Been thanked: 182 times

Re: CICS Transaction at fix interval

Postby sinmani » Thu Jun 07, 2012 6:38 pm

Robert Sample wrote:(4) Your post has 5 bytes for terminal id and 5 bytes for transaction id -- are you aware that neither value can have 5 bytes?



Yes Robert , That sd have been 4 bytes. That was a typo.
Thanks for your response
-----------------------------------------
As long as you think you are a student, you are doing well.
The day you consider yourself as the master of the game..........well
sinmani
 
Posts: 93
Joined: Thu Mar 22, 2012 10:02 am
Has thanked: 14 times
Been thanked: 0 time


Return to CICS

 


  • Related topics
    Replies
    Views
    Last post