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
 

 

Commit Frequency in a PL1 DB2 program

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
Ramya Sundar

New User


Joined: 02 May 2007
Posts: 3
Location: Bangalore

PostPosted: Thu May 03, 2007 11:26 am    Post subject: Commit Frequency in a PL1 DB2 program
Reply with quote

Hi,

Iam coding a PL1 DB2 program, where I need to give a commit frequency of 5. Iam using insert in 3 tables in the program. How do I specify this?
Back to top
View user's profile Send private message

dick scherrer

Site Director


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

PostPosted: Thu May 03, 2007 7:26 pm    Post subject:
Reply with quote

Hello,

Please clarify this
Quote:
commit frequency of 5


It is a term that i'm not familiar with.
Back to top
View user's profile Send private message
Ramya Sundar

New User


Joined: 02 May 2007
Posts: 3
Location: Bangalore

PostPosted: Fri May 04, 2007 11:08 am    Post subject: Re: Commit Frequency in a PL1 DB2 program
Reply with quote

Hi.

Commit frequency of 5 implies that I need to commit after 5 rows are inserted into the table. The program is a batch program with for example 100 records input at a time. How should I check that 5 inserts are completed and give commit. Is there any way to do this?
Hope now am clarifying your question.
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Fri May 04, 2007 12:49 pm    Post subject:
Reply with quote

Hello,

Usually, commits are issued at the end of a LUW (logical unit of work) rather than after n updates. This is to facilitate recovery/restart. Has your recovery/restart process been defined?

Keep in mind that any and all external updates (files, reports including counters in the reports, etc) must be syncronized.

To do what your request is, you need only to define a counter, add 1 to it as processing is done, and issue a commit when the counter reaches 5 and reset the counter after each commit. Easy to do, but may or may not be what you need n case of an abend.
Back to top
View user's profile Send private message
Ramya Sundar

New User


Joined: 02 May 2007
Posts: 3
Location: Bangalore

PostPosted: Fri May 04, 2007 1:51 pm    Post subject: Re: Commit Frequency in a PL1 DB2 program
Reply with quote

Thanks.....I will try this.
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Fri May 04, 2007 7:43 pm    Post subject:
Reply with quote

You're welcome icon_smile.gif

As an afterthought, why is a commit being scheduled for every 5 adds? Seems like that is very frequent icon_confused.gif
Back to top
View user's profile Send private message
ashwinreddy

Active User


Joined: 16 Sep 2004
Posts: 106
Location: Hyderabad

PostPosted: Fri May 04, 2007 8:47 pm    Post subject:
Reply with quote

Hi,

We used to use follwoing Procedure as

As we used to use a table which contains coulmns as Program name, Commit frequency, Commit length (not sure of name) and Program keys. As normally we used to have commit frequency as 500.

And we used to check two conditions as the number of rows inserted as 500 (if so increment the commit length). And used to move the key columns to the Program keys.

And when the program abends, update the corresponding key coulmns.

And your query should be modified as (i took three coulmns Name, Emp no and DOB as keys)

Name => :Host var1
and
Emp id => :Host var2
and
DOB => :Host var3.

And before openning the cursor, we used to check the check point table whether Program name and Program keys are not spaces.

If not spaces i will move the values from the Program keys to Var1, Var2 and Var3.


Hope this will help you. But sorry if you can't i think its not easy to explain it in mail.

Cheers
Ashwin
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 -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm
No new posts I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 13 Tue Dec 06, 2016 8:30 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts A sample of exit program for exit XMN... lind sh CICS 2 Mon Oct 03, 2016 5:07 pm


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