i want to perform uniqness on db file bt my db file nt
hving key by useing rpgle.

Answers were Sorted based on User's Feedback



i want to perform uniqness on db file bt my db file nt hving key by useing rpgle...

Answer / ravi kumar

Create LF for PF and take UNIQUE keyword in file level and take one field as key field(Whenever UNIQUE keyword is used in LF, It will be compiled successfully if your PF doesn't have DUPLLICATE RECORDS orher wise it will not be compiled.)

After creating LF, You have to use LF in RPGLE. Then you can retrieve and insert records through RPGLE.

I have got success in this way...

Is This Answer Correct ?    2 Yes 0 No

i want to perform uniqness on db file bt my db file nt hving key by useing rpgle...

Answer / bhargav

Assigning non-numeric values to NUMERIC field.

Is This Answer Correct ?    0 Yes 0 No

i want to perform uniqness on db file bt my db file nt hving key by useing rpgle...

Answer / raghav

Try using CL program  
1.OVRDBF (Share ODP - *YES)
2.OPNQRYF - Define keyfield
3.Call RPGprogram
4.DLTOVR

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More RPG400 Interview Questions

WHAT IS MENT BY RECORD LEVEL IDENTIFIER ? WHAT IS THE PURPOSE OF THIS?

1 Answers  


Q:Hi all,i want accurate answer with code using in built functions.please sent me code as soon as posible. I have program nmed PGM1 which '' RETRIEVE Current production date''should correctly default the production date for the user who is issuing raw materials to the manufacturing.The production date can be different from the celendra date. However, the program does not make the correct adjustment for all manufacturing plants. there is a parameter which determines the production start time e.g. 07:00 if the system time precedes this,the program subtracts one from the celendra day.This work fine when the celendar day starts after production day as it does in England,the system should be adding one to the celendar day during the overlap. unfortunately the program was desined to assumed the celendar day always starts before the production day. Change required in the program: Change the PROGRAM PGM1 to use the new parrameter to decide whether to add or subtract 1 from the celendar day when determining the production date.

0 Answers   TCS,


what are the array operations?

1 Answers   IBM,


Anybody can explain the difference between SFLCLR & SFLINZ?

7 Answers  


Can an indexed file be accessed in arrival sequence in RPG?

3 Answers  






Need a sql query: retrieve all duplicate records in table?

1 Answers  


what is importance of 'MAPFLD' IN OPNQRYF FILE ?

2 Answers  


use of PUTOVR,OVRDTA,KEEP keywords?

2 Answers   HCL,


3 members in a databasefile .how to read records from all the members?????????

4 Answers   CTS,


how to find whether a date format is valid or not in RPG400 not in RPGILE.Can you please write the coding for this sir,i'm new to AS400.Please help.

1 Answers  


am 2010 passed out . can any one tell me which course is good to put 2+fake .guide me

1 Answers  


Mr.Yallamanda Reddy P thanks for your answer sir,can we use test(D) opcode in RPG/400,if yes please help me by eloborating on that answer by writing a sample code for that sir

2 Answers   iGate,


Categories