Created On:  07 August 2010

Problem:

When compiling a program in Mainframe Express, the compiler does not issue a warning for alphanumeric MOVE operations when the target length is smaller than the source length.

Resolution:

Use the MOVE-LEN-CHECK directive. This directive causes the compiler to check source and target lengths for alphanumeric MOVE operations and issues a warning message (166) if they are different. If you do not specify a parameter, or if you set parameter to ALL, a warning message (166) is issued if the source and target lengths are different.

If you set parameter to TRUNC, a warning message (1247) is issued when the source length is greater than the target length.

Any warning messages produced by enabling this directive are only visible if WARNINGS"2" or WARNINGS"3" is selected.

Syntax:

>>-.---.-.----.-MOVE-LEN-CHECK--.---------------.--.---><

   -/-                        --"parameter"--       

              -NOMOVE-LEN-CHECK-------------------

Parameters:

parameter ALL or TRUNC

Properties:

Default: NOMOVE-LEN-CHECK

Phase: Syntax check

$SET: Any
Incident #2452881