Hi Francois,

These are 2 different statements:
d SYDDSREF E DS Based(Null)

The equivalent for
d SYDDSREF E DS Based(Null)

A template can only be used for defining other data-structures or variables,
but the reference fields cannot be accessed at runtime.
When defining a data structure based on a pointer the data structure
sub-fields and the data structure can be used at runtime

Mit freundlichen Grüßen / Best regards

Birgitta Hauser

"Shoot for the moon, even if you miss, you'll land among the stars." (Les
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
?Train people well enough so they can leave, treat them well enough so they
don't want to.? (Richard Branson)

-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Francois
Sent: Freitag, 22. Mai 2020 22:16
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Any changes to the RPG compiler lately ?

Hi there,

I had to recompile a module from a service program and the compiler issued
"Item MSGID was defined with TEMPLATE and cannot be used in this context."

The code compiled before and would appreciate any idea why it's not
compiling anymore Was there a PTF in the latest CUME that changed the way
referencing a field in a Template DS ?

Here's the code
// DDS Reference Fields Definitions (MSGID defined as a 7A) DCL-DS SYDDSREF
Ext Template END-DS; ...
// @MsgID is a parm that I compare with the length of the defined reference
field MsgID If %Len(@MsgID)>%Len(MsgID);

If I define SYDDSREF the old fashion way, it compiles fine.
And, again the definition with Template above was working before then did
not for unknow reason
d SYDDSREF E DS Based(Null)


Confidentiality Warning/Avertissement de confidentialit?:

This message is intended only for the named recipients. This message may
contain information that is privileged or confidential. If you are not the
named recipient, its employee or its agent, please notify us immediately and
permanently destroy this message and any copies you may have. Ce message est
destin? uniquement aux destinataires d?ment nomm?s. Il peut contenir de
l'information privil?gi?e ou confidentielle. Si vous n'?tes pas le
destinataire d?ment nomm?, son employ? ou son mandataire, veuillez nous
aviser sans tarder et supprimer ce message ainsi que toute copie qui peut en
avoir ?t? faite.
This is the RPG programming on IBM i (RPG400-L) mailing list To post a
message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or
change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related

Help support midrange.com by shopping at amazon.com with our affiliate link:

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].