Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


Q.1 how to implement the commitment control.
2.how to control commitment control from external program.

Answers were Sorted based on User's Feedback



Q.1 how to implement the commitment control. 2.how to control commitment control from external prog..

Answer / manoj kumar

Above answer is correct but there is one step missing -
1. CRTJRNRCV
2. CRTJRN
3. STRJRN
4. STRCMTCTL (in CL program)
5. Declare file with keyword COMMIT and in program use
Commit and Rollback based on processing logic (i.e. after
successful execution use Commit and when invoked exception
handling then use rollback).
6.ENDCMTCTL

Cheers Again!!!

Is This Answer Correct ?    15 Yes 0 No

Q.1 how to implement the commitment control. 2.how to control commitment control from external prog..

Answer / amit

Above answers are correct but there are a couple of steps
missing -
1. CRTJRNRCV
2. CRTJRN
3. STRJRN
4. STRCMTCTL (in CL program)
5. Declare file with keyword COMMIT and in program use
Commit and Rollback based on processing logic (i.e. after
successful execution use Commit and when invoked exception
handling then use rollback). Cheers !

Is This Answer Correct ?    7 Yes 1 No

Q.1 how to implement the commitment control. 2.how to control commitment control from external prog..

Answer / janardhan

1. Create a Journal Receiver using command CRTJRNRCV to
attach to Journal.
2. Create a Journal using command CRTJRN
3. Start Journal using command STRJRN or STRJRNPF.
4. Use COMIT and ROLLBK opcode in RPG Program with any
inticator to On and OFF.

Is This Answer Correct ?    8 Yes 3 No

Q.1 how to implement the commitment control. 2.how to control commitment control from external prog..

Answer / sids

Above answer is correct but there is one step missing -
1. CRTJRNRCV
2. CRTJRN
3. STRJRN
4. STRCMTCTL (in CL program)
5. Declare file with keyword COMMIT and in program use
Commit and Rollback based on processing logic (i.e. after
successful execution use Commit and when invoked exception
handling then use rollback).
6.ENDCMTCTL

One more thing you if you guys using COBOL then u have to
define Commitment Control for the file in the environment
division in File Control.

Is This Answer Correct ?    4 Yes 0 No

Q.1 how to implement the commitment control. 2.how to control commitment control from external prog..

Answer / sreedhar

Hi Deepak,
Here second question is doubt.
Why do you want to control "commitment control" from external program.
What is the requirement?
As long as file is under "commitment control" you can commit or rollback those transaction any point of time. this may be inside the program or out side the program.

Is This Answer Correct ?    1 Yes 0 No

Q.1 how to implement the commitment control. 2.how to control commitment control from external prog..

Answer / syam

1. Create a Journal using command CRTJRN
2. Create a Journal Receiver using command CRTJRNRCV to
attach to Journal.
3. Start Journal using command STRJRN or STRJRNPF.
4. Use COMIT and ROLLBK opcode in RPG Program with any
inticator to On and OFF.

Is This Answer Correct ?    9 Yes 9 No

Q.1 how to implement the commitment control. 2.how to control commitment control from external prog..

Answer / binesh madhuripu

1. CRTJRNRCV
2. CRTJRN
3. STRJRN
4. STRCMTCTL
5. In Environment Division, declare file in
FILE-CONTROL then, mention Commitment Control
in I-O CONTROL.
Eg.

ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT UPDATE-FILE ASSIGN TO DATABASE-PFILE1
ORGANIZATION IS INDEXED
ACCESS MODE IS DYNAMIC
RECORD KEY IS REC-KEY
FILE STATUS IS FILE-STATUS.
I-O-CONTROL.
COMMITMENT CONTROL FOR UPDATE-FILE.
6. Declare file with keyword COMMIT and in program use
Commit and Rollback based on processing logic
(i.e. after successful execution use Commit and when
invoked exception handling then use rollback).
7. ENDCMTCTL

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More DB400 Interview Questions

How to find the list of source physical files in a library?

0 Answers  


1. How can I create a LF using crtlf command based on a particular member in a multimember PF? Where I have to specify the member name? 2. How to differentiate between the types of join from a Join logical file DDS. Is it possible to have different types of Join Logical files? 3.Any performance difference between Opnqrf and Embedded SQL? When I should prefer Opnqryf and when SQL? 4. I know access path is the path chosen by the program to retrieve data. It can be of keyed access path or arrival sequence. *IMMED- *IMMED description says access path is updated each time record is added or deleted from a member. - What is updating here? *REBLD - The access path is completely rebuilt each time a file member is opened. The access path is maintained until the member is closed, then the access path is deleted. - I am not able to understand this completely. Could anyone explain these more clearly? 5.What is the purpose of using activation group. I know it is a resource allocator, but other than this any other benefits of using an activation group?

2 Answers   IBM,


what is error handling concepts in cl

3 Answers   Active Brains,


How to update physical file using logical file with example?

0 Answers  


what is exception and how many types of exception

1 Answers   Active Brains,






Last statement of any RPG pgm is LR?

5 Answers  


what is multiple member pf

1 Answers   Active Brains,


How can we know that a trigger has been added on a PF? and what is the purpose of adding a trigger?

3 Answers  


How to insert more than one record to a pf at a time?(Bulk insert to a pf)

9 Answers  


How we can't update join logical files?

10 Answers  


I had created one physical file tell me command to enter data in to?

1 Answers  


how to see number of logical files depending on a pf?...can we declare more than 20 logical files from a single pf? is it possible

4 Answers   ocbc,


Categories