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
In 'o' Specs What Is The Opcode For Write?
which are control break logic indicators?
How to add 99 menu (page down) option in menu creation..
what is cab?
To Add A File To The 'file Selection' Option Of A Query, The Function Key To Be Pressed Is?
how to pick up the changed records every time in a subfile after the first change made ?
Write a CL program which will run a batch job at 1 am every night
what is term cua , saa?
Can you summarize the steps I have to go through in writing my first cgi?
Why we are not able to perform insert delete and update operation in Join logical file?
is it there an easy way to determine if an html section is available to issue a wrtsection upon?
How Many Specs Are There In Rpg & Which Are They?
what is scan and xlate?
what are the uses of factor1, factor2 and result field for the rpg operation code parm?
how can you check for a records existence without causing and i/o (chain/read)?