Ü MOVE (P)

 

Factor 1

Op-code

Factor 2

Result Field

Resulting Indicators

       HI                            LO                      EQ

Data attribute

MOVE(P)

Source field 

Target field Padded on the left

 

 

 

 

o   If factor 2 is shorter than the length of the result field, a P specified in the operation extender position causes the result field to be padded on the left after the move occurs.

 

Example

 


Columns . . . :    6  80                     Browse                          AMINEM/QRPGLESRC
SEU==>                                                                               OP_MOVE1
FMT D  DName+++++++++++ETDsFrom+++To/L+++IDc.Keywords+++++++++++++++++++++++++++++
*************** Beginning of data ****************************************************
0001.00 D A1              S              5A   INZ('AAAA') VARYING                       130129
0002.00 D A2              S             10A   INZ('AAAAAAAA') VARYING                   130129
0003.00 D A3              S             20A   INZ('AAAAAAAAAAAA') VARYING               130129
0004.00 D B1              S              5A   INZ('BBBBB')                              130129
0005.00 D B2              S             10A   INZ('BBBBBBBBBB')                         130129
0006.00 D B3              S             20A   INZ('BBBBBBBBBBBBBBBBBBBB')               130129
0007.00 D C1              S              5A   INZ('CCC') VARYING                        130129
0008.00 D C2              S             10A   INZ('CCCCCCC') VARYING                    130129
0009.00 D C3              S             20A   INZ('CCCCCCCCCCCCCCCCC') VARYING          130129
0010.00 C     A1            DSPLY                                                       130129
0011.00 C     A2            DSPLY                                                       130129
0012.00 C     A3            DSPLY                                                       130129
0013.00 C     B1            DSPLY                                                       130129
0014.00 C     B2            DSPLY                                                       130129
0015.00 C     B3            DSPLY                                                       130129
0016.00 C     C1            DSPLY                                                       130129
0017.00 C     C2            DSPLY                                                       130129
0018.00 C     C3            DSPLY                                                       130129
0019.00 C                   MOVE(P)   A1            B2                                  130129
0020.00 C                   MOVE(P)   A2            B3                                  130129
0021.00 C                   MOVE(P)   A3            B1                                  130129
0022.00 C                   MOVE(P)   B1            C3                                  130129
0023.00 C                   MOVE(P)   B2            C1                                  130129
0024.00 C                   MOVE(P)   B3            C2                                  130129
0025.00 C                   MOVE(P)   C1            A3                                  130129
0026.00 C                   MOVE(P)   C2            A1                                  130129
0027.00 C                   MOVE(P)   C3            A2                                  130129
0028.00 C     A1            DSPLY                                                       130129
0029.00 C     A2            DSPLY                                                       130129
0030.00 C     A3            DSPLY                                                       130129
0031.00 C     B1            DSPLY                                                       130129
0032.00 C     B2            DSPLY                                                       130129
0033.00 C     B3            DSPLY                                                       130129
0034.00 C     C1            DSPLY                                                       130129
0035.00 C     C2            DSPLY                                                       130129
0036.00 C     C3            DSPLY                                                       130129
0037.00 C                   SETON                                            LR         130129
****************** End of data *******************************************************



OUTPUT

DSPLY  AAAA               

DSPLY  AAAAAAAA          

DSPLY  AAAAAAAAAAAA        

DSPLY  BBBBB                          

DSPLY  BBBBBBBBBB                     

DSPLY  BBBBBBBBBBBBBBBBBBBB           

DSPLY  CCC                            

DSPLY  CCCCCCC                        

DSPLY  CCCCCCCCCCCCCCCCC              

DSPLY  AAAA                                 

DSPLY     AAAAA                             

DSPLY           AAA                         

DSPLY  AAAAA                                

DSPLY        AAAA                           

DSPLY              AAAAAAAA                 

DSPLY  AAA                                   

DSPLY  AAAAAAA                              

DSPLY              AAAAA                    

 

 

 

Explanation of OUTPUT

 

1.  MOVE(P)   A1            B2                                 

 

MOVE(P) pic 1                                    

          Result:  B2=       AAAA

 

      All the above B in red will be removed while padding.

 











User Comments:



Subscribe

.  


Copyright © www.go4as400.com, 2013-2023. Copyright notice   Terms of services   Privacy policy