How can i keyed a flat file in RPGLE

Answers were Sorted based on User's Feedback



How can i keyed a flat file in RPGLE..

Answer / sd

Can be done through RRN.

Is This Answer Correct ?    16 Yes 8 No

How can i keyed a flat file in RPGLE..

Answer / syam

Sd's answer is correct.

FMASTER IF F 96 96 DISK A
F KRECNO RRN

Is This Answer Correct ?    7 Yes 0 No

How can i keyed a flat file in RPGLE..

Answer / rajesh

YOU CAN CREATE A LF WITH KEY

R PF1 PFILE(PF1)
K PF1

Is This Answer Correct ?    7 Yes 1 No

How can i keyed a flat file in RPGLE..

Answer / jvn

Declaration of file
F abcd UF A F 100 10 A I DISK
KEYLOC(1)
file name pgm desc Record len Key len &type

The above file type declaration means file 'ABCD' is a
program described file of record length 100, key field
length 10 of type character and the file is indexed with
the position of key field starting from position 1 as per
the KEYLOC value.

I abcd xy
I 1 11 keyfield_name

They key field can be subsequently defined as per the
example above.

Is This Answer Correct ?    5 Yes 0 No

How can i keyed a flat file in RPGLE..

Answer / surendra y mudliar

Flat file can be read using RRN for random access.

Is This Answer Correct ?    5 Yes 1 No

Post New Answer

More RPG400 Interview Questions

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 records form a file in rpg without using "Delete" OPCODE?

7 Answers  


Need a sql query: retrive all duplicate records in table

3 Answers  


i would like to know under what circumstance the object will get locked on AS400.

5 Answers   IBM,


steps for debugging two rpg programs????

4 Answers  






can anybody explain significance of *loval setll with example code????

3 Answers   HSBC,


1.what are the ARITHMETIC EXPRESSIONS IN CL PGM? 2.How to PASSING PARAMETER TO CL PGM?

1 Answers   NetCracker,


How can we override a file during runtime in RPG? Without using OVRDBF or calling a CL program

1 Answers   UST,


What is the difference between iter and do?

0 Answers  


if there is a module object , how to find the program object for this module object.Assume the module object name and program object name is not same.

0 Answers  


WHERE DO WE USE COMIT KEYWORD IN AN RPG PROGRAM? YOU MADE SOME CHANGES TO DATABASE BUT YOU DON'T WANT TO SAVE THOSE CHANGES NOW? HOW DO YOU HANDLE THIS ONE?

2 Answers  


why subproc not run in dftactgrp?????/plz explain

2 Answers   CSC,


Categories