|
 |
 |
 |
Welcome to Code400.com
|
Okay...We all like to get free stuff..Right?!?
Well thats what we are offering here....Free Stuff
- Free storage for your source code.
- Free access to code
samples. (site search)
- Free place to ask questions or just say what you want.
We are interested in what you have to say.
If you can’t find what your’e looking for on this site....
We will add it.
The small print says: We provide the source code on this site as only
a guide. We do not recommend that anyone run any of the code provided
on this site without first testing it.
If you choose to download source from this site directly onto
your production box without testing....Well, YOU are completely to
blame and we don’t want to hear about it.
Random QuoteThere are only two kinds of scholars; those who love ideas and those who hate them.
Emile Chartier
| |
 |
 |
|
Can I set up some default values for my control (H)
specifications in an RPG program?
Can I set up some default values for my control
(H) specifications in an RPG program?
A: Yes, the RPG compiler looks for control (H)
specifications in two other locations, if
none are specified in the program's
source member:
A data area called RPGLEHSPEC anywhere in
the library list, and DFTLEHSPEC in
library QRPGLE.
For RPG/400, these data areas are called
RPGHSPEC in *LIBL and DFTHSPEC in QRPG.
To copy some RPG H specifications into
every ILE RPG program, create a data
area named RPGLEHSPEC and put the keywords
and values in it. The data area can be as
long as required to contain the keywords
and values. Since the compiler stops
looking as soon as it finds a valid
control specification, you can replace
the data area options by coding values
in the H specifications of an individual
program, or ignore everything in the data
area by including a blank H specification.
Be very careful of this last one. I had
gotten out of the habit of using * on
blank comment lines since it is not
required in RPG IV, but a line with
just an H in column 6 anywhere will
ignore all the options in your data
area, so be sure to always use H*
for any blank lines.
You could use this command:
CRTDTAARA DTAARA(RPGLEHSPEC) TYPE(*CHAR) LEN(112)
VALUE('Option(*SRCSTMT:*NODEBUGIO)') +
TEXT('Default Control (H) Specs for RPG IV')
Select "work with data areas type options"
and press enter.
On the compiler listing, the first pages
will show the defaults for all the options,
so it looks like your data area was ignored.
Look farther down past the last H specification
to see the effects of the override.
And finally, be sure to document in your programs
that you are using the data area to avoid
driving maintenance programmers crazy in the
future trying to identify the source
of these compiler options.
|
| |