how to retrieve RRN value in RPGLE program

Answers were Sorted based on User's Feedback



how to retrieve RRN value in RPGLE program..

Answer / prabhas

Using INFDS

Is This Answer Correct ?    17 Yes 2 No

how to retrieve RRN value in RPGLE program..

Answer / dkumar3

Shift + Ecs key >> 14 >> F11 this will display the all open files and corresponding RRN no.

Is This Answer Correct ?    1 Yes 0 No

how to retrieve RRN value in RPGLE program..

Answer / narendra

There are many ways to retrieve the value of RRN in RPG. One way is to use the INFDS (File information data structure) and in data structure define the RRN from pos 397 to 400.
Another way is to use the Keyword RECNO(RRN) while defining the file in the F Spec.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More RPG400 Interview Questions

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,


What is the difference between copybooks and subprocedures in as400?

0 Answers  


I have a RPG program of 100 Lines and first line is to SETON indicator LR. Will the program execute rest of the 99 Lines?

6 Answers  


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,


I have a PF(ABC)with no key fields. PF(ABC)have 2 fields (cusno and cusname). Please let me know how can i read the cusno = 1150 directly from PF in CL and RPG program(Without creating the LF and without reading the complete file and then compare 1150)

3 Answers   Opus,






Can anybody tell me in which scenario we have to use SQLRPG .(Embeded SQL)....?

2 Answers   HSBC,


1.Are there any errors in the following statement?If so then list them.DTAARA is a data area having a field EMP # and EMPNO is a field in the file EMPPF.Which has one record. READ EMPPF IF %FOUND(EMPPF) IN DTAARA EVAL EMP#=EMPNO OUT DTAARA ENDIF

5 Answers  


How to define data area in RPG program? In which scenario multi occurrence DS is use in AS400?

0 Answers  


How can we call CL program to RPG? How many number of parameter we can pass

2 Answers   TCS,


can anyone explain aboutovrOVRDBF,OPNQRYF, OVRSCOPE and OPNSCOPE?

2 Answers   TCS,


In how many ways a session/device error occurs,,, and what is the remedy for it?

3 Answers  


if i have three programs progA,progB and progC .now i call progB from progA. but the progB does not exist . now i want to call progC instead of starting dump. how can we achieve this.

10 Answers   Four soft,


Categories