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 to retrieve particular field records from a physical file,say i have a physical file called 'employee' in it i have to retrieve the records of a field 'admin' present in pf 'employee' using rpg,but i should not use logical file or openquery file.

3 Answers   iGate, Wipro,


I know whole thing ab't Arrays related to declaration..can anyone tell me what exactly use of array or anyone faced a situation where he found use of array must....

1 Answers  


I know chain keyword retreive records randomly but how chain keyword exactly works internally????

4 Answers  


Can we trigger an rpg program which has user interaction with display file when updating a file using the command ADDPFTRG?

2 Answers  


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

1 Answers  






I want to declare the number of elements of an array dynamically in RPGLE ? Is it possible? If yes, then how do I do it ?

2 Answers  


how to find whether a date format is valid or not in RPG400 not in RPGILE.Can you please write the coding for this sir,i'm new to AS400.Please help.

1 Answers  


Q1.How we can copy the data of file one session to another session? Q2.how we can execute a loop infinitely in AS/400 coding? Q3.In ALDON tool,multitask is posible on a perticular object by the user?

6 Answers   CSC,


Hi, Can any body tell me ur experience on this questions? Questions: 1.what is the use of SFLRCDNBR other than subfile page display? 2.Which of the following operation cannot be used in conjuction with a file coded as device type disk?

1 Answers  


Have a join logical file with more than one members with different record formats. So how can we read the different members from this file and also how we can read the different record format from the join logical?

3 Answers  


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  


explain sflclr, sflend, sfldlt, and sflcsrrrn?

0 Answers   IBM,


Categories