View previous topic :: View next topic
|
Author |
Message |
zos5415
New User
Joined: 29 Aug 2008 Posts: 18 Location: China
|
|
|
|
HI,Guys,
i use the following logic to make TDQ ( trigger level is 1) to be triggerred when it come to threshold.
In Prog A:
it maybe have possible to write many time of TDQ in one loop .
Code: |
STARTBR FileA
Perform until eof-of-acct
READNEXT FileA
IF NOT-END-OF-ACCT
EXEC CICS WRITEQ TD(xxxx) END-EXEC
EXEC SYNCPOINT END-EXEC
END-IF
END-PERFORM
|
it work for the first records of the STARTBR, but when comes to next, error occurs:
RETURN CODE: 08 INVALID REQUEST FOR FILE
FUNCTION CODE: 060E READNEXT
If I comment the EXEC SYNCPOINT END-EXEC , the Prog can work fine except that the records in TDQ will be accumulated more than 1 . it will only trigger ONE times for the whole READNEXT.
so i want use SYNCPOINT to tell TDQ that one task is over.
unfortunately it seems STARTBR don't work.
Thank you for any suggestion. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
I fail to understand the need for the SYNCPOINT while you're browsing a file.
What could be happening is that CICS recognizes that the file is being browsed by the active task, which effectively, is accessing a Control Interval as well as LSR could be affecting this as well.
SYNCPOINT invokes DTB to create a LUW (Logical Unit of Work) and only needs to be issued if protected resources (IE: A File) had been updated.
However, SYNCPOINT issuance requires justification and necessity in order to make it a viable option in a given program/task. You could really get files out of synchronization if precautions aren't taken.
In other words, if protected resources are not being updated, then SYNCPOINT is not necessary.
Also, define your TDQ as Recoverable in case the task abends and set your Trigger Level to 0001. I'm assuming the TDQ definition specifies a Transid?
Bill |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
From the CICS Application Programming Guide (manuals link at the top of the page):
Quote: |
UOWs should be entirely logically independent, not merely with regard to protected resources, but also with regard to execution flow. Typically, an UOW comprises a complete conversational operation bounded by SEND and RECEIVE commands. A browse is another example of an UOW; an ENDBR command must therefore precede the syncpoint. |
|
|
Back to top |
|
|
zos5415
New User
Joined: 29 Aug 2008 Posts: 18 Location: China
|
|
|
|
Quote: |
If I comment the EXEC SYNCPOINT END-EXEC , the Prog can work fine except that the records in TDQ will be accumulated more than 1 . it will only trigger ONE times for the whole READNEXT.
|
If the syncpoint can't be used in the STARTBR, but in the loop the TDQ was written more than 1 times, but for the TDQ related TRansaction was only be triggered 1 times. I use Syncpoint just told the system that the task is over then TDQ will be triggerred each task over.
But it failed, any advice for the purpose ? |
|
Back to top |
|
|
|