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
 

 

CICS transaction - Query

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
shanudarling
Warnings : 1

New User


Joined: 20 Dec 2006
Posts: 55
Location: noida

PostPosted: Fri Apr 06, 2012 9:56 am    Post subject: CICS transaction - Query
Reply with quote

I have a write a new cics program which will conduct inquiries for bulk customers (around 30-40000 records). For each customer 3 inquiries will be conducted which will also use 3rd party (this means that around 100000 inquiries will be conducted for each run of the program).

I have 2 options for writing the program -
option1 - there will be 1 single transaction which will process all the records

option2 - one transaction will process record for 1 customer and then it will trigger another transaction to process the 2nd customer record, the transaction for the 1st customer will end. This process will continue till all the records are processed.

My question is which approach should be used.

My client has specifically asked me to make sure that this particular transaction should not use all the cics resources and this transaction should not impact functioning of other transactions. It should be efficient.
Back to top
View user's profile Send private message

Binop B

Active User


Joined: 18 Jun 2009
Posts: 407
Location: Nashville, TN

PostPosted: Fri Apr 06, 2012 12:26 pm    Post subject:
Reply with quote

Hi Shanu,

From my personal view, Option 2 is certainly better especially with the huge amount of I/O that is to be expected. The part you need to be careful about is to not initiate too many transactions. Have a CWA field counter or something like that to control to the active transactions.

Use CWA fields to intially run only 5 customer process at a time... Increase it gradually to a point where you feel the performace is good and not taking up a huge amount of the CICS resources.
Back to top
View user's profile Send private message
Peter cobolskolan

Active User


Joined: 06 Feb 2012
Posts: 104
Location: Sweden

PostPosted: Fri Apr 06, 2012 12:35 pm    Post subject: Reply to: CICS transaction - Query
Reply with quote

Starting many transactions/tasks requires of course mor resources than starting a single one.
My opinion is that you should not produce more output than can be presented on one (1) screen at a time. If the result you produce will need many screens in total, produce the first screen an show it (SEND MAP) and return (RETURN TRANSID()) COMMAREA(). Save enough information in your Commarea so the next task can start where the other ended. If the user requires another screen of information, just produce it and return (RETURN TRANSID()) COMMAREA() again. Every produced screen could be saved (e.g.TS), so you dont have to produce it again if the user wants to browse back.
Eventually the user quits after a couple of screens, and doesnt need all other, not yes produced, screens. This approach saves resources.
If you need to produce all screens/information always, just do it in one task, as there is no locking as long as you just read from your files/tables, and no need to split it into many tasks.
For every read you make from a file, CICS can dispatch other tasks while the I/O is performed, doesnt matter if there are a few or many Reads.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


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

PostPosted: Fri Apr 06, 2012 7:21 pm    Post subject: Reply to: CICS transaction - Query
Reply with quote

Any program in the mix that addresses the target CWA field, must use ENQ/DEQ API's, using the same internally-defined RESOURCE name, in order to make the access serial and retain data integrity.

If in the future you migrate to Threadsafe, this would be mandatory, as you would now introduce multiple TCB's (not just a single QR), running concurrent tasks.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Fri Apr 06, 2012 8:39 pm    Post subject:
Reply with quote

have you modeled the process
so that you can at least guess at the probable length of this process?

what feedback are you expected to provide the user?

why can't this be a batch process?
then leave just 3 screens in cics:
  • 1-bulk customer request input
  • 2-bulk customer request status
  • 3-bulk customer request detail


as the batch process finishes, it updates a db2 table, a CICS QUEUE.
items 2 and 3 would access the request status
and either display the stautus (2)
or display the detail (3)

that way few cics resources.

don't tell me, this idiot 3rd party tool is only accessable in CICS.
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 -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts Asynchronous CICS Processing Question moezbud CICS 0 Mon Mar 06, 2017 6:13 pm
No new posts CICS Question RE: Browse, Readnext an... moezbud CICS 7 Sun Mar 05, 2017 5:45 am
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm


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