MAC-PAC Homecontact ussupport login 
Documentation > MAC-PAC Reference Library > Distribution > Expert Configurator > Key Concepts and Procedures > Operands

Operands

 

Syntax expressions are composed of one or more elementary syntax expressions.  The arithmetic or logical operation between two variables of an elementary syntax expression is specified by the operand used within that expression.  Operand codes are defined in category Y02 in the Reference File.  The operand code is user-defined but the system identifier and meaning are constant.  The Operand Codes listed below are the codes supplied in the standard software.

Operations are limited to specific variable types  That is, variable one (V1) and variable two (V2) must be of a certain type for an operator to be used.  The types available are:

 

L

Logical (false or true)

A

Alphanumeric

N

Numeric

M

Multiple variable table

T

Validation Table

 

The following is a list of all the operands available for syntax expressions on the Expert Configurator (ID is system identifier).

 




ID

MAC-PAC
Supplied
Operand
Codes




Meaning


Valid
Types
(V1,V2)



Result
Type




Nature of Operation

01

LT

Less than

(N,N)

L

(V1 - V2)

02

LE

Less than or equal

(N,N)

L

(V1 -= V2)

03

+

Addition

(N,N)

N

(V1 + V2)

04

-

Subtraction

(N,N)

N

(V1 - V2)

05

/

Division

(N,N)

N

(V1 / V2)

20

X

Multiplication

(N,N)

N

(V1 X V2)

06

GT

Greater than

(N,N)

L

(V1 + V2)

07

GE

Greater than or equal

(N,N)

L

(V1 += V2)

08

=

Equal to

(L,L)
(A,A)
(N,N)

L
L
L

(V1 = V2)

09

RD

Round Down

(N,N)

N

(V1 RD V2)
=(V1 / V2) X V2
Note: Integer Division

10

RU

Round up

(N,N)

N

(V1 RU V2)
=((V1/V2) X V2) =V2 if remainder is not zero.
Note: Integer Division

11

C1

Concatenate one character

(A,A)
(A,N)

A
A

(V1 C1 V2)V1 concatenated with the first alphanumeric character or the first non-decimal numeric character of V2.

12

C2

Concatenate two characters

(A,A)
(A,N)

A
A

(V1 C2 V2)V1 concatenated with the first two alphanumeric characters or the first two non-decimal numeric characters of V2.

13

C3

Concatenate three characters

(A,A)
(A,N)

A
A

(V1 C3 V2)V1 concatenated with the first three alphanumeric characters or the first three non-decimal numeric characters of V2.

14

C4

Concatenate four characters

(A,A)
(A,N)

A
A

(V1 C4 V2)V1 concatenated with the first four alphanumeric characters or the first four non-decimal numeric characters of V2.

15

EM

Element of Multiple Option table

(A,M)
(N,M)

L

(V1 EM V2)V1
= 0 where 0 is an operation in the multiple option table identified by V2.

16

EL

Element of Validation Table

(A,T)

L

(V1 EL V2)V1
= V(i)  where V(i) is a variable within the validation table identified by V2.

17

&

Logical AND

(L,L)

L

(V1 & V2)True if V1 is true and V2 is true; otherwise false.

18

OR

Logical OR

(L,L)

L

(V1 OR V2)False if V1 is false and V2 is false, otherwise true.

19

IF

Logical IF

(A,L)
(N,L)

A
N

(V1 IF V2)

21

SA

Substring after

(A,N)

A

(V1 SA V2)Result will be all characters from V1 after and including the position identified by V2.

22

SB

Substring before

(A,N)

A

(V1 SB V2) Result will be all characters from V1 before and including the position identified by V2.

 

Note:    All variables that are numeric must be positive numbers.

 

ID

Operand Code

Considerations

04

Subtraction

Result must not be negative.

05

Division

Variable 2 cannot be zero.

09

Round Down

Variable 2 cannot be zero.

10

Round Up

Variable 2 cannot be zero.

11

Concatenate 1

Variable 1 cannot be greater than 14 characters long.  Variable 1 cannot be greater than 14 characters long.

12

Concatenate 2

Variable 1 cannot be greater than 13 characters long.  If variable 2 is numeric and less than one, then zeros will be concatenated.

13

Concatenate 3

Variable 1 cannot be greater than 12 characters long.  If variable 2 is numeric and less than one, zeros will be concatenated.

14

Concatenate 4

Variable 1 cannot be greater than 11 characters.  If variable 2 is numeric and less than one, zeros will be concatenated.

15

Element Of Multiple Option Table

Variable 1 must be the same type as the options in the Multiple Option Table.

19

 

Result
V1 If variable 1 is numeric or alphanumeric and variable 2 is true.

0 If variable 1 is numeric and variable 2 is false.

Blank If variable 1 is alphanumeric and variable 2 is false.

21

Substring After

Variable 2 must be a whole number between 1 and 15.

22

Substring Before

Variable 2 must be a whole number between 1 and 15.

 

Note:  All variables that are numeric must be positive numbers.