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

3. Given the DOS Specification below and the following information: • Indicator 50 is off • No records have been written to the subfile What will be the result if the EXFMT operation code is performed on the record format CTLR? A R SUBFL A DESCRIP 101 6 1ODSPATR(UL) A DFT(’NOT FOUND’) A R CTLR SFLCTL(SUBFL) A N50 SFLDSP A SFLDSPCTL A SFLINZ A 67 SFIJEND A SFLSIZ(13) A SFLPAG(12) A ACCOUNTNO 100 S 10 a.) Only AccountNo will display b.) SUBFL will be initialized with 13 blank records c.) An I/O exception error will occur d.) The screen will display 12 records with ‘NOT FOUND’

4 Answers   IBM,


How to set on/off a group of indicators in a single statement?

3 Answers  


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

5 Answers  


what is the difference between the cpyf command crtdupobj command?

9 Answers   IBM,


What are the commands that can be executed in CLP but not in RPG? Why?

1 Answers   CSC,






How to handle duplicate error handling in RPG?

0 Answers  


1.What is referential Integrity? 2.What is Foreign Key? 3.What is Transfer Control? 4.What is Free format?

3 Answers  


I know chain keyword retreive records randomly but how chain keyword exactly works internally????

4 Answers  


Mr.Yallamanda Reddy P thanks for your answer sir,can we use test(D) opcode in RPG/400,if yes please help me by eloborating on that answer by writing a sample code for that sir

2 Answers   iGate,


How do you know if a record exists without doing a READ and CHAIN?

6 Answers   IBM,


difference between CHAIN and READE?

8 Answers   HCL,


Can anybody tell me the setps to create .csv file in IFS folder on AS/400. I also need to know how I can send this .csv file to PC in xls sheet.....?

2 Answers  


Categories