Ü  GOTO (Go To)

·         It takes the control to a specified Tag-label or End sob-routine label.

¤  Tag label

 

Factor 1

OpCode

Factor 2

Result Field

Resulting Indicators

       HI                            LO                      EQ

GOTO

Tag label

 

 

 

 

Example

 


Columns . . . :    6  80                      Edit                            AMINEM/QRPGLESRC
SEU==>                                                                                OP_CABXX
FMT D  DName+++++++++++ETDsFrom+++To/L+++IDc.Keywords+++++++++++++++++++++++++++++
*************** Beginning of data *****************************************************
0001.00 Da                S              2  0 INZ(11)                                   130128
0002.00 Db                S              2  0 INZ(22)                                   130128
0003.00 Dc                S              2  0 INZ(11)                                   130128
0004.00 Dn                S              2  0 INZ(0)                                    130128
0005.00 C     TAG_A         TAG                                                         130128
0006.00 C     a             CABEQ     c             TAG01                               130128
0007.00  *                                                                              130128
0008.00 C     TAG_B         TAG                                                         130128
0009.00 C     b             CAB       c             TAG02                414243         130128
0010.00  *                                                                              130128
0011.00 C     TAG01         TAG                                                         130128
0012.00 C                   EVAL      n=n+1                                             130128
0013.00 C                   GOTO      TAG_B                                             130128
0014.00  *                                                                              130128
0015.00 C     TAG02         TAG                                                         130128
0016.00 C                   EVAL      n=n+1                                             130128
0017.00 C     n             DSPLY                                                       130128
0018.00 C     *IN41         DSPLY                                                       130128
0019.00 C     *IN42         DSPLY                                                       130128
0020.00 C     *IN43         DSPLY                                                       130128
0021.00  *                                                                              130128
0022.00 C                   SETON                                        LR             130128
****************** End of data ********************************************************


OUTPUT

DSPLY  2

DSPLY  1

DSPLY  0

DSPLY  0

 

 

¤  End subroutine label

Factor 1

OpCode

Factor 2

Result Field

Resulting Indicators

       HI                            LO                      EQ

GOTO

End subroutine label

 

 

 

 

 


0122.00      C           VALID     BEGSR
0123.00      C           PTNUM     CHAINREC2                 85    |
0124.00      C           PTNUM     IFEQ *BLANKS                    |
0125.00      C                     MOVELARY,1     MSG2             |
0126.00      C                     SETON                     20    |
0127.00      C                     GOTO AAA                        |
0128.00      C                     ENDIF                           |>>>>>>
0129.00      C           PTNAME    IFEQ *BLANKS                    |
0130.00      C                     MOVELARY,2     MSG2             |
0131.00      C                     SETON                     21    |
0132.00      C                     GOTO AAA                        |>>>>>>
0133.00      C                     ENDIF                           |
0134.00      C           PTADDR    IFEQ *BLANKS                    |
0136.00      C                     MOVELARY,3     MSG2             |
0137.00      C                     SETON                     22    |
0138.00      C                     GOTO AAA                        |>>>>>>
0139.00      C                     ENDIF                           |
0145.00      C           AAA       ENDSR                           |>>> End subroutine label

 










User Comments:



Subscribe

  Email:



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