Ü  MOVEL (Move Left)

·         The MOVEL operation moves characters from factor 2 to the result field and it does that by moving the leftmost character first.

 

 

Example

 


Columns . . . :    6  80                     Edit                             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                   MOVEL     A1            B2                                  130129
0019.00 C                   MOVEL     A1            B2                                  130129
0020.00 C                   MOVEL     A2            B3                                  130129
0021.00 C                   MOVEL     A3            B1                                  130129
0022.00 C                   MOVEL     B1            C3                                  130129
0023.00 C                   MOVEL     B2            C1                                  130129
0024.00 C                   MOVEL     B3            C2                                  130129
0025.00 C                   MOVEL     C1            A3                                  130129
0026.00 C                   MOVEL     C2            A1                                  130129
0027.00 C                   MOVEL     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  AAAAACCC                            

DSPLY  AAAAAAAAAAAA                        

DSPLY  AAAAA                               

DSPLY  AAAABBBBBB                          

DSPLY  AAAAAAAABBBBBBBBBBBB                

DSPLY  AAA                                  

DSPLY  AAAAAAA                             

DSPLY  AAAAACCCCCCCCCCCC 

 

                 

 

 

·        Output Explanation

 

***Here due to MOVEL operation the data will start filling from the left.

 

 

1.  MOVEL      A1            B2  

          Result:  B2= AAAABBBBBB

 

 

 

2.  MOVEL      A3            B1  

 

 

          Result:  B1= AAAAA

 

 

 

 

3.  MOVEL      B3            C2  

           Result:  C2=AAAAAAA

 

4.  MOVEL      C3            A2  

 

           Result:  A2= AAAAACCCC

 

 

 










User Comments:



Subscribe

  Email:



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