Hi,This is raju.Can any body give me the real experience
answer for this question?
1.What is the significance of *MAP and *DROP in the CPY
command?

Answers were Sorted based on User's Feedback



Hi,This is raju.Can any body give me the real experience answer for this question? 1.What is the ..

Answer / rakesh

Hey Raju,
Actual Significance is *MAP will Map the Field
from From File to To File where ever it will find mapping
without error where as *drop will Drop off the Field where
ever it is not matching .

For Example : we want to copy 12 fields file data to
another File having 12 Fields plus 3 more addon , we have
to use the *Map and *Drop to add the data of 12 match
fields and drop the remaining.

Is This Answer Correct ?    5 Yes 0 No

Hi,This is raju.Can any body give me the real experience answer for this question? 1.What is the ..

Answer / nora alexander

It's for Record format field mapping - if you use *NOCHK it
just copies the data without regard to field type or size,
which is a bad idea.
*MAP
Fields with the same name in the from-file and to-file
record formats are copied, and any fields in the to-file
that do not exist in the from-file format are set to the
default value specified on the DFT keyword for the data
description specification (DDS) of the to-file or zero for
numeric fields, blanks for character fields, current
date/time for date/time fields, or null value for null-
capable fields.
If *MAP is specified, *DROP can also be specified. Mapped
fields may have different starting positions in the from-
file and to-file record formats.

If *MAP is specified and a valid conversion is defined
between the from-file field CCSID and the to-file field
CCSID, the character data is converted to the to-file field
CCSID. However, if either the from-file field CCSID or the
to-file field CCSID is 65535, the character data is not
converted.

*MAP allows for the conversion of date/time data and the
copying of null values.

*DROP
This value must be specified for field-level mapping if any
of the field names in the from-file record format do not
exist in the to-file format. If *DROP is specified, *MAP
can also be specified. When *DROP is specified, all the
field names that exist in both record formats must have the
same attributes and relative positions in the from-file and
to-file record formats, or *MAP must also be specified.
Null values are copied.

Is This Answer Correct ?    2 Yes 1 No

Hi,This is raju.Can any body give me the real experience answer for this question? 1.What is the ..

Answer / venki

i think it does not need that mush of cinfusion *map is for
just it checks he record format of to files *drop is also
same but it ignores the fild attribute it cheks for wheher
the teo data types are comptable or not

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More RPG400 Interview Questions

WHAT IS MONMSG IDENTIFIER FOR STRTCPFTP command IN cl (as/400)?

3 Answers  


How to declare the more than one file in cl/400.

13 Answers   IBM,


wat is the difference between array and multiple occurence data structure?

4 Answers   Four soft,


How can read PF in reverse order (end to start) in CL pgm..

8 Answers   TCS,


I have 1000 records in a file. I would like to generate 10 identical reports from this record with same format (structure of records) how do I do this?

1 Answers   IBM,






what procedure should we use to find whether the following operations are successful or not setll setgt chain read reade readp pls tell with example i'm not lazy to read the manual or not lazy to do anything.but sometimes i cannot understand the things given in manual in high level english its little bit complicated for me,i can't understand their way of writing thats why i ask these questions here and find the solution in simple words that i can understand thats the real reason sir.sorry if i had hurt you or disturbed you.please understand my situation.

5 Answers   iGate,


I need to generate outfile for object of all the user lib. in the sysmte using cmd DSPOBJD. But this cmd is correcpted in my server,Any body tell me is there any alternative...?

2 Answers  


what is estimation? and what is the level identifier parameter in PF?

3 Answers   TCS,


what do you mean by SESSION/DEVOCE ERROR?

1 Answers   IBM,


1)how to do date validation in rpg? 2)how to delete dUPLICATE RECORDS?

12 Answers   IBM, Opus,


What you have to do in the display file when you are using message subfile?

1 Answers  


I have a file .In that file i have 3 fields. Those fields are eno, ename, esal.Keyfield is eno. In that file i have data like this for eno 1,2,3,4,5. Now i need to display 2nd record. That means i need to set the pointer on 2nd record... Then, write the complete rpg program using setll.

1 Answers  


Categories