How Commitment and Roll back control is used in as400,
explain with real time senario ???

Answers were Sorted based on User's Feedback



How Commitment and Roll back control is used in as400, explain with real time senario ???..

Answer / avinash

suppose we have to update 1000 of recrds in my cobol db2
program and my program is running fine and it has updated
999 records but the job gets abended in this scenario my
work is not commited or completed so again i have to submit
a job and again it starts updating from record 1.

so to avoid such scenario commit and rollback is used.
so if we set commit point at every 200 records then it will
update the records in 200*5=1000
so if job abends on 999 records then it rooback to the
records from 800 to 1000.
so cpu time will be less.

Is This Answer Correct ?    11 Yes 0 No

How Commitment and Roll back control is used in as400, explain with real time senario ???..

Answer / garry

With commit/rollback we can ensure data consistency.

Consider a scearion where commit/rollback is not used.
Suppose your program writes/updates 10 files. In case the
program fails in between (say after updating 5 files),
there will be data in 5 files and corresponding data will
not be available in 5 files.

If we introduce commit/rollback in above program. In case
of program failure changes made to 5 files can be rolled
back so that we don't have inconsistency between files.

with Commit/rollback we can ensure either all files are
updated or not file is updated.

Is This Answer Correct ?    7 Yes 3 No

Post New Answer

More RPG400 Interview Questions

how can an indexed file be used as arrival sequence in RPG?

3 Answers   IBM,


1)how to do date validation in rpg? 2)how to delete dUPLICATE RECORDS?

12 Answers   IBM, Opus,


I have two sessions S1 & S2 under this 3 jobs(say j1,j2,j3 under session S1) And 2 jobs(Say j4, j5 Under session S2)is running. How many QTEMP & how many LDA will create for the same.

9 Answers   IBM,


How to set on/off a group of indicators in a single statement?

3 Answers  


1.Where we declare Variables in RPG/400,RPGIV,RPGILE.? 2.When do we use D-spec and I-spec in real time ?.what is difference between them?

1 Answers   HP,






I want to add 10 days in current date. how it is possible in CL program...?

11 Answers   CSC,


How to search particular records from the database file in rpg?

2 Answers  


can anybody help me that what is the procedure of debugging the service program?

3 Answers   CSC,


HOW TO DELETE THE RECORD FROM MASTER FILE WHICH IS LINK BY ANOTHER TRASATION FILE WITH REFERTIAL INTYGRITY?

1 Answers   TCS,


What is the Record Address file. How can we use it in RPG program?

4 Answers  


what is commitment control?explain about it?

1 Answers   HSBC,


1. What is bound-by-call and bound-by-reference? 2. Where and why is *Nomain used? 3. What are the difficulties faced by programmers when using service programs? 4. Explain the different ways of parsing and compiling XML in iSeries.

2 Answers  


Categories