CAN WE INSERT FIELD IN PHYSICAL FILE BY USING OPNQRYF?

Answers were Sorted based on User's Feedback



CAN WE INSERT FIELD IN PHYSICAL FILE BY USING OPNQRYF?..

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

CAN WE INSERT FIELD IN PHYSICAL FILE BY USING OPNQRYF?..

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

CAN WE INSERT FIELD IN PHYSICAL FILE BY USING OPNQRYF?..

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

CAN WE INSERT FIELD IN PHYSICAL FILE BY USING OPNQRYF?..

Answer / rake

we can insert a field using MAPFLD in opnqryf

Is This Answer Correct ?    6 Yes 14 No

Post New Answer

More IBM AS400 AllOther Interview Questions

what is the function of cpysplf command?

1 Answers   IBM,


any one have give AS400 study material? pls pass it to gopalsai789@gmail.com

0 Answers   IBM,


what is the main use of OPNQRYF ?? in that query why we can use OVERDBF and in that OVERDBY why should we use SHARE(*YES)

2 Answers   IBM,


How to inner join more than 2 PFs in a CL program using OPNQRYF command?

1 Answers  


What the difference between Source Physical File and Physical File?

1 Answers  






define data structure?

1 Answers   IBM,


what is the purpose of DMPCLPGM IN CL?

3 Answers   IBM, Wipro,


define the purpose of the %sst function?

1 Answers   IBM,


what does check opcode is used?

1 Answers   IBM,


what is the command to rtrieve system date? options:1.rtvsysval 2.rtvjoba 3.rtvjobd 4.both a and b

5 Answers  


what is multijoin logical file? what are the keywords available in joinlogical file? what are the mandatary keywords for joinlogical file? explai the keywords?

2 Answers   HCL,


How to read data from *LDA (Local Data Area) in RPGLE program without using IN opcode?

1 Answers  


Categories