Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

what is the maximum number of subroutines allowed in rpg?

1690


What are the mandatory keywords of sub file?

1392


what are the different methods to access seu?

1027


What is the difference between physical file and logical file?

1069


what is join logical file?

1777


can you specify a display file to be used in the following modes input,output, or combined modes ?

1458


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?

1193


how do you pass parameters in cl?

1715


Which command is used to replace CDUP command in FTP IF i WANT TO USE SFTP?

2368


how can you check for a records existence without causing and i/o (chain/read)?

1994


is there any way I can ease my rpg controls on numeric input fields? How about an input date field?

1053


How do I remove a flag or check no. or name when a user opens too many sessions?

2147


which of the following operations does not zero the field flda defined as 4,0?

1125


when would you use or not use this approach?

1456


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?

981