This is all I had time for today. Gotta go. Let me know how I did!
1. How do u know a record exists without doing read and chain?
SETLL and %FOUND
2. What will be ur approach in going either for OPNQRYF or Logical files. Which one to go for?
Depends. How many logicals are already over the file? How often with the job be run? Is this a one time or permanent job. And many others. It depends on your system and your rules.
3. How do u manage that the records doesn’t get locked by a CHAIN or READ operation?(This he asked indirectly by taking a subfile selection screen and another update screen)
Depends. You can define the F spec for input only. You can code the CHAIN or READ with the (N) extender. I didn’t understand your part in the ().
4. How do u call procedures in ILE?
CallP or simply reference the procedure name. So you could do some like:
DayOfWeek = GetWeekDay( *DATE );
Or
If GetWeekDay(*DATE) = 2;
5. What is the syntax of passing parameters to a procedure by value?
The syntax of the actual call or the prototype syntax? Or did you mean neither one?
6. Have u used binder language like coding export to procedures ?
Yes, see below:
STRPGMEXP PGMLVL( *CURRENT )
EXPORT SYMBOL( 'MSGBOX' )
EXPORT SYMBOL( 'ACTMETHOD' )
ENDPGMEXP
STRPGMEXP PGMLVL( *PRV )
EXPORT SYMBOL( 'MSGBOX' )
ENDPGMEXP
7. How do u code file field renames in ILE RPG?
Depends. You can use the I spec (old way). You can use the PREFIX keyword on the F spec.
8. In ProgramB there is a submitjob ,which is a call to program C.There is also a CALL to program D from B. How would u check the program C has been executed in D?
Depends. You could set up a data area or a data queue. You could pass messages. Just a couple of ways.
9. How do you find whether a record is locked or not.
Depends. In older RPG the *PSSR was used. In a newer program I would use a MONITOR block.
Difference between RPG/400 and RPG4
Is this a question or related to previous question?
10. Is there any thing advantage for date variables in RPG4?
Yes. There are all sorts of new BIFs that work with the date, time and timestamp type fields.
11. How do you find whether a job is a batch job or interactive?
RTVJOBA TYPE 0=Batch, 1=Interactive
12. What you have to do in the display file when you are using message subfile
Define the subfile and subfile control records? Not sure what you’re looking for here.
13. How to set on/off a group of indicators in a single statement.
Trick question, right? In the past this little trick was done with a MOVEA ‘00000’ *IN30. This is considered bad programming practice today.
14. How can you determine the number of characters in a variable?
%CHECKR(‘ ‘ : variable)
15. Let's consider a variable X of length 20. Move value 'ABC' to it. How to determine how many characters does X have?
With both 14 and 15 I can’t tell if you are looking for the length of the DATA in the variable or the length of the variable itself.
%CHECKR = Length of data &LEN = Length of variable
16. Suppose you have 3 members in a database file.
17. How to read records from all the members without using CL (OVRDBF) ie it should be handled exclusively in an RPG program?
As far as I know, can’t be done. Unless of course you call a CLP from the RPG, but as far as this question goes, wouldn’t that be cheating? ;-)
18. How do you do indexing in a physical file?
I don’t understand the question. Do you mean adding key fields? Do you mean creating logicals?
19. PF contains 50 fiedls how can u update only 2 fields?
Depends [tried of “hearing” that yet?

] The old way would be to code the fields on O specs then do an EXCEPT. The new way is UPDATE RecordName %FIELDS( Field1 : Field2 )
20. Can indexed file be accessed in arrival sequence in RPG
By indexed I assume you mean a logical file? Sure, just don’t specify the K on the F spec.
21. when will DUMP & DEBUG be ignored
DEBUG(*NO)
22. what is the necc. command needed before OPNQRYF & why
OVRDBF SHARE(*YES) Because the OPNQRYF and the program to process the file must share an access path.
23. can u copy the records created by the OPNQRYF to other files & how
Sure. CPYFRMQRYF
24. diff, ways to pass data between pgms. which is the efficient way
Just three are 1) pass parms, 2) *LDA, 3). DATAARA. Most efficient? PARMs
35.What are the necessary keywords required to code a message subfile?
36. What is the purpose of FRCDTA keyword?
37. What is the purpose of PUTOVR keyword?
45. What is Group job?
51. How do you detect unused spool storage?
52. What are the functions of remote job entry?
53. What is journalling and commitment control?
54. What is the purpose of Panel Groups?
55. How can a screen field that has changed since the last output
operation be detected?
56. What would be the effect on the field where reverse image,
underline, and high intensity?
57. Can more than one subfile record be displayed on one line?