Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Commit Processing in IMS DB.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC
View previous topic :: :: View next topic  
Author Message
Karthigaiselvan

New User


Joined: 11 Dec 2006
Posts: 35
Location: India

PostPosted: Mon Nov 12, 2007 6:42 pm    Post subject: Commit Processing in IMS DB.
Reply with quote

Hi,

I've a CICS program accessing an IMS DB. We found in production that this program is getting the updates (made by itself) lost on some occassions. We tried to debug this issue in test region by simulating certain scenarios. Consider the 2 scenarios we simulated below.

1. We ran the program and trapped the code with break points in Trace master. We could see the updates (REPL call) are successful. we checked this by browsing the database. Later when TERM PSB call is executed, the status got lost from the DB. The time duration we had b/w the REPL & TERM calls is quite note-worthy when we debugged.

2. When we did not trap the code (not in debugging mode) and ran the program, the updates are correctly made.

Could a delay b/w REPL & TERM in a CICS program be causing the updates being lost? Any pointers?
Back to top
View user's profile Send private message

Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1105
Location: The Netherlands at Hole 19

PostPosted: Tue Nov 13, 2007 12:57 am    Post subject:
Reply with quote

Sorry, don't know about CICS but I will investigate. Get back to you later on.
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Tue Nov 13, 2007 3:51 am    Post subject:
Reply with quote

If you are seeing the IMS REPL actually replacing the segment, and you have a return status code of blanks, then the REPL worked.

I do think that your CICS command TERM is "backing out" the update. In other words, IMS thinks that you have abended and is recovering.
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1105
Location: The Netherlands at Hole 19

PostPosted: Tue Nov 13, 2007 4:00 am    Post subject:
Reply with quote

Quote:
TERM command
The Terminate (TERM) command is used to terminate a PSB in a CICSĀ® online program.

About the TERM command:

Format
Options
Usage
Example
Format
>>-EXEC--DLI--+-TERMINATE-+------------------------------------><
'-TERM------'

Options
No options are allowed with the TERM command.

Usage
If you want to use a PSB other than the one already scheduled, use the TERM command to release the PSB.

When you issue the TERM command, all database changes are committed and cannot be backed out. Because returning to CICS also terminates the PSB and commits changes, you need not use the TERM command unless you want to schedule another PSB, or commit database changes before returning to CICS.

No options are allowed with the TERM command. If your program subsequently needs a PSB that has terminated, it must reschedule that PSB by issuing another SCHD command.

In most applications, you do not need to use the TERM command.

Example
EXEC DLI TERMExplanation
This example shows how to terminate a PSB with the TERM command.

This topic can be found in: IMS Application Programming API Reference (8 MB)


Back to top
View user's profile Send private message
Karthigaiselvan

New User


Joined: 11 Dec 2006
Posts: 35
Location: India

PostPosted: Tue Nov 13, 2007 12:41 pm    Post subject: Reply to: Commit Processing in IMS DB.
Reply with quote

Quote:
I do think that your CICS command TERM is "backing out" the update. In other words, IMS thinks that you have abended and is recovering.


When i did TERM PSB immediately after REPL call, the updates are correctly committed and not lost. But when we do the TERM PSB a bit delayed, the updates are lost.
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Tue Nov 13, 2007 5:19 pm    Post subject:
Reply with quote

Why are you terminating the PSB?
Back to top
View user's profile Send private message
Karthigaiselvan

New User


Joined: 11 Dec 2006
Posts: 35
Location: India

PostPosted: Tue Nov 13, 2007 6:30 pm    Post subject: Reply to: Commit Processing in IMS DB.
Reply with quote

Sandy,

I'm TERMinating the PSB to commit the updates made in REPL call. I did this TERM immedialtely after REPL call to figure out if this is a timing issue.
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Tue Nov 13, 2007 7:06 pm    Post subject:
Reply with quote

Hmmmmm....I do not believe that you need to do that. Try taking out the last TERM and see what happens.
Back to top
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Tue Nov 13, 2007 8:33 pm    Post subject:
Reply with quote

In CICS IMS DB program if we need to commit the changes before CICS syncpoint then we need to issue TERM call.
Back to top
View user's profile Send private message
Karthigaiselvan

New User


Joined: 11 Dec 2006
Posts: 35
Location: India

PostPosted: Wed Nov 28, 2007 6:43 pm    Post subject: Reply to: Commit Processing in IMS DB.
Reply with quote

Based on our research, we almost found that the updates are lost because of parallel processing by another program on the same record. That is, after program A issued REPL on the record, another program
(say B) STARTed from A does a GHU (before A issues TERM PSB to commit) and this GHU gets the old value for pgm B. We dont know why this is happening, since our DB is a DLI DB and successive GHU after REPL is expected to return the new data.

Any inputs why this is happening. Please let me know if additional details are needed.
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1105
Location: The Netherlands at Hole 19

PostPosted: Thu Nov 29, 2007 3:37 am    Post subject:
Reply with quote

Did you try the command code 'Q'?

Quote:
Q Reserve a segment so that other programs will not be able to update it until you have finished processing and updating it.
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 -> IMS DB/DC All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts processing a XML file in PL/1 grvtomar PL/I & Assembler 2 Fri Jun 09, 2017 1:07 pm
No new posts File processing vishwakotin Mainframe Interview Questions 14 Fri Apr 28, 2017 11:38 am
No new posts Asynchronous CICS Processing Question moezbud CICS 1 Mon Mar 06, 2017 6:13 pm
No new posts Run stats processing on zIIP Engine Virendra Shambharkar DB2 9 Fri Oct 14, 2016 10:24 am
No new posts DB2 Streaming Batch Processing Problem Manshadi DB2 4 Sat Sep 24, 2016 12:14 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us