1. If my rpg program has a date field, What extra care I
have to take while compiling that RPG program?
2. If the file is keyed and I have declared the file as well
as Key list properly in my program. Still am getting an
error message like "Chain/reade operation is not allowed"
What may be the case?

Answers were Sorted based on User's Feedback



1. If my rpg program has a date field, What extra care I have to take while compiling that RPG prog..

Answer / praveen ravuri

we have mention to the 'k' field in the f spec

Is This Answer Correct ?    10 Yes 1 No

1. If my rpg program has a date field, What extra care I have to take while compiling that RPG prog..

Answer / murali

Compile the pgm with CVTOPT *DATETIME. This will allow dates lesser than 01/01/1940.
Record address type shud be K to tell the compiler to access the file in keyed sequence.

Is This Answer Correct ?    2 Yes 0 No

1. If my rpg program has a date field, What extra care I have to take while compiling that RPG prog..

Answer / arvind

format of variable, length of variable should be date and sep(-/).should be define

extra key "A"

Is This Answer Correct ?    1 Yes 0 No

1. If my rpg program has a date field, What extra care I have to take while compiling that RPG prog..

Answer / venki

2A:May be you have define you file as output mode

Is This Answer Correct ?    1 Yes 0 No

1. If my rpg program has a date field, What extra care I have to take while compiling that RPG prog..

Answer / shishir

in f specification may b you forget to define "record address type" = 'k' bcoz in chain searching of data can only b possible through key field ( key is madatory in chain operation )

Is This Answer Correct ?    2 Yes 1 No

1. If my rpg program has a date field, What extra care I have to take while compiling that RPG prog..

Answer / vivek

Program actually works when we not use K IN F SPEC. have tested then posted

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More RPG400 Interview Questions

how can I tell when to replace the array?

0 Answers   IBM,


Suppose i am having 3 programs PgmA,pgmB,pgmC and using source debugger. At debugging time i found that pgmC having some code error..then in debug mode directly how can i debug pgmC

2 Answers  


1)how to do date validation in rpg? 2)how to delete dUPLICATE RECORDS?

12 Answers   IBM, Opus,


Hi guys. Im in AS/400(RPGLE,CLP) from last 1 year.Now i wan to upgrade my Knowledge in AS/400. Suggest me some new fields & courses which falls under AS/400. Waiting for your quick Response.

1 Answers   Voltech,


explain sflclr, sflend, sfldlt, and sflcsrrrn?

0 Answers   IBM,


I want to declare the number of elements of an array dynamically in RPGLE ? Is it possible? If yes, then how do I do it ?

2 Answers  


How to update only a field of a PF in an RPG program. I don't want to update the record, only one field.

2 Answers  


A particular job executing on the iS is not behaving as expected and is operating in an environment in which it can be debugged. What commands would you use to debug and observe the program?

2 Answers   IBM,


what is ment by "MDT"

2 Answers   TCS,


what is the difference between the procedure and module in ILERPG?

4 Answers  


What will happen if we r using seton lr after return or vice versa.

5 Answers  


What is journalling and commitment control?

3 Answers   IBM,


Categories