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

what is the necessary command needed before OPNQRYF and why?

5 Answers  


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

3 Answers   HSBC,


I know whole thing ab't Arrays related to declaration..can anyone tell me what exactly use of array or anyone faced a situation where he found use of array must....

1 Answers  


we are sending data of physical file to screen design and it is showing no record why?

1 Answers   NTT Data,


What is use of IMPORT and EXPORT in RPGLE ? What is activation Group ? What is Service Program ???? How to call another program in RPGLE ?

1 Answers  






use of PUTOVR,OVRDTA,KEEP keywords?

2 Answers   HCL,


As Packed veriable store 2 digits in 1 byte and ZONE variable store 1 digit in 1 byte... Please tell me when we have to use Packed and Zone variable...?

1 Answers  


How do u design a physical file, when you have 2 Unique fields like for eg in A student file student ID and student examination no both are unique

0 Answers  


how can I tell when to replace the array?

0 Answers   IBM,


can any body correct the following code? Following a procedure which returns the maximum of two numbers.Correct the following code. P GETMAX B D GETMAX PI D NUM1 35 0 D NUM2 45 0 C IF NUM1 > NUM2 C RETURN NUM1 C ELSE C RETURN NUM2 C ENDIF P GETMAX E

1 Answers  


In case if I want to know whether a record exists in a file, which one do you prefer CHAIN or a SETLL and why ?

1 Answers  


what is an online rpg?

0 Answers   IBM,


Categories