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

Is it possible to create a logical file whose Physical file is not in same library?

6 Answers  


What is the interactive job? What is the batch job? How to change the batch job to interactive job?

0 Answers  


what is error handling concepts in cl

3 Answers   Active Brains,


What is the use of member in pf?

0 Answers  


Hi, Please give the answer to this question? I have Phisical file with 100 records,there is no any duplicate records in this pf.Based on this pf one Logical file i have used.But this lf is viewing only 80 records only of that pf?What is the reason for this?Please give me answer?

4 Answers   IBM,






How can i retrieve city while my i have one field address length 60 but i don't know what where is city in this field ?

4 Answers  


how to update physical files using normal logical file

4 Answers  


Which keyword is used both in subfile and subfile control record format of a DSPF?

8 Answers  


In a CL Program after executing a SQL SP how to receive a Output value from the SP. Just to make it clear I am sending 2 input and 1 output parameter to the SQL Stored Procedure. Now while receiving it output parm it is failing.

0 Answers   Nous,


When we create a pf and did not fill up maint parameter, then by default which access path will the system take & why?

0 Answers  


How to add a field to a PF and compile it without loss of data?

7 Answers  


How to read a PF in reverse(from last rec to first) using CL?

3 Answers   HCL,


Categories