Purpose
Changes the sequence numbers on type 7 and type 8 process parameters.
Parameters that do not have sequence numbers are not assigned new sequence numbers; however, these parameters do maintain their internal relationship to parameters that specify sequence numbers. Sequence numbers specified on parameters that pass control to other process parameters are changed to the appropriate new values.
Syntax
►►─┬────────────────────────────────────────────────────────────────────────┬─►◄ │ ┌─────────────────────── AND ───────────────────────────────┐│ └ RENumber ─▼─┬┬ 7 ┬┬┬───────────────┬ TO new ┬────────────────────────┬┴┘ │└ I ┘│└ start ┬──────┬┘ └ increment BY increment ┘ └┬ 8 ┬┘ └ /end ┘ └ B ┘
Syntax Rules
Specifies a RENUMBER clause; one or more RENUMBER clauses can be associated with a USE parameter. The RENUMBER clause should be coded after any WITH VALUES, CHANGE, and DROP/KEEP clauses associated with the USE parameter.
Specifies a type 7 or type 8 process parameter, respectively. A least one space must follow this specification.
Specifies the beginning of a range of sequence numbers to be renumbered. Start must be a value in the range 0 through 999; the default is 0.
Specifies the end of a range of sequence numbers to be renumbered. End must be a value in the range 0 through 999, preceded by a slash, and equal to or greater than start; the default is 999. During execution, only those parameters with sequence numbers within the specified range are renumbered.
Specifies the starting value of the new sequence numbers. New must be a number in the range 0 through 999; the default is 1. During execution, process parameters are renumbered within the specified range, starting with new.
Specifies an increment value for renumbering. Increment must be a number in the range 1 through 999; the default is 1.
Signals the end of a RENUMBER action and the start of another, as shown in this example:
RENUMBER 7 001/100 TO 5 BY 10 AND 8 001/020
Examples
Sample USE parameters and associated clauses are shown and described below.
Example 1: USE Parameter
USE DEFINITION CUSTFILE USE REPORT CUSTLIST
The first USE parameter copies parameters stored in library member CUSTFILE. The second USE parameter copies parameters stored in library member CUSTLIST.
Example 2: WITH VALUES Clause
USE REPORT 'CUSTLIST' WITH VALUES
(AMOUNT=50
NAME=BROWN
SALES=10000)
This USE parameter copies parameters stored in IDD. Keywords are used to assign values to symbolic parameters in the stored code. The keywords are associated with the symbolic parameters by using information coded on the DEFAULT clause. The values specified on the WITH VALUES clause override any specified default values.
Example 3: WITH VALUES Clause
USE CUSTFILE WITH VAL (50, BROWN, , 'THREE PIECE SUITS')
In this example, argument values replace symbolic parameters in the code stored in library member CUSTFILE. &&1 is assigned a value of 50; &&2 is assigned a value of BROWN; &&3 is assigned a value specified on a DEFAULT clause. The fourth argument is enclosed in quotation marks because it contains embedded spaces.
Example 4: CHANGE Clause
- ◄-Inline code
-
USE *
CHANGE RPTNO TO 12 AND
'52*010' 4/9 TO '410010' AND
'CLIENT-NAME' TO 'NAME'
113CLIENT ACCOUNTS
1151*010 CLIENT-NAME
1152*010 'SALES DISTRICT'
- ◄-More inline code
-
END
-
- ◄-More inline code
-
In this example, the USE parameter modifies inline code that falls between the USE parameter and the END clause.
Report number 11 is changed to Report number 12. Columns 4 through 9 of a type 5 edit parameter are changed as follows: the detail line becomes a header line and the relative column number is changed to an absolute column number. Additionally, CLIENT-NAME changes to NAME within columns 1 through 72 on any records that specify this field name. The length of the records that specify CLIENT-NAME is adjusted to accommodate the shorter value.
Example 5: DROP Clause
USE * DROP FIELD SALARY
DROP ID 20000100/20000175
REC SALARY 1 10 2 DP=2
REC NAME 11 20
0151*010 NAME
0151*020 SALARY 20000100
0161*010 'TOTAL COMPENSATION FOR' 20000125
0162*010 'FACULTY PROFESSORS' 20000150
0162*020 SALARY SZ=11 DP=2 20000175
END
In this example, inline code that appears between USE and END is modified by the DROP clauses. The first DROP clause drops the REC parameter that defines SALARY. The second DROP clause instructs CA Culprit to drop all records with ID values in the range 20000100 through 20000175; that is, the detail line for SALARY and all the type 6 edit parameters coded for Report 01. The modified code generates a report that lists the names of the faculty professors.
Example 6: DROP/KEEP Clause
USE * KEEP 'SALARY' AND 'NAME' DROP ID 20000100 REC SALARY 1 10 2 DP=2 REC NAME 11 20 0151*010 NAME 0151*020 SALARY 20000100 0161*010 'TOTAL SALARY' 0161*020 SALARY SZ=11 DP=2 END
The KEEP clause instructs CA Culprit to eliminate all parameters except for those that specify the character strings SALARY and NAME. The DROP clause instructs CA Culprit to eliminate the parameter with ID 20000100; this parameter also specifies the character string, SALARY.
When a parameter meets both DROP and KEEP criteria, the DROP clause is executed. The code that results from the instructions listed above is shown below. The code will cause a run-time error because SALARY must appear on a SORT parameter or on a type 5 edit parameter in order to appear on a type 6 edit parameter:
REC SALARY 1 10 2 DP=2 REC NAME 11 20 0151*010 NAME 0161*020 SALARY SZ=11 DP=2
Example 7: RENUMBER Clause
USE REPORT AVERAGE WITH VALUES (COUNT=12)
RENUMBER 7 AND
8 50/100 TO 5 BY 10
Library member AVERAGE contains CA Culprit parameters that perform a procedure to compute averages. A symbolic parameter in the code is assigned a value of 12; the keyword COUNT is associated with the symbolic parameter through information coded on the DEFAULT clause in the stored code.
With the first RENUMBER clause, all sequenced type 7 parameters are renumbered starting with 001. The second RENUMBER action renumbers type 8 parameters with sequence numbers in the range 50 through 100; the new sequence numbers begin with 5 and increase by 10.
Example 8: DEFAULT
USE AGERPT ◄-Primary input
WITH VALUES (AMOUNT=50)
DEFAULT &&1=AMOUNT=100 ◄-Copy library member AGERPT
&&2=PERIOD=365
&&3=START=010184
&&4=END=123184
010 AMT &&1 PERIOD &&2
* START-DATE &&3 FINISH-DATE &&4
-
- ◄-More stored code
-
Library member AGERPT contains a report on aging; default values are defined for four symbolic parameters in the stored code. The USE parameter accesses the code stored in AGERPT; the default values defined on the DEFAULT clause replace all symbolic parameters within the stored code, with the exception of &&1, which is assigned a value of 50 in the keyword expression coded on the WITH VALUES clause.
|
Copyright © 2014 CA.
All rights reserved.
|
|