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
- 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.
- 7.3 Reference: What's new since 7.3: https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/rzasd/rpgrelv7r3post.htm
- 7.4 Reference: What's new in 7.4: https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_74/rzasd/rpgrelv7r4.htm
Was this topic helpful?
Document Information
Modified date:
11 December 2019
UID
ibm11107693