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

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?

5 Answers   CitiGroup, Symphony,


How to read alternative records in a pf by using rpg?

8 Answers   IBM,


Why did we give STRSRVJOB while debugging batch program

3 Answers   HBL Power Systems,


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

2 Answers  


can we use cl programming to update or delete physical files

12 Answers  


we are sending data of physical file to screen design and it is showing no record why?

1 Answers   NTT Data,


Delete FileName at first statement in RPG.

1 Answers  


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

0 Answers   IBM,


I have a file .In that file i have 3 fields. Those fields are eno, ename, esal.Keyfield is eno. In that file i have data like this for eno 1,2,3,4,5. Now i need to display 2nd record. That means i need to set the pointer on 2nd record... Then, write the complete rpg program using setll.

1 Answers  


1.How you will find the program is batch or online in cl pgm? 2.How you will end the batch pgm when the job runs? write an logic? 3.In wich command the option *drop is used?

2 Answers   TCS,


3 members in a databasefile .how to read records from all the members?????????

4 Answers   CTS,


how to find whether a date format is valid or not in RPG400 not in RPGILE.Can you please write the coding for this sir,i'm new to AS400.Please help.

1 Answers  


Categories