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

same TRANID initiated multiple times


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
lokesh ranjan

New User


Joined: 29 Jul 2005
Posts: 9
Location: Gurgaon

PostPosted: Tue Dec 01, 2009 1:44 pm
Reply with quote

Hi,

I have following scenario and I want to make sure that it will work efficiently:

It will initiate trn1 multiple times for each 150 accounts processed.
Will it be overhead on CICS and is it feasible scenario to execute same tranid for each 150 accounts which may cause same tranid to be running parallely if previous tranid is not complete.

loop-para.

logic for population of variables.

If ws-acct-counter = 150
exec cics start
tranid (trn1)
.......
NOCHECK
end-exec
move +1 to ws-acct-counter
go to loop-para
end-if

add +1 to ws-acct-counter
go to loop-para

loop-para-exit.
exit.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Tue Dec 01, 2009 2:02 pm
Reply with quote

duh,
will multiple concurrent transactions involve more cics resources
than 1 transaction?

what kind of answer are you looking for?

not only that, you for sure will have to contend with resource contention.

batch processing in an online environment idiots answer to everything.

what is the problem of just processing each account, one at a time,
if you are not going to do the processing in batch - where you should.
Back to top
View user's profile Send private message
lokesh ranjan

New User


Joined: 29 Jul 2005
Posts: 9
Location: Gurgaon

PostPosted: Tue Dec 01, 2009 2:19 pm
Reply with quote

Resource contention is not an issue because it will process next 150 accounts.

requirement is to update all impacted accounts in online to replace batch process.

It will have input of 150 accounts in next transaction(trn1) it will update records in different files one by one by random read update.

my concern is with initiating trasid in loop which may go parallel if previous 150 accounts are not processed before initiating next transid (trn1).
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Tue Dec 01, 2009 2:33 pm
Reply with quote

if your goal is just to have 1 active transaction,
then get rid of the START API call and just process the accounts.
Back to top
View user's profile Send private message
lokesh ranjan

New User


Joined: 29 Jul 2005
Posts: 9
Location: Gurgaon

PostPosted: Tue Dec 01, 2009 2:40 pm
Reply with quote

Thanks for your time.

but still I have following query:
will CICS be able to handle multiple active transaction (same tranid) without any overhead and how much can be the limit.

will each next tranid (trn1) be able to retrieve correct record for processing?

I need a rough idea.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Tue Dec 01, 2009 3:35 pm
Reply with quote

Quote:
will CICS be able to handle multiple active transaction (same tranid)

yes

Quote:
without any overhead

you are not serious are you. of course there will be the normal overhead of each task

Quote:
how much can be the limit.

not an authority here, but it would depends on your CICS system

Quote:
will each next tranid (trn1) be able to retrieve correct record for processing?


well, that depends on what data you supply the STARTed Trans.
Back to top
View user's profile Send private message
lokesh ranjan

New User


Joined: 29 Jul 2005
Posts: 9
Location: Gurgaon

PostPosted: Tue Dec 01, 2009 3:38 pm
Reply with quote

Thanks Dick for answering my doubts.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Tue Dec 01, 2009 4:38 pm
Reply with quote

Quote:
will CICS be able to handle multiple active transaction (same tranid)
You have got to be joking. When 100 (or 1000) people sign onto a CICS region and all of them enter the same tranid to start their work, do you think CICS is going to have a problem? This is what CICS is deigned to do!

I wonder if your design has been through review, though. How do you ensure each START picks up the right 150 in sequence? Why is the 150 limit there in the first place? If these transactions run unattached to a terminal, and use things like TS queues, have you thought through the requirements to ensure each has a unique name? If this runs attached to a terminal, how long will that terminal be out of service? What happens if CICS comes down after 75 of the 150 have been processed?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Tue Dec 01, 2009 4:49 pm
Reply with quote

as you have only provided your solution to a problem that we know nothing of,
it is hard to provide suggestions.

one thing: If you read something from somewhere and then do a START tran you lose all audit control - as Robert suggested.

look up ATI, which is (short form) a queue built of trigger records to indicate the account to be processed and you would have your trn1 program triggered by the queue item. That way if CICS goes down - or your program abends - the item would still be on the queue.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Tue Dec 01, 2009 5:11 pm
Reply with quote

from the CICS Application Programmer Guide 5.1.2 How tasks are started and
a direct reference to 6.5.4 Automatic transaction initiation (ATI)
Back to top
View user's profile Send private message
lokesh ranjan

New User


Joined: 29 Jul 2005
Posts: 9
Location: Gurgaon

PostPosted: Tue Dec 01, 2009 7:44 pm
Reply with quote

Hi Robort/Dick: The design is under process but similar design is already coded but I was not sure it will work or not.

Quote:
How do you ensure each START picks up the right 150 in sequence?


The same I wanted to confirm.....
even if it will not pick up same while Retrieving it will not create any issue for data update processing in my design because each record is unique.

I hope separate memory will be assigned for each task initiated and each task would retrieve data from that memory.
(I am not using and TSQ, TDQ to pass data. data will be passed through working storage variable)

Following command is there to initiate trn1:
EXEC CICS START
TRANSID ('TRN1')
FROM (WS-xxxx-RECORD)
LENGTH (LENGTH OF WS-xxxx-RECORD)
RTRANSID (EIBTRNID)
RTERMID (EIBTRMID)
NOCHECK
END-EXEC.

I was worried about loop part. suppose I get 15,000 records to be processed then loop will initiate 15000/150 = 100 transactions (trn1) within fraction of seconds and if each transaction will retrieve their own memory I don't think it will create any problem, apart from overload in CICS.

Note: I am thinking a single CICS application program without any task initiation may be a better solution.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Tue Dec 01, 2009 8:11 pm
Reply with quote

lokesh,

as I said before, you have a solution that you have decided on and only want us to say that it is ok.

well, I already said my piece - I would not do it your way.

by the way, a START Task is task initiation.
and 'apart from overload in CICS' is a problem.

using a queue would mean that the data is recoverable and you can
control it to have only 5 - 10 active tasks (transactions in your terms)
draining the queues.

apparently you have no audit oversight at your shop.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Tue Dec 01, 2009 8:46 pm
Reply with quote

Quote:
Note: I am thinking a single CICS application program without any task initiation may be a better solution.
Since a program requires a transaction, and a transaction must be initiated by a task at some point, good luck in achieving this.

You're basically taking a batch process and moving it to CICS (which is a transaction processor, not a batch processor). Anything you do will have potential problems in CICS since it is not designed for batch processing. There are ways to mitigate the impact but since you've decided upon your approach and want validation, not solutions, all we can do is tell you good luck. Your approach may or may not work depending upon your coding skills. It will certainly have an impact upon the other users of the region, and possibly upon all users of the LPAR you are running in -- again, depending upon your coding skills. This impact could be minor or it could make the LPAR unusable to all others -- only time will tell.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Wed Dec 02, 2009 4:05 am
Reply with quote

Hello,

Quote:
requirement is to update all impacted accounts in online to replace batch process.
What business requirement determined to move a standard batch process online? Online, kinda by definition, is meant for user interaction - not a batch process.

If the requirement in part is to de-stabliize the online environment, running lots of online batch will surely do it.

If this is already running in batch, why try to move it online?

Quote:
will CICS be able to handle multiple active transaction (same tranid) without any overhead and how much can be the limit.
CICS is designed to handle many, many concurrent online transactions. Online "Batch" nearly always negatively impacts the environment. It may also introduce data contention issues between this batch process and online processes. It will be interesting to see what happens when this approach causes data contention/integrity problems with the online.

Maybe there is a good reason why they run separately now. . .
Back to top
View user's profile Send private message
Earl Haigh

Active User


Joined: 25 Jul 2006
Posts: 475

PostPosted: Wed Dec 02, 2009 5:57 am
Reply with quote

Quote:
requirement is to update all impacted accounts in online to replace batch process.



you might want to consider a vendor software solution that can access
CICS from within your batch COBOL programs.


>>> Use [URL] BBCode for External Links
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 -> CICS

 


Similar Topics
Topic Forum Replies
No new posts combine multiple unique records into ... DFSORT/ICETOOL 2
No new posts Repeat n times by substuting SEQNUM i... DFSORT/ICETOOL 2
No new posts SORT JCL to merge multiple tow into s... DFSORT/ICETOOL 6
No new posts Using Multiple IFTHEN and WHEN condit... SYNCSORT 12
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
Search our Forums:

Back to Top