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
what is the use of unique keyword and what level it is defined?
what is cab?
what is the maximum number of fields under a record format of physical file?
what are the two record formats a subfile contain ?
define the rcvf command?
How we will get issues on AS/400 technology ? I mean which issue/Defect Tracking tool is using in all companies when any issue comes? Can anybody explain about the work flow of AS/400 project ? plzzz
what are the uses of factor1, factor2 and result field for the rpg operation code parm?
what is the purpose of indicators in rpg?
what is the purpose of dynslt keyword?
what is externally described file ?
What is data structure in as400? What is the use of data structure?
How can we change the uppercase to Lowercase in RPG?
what is the necessary keyword for non-join logical file?
what is meant by object lock requests,held locks and locks waiting to be applied(wrkobjlck) why should we apply for locks.Please explain sir.
what is the command to know key fields of file?