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
what if my system I runs with system value qccsid 65535?
how you will find an error which is not in the first page of the subfile without using rolldown key?
What is diff between EVAL & MOVE?
in conjunction with which statements can orxx and andxx conditions be used ?
how can you execute a command from within an rpg program without calling a clp program?
how to write code for singlepage in sqlrpgle with update ?
which of the cl command can be used to determine which logical files are dependent on a specific file?
Can any one explain the basic things about RLU and Printer Files and their Definitions for both and why are they used,i'm a newbee so please help me out
what is overlay?
Hi,Can any body give the code for the below mentioned quetion.?Im trying to get coding in with easily inderstanding.Plese give me the coding for this? 1.How would you achieve this requirement with out using RPG/RPGLE pgm,but by using only CL?Read a database file and display file contents on the screen when enter key pressed the next record should be displayed on screen.When the last record is reached or when F3 key is pressed the program should exit if the file is empty,a message should be displayed indicate that there are no records to display. Database file Name=EMPDBF Fields in EMPDBF to be displayed on screen Employee Number- EMPNUM(5,0) Employee Name- EMPNAM(30,A) Employee Address-EMP ADDR(50 A)
which are the figurative constants used in rpg?
WHAT IS AS/400 SYNORIO?
what is the function of cpyf command?
explain the use of dftwrt display keyword?
what keyword must be used with protect keyword ?