IBM Support

PH42816: SUPPORT LOWER AND UPPER LIMITS ON USING INSTRUCTION

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as new function.

Error description

  • Provide a way to limit the lower and upper addressability limits
    on the USING instruction, applying to instructions which use
    long displacements as well as 12-bit displacements.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED: Users of HLASM for z/OS, z/VM, z/VSE and     *
    *                 Linux                                        *
    ****************************************************************
    * PROBLEM DESCRIPTION: Support lower and upper limit values    *
    *                      for the USING instruction.              *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    There is no way to limit the range of locations which can be
    addressed by a long displacement instruction via a specific
    USING statement.
    
    For consistency, any such limit should also apply in the same
    way to standard displacement instructions if the limit values
    lie within the range of such instructions.
    
    The solution should also allow multiple discontiguous areas to
    be based on the same set of base registers.
    

Problem conclusion

Temporary fix

Comments

  • The USING instruction now supports optional lower and upper
    limit suboperands to restrict the range of addressability,
    in addition to the existing end limit which only applies for
    12-bit displacements.
    
      USING (base,end,lower,upper),...
    
    The parentheses are only needed if more than one suboperand is
    specified.  Trailing commas are optional if trailing suboperands
    are unused.
    
    The lower and upper suboperands specify addressability range
    limits for this USING statement, regardless of whether a
    standard or long displacement is being used.  Both must be
    locations within the same relocatable area as the base address,
    and can have either a positive or negative offset from the base.
    
    The lower limit specifies the first location that can be
    addressed using this USING statement, and the upper limit
    specifies the end of the area which can be addressed (as for the
    existing 12-bit end limit option), which is one byte beyond the
    last addressable location.
    
    It is an error if the lower value is greater than or equal to
    the upper value.
    
    The lower and upper locations are not necessarily addressable in
    practice, even by long displacement instructions.  They are only
    used to establish the maximum addressability range.
    
    For an ordinary USING or non-dependent labeled USING, the
    default is that no limit applies, which is represented by the
    relevant limit being set to the base address plus x'80000000'.
    For the lower limit, this is simply treated as the most negative
    number.  For the upper limit, when the value is decremented by
    one, wrapping round to positive, this gives the highest
    addressable offset as x'7FFFFFFF', the maximum possible.
    
    For a dependent USING, the defaults are inherited from the
    supporting base USING.
    
    These limits allow the same base registers to be used to address
    multiple discontiguous parts of the same section, for example as
    follows:
    
      USING (codebase,,code,code_end),R3,R4,R5
      USING (codebase,,static,static_end),codebase
      USING (codebase,,literals,literals_end),codebase
    
    The Active Usings headings now include the lower and upper
    limits in the range information if present, shown as signed
    hexadecimal offsets relative to the location addressed by the
    first base register.
    
    In the Using Map report, if a lower or upper limit is present,
    the first line for a USING instruction is followed by an
    additional line showing any lower limit under the Value column
    and any upper limit under the Range column.  Both values are
    relative to the location addressed by the first base register.
    
    In some cases the Using Map for a dependent USING incorrectly
    showed a default range (00001000 for 4K bytes) instead of either
    showing zero (if the range start address is not addressable
    using a 12-bit displacement) or the remaining range from the
    dependent USING offset to the end of the 12-bit addressability
    range.  This has been corrected.
    
    The ADATA USING Map record has not been changed at present as it
    would require an incompatible update to add the new information.
    
    DOCUMENTATION UPDATES:
    
    In the HLASM Language Reference, SC26-4940-09, the description
    of each of the three forms of the USING instruction (Ordinary
    USING, Labeled USING and Dependent USING) is updated as follows:
    
    In the syntax diagram, optional positional suboperands are added
    for the lower and upper limit suboperands following the end
    limit, where the commas are only required if any following
    suboperand is used.
    
      (base,end,lower,upper)
    
    The descriptions of the lower and upper limits are added
    following the end limit as follows:
    
     lower
       Specifies a lower limit for the addressability range, which
       applies both for 12-bit displacements and for long
       displacements.  The lower limit must have the same
       relocatability attribute as the base and can have any
       negative or positive offset from the location addressed by
       the first base register.  An offset of x'80000000' is
       equivalent to no limit.
    
     upper
       Specifies an upper limit for the addressability range, which
       applies both for 12-bit displacement and for long
       displacements.  This is one more than the maximum addressable
       byte address, as for the end limit.  The upper limit must
       have the same relocatability attribute as the base and can
       have any negative or positive offset from the location
       addressed by the first base register, but if a lower limit is
       present the upper limit must be greater than the lower limit.
       An offset of x'80000000' is equivalent to no limit.
    
    The first paragraph following the heading "Range of an ordinary
    USING instruction" is replaced with the following three
    paragraphs:
    
     For instructions with 12-bit displacements, the maximum range
     of an ordinary USING instruction (called the "ordinary USING
     range", or the "USING range") is the 4096 bytes beginning at
     the base address specified in the USING instruction.  For
     long-displacement instructions, the maximum range is the
     addresses between (base_address-524288) and
     (base_address+524287).
    
     The range for 12-bit displacements may be limited by specifying
     an end limit address which is less than the end of the maximum
     range.  The range for both types of displacement may be limited
     by specifying lower and upper limit values.
    
     Addresses that lie within the USING range can be converted from
     their implicit to their explicit base-displacement form using
     the designated base registers; those outside the USING range
     cannot be converted.
    
    In the HLASM Programmer's Guide, SC26-4941-07, the following
    changes are made:
    
    In the "Source and object" section point 16 of the Active
    Usings headings is modified to show the range in the form
    (range,lower,upper) if a lower or upper limit is present.
    The lower and upper limits are shown as hexadecimal offsets
    from the location addressed by the first base register.
    
    In the "USING map" section a new example will be provided with
    lower limit (13) and upper limit (14) immediately below fields
    (6) for the value and (7) for the range.  These are documented
    in additional points as follows:
    
     (13)
       For a USING statement which specified a lower limit, this
       shows the lower limit relative to the location addressed
       by the first base register.
    
     (14)
       For a USING statement which specified an upper limit, this
       shows the upper limit relative to the location addressed
       by the first base register.
    
    The documentation of message ASMA313E is modified to cover
    the case where it applies to the upper and lower limits, and
    to correct the system action:
    
     ASMA313E The end value specified in the USING is less than or
              equal to the start value
    
     Explanation
       The end limit value specified is less than or equal to the
       base value, or the upper limit value is less than or equal to
       the lower limit value, which results in a zero or negative
       range.
    
     System action
       The statement is ignored.
    
    The documentation of message ASMA314E is modified to refer
    to "limit" instead of "end" throughout, and the explanation
    is modified, as follows:
    
     ASMA314E The base and limit values have differing relocation
              attributes
    
     Explanation
       The base value and the end limit, lower limit or upper limit
       value have differing relocation attributes; that is, they are
       defined in different sections.
    
     System action
       The statement is ignored.
    
     Programmer response
       Change the USING statement to specify a limit value that is
       in the same section as the base value.
    
    END OF DOCUMENTATION UPDATES
    

APAR Information

  • APAR number

    PH42816

  • Reported component name

    HLASM MVS, VM &

  • Reported component ID

    569623400

  • Reported release

    160

  • Status

    CLOSED UR1

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    YesSpecatt / New Function / Xsystem

  • Submitted date

    2021-12-15

  • Closed date

    2022-01-20

  • Last modified date

    2022-02-01

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

    UI78977 UI78978 UI78979

Modules/Macros

  •    ASMAINFO ASMA2F   ASMA2G   ASMA2I   ASMA2R
    ASMA2W   ASMA2Z   ASMA26   ASMA7EN  ASMA7UE  ASMA9Z   ASMA92
    

Publications Referenced
SC26494009SC26494107   

Fix information

  • Fixed component name

    HLASM MVS, VM &

  • Fixed component ID

    569623400

Applicable component levels

  • R160 PSY UI78978

       UP22/01/21 P F201

  • R360 PSY UI78977

       UP22/01/20 P 2201

  • R689 PSY UI78979

       UP22/01/20 I 1000

Fix is available

  • Select the PTF appropriate for your component level. You will be required to sign in. Distribution on physical media is not available in all countries.

[{"Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSENW6","label":"High Level Assembler and Toolkit Feature"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"160"}]

Document Information

Modified date:
02 February 2022