RPGIV @ Work

A unique site for RPG and System i Lovers


Hi, this site will provide all what you need in System i and RPG developments.

My Name is Chamara Withanachchi, System i Expert and RPG Developer. And in the field for last 11 years.

I hope you will find lot of valuable information from this site

Get the most out of ILE RPG Header specifications Print E-mail
User Rating: / 0
Written by Chamara Withanachchi   

Header specifications (also known as Control Specifications) seemed to almost disappear back around the turn of the century. However, these nifty statements are back in force especially for the ILE programmer.

H option(*srcstmt:*nodebugio) these probably belong in every program. *srcstmt allows finding the source statement line numbers, as opposed to arbitrary object line numbers, when compiling and debugging. *nodebugio prevents debug from stopping on O/I (jumping to F specs) during source debug.

H optimize(*none)
...*none adds debugging display and modify field values but slower run-time

H decedit(*jobrun)
...how do you want the decimal to appear (.,)
H truncnbr(*no)
...*YES means ignore numeric overflow

H DftActGrp(*no)
*YES acts like a 'normal' RPG program, *NO allows ILE features to be used, binding to a service program for example
H ActGrp(*caller)
H bnddir('BIND1':'BIND2')

H datfmt(*MDY/)
...requires 8A fields H datfmt(*USA/)
...requires 10A fields H Debug DateEdit(*YMD)

H Option(*XREF, *NOGEN, *SHOWCPY, *EXT) ...specify compiler options as in this example, a cross-referenced listing is created including any externally described files and fields and including copy source but the object is not created (or generated).

H Indent('-') or H Indent(' ') for example
...compile listing shows indentation based on character value specified, only up to two characters though. Spaces are allowed for indentation.

H copyright('Copyright 2009, Ken LeMaster')
adds copyright information available when displaying programs

You may want to put commonly used H specs into a copybook and just include a "/copy" at the top of your program;
H/copy mylib/qrpglesrc,myHspecs

<Previous   Next>