CAN WE INSERT FIELD IN PHYSICAL FILE BY USING OPNQRYF?
Answer Posted / manish kumar
MAPFLD is used to change the format of the fields used in
the OPNQRYF statement. When I say changing the format the
format of the field will not be changed but we can format
the data as we wish and store it in a diffrent variable.
For eg. You want check for year to be some value and are not
concerned abt date and month then you can follow as below.
OVRDBF FILE(FILEA) SHARE(*YES)
OPNQRYF FILE(FILEA) QRYSLT('YEAR *EQ "88" ') +
MAPFLD(YEAR '%SST(DATE 5 2)' *CHAR 2)
CALL PGM(PGMC)
CLOF OPNID(FILEA)
DLTOVR FILE(FILEA
| Is This Answer Correct ? | 9 Yes | 0 No |
Post New Answer View All Answers
How can we change the uppercase to Lowercase in RPG?
what key word is used when screen is re-display?
how to validate input values in display file ?
how can you detect and handle a record lock situation?
what are the various types of device files?
how do you use exceptional write in c specs?
what is xfoot opcode ?
which type of object is used in db2/400?
How to convert a spool file to PDF file in AS400?
what is the use of jdftval in join logical file?
which are the member types which seu supports?
What is diff between EVAL & MOVE?
Why we have multiple data types in As400 and why we use numeric, packed, decimal, zoned the basic difference between this?
what are the different types of arrays available in rpg ?
how can I control the way a remote browser uses its cache?