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
how do you read data area in an rpg program?
The content of Physical file is as below: hfcftp wruquief SENDPASV 0 CDUP ASCII GET 01100901.CSV ramndk/ECP505.EC0110090 (REPLACE QUIT Thw above commands will get executed when we call STRTCPFTP from CL program.... Now if I want to use SFTP what can be the solution? plz reply in detail....Thank you for ny help... I m using RPG/ILERPG to download...
What are the mandatory keywords of sub file?
what are the various types of device files?
a multiple format logical file is also known as?
what are the two record formats a subfile contain ?
what are different record spacing keywords in rlu ?
which are the figurative constants used in rpg?
what is the difference between seton lr and retrn?
what opcode will be used to test the zone of a character field?
what is a spool file?
what does the opcode free do?
an access path may be in which sequence?
what is the maximum number of fields under a record format of physical file?
what is service program?