RPG OS/400 is an actively used programming language created in 1959.

60Years Old 6,321Users 33Jobs

Example code from Wikipedia:

ctl-opt main(GetCustInf);
       dcl-ds ARMSTF1 ext end-ds;
       dcl-proc GetCustInf;
         dcl-pi *n extpgm('CUS001');
           inCusNo like(arCNum) const;
           outName like(arName);
           outAddr1 like(arAdd1);
           outAddr2 like(arAdd2);
           outCity like(arCity);
           outState like(arStte);
           outZip like(arZip);
         end-pi;
         exec sql select arName, arAdd1, arAdd2, arCity, arStte, arZip
                  into  :outName, :outAddr1, :outAddr2, :outCity, :outState,
                        :outZip
                  from   ARMSTF1
                  where  arCNum = :inCusNo
                  fetch first 1 row only
                  with CS
                  use currently committed;
         return;
       end-proc;
Edit

Last updated February 11th, 2019