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

Assume 2 users are using the same file and first user updates some record in the file. Will the 2nd user will be able to see the updated record or not?

0 Answers  


Can a run time array be declare like below with no specified number of elements ? Is it possible ? DFLD_ARRAY 7 DIM() INZ(*blanks) What does this mean ? Does this mean that the number of array elements will be dynamically declared during run time ?

1 Answers   TCS,


difference betwen keywords and opcodes

3 Answers  


there is any limit to display the members in rpg400?

3 Answers  


can i use unique key in LF

3 Answers   TCS,






what is the difference between SETON RT & RETURN?

5 Answers  


What is SFLNXTCHG keyword why it has used and where? Briefly explain with Example.

2 Answers   IBM,


1.Load an runtime array of length 99 from the pf and you want to handle all the possible errors?

0 Answers   HCL,


In ProgramB there is a SBMJOB, which is a call to program C .There is also a CALL to program D from B. How would you check the program C has been executed in D?

4 Answers  


How to define data area in RPG program? In which scenario multi occurrence DS is use in AS400?

0 Answers  


when will come session device error?

4 Answers   TCS,


Given the following code, what is the value of RESULT? DName+++++++++++ETDsFrom+++To/L+++IDc.Keywords+++++++++++++ D RESULT S 5 0 C EVAL RESULT = (2 + 3 * 2) ** 2 / 2

2 Answers  


Categories