Constant keyword added to RPG definitions [email protected] (Simon Hutchinson)

​[[{“value”:”As part of the latest Technology Refreshes, IBM i 7.5 TR4 and 7.4 TR10, comes an addition to the variable and data structure definitions. It is now possible to use the constant keyword as part of those definitions to protect them from being changed.
Why would I want to do that?
There are times I want to use a variable, rather than a constant. It might be to contain a date. I would not want this to be changed, either on purpose or by accident.
Below is an example:

01 **free
02 dcl-s StartDate date inz(*sys) const ;
03 dsply StartDate ;
04 StartDate = d’2024-07-04′ ;

Read more »”}]] Read More 

Leave a Reply

Verified by MonsterInsights