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 |
Hi all friend, Could Any body send me the code (with coding) of this senario because I have tried but I am stucking somewhere so Please reply ASAp with coding. senario:Q: I have to write the flat file(FLAT1) into the three different PFS (PF1,PF2 and PF3) with the respect of H line data, D line data and Z line data of flat file. where I have different data in flat file(FLAT1) which is mentioned below with data. H0929200909282009092820095529420003000073 D2222220006765555webservi001633.9909222009092820090924200951 8564380134049ROSNER TOYOTA OF FREDE FREDERICKSBURVA 224080000USA840840001633.99001633.99851856492689800208001915 511001633.990408490000000.0000000003446048 1,3 110793145 09070700351 372367 Rosner Motors D3333320006774444webservi000271.2409222009092820090924200951 8564380134049ROSNER TOYOTA OF FREDE FREDERICKSBURVA 224080000USA840840000271.24000271.24851856492689800208001835 511000271.240930680000000.0000000003450293 1 110793254 09072100079 373933 Rosner Motors Z0929200900000020001905.25 FLAT1 has the three pf data H line-represents the header pf data,D-Represent Details pf data,Z-Represents the trailer pf data Now I have to write H line data of flat file into Header pf (PF1),D line data of flat into datails pf(PF2) and Z line data of flat file into pf(PF3) with the spefic position(H,D and Z data of flat file into PF1, PF2 and PF3) of flat file.
How to find d key field of a pf that doesn’t have source physical file?
Q1.How to read the Array? Q2.How to copy the content of one Array to another Array?
I have one cl program which calls two rpg programs named a & b. I am loading a run time array in Pgm A and the control comes back to cl pgm. i call pgmb and I want to read the runtime array in pgmb which was loaded in pgma. How it can be acheived. I should not use any intermediate file or dataarea to store the loaded values.
If record-format name in an externally-described file has already been defined as a file-name.how to solve this?
What is the difference between iter and do?
I want my simple Green screen should refersh every 1 min ,How can I do it..? Please share the logic
What are the values of NUM1 and NUM2 after executing the following code? CLONO1NO2NO3 Factorl÷÷+OpcdeFactor2+÷+ResultLenDHHiLoEq C MOVE *LOVAL NUM1 50 C MOVE *J-fIVAL NtJM2 52
what is batch debug in as400?
How do you find whether a record is locked or not?
when will come session device error?
How to declare the pull button in AS/400..