how can an indexed file be used as arrival sequence in RPG?

Answers were Sorted based on User's Feedback



how can an indexed file be used as arrival sequence in RPG?..

Answer / sanpra

To achieve this on 'F' Spec leave the 'Record address type'
option as blank ( i.e. don't specify 'K' - Keyed or
anthying) .

Is This Answer Correct ?    25 Yes 1 No

how can an indexed file be used as arrival sequence in RPG?..

Answer / kamlesh

do not specify K for record address type in F spec.
Use RECNO(VRRN) keyword where VRRN is packed data type
having dec pos as 0 and has length enough to hold
largest RRN of ur PF.
Now move RRN in VRRN variable and apply
VRRN Chain FILE 99
ur required record is retrieved

Is This Answer Correct ?    3 Yes 0 No

how can an indexed file be used as arrival sequence in RPG?..

Answer / ttom

How will chain be used if 'K' is not specified as address
type in the f spec

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More RPG400 Interview Questions

How to search particular records from the database file in rpg?

1 Answers  


HI,1: What is the function of 'SETON LR' AND '*INLR=*ON ? 2:Can we used "seton lr" OR "*INLR = *ON" in between the program code ? 3:if yes then according to there function the code which is written acter seton lr/ *inlr should not be execute . Can any one tell me why those code get executed ?

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


what is file information data structure?

1 Answers   IBM,


When PGMA calls PGMB for the first time PGMB executes the *INZSR. PGMB uses the RETRN operation to return to PGMA. When PGMA call PGMB the second time is the *INZSR executed?

5 Answers   Mphasis,






How can i check the object existance in RPG program without using QCMDEXC command.

7 Answers   IBM, JDA,


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

1 Answers   IBM,


are there any useful c runtime apis that I can call from rpg iv?

0 Answers   IBM,


How to index LF by relative record no (RRN)

1 Answers  


1.How to load Records of a Physical file(PF) in the reverse order, in CL program?

2 Answers   Cap Gemini,


1) How to declare a file? 2) How to define a display file? 3) How to monitor error messages in RPG? 4) How to find the attributes for subfiles? and what is the DDS for subfiles?

2 Answers   TCS,


How can we search particular records from the database file in RPG. For example, there are 100 records in the file.i need to retrieve all the records matching/equal to the particular 'NAME' field. How can we do the above using SEARCH criteria other than using the IF cond?

4 Answers   CTS,


Categories