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

READNEXT error when use SYNCPOINT


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

New User


Joined: 29 Aug 2008
Posts: 18
Location: China

PostPosted: Thu Nov 12, 2009 3:09 pm
Reply with quote

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
View user's profile Send private message
Bill O'Boyle

CICS Moderator


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

PostPosted: Thu Nov 12, 2009 5:12 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Thu Nov 12, 2009 6:13 pm
Reply with quote

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
View user's profile Send private message
zos5415

New User


Joined: 29 Aug 2008
Posts: 18
Location: China

PostPosted: Fri Nov 13, 2009 6:52 am
Reply with quote

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
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 Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Error while running web tool kit REXX... CLIST & REXX 5
No new posts Getting Error while trying to establi... DB2 3
Search our Forums:

Back to Top