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

When PGMA calls PGMB for the first time PGMB executes the *INZSR. PGMB uses the RETRN operation to return to PGMA. When PGMA call PGMB the second time is the *INZSR executed?

5 Answers   Mphasis,


Why did we give STRSRVJOB while debugging batch program

3 Answers   HBL Power Systems,


Hi friends, Can you give the solution for the below mention simple code.and explain.what is output D CHR1 S 4A INZ('PEN') D CHR2 S 10A INZ('MYGET') D CHR3 S 8A INZ('GOOD') D CHR4 S 22A INZ C MOVEL CHR1 CHR4 C MOVE CHR2 CHR4 C EVAL CHR4=CHR3 C MOVE CHR1 CHR4

4 Answers  


How can we find out whether the job is interactive or Batch through RPG program? 2) How can we find out through CL program?

6 Answers   CSC,


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  






How to declare the more than one file in cl/400.

13 Answers   IBM,


How can read PF in reverse order (end to start) in CL pgm..

8 Answers   TCS,


What are the necessary keywords required to code a message subfile?

3 Answers  


what is use of sflnxtchg and use of MDT(modify data tag).both r same r not and can we use these on dspf and subfile.

2 Answers  


How to define data area in RPG program? In which scenario multi occurrence DS is use in AS400?

0 Answers  


in which journalling which attributes are necessary

2 Answers   CTS,


What is the difference between RPG/400 and RPG4

1 Answers   HCL,


Categories