1)how to do date validation in rpg?
2)how to delete dUPLICATE RECORDS?

Answer Posted / chandu

We can delete duplicate records by using this:
factor1 opcode factor2 result eq
key setll pf
reade pf 50
dow *in50=*off
delete rec1
reade pf 50
enddo

Is This Answer Correct ?    4 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How Chain operation copies the record's data to the input buffer for the program?

1082


When it is desirable to describe files Internally?

1189


what is the use of sflnxtchg?

804


Please tell me how to read the records from a file with load an array of size with error conditions(The logic answer for this question is ARR is array of 99 elements Z-ADD 0 IDX *LOVAL SETLL FILE READ FILE 99 *IN99 DOWEQ *OFF IDX ANDLT 99 ADD 1 IDX MOVE FIELD ARR,IDX READ FILE 99 ENDDO).So,Please give me the complete of this code.

2052


is this a rpg channel?

681






how does the rpg element work?

717


how do I declare a minor?

717


How to declare the pull button in AS/400..

1883


if there is a module object , how to find the program object for this module object.Assume the module object name and program object name is not same.

2200


What are the types of identifiers?

572


How to select highest score of each subject or how to select highest income of every month?

1296


How to write record if no field or the field are different in physical file in rpgle ?

490


1. What is bound-by-call and bound-by-reference? 2. Where and why is *Nomain used? 3. What are the difficulties faced by programmers when using service programs? 4. Explain the different ways of parsing and compiling XML in iSeries.

5413


If my rpg program has a date field, what extra care I have to take while compiling that rpg program? If the file is keyed and I have declared the file as well as key list properly in my program. Still am getting an error message like "chain/reade operation is not allowed" what may be the case?

619


How can we override a file during runtime in rpg?

688