Use the following syntax to define new variables using existing variables:
DEFINE VAR newvar = expression
Requests the definition of a new variable.
Provides the name of the new variable you want to define.
Assigns any arithmetic expression, the result of which is the value of the new variable. You can use the following to create the expression:
Delimit all variables, operands, and parentheses with blanks. You can use the following operators in the expression:
+ = Addition
- = Subtraction
* = Multiplication
/ = Division
! = Exponentiation
( ) = Parentheses
Examples: The DEFINE Command
The following examples show ways to enter the DEFINE command:
DEFINE ID TRANID TRANID(1,4)
DEFINE ID PROGID PROGID(3,4)
DEFINE ID MYKEY TRANID ' ' TERMID
DEFINE VAR TRAN %CPUTIME= , ( TRAN CPUTIME * 100 ) / TRAN LIFETIME
The continuation comma allows the command to be continued on a second line.
DEFINE VAR TRAN DCNTMAX = TRAN DCOUNT MAX
DEFINE XID KEY19 PRODUCT=EXPC RECORD=19,
OFFSET=X14 LENGTH=8 TYPE=HEX
The continuation comma allows the command to be continued on a second line.
DEFINE XVAR TERM MYVAR,
PRODUCT=EXPC RECORD=19 OFFSET=X28,
LENGTH=2 TYPE=HEX HDR2=myvar
The continuation commas allow the command to be continued on subsequent lines.
| Copyright © 2012 CA. All rights reserved. | Tell Technical Publications how we can improve this information |