1.If *HIVAL SETGT is used what opcode is used to read a
record?
A:READ
B:READPE
C:CHAIN
D:READP
2.How to pass numeric parameter to the rpg pgm from the
command line?
3.What keyword is used on the rpg 4 definition
specification to rename a subfile in an externally
definition data structure?

A:RENAME
B;LIKE
C:EXTNAME
D:EXTFLD

Answers were Sorted based on User's Feedback



1.If *HIVAL SETGT is used what opcode is used to read a record? A:READ B:READPE C:CHAI..

Answer / sanjeev

(1)readp
(2) we can pass paramaters through command line

If a numeric A has length 5 and its value is (8)then on
command line we have to type X'00008F'
(3)EXTNAME

Is This Answer Correct ?    13 Yes 0 No

1.If *HIVAL SETGT is used what opcode is used to read a record? A:READ B:READPE C:CHAI..

Answer / yash

1. ReadP
2. Its not advisable to pass numeric parameters from
command line to RPG program as numeric parameters from
command line goes in 15,5 packed format and generally the
data gets corrupted.
3. EXTNAME

Is This Answer Correct ?    6 Yes 0 No

1.If *HIVAL SETGT is used what opcode is used to read a record? A:READ B:READPE C:CHAI..

Answer / syam

A1. READP
A2. CALL PGM(KCS/MYPROGRAM) PARM(11111 22222)
A3. EXTNAME

Is This Answer Correct ?    5 Yes 5 No

1.If *HIVAL SETGT is used what opcode is used to read a record? A:READ B:READPE C:CHAI..

Answer / naga srinivas.kattula

1)We can use both READP and READPE ..bcz REAP is used to
read the records from bottom to top and READPE reads the
records which are equal to KEY in facor1 from bottom to
top(we get equal records of key value from bottom to top)

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More RPG400 Interview Questions

i want code and what are used key words are ...like wrkmbrpdm screen (q) i have a file with 3 fields empno,empname,empaddr... here you give the empno it displays from that number to remaining empno's how? sub file screen: employee details pos to:empno then enter empno empname empaddr so file have 100 records from 1 to 100 so the above pos you give the 55 empno...it displays the from 55 to remaining... ...... please share this answel

2 Answers   IBM,


I have two sessions S1 & S2 under this 3 jobs(say j1,j2,j3 under session S1) And 2 jobs(Say j4, j5 Under session S2)is running. How many QTEMP & how many LDA will create for the same.

9 Answers   IBM,


Suppose we have one database file and it is used by 5 programs and in 3 program we have to add some records in datbase file s what is the impact on other program?

0 Answers  


can i use UPDDTA command in rpg program in which contains a file

1 Answers   TCS,


what are the parameters of jobd?give in detail.&what are the parameters of subsystem...????

1 Answers   CTS,






what is meant by record lock.how records are locked.what is the purpose of record lock.if records are locked what happens.how to find out which record is locked.

4 Answers   HCL,


1.Load an runtime array of length 99 from the pf and you want to handle all the possible errors?

0 Answers   HCL,


How can read PF in reverse order (end to start) in CL pgm..

8 Answers   TCS,


This is my Physical file 'EMPS' existing in library "TAMIL1" and its record format is 'EMPRCD" a)its source is R EMPRCD ENO 4 0 ENAME 10 EADD 10 b)The records present in EMPS are as follows ENO ENAME EADD 0001 tamil coimbatore 0002 kumar bangalore 0003 sunder bangalore 0004 arunkumar chennai 0005 pandi hyderabad 0006 santhosh hyderabad 0007 sasi salem 0008 kalai chennai 0009 suresh hyderabad 0010 vijay bangalore 0011 Arul chennai 0012 velu chennai 0013 khan bangalore 0014 praba chennai 0015 praba.p coimbatore 0016 anand ooty 0017 raja erode 0018 sankar erode 0019 vadivel namakkal 0020 anbu chennai 0021 Ajith mumabi c)now i want to select the 'ENAME' field records starting with 'S' for that i have created a RPG program its source code is PGM DCLF FILE(TAMIL1/EMPS) DCL VAR(&MYENO) TYPE(*CHAR) LEN(4) OVRDBF FILE(EMPS) SHARE(*YES) OPNQRYF FILE((TAMIL1/EMPS)) QRYSLT('ENAME *EQ %WLDCRD("S *")') READ: RCVF RCDFMT(EMPRCD) MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(END)) CHGVAR VAR(&MYENO) VALUE(&ENO) SNDUSRMSG MSG(&MYENO) SNDUSRMSG MSG(&ENAME) SNDUSRMSG MSG(&EADD) GOTO READ END: CLOF OPNID(EMPS) DLTOVR FILE(EMPS) ENDPGM Is this coding correct sir,the program gets compiled,and if i call it it says query running but records are not displayed.please help me out

4 Answers   Virtusa,


Can somebody tell me that, Is it possible to read all the member of PF without OVRDBF?

6 Answers  


how to change the length of the field in a physicalfile?

12 Answers  


Hi friends, I am using a load all subfile , and currently i am in in the third page of the subfile , from third page i have selected a record and called some other program .on returning, subfile is being loaded from the frist page. so can any one kindly suggest me in retaining my third page after returning. i.e loading from third page.

7 Answers  


Categories