Purpose
Modifies copied or inline code:
Syntax
Col 1 ▼ ►►─── =CHANGE ─┬─────────────────────────┬────────────────────────────────────► └─ Rptno = report-number ─┘ ►─┬──────────────────────────────────────────────────────────────────────────► └─ Old = ─┬─ old-id ──────────────┬─ NEW = new-id ──────────────────────── └─ ( start-id, end-id ) ─┘ ►─────────────────────────────────┬──────────────────────────────────────────►◄ ─┬─────────────────────────────┬─┘ └─ Incr = sequence-increment ─┘
Syntax Rules
Identifies an =CHANGE clause. Within each =MACRO parameter, =CHANGE clauses are processed after any =DROP clauses.
Changes the report number in columns 2 and 3 of report-specific parameters to the value specified by report-number. Report-number must be a number in the range 00 through 99.
No more than one RPTNO= keyword expression can be associated with a single =MACRO parameter. Parameters such as input definition parameters that do not specify report numbers are not affected by this instruction.
Specifies that edit or process parameters identified in the OLD= keyword expression are to be renumbered according to the value specified in the NEW= keyword expression.
Identifies an edit or process parameter to be changed, as follows:
Each copied or inline parameter, starting with column 4, is compared with the value of old-id for as many characters as are specified. When a match is found, the copied parameter is renumbered as specified by the NEW= keyword expression. If more than one OLD= keyword expression applies to a record, only the task associated with the first OLD= keyword expression is performed.
Identifies a range of edit parameters or process parameters to be renumbered. The range must be enclosed in parentheses. A comma or at least one space must separate the values specifying the range.
During processing, the copied or inline parameter is compared to the values specifying the range, beginning with column 4. When a match is found, the parameters within the range are renumbered as specified by the NEW= keyword expression (see below). If more than one OLD= keyword expression applies to the range of parameters, only the task associated with the first OLD= keyword expression is performed.
Modifies the value or values identified in the OLD= keyword expression. The value of new-id must refer to the same type of parameter (that is, an edit or a process parameter) referenced in the OLD= keyword expression. If new-id refers to a process parameter, it must specify a sequence number in the range 000 through 999.
The value of new-id replaces all parameters specified by the OLD= keyword expression, starting with column 4 of each parameter. For example, if NEW=51, then the value 5, which identifies a type 5 edit parameter, replaces the value in column 4, and the value 1, which identifies edit line number 1, replaces the value in column 5 for all edit parameters identified in the OLD= keyword expression.
Edit parameters that are to be renumbered can be submitted in any order since CA Culprit sorts the parameters before renumbering occurs. Process parameters with sequence numbers can also be submitted in any order; the following considerations apply if sequence numbers are modified:
RESULT FIELD nnn LEFT UNCHANGED
A keyword expression that specifies the increment value for renumbered process parameters. Sequence-increment must be a 3-digit number in the range 000 through 999; the default is 001.
Usage
The following coding considerations apply to =CHANGE:
Note: Within each =MACRO parameter (that is, =MACRO and any associated parameters), a maximum of 20 keyword expressions (that is, REC=, TYPE=, CNST=, OLD=, and NEW=) is permitted. Each occurrence of a keyword expression must appear entirely on one line.
Examples
Sample =MACRO parameters and associated parameters are shown and described below.
Example 1: =DROP
INPUT 80 =MACRO 'PARMSET' =DROP INPUT REC=FIELDA REC=FIELDC CNST=WORKFLD1 =MEND
PARMSET is the name of the module defined to IDD; it contains the set of parameters inserted into the CA Culprit parameter stream. =DROP deletes the INPUT record, REC parameters for FIELDA and FIELDC, and a work field parameter, WORKFLD1. =MEND completes the =MACRO parameter. An alternative INPUT parameter replaces the one dropped by the =MACRO parameter.
Example 2: =CHANGE
=MACRO PARMSET =CHANGE OLD=51, NEW=52, OLD=7010, NEW=7500 =CHANGE OLD=(7100,7200) NEW=(7600) INCR=002 =MEND
In this example, the parameters stored in the library member PARMSET are modified for the CA Culprit run. The first =CHANGE converts all type 5 edit parameters that specify edit line 1 to parameters that specify edit line 2; a type 7 process parameter with sequence number 010 is renumbered with sequence number 500. The second =CHANGE clause renumbers type 7 process parameters with sequence numbers between 100 and 200. The new sequence numbers start with 600 and increase by 002.
An alternative way of coding the above example using one =CHANGE clause and a continuation line follows:
=CHANGE OLD=51 NEW=52, OLD=7010 NEW=7500 *OLD=(7100,7200) NEW=(7600) INCR=002
Example 3: =DROP/=CHANGE
INPUT CARD =MACRO PARMSET (SORT-1,SORT-2) =DROP INPUT TYPE=4 TYPE=(8000,8499) =DROP TYPE=3 =CHANGE RPTNO=07 =MEND
SORT-1 and SORT-2 are arguments that replace symbolic parameters &&1 and &&2 stored in the parameters in library member, PARMSET. The =DROP clauses eliminate the following records from the code copied from PARMSET: the INPUT parameter, all type 4 edit parameters, the title parameter, and type 8 process parameters with sequence numbers in the range 000 to 499. Other type 8 parameters are retained, except for any unsequenced type 8 parameters that immediately follow sequence number 499. All remaining report-specific parameters are changed so that 07 appears in columns 2 and 3.
Example 4: =CHANGE Clause
=MACRO * =CHANGE RPTNO=02 =MEND 0151*001 FIELD-1 0151*002 FIELD-2 - ◄Inline parameters to be - modified - 0151*026 FIELD-26 =MACRO * =MEND - - ◄-Other CA-Culprit parameters -
=MACRO * indicates that inline parameters are to be modified. The type 5 edit parameters for fields FIELD-1 through FIELD-26 are changed so that 0151 becomes 0251, reflecting a new report number. The second =MACRO * serves only to stop the effect of changes resulting from the preceding =MACRO parameter. The second =MACRO * parameter would not be necessary if the parameters to be changed occurred at the end of the parameter stream.
Example 5: =DROP Clause
=MACRO * =DROP TYPE=7010 =MEND 227010 MOVE FIELD-A TO FIELD-B 227 MOVE FIELD-B TO FIELD-C 227 TAKE 1 227020 TAKE 2
=MACRO * indicates that parameters to be modified follow inline. The type 7 process parameter containing sequence number 010 is dropped; the two type 7 parameters that immediately follow are also dropped because they do not specify sequence numbers. The only parameter that remains is the type 7 process parameter with sequence number 020.
|
Copyright © 2014 CA.
All rights reserved.
|
|