rpgle

RPG **FREE : What is the equivalent free-form declaration for a LIKE definition with a relative size


DName+++++++++++ETDsFrom+++To/L+++IDc.Keywords+++++++++++++++++++++++++++++Comments++++++++++++
DQty              S             11p 3 INZ(123.50)                                              
DQtyX             S             +1    LIKE(Qty)                                                
 *. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8 ...+... 9 ...+... 0

How can standalone variables be declared and sized relatively in fully-free RPG?

Here I want to declare QtyX as 12p3


Solution

  • The answer per the manual is

    dcl-s QtyX like(Qty:+1);