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

parameters cannot be passed in which one??

2 Answers   CTS,


Im traying to get out put of this below mention simple logic code.But im geting out of different.(im trying with my laptop trhough my company server. DCL &FIELD1 *CHAR 10 VALUE('TCS AS/400') DCL &FIELD2 *CHAR 10 CHGVAR(%SST(&FIELD2 1 10))(%SST(&FIELD1 10 1) Can you tell me the value of field2 after excuted of CHGVAR command.

2 Answers  


what are the types of identifers

2 Answers   IBM,


How can we call CL program to RPG? How many number of parameter we can pass

2 Answers   TCS,


WHERE DO WE USE COMIT KEYWORD IN AN RPG PROGRAM? YOU MADE SOME CHANGES TO DATABASE BUT YOU DON'T WANT TO SAVE THOSE CHANGES NOW? HOW DO YOU HANDLE THIS ONE?

2 Answers  






I have to change a program. This program is calling a subroutine mor than 100times within it. so will it have any performance issue? if yes than what changes i can make. Thanx for ur valuable answer.

2 Answers  


am 2010 passed out . can any one tell me which course is good to put 2+fake .guide me

1 Answers  


what is ment by "MDT"

2 Answers   TCS,


How to call one program from another program in RPG? please help me with the code

0 Answers   HCL,


Can an indexed file be accessed in arrival sequence in RPG?

3 Answers  


Can any body give the code for this quesition? Using the following details write C-Spec code to set Name to"AMMU LABS SYSTEM" D NAME1 S 10 INZ('AMMU') D NAME2 S 10 INZ('LABS') D NAME3 S 10 INZ('SYSTEM') D NAME S 20

5 Answers  


ESCAPE message sent by child program can be handled by parent program using which keyword?

2 Answers  


Categories