Ü  MULT (Multiply)

·         This op-code adds factor-1 with factor-2 to place the multiplication in result field.

·         It can be used for packed, signed, binary, integer, array element, subfield.

·         The H operation extender can be specified to cause the result to be half-adjusted—that is, rounded up.

Factor 1

Op-code

Factor 2

Result Field

Resulting Indicators

       HI                            LO                      EQ

Numeric value 1

MULT(H)

Numeric  value 2

Multiplication result

Result field > 0

Result field < 0

Result field = 0

 

Example


Columns . . . :    6  80                  Browse                             AMINEM/QRPGLESRC
SEU==>                                                                               OP_MULT
FMT D  DName+++++++++++ETDsFrom+++To/L+++IDc.Keywords+++++++++++++++++++++++++++++
*************** Beginning of data ****************************************************
0001.00 Da                S              2  0 INZ(11)                                   130125
0002.00 Db                S              2  0 INZ(22)                                   130125
0003.00 Dc                S              2  0 INZ(0)                                    130125
0004.00 Dd                S              2  0 INZ(0)                                    130125
0005.00 C     b             MULT      a             c                    414243         130130
0006.00 C                   MULT      -1            a                    515253         130130
0007.00 C                   MULT      a             d                    616263         130130
0008.00 C     c             DSPLY                                                       130125
0009.00 C     *In41         DSPLY                                                       130130
0010.00 C     *In42         DSPLY                                                       130130
0011.00 C     *In43         DSPLY                                                       130130
0012.00 C     a             DSPLY                                                       130130
0013.00 C     *In51         DSPLY                                                       130130
0014.00 C     *In52         DSPLY                                                       130130
0015.00 C     *In53         DSPLY                                                       130130
0016.00 C     d             DSPLY                                                       130130
0017.00 C     *In61         DSPLY                                                       130130
0018.00 C     *In62         DSPLY                                                       130130
0019.00 C     *In63         DSPLY                                                       130130
0020.00 C                   SETON                                        LR             130125
****************** End of data *******************************************************


 

 

OUTPUT

 

DSPLY  42

DSPLY  1 

DSPLY  0 

DSPLY  0 

DSPLY  11-

DSPLY  0 

DSPLY  1 

DSPLY  0 

DSPLY   0

DSPLY  0 

DSPLY  0 

DSPLY  1 

 

 





User Comments:





Copyright © Go4as400.com, 2013-2017. Copyright notice