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

HI,1: What is the function of 'SETON LR' AND '*INLR=*ON ? 2:Can we used "seton lr" OR "*INLR = *ON" in between the program code ? 3:if yes then according to there function the code which is written acter seton lr/ *inlr should not be execute . Can any one tell me why those code get executed ?

2 Answers  


Difference between RESET and CLEAR

1 Answers   TCS,


Is it possible to call a subfile using CL. IF yes.. kindly help me out with explanation...?

3 Answers  


can we use cl programming to update or delete physical files

12 Answers  


is this a rpg channel?

0 Answers   IBM,






how do I preserve and clean the array?

0 Answers   IBM,


WHAT IS MONMSG IDENTIFIER FOR STRTCPFTP command IN cl (as/400)?

3 Answers  


we are sending data of physical file to screen design and it is showing no record why?

1 Answers   NTT Data,


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

2 Answers  


what are the array operations?

1 Answers   IBM,


1.What is the Maximum field length we can declare in RLU?? 2. What is the difference if your designing RLU using DDS and using the option 19 for the RLU??

2 Answers  


Hi all friend, Could Any body send me the code (with coding) of this senario because I have tried but I am stucking somewhere so Please reply ASAp with coding. senario:Q: I have to write the flat file(FLAT1) into the three different PFS (PF1,PF2 and PF3) with the respect of H line data, D line data and Z line data of flat file. where I have different data in flat file(FLAT1) which is mentioned below with data. H0929200909282009092820095529420003000073 D2222220006765555webservi001633.9909222009092820090924200951 8564380134049ROSNER TOYOTA OF FREDE FREDERICKSBURVA 224080000USA840840001633.99001633.99851856492689800208001915 511001633.990408490000000.0000000003446048 1,3 110793145 09070700351 372367 Rosner Motors D3333320006774444webservi000271.2409222009092820090924200951 8564380134049ROSNER TOYOTA OF FREDE FREDERICKSBURVA 224080000USA840840000271.24000271.24851856492689800208001835 511000271.240930680000000.0000000003450293 1 110793254 09072100079 373933 Rosner Motors Z0929200900000020001905.25 FLAT1 has the three pf data H line-represents the header pf data,D-Represent Details pf data,Z-Represents the trailer pf data Now I have to write H line data of flat file into Header pf (PF1),D line data of flat into datails pf(PF2) and Z line data of flat file into pf(PF3) with the spefic position(H,D and Z data of flat file into PF1, PF2 and PF3) of flat file.

4 Answers   IBM,


Categories