IBM Support

SAMEPOS keyword for 7.3 with a PTF

General Page

You are in: RPG Cafe > SAMEPOS keyword for 7.3 with a PTF

Short URL: http://ibm.biz/rpg_samepos_keyword

RPG Cafe: SAMEPOS keyword for 7.3

New SAMEPOS keyword for the ILE RPG compiler in 7.3

  • PTF SI69572 for 7.3 is available.

PTF

7.3:
  • ILE RPG compiler: SI69572

Details

Brief description of the SAMEPOS keyword

SAMEPOS(other_subfield) positions the new subfield at the same position as the parameter subfield. The new subfield must follow the SAMEPOS subfield in the data structure.

Unlike the OVERLAY keyword, the subfield defined with SAMEPOS doesn’t have to fit within the overlaid subfield.

dcl-ds ds1 qualified;
   x char(10);
   y char(20) overlay(x); // Invalid: Y does not fit in X
end-ds;
dcl-ds ds2 qualified;
   x char(10);
   y char(20) samepos(x); // Valid. Y starts at position 1, the same position as X
end-ds;

RDi support

RDi supports the SAMEPOS keyword starting in version 9.6.0.6.

Documentation in the IBM Knowledge Center

The ILE RPG Reference and ILE RPG Programmer's Guide in the 7.3 and 7.4 IBM Knowledge Center are updated with full information about the SAMEPOS keyword. Start at the "What's New Since 7.3" or the "What's New in 7.4" section in the Reference.

[{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SS69QP","label":"Rational Development Studio for i"},"Component":"ILE RPG Compiler","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
11 December 2019

UID

ibm11107693