6.97 MAPALLCOLUMNS| NOMAPALLCOLUMNS

Valid For

Valid as a standalone Replicat parameter or as an option to MAP.

Description

An Extract or Replicat checks if all source columns are mapped directly to the target, without using the column mapping function when MAPALLCOLUMNS parameter is specified. If any source column is not mapped, then the Extract or Replicat abends.

MAPALLCOLUMNS and NOMAPALLCOLUMNS can be used in two different ways. When specified at a global level, one parameter remains in effect for all subsequent MAP statements, until the other parameter is specified. When used within a MAP statement, they override the global specifications.

Default

NOMAPALLCOLUMNS

Syntax

MAPALLCOLUMNS | NOMAPALLCOLUMNS 

Examples

Example 1   

This example enables MAPINVISIBLECOLUMNS for some MAP statements while disabling it for others.

MAPALLCOLUMNS
MAP hr.emp, TARGET hr.emp2;
NOMAPALLCOLUMNS
MAP hr.dep, TARGET hr.dep2;
Example 2   

This example shows a combination of global and MAP-level use of MAPINVISIBLECOLUMNS. The MAP specification overrides the global specification for the specified table.

 
NOMAPALLCOLUMNS 
MAP hr.dep, TARGET hr.dep2;
MAP hr.emp, TARGET hr.emp2, MAPALLCOLUMNS ;
Example 3   Abend with the option because source col2 is not mapped
Source has col1 and col2. Target has col1
Example 4   Abend with the option because col2 is not mapped
Source and target both have col1 and col2 MAP source, TARGET target, COLMAP( col1 = col1, col2 = 'abc' )
Example 5   Abend with the option because col2 is not mapped to the directory
Source and target both have col1 and col2. MAP source, TARGET target, COLMAP( col1 = col1, col2 = @STRCAT(col2, ' '))