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.



I have a file .In that file i have 3 fields. Those fields are eno, ename, esal.Keyfield is eno. In t..

Answer / swetha krishna

2 setll pf
read rec

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More RPG400 Interview Questions

How do you find whether a record is locked or not?

2 Answers  


Have a join logical file with more than one members with different record formats. So how can we read the different members from this file and also how we can read the different record format from the join logical?

3 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  


Im traying to get out put of this below mention simple logic code.But im geting out of different.(im trying with my laptop trhough my company server. DCL &FIELD1 *CHAR 10 VALUE('TCS AS/400') DCL &FIELD2 *CHAR 10 CHGVAR(%SST(&FIELD2 1 10))(%SST(&FIELD1 10 1) Can you tell me the value of field2 after excuted of CHGVAR command.

2 Answers  


program to find the number of objects used in a given program through a display.

2 Answers   IBM,






To check the locks , we use cmd WRKOBJLCK , but how we confirm whether it's objeck lock / member lock. I confused with the Lock type and Status values...Can any body please tell me ...

5 Answers  


How can you delete a record from a file in RPG without using DELETE oppcode?

2 Answers   UST,


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

4 Answers   Manhattan,


Difference between RESET and CLEAR

1 Answers   TCS,


How do you do indexing in a physical file?

2 Answers  


1.The questions have given an array declaration and move operation then this statement is correct or not?

3 Answers   TCS,


I have 1000 records in a file. I would like to generate 10 identical reports from this record with same format (structure of records) how do I do this?

1 Answers   IBM,


Categories