I am reading a file in CL program. and MONMSG CPF0864 has arrived means EOF has arrived. Now i want to read this file again. How i can do this?

Answers were Sorted based on User's Feedback



I am reading a file in CL program. and MONMSG CPF0864 has arrived means EOF has arrived. Now i want ..

Answer / alok.yee001

by using POSDBF command

Is This Answer Correct ?    4 Yes 2 No

I am reading a file in CL program. and MONMSG CPF0864 has arrived means EOF has arrived. Now i want ..

Answer / alok.yee001

Yes sarath you are right, but in that case we need two commands ovrdbf and dltovr, and if we are repeating this scenerio two or three time thenut will be complex to handle.

Youranswer is right too.

Is This Answer Correct ?    1 Yes 0 No

I am reading a file in CL program. and MONMSG CPF0864 has arrived means EOF has arrived. Now i want ..

Answer / sarath_kollam

You can also use OVRDBF with POSITON to *START . But you can only use this once inside , other wise ENDOVR and Override again.

Is This Answer Correct ?    1 Yes 1 No

I am reading a file in CL program. and MONMSG CPF0864 has arrived means EOF has arrived. Now i want ..

Answer / brian

Brian J

Is This Answer Correct ?    0 Yes 0 No

I am reading a file in CL program. and MONMSG CPF0864 has arrived means EOF has arrived. Now i want ..

Answer / shubhendu

We can define same file 2 times with different open id and then we will do RCVF with their open id and then we will read again same file after reading the 1st time with their open id

Ex. DCLF File(abc) OpnId(1)
DCLF File(abc) OpnId(2)
RCVF OpnId(1)
MonMsg msgid(cpf0864)

RCVF opnId(2)
MonMsg msgid(cpf0864)


Like this I think we can do

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More RPG400 Interview Questions

1.Suppose my file has 10 fields and I want to make the 2nd field Zeros in all records. And assume I have millions of records and I dont want to read each record and update the desired field with 0. Any other way to do this in one step operation? 2. Assume my file has 100 records and I want to see only first 10 records. Is this possible through LF? 3.I have 3 jobs A B and C. I want to submit B after successful completion of A and want to submit C after successful completion of B. Without using job scheduler or job queue, how can i do that through CL program? 4.What is difference between Bind by copy and bind by reference?

4 Answers   Virtusa,


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  


What is the diff bw PF/LF Name and their Record format name? what is restriction in record format then file name?

0 Answers   Wipro,


When a object will be locked & when a record will be locked? Plz explain.

2 Answers  


How to find d key field of a pf that doesn’t have source physical file?

2 Answers  






what is data area and how it is used in rpg program ?

0 Answers   IBM,


what is ment by "MDT"

2 Answers   TCS,


what is the equivalent keyword for CHAIN opcode ??

7 Answers   TCS,


use of PUTOVR,OVRDTA,KEEP keywords?

2 Answers   HCL,


Write the subfile logic program for the given concept. Load the data to the subfile depends upon the designation where designation is not a key field?

2 Answers   TCS,


list down and describe the sub systems vailable

5 Answers   IBM,


When we have a file with Duplicate records and I want to read the unique record from the file. For example a file containing Emp Name as 'Ram' and there are 3 entries of it. So how to read a unique record from File?

0 Answers  


Categories