CAN WE INSERT FIELD IN PHYSICAL FILE BY USING OPNQRYF?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / sumit gupta
Hi Suma..your question is wrong...OPNQRYF is used to select
some records from a physical file which is overide or
simple 1 file(without OVRDBF).
We cannot insert field into physical file throgh OPNQRYF.
But yes you can change the format of field as SAID BY
MANISH and then bys using CPYFRMQRYF...you can write the
selected record into physical file.
Is This Answer Correct ? | 6 Yes | 0 No |
Answer / venkat
it is not possible to insert a field using openquery file
because of there is no parameter to insert the field at
opnqryf
Is This Answer Correct ? | 3 Yes | 0 No |
What are the valid data types in Data Queue?
distinguish between terminating a program through seton lr and return?
define the purpose of the leave operation?
how would you design the process for a nightly, high volume check producing process that needs to select only records that are flagged to be processed?
define subsystem?
what is lokup opcode?
define a shared access path?
What is the native language of AS/400?
we have 2 PF files with same name, how to copy data's from one file to another through RPG program logic?
How to create an Access path in Synon/2E ?
when would you use or not use this approach?
Difference between NOPASS & OMIT?