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

Suppose I have 3 jobs a b and c. I want to submit b after successful completion of a and want to submit c after successful completion of b. Without using job scheduler or job queue, how can I do that through cl program?

1 Answers  


what was the robotech rpg?

0 Answers   IBM,


What would be the effect on the field where reverse image, underline and high intensity?

7 Answers   IBM,


One of the job in subsystem is in Running status,expected time to complete this job is 2 minutes. But from last 5 -10 minutes this job is still in running status....What are the possible reasons...and What are the actions i need to perform to check this...?

4 Answers  


can I touch the array during treatments?

0 Answers   IBM,






In a particular program one file is used where override command is applied to a file, now this program calls another program where we want to use the same file but without override.How it can be done?

6 Answers   Hexaware,


Hi friends, I am using a load all subfile , and currently i am in in the third page of the subfile , from third page i have selected a record and called some other program .on returning, subfile is being loaded from the frist page. so can any one kindly suggest me in retaining my third page after returning. i.e loading from third page.

7 Answers  


2. Which of the following statement(s) explains the difference(s) between the /INCLUDE and ICOPY directives? a.) No difference, they function the same b.) ACOPY cannot be used as a conditional directive c.) IINCLUDE files cannot contain embedded SQL d.) Nesting /TNCLUDE directives is not allowed

2 Answers   IBM,


RPG/400 number of Records present in a physical file using file information data structure FPF001 IP E DISK F KINFDS INFDS1 IINFDS1 DS I *RECORD RECORD Is this coding correct sir,i have given I P E that is I- input,P-primary file,E-externally described. Primary to use RPG logic cycle,is this the correct method because we have to find number of records present using file information data structure in RPG/400 without doing any input/output operations on the file and also without using DSPFD,SQL. If the above coding is correct means,when i compile the program it gets compiled,but if i call the program it does not return anything,i need number of records,please complete the coding sir.

1 Answers   IBM,


What is the purpose of record level identifier?

0 Answers  


list down and describe the sub systems vailable

5 Answers   IBM,


How to read data from Nth member of a physical file containing some X number of members in it? "Provided member names are unknown"

4 Answers  


Categories