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 maximum number of subroutines allowed in rpg?
What are the mandatory keywords of sub file?
what are the different methods to access seu?
What is the difference between physical file and logical file?
what is join logical file?
can you specify a display file to be used in the following modes input,output, or combined modes ?
How to debug a batch job when it is in messagewait(mswg) status. I know the steps for batch ebugging, but im confusing with when we submit any job for batch debug we put in held state. So here also do same thing or any other way?
how do you pass parameters in cl?
Which command is used to replace CDUP command in FTP IF i WANT TO USE SFTP?
how can you check for a records existence without causing and i/o (chain/read)?
is there any way I can ease my rpg controls on numeric input fields? How about an input date field?
How do I remove a flag or check no. or name when a user opens too many sessions?
which of the following operations does not zero the field flda defined as 4,0?
when would you use or not use this approach?
Pose, there are 100 records in the file.i need to retrieve all the records matching/equal to the particular name field. How can we do the above using search criteria other than using the if cond?