Midrange News for the IBM i Community


Posted by: TFisher
Compiler Directives in Free-form RPG
has no ratings.
Published: 20 Feb 2014
Revised: 20 Feb 2014 - 3717 days ago
Last viewed on: 25 Apr 2024 (4911 views) 

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

Compiler Directives in Free-form RPG Published by: TFisher on 20 Feb 2014 view comments(2)

I have been reading up on the free-form RPG that is part of IBM’s Technology Refresh 7. Something that isn’t immediately clear to me is whether or not the /COPY and /INCLUDE compiler directives are going to be allowed or not.  I have read where they only allow /IF, /ELSE, and /ENDIF within a free-form statement.  Is it safe to assume that the other directives can still be used as long as it’s not “within” a free-form statement?  If not, that would be a problem since all our prototypes are stored  outside of our applications.

 

In case you are wondering...I would try it myself, but we don't have everything installed yet to use it.

Return to midrangenews.com home page.
Sort Ascend | Descend

COMMENTS

(Sign in to Post a Comment)
Posted by: bobcozzi
Site Admin ****
Chicagoland
Comment on: Compiler Directives in Free-form RPG
Posted: 10 years 2 months 5 days 22 hours 27 minutes ago

All directives can be used in the updated RPG IV implementation. There is not free vs fixed anymore.

The directives must begin in column 7 or later--no longer restricted to position 7.

The big change is the /IF directives since they can be used to control how code is compiled, they can be used within a statement that spans multiple lines.

Posted by: TFisher
Premium member *
Comment on: Compiler Directives in Free-form RPG
Posted: 10 years 2 months 5 days 20 hours 35 minutes ago

Thanks Bob!  I thought that was the case, but just wanted to be sure.