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 if my system I runs with system value qccsid 65535?

0 Answers   IBM,


Define an Interactive Job?

1 Answers  


How many Printer Files can Declare in a CL Program?

4 Answers  


when do you explicitly open files and close files in an rpg program?

1 Answers   IBM,


i have one physical file which is having two logical files. logical a have unique keyword and logical b doesnt have a unique keyword. can i give duplicate values while updating through physical file. if no why?

4 Answers   IBM,


What is SFLPAG

1 Answers  


What is the purpose of the following I UDS I 1 60ORDER# I 7 90LINE#

1 Answers  


define the purpose of the *bcat function?

1 Answers   IBM,


Define a Job Queue?

1 Answers  


is it there an easy way to determine if an html section is available to issue a wrtsection upon?

0 Answers   IBM,


Dear All, I have one confusion related to my platform. I am working with Wipro from last two year however still I am looking for AS400 platform kindly show me the way out of it. And please share with me the hardware knowledge that how I grow myself in hardware (AS/400) also.

1 Answers   Wipro,


what is a join logical file?

0 Answers   IBM,


Categories