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

How many secondary files allowed in a program?

1 Answers  


What are the two main attributes, which govern the execution of a job?

1 Answers  


For AS/400 Freshers good website is

3 Answers   HCL, HP,


1. There is a file called Month. Month has 12 members called Jan, Feb, ..., Dec. How to design a rpg code which can access any member and show its content. (User can ask for any member when required)?

0 Answers  


define the purpose of the *bcat function?

1 Answers   IBM,






Write the subfile logic program for the given concept. Load the data to the subfile depends upon the designation where designation is not a key field?

2 Answers  


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

1 Answers   IBM,


what does dfu program you to do on a record?

0 Answers   IBM,


how can you execute a command from within an rpg program without calling a clp program?

1 Answers   IBM,


How many PARM statement can we use in a CL program?

6 Answers  


what is the purpose of DMPCLPGM IN CL?

3 Answers   IBM, Wipro,


Which of the following operations does NOT zero the field FLDA defined as 4,0? C MOVE *ZEROS FLDA C Z-ADD *ZEROS FLDA C Z-ADD 0 FLDA C MOVE *ALL'0' FLDA C SUB FLDA FLDA C MOVE '0000' FLDA C CLEAR FLDA C MOVE *BLANKS FLDA

1 Answers  


Categories