How to create a key field for a logical file inside RPG?

Answers were Sorted based on User's Feedback



How to create a key field for a logical file inside RPG?..

Answer / hello

first correct ur question buddy

Is This Answer Correct ?    11 Yes 0 No

How to create a key field for a logical file inside RPG?..

Answer / renjith

you can use KLIST in RPG program

Is This Answer Correct ?    11 Yes 5 No

How to create a key field for a logical file inside RPG?..

Answer / rajesh n

In D Spec use KFLD and key field name.

Example:

KFLD Fld1.

Is This Answer Correct ?    5 Yes 6 No

How to create a key field for a logical file inside RPG?..

Answer / sekhar

use LikeRec(RECFMT:*KEY)

Is This Answer Correct ?    1 Yes 5 No

Post New Answer

More RPG400 Interview Questions

Assume my file has 100 records and I want to see only first 10 records. Is this possible through lf?

1 Answers  


Why did we give STRSRVJOB while debugging batch program

3 Answers   HBL Power Systems,


Hi, I am getting the error in RPG (All Record Formats for externally-described file ABCD ignored or dropped due to error; file ignored.) Please suggest any

2 Answers   Satyam,


please help me answer to this question what is the difference between the binding and srvpgm in ilerpg?

4 Answers   HCL,


i want code and what are used key words are ...like wrkmbrpdm screen (q) i have a file with 3 fields empno,empname,empaddr... here you give the empno it displays from that number to remaining empno's how? sub file screen: employee details pos to:empno then enter empno empname empaddr so file have 100 records from 1 to 100 so the above pos you give the 55 empno...it displays the from 55 to remaining... ...... please share this answel

2 Answers   IBM,






what are the array operations?

1 Answers   IBM,


Anybody can explain the difference between SFLCLR & SFLINZ?

7 Answers  


how do I preserve and clean the array?

0 Answers   IBM,


Can somebody tell me that, Is it possible to read all the member of PF without OVRDBF?

6 Answers  


In RPG program one file using as a PRIMARY file while running program some of the records reading twice any body know why its happening

2 Answers  


Thanks gagan for your answer,i'm new to as400,i don't know embedded sql in rpg.can you send me the coding for the below mentioned question in embedded sql rpg. how to retrieve particular field records from a physical file,say i have a physical file called 'employee' in it i have to retrieve the records of a field 'admin' present in pf 'employee' using rpg,but i should not use logical file or openquery file.

2 Answers   iGate,


can i use unique key in LF

3 Answers   TCS,


Categories