Does anyone KNOW how the binder organises copyright statements in an
ILE program or service program? These are text strings embedded in the
compiled object using:
o COPYRIGHT TEXT('XYZ 2009') CL command
o #pragma comment(copyright, "XYZ 2009") C directive
o COPYRIGHT('XYZ 2009') RPG IV H-spec
o etc.
My problem is duplicate entries appearing in the copyright section of
the output from DSPPGM or DSPSRVPGM.
My observation is that the binder rationalises copyright statements
such that only one occurrence of a given copyright string should appear.
For example: If I have a program consisting of three modules A, B, and
C, and each module source contains the following:
H COPYRIGHT('(C) XYZ 2009')
then each resulting compiled module will show "(C) XYZ 2009" with
DSPMOD DETAIL(*COPYRIGHT). When these three modules are bound into a
*PGM object DSPPGM DETAIL(*COPYRIGHT) will show only one instance of
"(C) XYZ 2009".
If one module has a different copyright value then DSPPGM
DETAIL(*COPYRIGHT) will show only two strings e.g.:
"(C) XYZ 2009"
"(C) ABC 2000, 2004."
indicating that the duplicates have been merged.
If all three modules have different copyright values then DSPPGM
DETAIL(*COPYRIGHT) will show all three strings.
For this problem I have a *PGM object with 17 bound modules. 13 of
them have exactly the same copyright statement. 1 has no copyright
statement. The remaining three modules each have different copyright
statements.
I was expecting the *PGM object to have 4 copyright statements but I
get 5. The statement from the 13 modules is duplicated.
As part of my investigation I have built the *PGM object in stages by
specifying OPTION(*UNRSLVREF) which allows me to create a *PGM object
with only some of the modules even though all are need to actually run
the program. This shows that 4 of the 13 modules cause the
duplication. If the program is built using only these 4 modules there
is only one copyright statement in the resulting program. If I include
any of these 4 modules with any of the other 9 modules that share the
same copyright statement I get 2 duplicate copyright statements.
Reducing further if I include only the entry module and any one of the
4 problematic modules (i.e., a 2-module program) I get duplicate
copyright statements. If I include only the entry module and any or
all of the other 9 modules I get a single copyright statement.
Although this does not affect the operation of the program the
duplicate copyright statements look extremely ugly.
I KNOW the copyright statements in the 13 modules are IDENTICAL
because they come from the same common include.
So ... what's going on?
Regards,
Simon Coulter.
--------------------------------------------------------------------
FlyByNight Software OS/400, i5/OS Technical Specialists
http://www.flybynight.com.au/
Phone: +61 2 6657 8251 Mobile: +61 0411 091 400 /"\
Fax: +61 2 6657 8251 \ /
X
ASCII Ribbon campaign against HTML E-Mail / \
--------------------------------------------------------------------
As an Amazon Associate we earn from qualifying purchases.