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

Can we possible to key with the date field?

1 Answers   IBM,


how to retrieve RRN value in RPGLE program

3 Answers  


what is data area and how it is used in rpg program ?

0 Answers   IBM,


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  


can anyone explain aboutovrOVRDBF,OPNQRYF, OVRSCOPE and OPNSCOPE?

2 Answers   TCS,


Can more than one subfile record be displayed on one line?

7 Answers   IBM,


1.Are there any errors in the following statement?If so then list them.DTAARA is a data area having a field EMP # and EMPNO is a field in the file EMPPF.Which has one record. READ EMPPF IF %FOUND(EMPPF) IN DTAARA EVAL EMP#=EMPNO OUT DTAARA ENDIF

5 Answers  


wat is curser?? and its types???

4 Answers   HSBC,


this is rpg3 code W0RTN IFEQ @CN,002 what is the means @CN,002

1 Answers  


What is the syntax of passing parameters to a procedure by value?

1 Answers  


Hello, I want to extend a length of field in my Display file(Subfile). Please suggest the possible steps. Thanks

3 Answers  


How do I read records from Subfile? what is the purpose of READC explain with example?

4 Answers   IBM,


Categories