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

1.String operatio such as moving the characters to the variables? 2.what are the building functions for check file longs? 3.which of the following methods will make externally describe file fields available to a program? A: A/copy statement that specifies the library file and member of the field reference file source code B: A data structure definition specification that names the file on the EXTNAME keyword C: A data structure definition specification that names the file on the IMPORT keyword? D: A Definition specification for each desired field with the REFFLD keyword

1 Answers   CSC, CTS,


wat is curser?? and its types???

4 Answers   HSBC,


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,


Thanks gagan for your answer,i'm new to as400,i don't know embedded sql in rpg.can you send me the coding for the below mentioned question in embedded sql rpg. how to retrieve particular field records from a physical file,say i have a physical file called 'employee' in it i have to retrieve the records of a field 'admin' present in pf 'employee' using rpg,but i should not use logical file or openquery file.

2 Answers   iGate,


1.I have a Physical file with 100 records, No duplicates exists, all are Unique,But while i am running Runqry utility i am getting only 80 records..What could be the reason?

3 Answers   Cap Gemini,






suppose one file is used by 100 user and file is locked by 100 user, what are the impact analysis?

1 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,


What are the necessary keywords required to code a message subfile?

3 Answers  


1.What is the Maximum field length we can declare in RLU?? 2. What is the difference if your designing RLU using DDS and using the option 19 for the RLU??

2 Answers  


Hi Viewers can any body explain me how to update and ahange the already existed data in physical file using subfile ? please explain me with the code if possible?

1 Answers  


A rpg or clp command to find if the file field is defined as a character or numeric field.

1 Answers   IBM,


If the last record of a file has been read, and the next operation on that file is a READ operation, what will be the values of the input fields for that file? A. They will be blank and/or zero. B. They will be null. C. They will equal the values of the first record in the file. D. They will equal the values of the last record read.

3 Answers  


Categories