The Change Copyright command changes the language specific Copyright
statement in one or all source files in a library for one, generic or
all source members. Only specific source types are supported and
considered for changes. If a language specific COPYRIGHT statement
exists, it is dropped and the new COPYRIGHT statement inserted.
Only the source types RPGLE, CLLE, and PNLGRP are supported.
* If your language provides a *
* COPYRIGHT statement that is *
* not supported, contact the *
* TAA Productivity Tools owner. *
A typical command would be:
CHGCPYRGT SRCFILE(xxx/*ALL) COPYRIGHT('This is ...')
All source files in the named library would be found. All members
headers would be accessed, but only the supported source types would
Since the MBR parameter defaults to *ALL, all members would be
For each supported source type, the source statements would be copied
to a temporary member in QTEMP.
If no language specific COPYRIGHT statement was found, the existing
source is left as is (no changes occur).
If the language specific COPYRIGHT statement is found, the old
version of the COPYRIGHT is dropped and the new version is output to
the temporary member. After all source statements have been copied
to the temporary member, the original member is replaced by the
revised temporary version.
A listing is produced with one line for each of the supported source
types and whether a change occurred or not.
The following standard rules apply for any supported
** Valid source must exist.
** The user must be authorized to change the source which is done
by copying back from the temporary member.
** The new version of the COPYRIGHT will be placed into the
source at the same source statement location as the old
** All lines of source that make up the old version of the
Copyright will be dropped.
** The same Source Sequence number as the first source line of
the COPYRIGHT statement found is used for the first source
line in the revised output. If multiple source lines are
output, each Sequence Number is bumped by .01. The Sequence
number for non-COPYRIGHT lines of source remain unchanged.
** The COPYRIGHT parameter text will appear on displays (such as
DSPPGM DETAIL(*COPYRIGHT) as it was entered in the COPYRIGHT
parameter. When the revised source is output, the CHGCPYRGT
command uses a standard format for how the language specific
COPYRIGHT statement will appear in the source. This is
partially based on the length of the text which is determined
by the last non-blank in the COPYRIGHT parameter. See the
specific language rules for the formatting used.
** The source file maximum width is 240 bytes (the same maximum
A typical statement would be:
H COPYRIGHT('Copyright ABC Co.')
h copyright('Copyright ABC Co.')
** The complete COPYRIGHT keyword and leading parenthesis must
appear in the first record of an H Spec (not in a continuation
record). The keyword can begin in position 7 or any position
** The Copyright text value may be upper or lower case.
** The COPYRIGHT keyword can be upper or lower case. The same
case that is found is used for the output. The output will
have the COPYRIGHT keyword beginning in position 8.
** The existing H spec for COPYRIGHT may extend over multiple
source lines for a maximum of 256 bytes of text.
** The H Spec containing the COPYRIGHT keyword may not contain
any other keywords. This is determined by ensuring the
positions prior to the COPYRIGHT keyword are blank and then
scanning for the 3 character value of Quote/EndParen/Blank.
This allows most combinations of quotes and ending parenthesis
to exist within the COPYRIGHT value.
If the scan value exists, the positions following the ending
parenthesis must be blank. If the COPYRIGHT text value spans
multiple source lines, the last line may not contain another
If multiple keywords exist, the 'Changed' column is flagged as
'***' on the listing and the source is not changed.
** The existing H spec and any continuation lines will be
** Multiple lines may be output. Regardless of the length of the
source file, the text will be formatted for a 92 byte source
file (80 bytes of source statement). The number of lines of
output will depend on the length of the text. The 256 byte
parameter will appear as follows (the first and last record
will also contain a quote surrounding the text):
1 1 - 51 51 Bytes + COPYRIGHT
2 52 - 113 62 Bytes
3 113 - 175 62 Bytes
4 176 - 217 62 Bytes
4 218 - 256 19 Bytes
A typical statement would be:
COPYRIGHT TEXT('Copyright ABC Co.')
** The existing COPYRIGHT command may extend over multiple source
lines for a maximum of 256 bytes of text. All will be
** Multiple lines may be output. The number of lines of output
will depend on the length of the text. Regardless of the
length of the source file, the text will be formatted for a 92
byte source file (80 bytes of source statement). The format
is similar to that by used by SEU prompting except that words
may be split). The 256 byte TEXT parameter will appear as
follows (the first and last record will also contain a quote
surrounding the text and parenthesis):
1 1 - 39 39 Bytes + COPYRIGHT + TEXT
2 40 - 81 42 Bytes
3 82 - 123 42 Bytes
4 124 - 165 42 Bytes
4 166 - 207 42 Bytes
5 208 - 249 42 Bytes
6 250 - 256 7 Bytes
A typical statement would be:
:COPYR.Copyright ABC Co.
with the colon (:) beginning in position 1.
** The COPYR Tag does not apply to Command Help Text (it may
exist, but is not used).
** The existing COPYR Tag may appear in only a single source line
with a maximum of 76 bytes.
** When output, it will appear as ':COPYR.xxxx' (no space before
or after the period).
** If your Copyright text + 7 (length of ':COPYR.'), exceeds the
width of the source file source statement, the text will be
CHGCPYRGT escape messages you can monitor for
None. Escape messages from based on functions will be re-sent.
Command parameters *CMD
SRCFILE The qualified name of the source file to be
processed. The special value *ALL may be entered to
process all source files in a named library.
The library qualifier defaults to *LIBL, but may not
be used if *ALL is specified for the source file
name. *CURLIB may also be used.
COPYRIGHT The text of the Copyright statement. Up to 256
bytes may be entered, but some languages do not
support 256 bytes. See the previous discussion of
SRCMBR The name of the member to be processed. The default
is *ALL for all members.
A specific member or a generic member name may also
See the previous comments.
The following TAA Tools must be on your system:
CHKGENERC Check generic
CVTLIBDBF Convert library data base files
EDTVAR Edit variable
HLRMVMSG HLL Remove message
RTVDAT Retrieve date
RTVDBFA Retrieve data base file attributes
RTVSYSVAL3 Retrieve system value 3
SNDCOMPMSG Send completion message
SNDESCMSG Send escape message
SNDSTSMSG Send status message
None, the tool is ready to use.
Objects used by the tool
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
CHGCPYRGT *CMD TAAPGNE QATTCMD
TAAPGNEC *PGM CLP TAAPGNEC QATTCL
TAAPGNEC2 *PGM CLP TAAPGNEC2 QATTCL
TAAPGNER *PGM RPG TAAPGNER QATTRPG
TAAPGNER11 *PGM RPG TAAPGNER11 QATTRPG
TAAPGNER12 *PGM RPG TAAPGNER12 QATTRPG
TAAPGNER13 *PGM RPG TAAPGNER13 QATTRPG
TAAPGNEC CL pgm - Does CVTLIBDBF if needed
TAAPGNEC2 CL Pgm - Does DSPFD *MBRLIST and reads
TAAPGNER11 RPG Pgm - RPGLE source type
TAAPGNER12 RPG Pgm - CLLE source type
TAAPGNER13 RPG Pgm - PNLGRP source type
TAAPGNER RPG Pgm is the print program called by all other Pgms