Free Form Definitions

From MidrangeWiki
Revision as of 14:11, 29 May 2014 by Starbuck5250 (talk | contribs) (Initial page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

One of the major new features of ILE RPG, introduced in 7.1, is free form definition specifications.

Features

  • Removes the column restrictions on definitions.
  • Can be interspersed with standard, fixed form, definitions.
  • /free and /end-free no longer required.

Requirements

  • IBM i 7.1 or higher.
  • 7.1 PTF 5770WDS SI51094.
  • If using SQLRPGLE, 7.1 PTF Group SF99701 level 26 or higher.

Examples

<source lang="rpg">

    D* fixed-form declarations
    D string        S       50A VARYING 
    D date          S         D DATFMT(*MDY) 
    D obj           S         O CLASS(*JAVA:'MyClass') 
    D ptr           S         * PROCPTR 
   
      // free-form declarations 
      DCL-S string VARCHAR(50); 
      DCL-S date DATE(*MDY); 
      DCL-S obj OBJECT(*JAVA:'MyClass'); 
      DCL-S ptr POINTER(*PROC);
    
      // constants
      DCL-C max_count 200; 
      DCL-C deleted 'D'; 

</source >

Links

Dawn May: Free format RPG and TR7


This article is a stub. You can help by editing it.