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
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 |
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 |
How do you find out whether a record is present in the physical file without reading the file? for Example Employee No: 100 in an Employee master.How do we find out whther 100 is present in Employee master without reading the file?
11 Answers Bank Of America, CSC, IBM,
1.Load an runtime array of length 99 from the pf and you want to handle all the possible errors?
I want to declare the number of elements of an array dynamically in RPGLE ? Is it possible? If yes, then how do I do it ?
i have 6 char field in program, but this field is using in all files i want to chage field size as 10 char , how can i do this except using *like defn...?
What are the commands that can be executed in CLP but not in RPG? Why?
Can we possible to key with the date field?
what happens when sflsiz = sflpag? What are the advantages and disadvantages?
Hi,Please give me complete code with this logic. The question is how to read the records from a file with load an array of size with error condition? (The logic is Z-Add 0 IDX *LOVAL SETLL FILE READ FILE 99 *IN9 DOWEQ *OFF IDX ANDLT 99 ADD 1 IDX MOVE FIELD ARR,IDX READ FILE 99 ENDDO)please give me complete code with explanation?
As400 Command to find the Name of the Program to which a Particular Module is Bound..? Ex: IC210AMR (*MODULE) is bound with Other Modules which Forms Program Object as IC210ABP(*PGM) . As400 Command to find the IC210ABP Using IC210AMR..? Thanks
what is importance of 'MAPFLD' IN OPNQRYF FILE ?
The PGMA calls PGMB.PGMB generates a report.The report should contain the called program name(PGMA).How do i get the called program name in PGMB to print it on the spool file?(calling program name should NOT be hard coded or passed as parameter to called program?
HI,1: What is the function of 'SETON LR' AND '*INLR=*ON ? 2:Can we used "seton lr" OR "*INLR = *ON" in between the program code ? 3:if yes then according to there function the code which is written acter seton lr/ *inlr should not be execute . Can any one tell me why those code get executed ?