New suboptions for High Level Assembler (HLASM)
Ingolf24 120000DRN3 Visits (1269)
You may wonder, why the latest compiles with the IBM High Level Assembler (HLASM) show the suboptions NOTRUNC, NOLONGER and NOSIGNED. These are the defaults for new suboptions introduced with APAR PH06572.
HLASM APAR PH06572: HLASM TRUNCATION CHECKS FOR CONSTANTS
Error description: When a constant is defined with an explicit length, the specified value will be truncated to fit if necessary. This could however happen accidentally, so HLASM should provide options to warn about cases which might be in error.
Users affected: Users of HLASM for z/OS, z/VM, zVSE and Linux
Problem description: Optional truncation warnings for DC values
Recommendation: If an explicit length is specified on a DC constant, any specified value is documented as being truncated to that length. Up to now there has been no way to check whether this process is causing values to be changed by accident.
Three new FLAG suboptions are introduced.
Warnings produced by FLAG(TRUNC) could indicate potentially harmful coding errors, so it is recommended that this option should be used where possible (although the default is NOTRUNC in order to avoid triggering new warnings for existing programs).
Warnings produced by FLAG(LONGER) and FLAG(SIGNED) are more likely to be harmless and do not necessarily indicate a coding error, as existing code (including macro instructions supplied with IBM products) may simply be relying on truncation as a way of simplifying source code. These options can be used temporarily to to check for possible errors, but if existing code triggers unnecessary warnings the options should be turned off again.
In some cases the list of FLAG options in the OPTIONS report could now exceed the listing line length, so the list is now continued on the next line if necessary.
Although S-type constants are not affected by the new checks, the existing range checks for an S-type constant were found to be incomplete and have now been fixed to ensure that a negative offset with an explicit base register, for example DC S(-1(9)), will be rejected with message ASMA028E Invalid displacement.
Documentation updates are in HLASM Programmer's Guide, SC26-4941-08.
For more information please see the APAR PH06572.