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?

Answers were Sorted based on User's Feedback



WHERE DO WE USE COMIT KEYWORD IN AN RPG PROGRAM? YOU MADE SOME CHANGES TO DATABASE BUT YOU DON'..

Answer / shobhit

Commitment Control is a function that allows processing a
group of changes in the file as a single operation.

If you want all the changes in file use COMMIT keyword else
use ROLLBACK.

Define COMMIT keyword in continuation line of F Spec(IPFK
spec) and COMMIT opcode in C spec.

Is This Answer Correct ?    7 Yes 1 No

WHERE DO WE USE COMIT KEYWORD IN AN RPG PROGRAM? YOU MADE SOME CHANGES TO DATABASE BUT YOU DON'..

Answer / mansi walia

Scenario:

Suppose we have written a new record in a database file but
we want to check if the employee phone number has is not
entered then roll back the changes else comit.

Example:
Move SEmpName EmpName
Move SEmpAdd EmpAdd
Move SEmpPh EmpPh
Write EmpRec

If EmpPh <> *Zeros
COMIT
else
RollBack
EndIf

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More RPG400 Interview Questions

What will be the value of STRING after line 0106 is executed in the code below? 0101 E* Fromfiletofile..tabnameprnentlenpdatabnamlenpda 0102 E ARR 8 1 0103 ISTRING DS 0104 I 1 8 ARR 0105 C MOVE *BLANK STRING 0106 C MOVEA'ABC' ARR A) 'AAAAAAAA' B) 'BBBBBBBB' C) 'CCCCCCCC' D) 'ABC ' E) ' ABC'

2 Answers  


what do you mean by an input subfile, what are the keywords required?

0 Answers   IBM,


list down and describe the sub systems vailable

5 Answers   IBM,


Can we journel logical file and access path? Can we use commitment control for non-join L.F?

4 Answers  


Anybody know the difference of primary file and full procedural file

4 Answers  






Can anybody tell me, does CL/400 handle LEVEL check while running the CL program....? plz share your experience...

4 Answers  


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

11 Answers   CSC,


Difference between RESET and CLEAR

1 Answers   TCS,


Assume 2 users are using the same file and first user updates some record in the file. Will the 2nd user will be able to see the updated record or not?

0 Answers  


Why Rpg/400 is Famous?

2 Answers   IBM,


explain sflclr, sflend, sfldlt, and sflcsrrrn?

0 Answers   IBM,


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  


Categories