Wednesday, July 8, 2009

(Tips) Uses of OVERLAY Op-Code AS/400 RPG ILE

The OVERLAY keyword overlays the storage of one subfield with that of another
subfield, or with that of the data structure itself. This keyword is allowed only for
data structure subfields.

Usage:
OVERLAY(name{:pos | *NEXT})

The Name-entry subfield overlays the storage specified by the name parameter at
the position specified by the pos parameter. If pos is not specified, it defaults to 1.

Examples:
A. Storage Allocation of Subfields with Keywords DIM and OVERLAY











B. Storage Allocation of Subfields with Keywords DIM and OVERLAY










C. Defining Subfield Overlay Positions with *NEXT








No comments:

Post a Comment