Ü LEAVESR (Leave the Subroutine)

·         This opcode is used to take the control out of the subroutine inside which it is defined.

 

Example


0129.00 C     FILSFL        BEGSR
0130.00 C                   SETON                                        52
0131.00 C                   SETOFF                                       45
0132.00 C                   EVAL      FIRSTRRN=RRN+1
0133.00 C                   DO        SFLPAG
0134.00 C                   READ(N)   REC1
0135.00 C                   IF        %EOF(MASTER)
0136.00 C                   EVAL      *IN45=%EOF(MASTER)
0137.00 C                   LEAVESR              >> If EOF() condition is met, the control
0138.00 C                   ENDIF                       comes out of the subroutine.
0139.00 C                   EVAL      S_ORG=ORG
0140.00 C                   EVAL      S_ACC=ACC
0141.00 C                   EVAL      S_CCY=CCY
0142.00 C                   ADD       1             RRN
0143.00 C                   WRITE     EXPD_SFL
0144.00 C                   ENDDO
0145.00 C                   SETOFF                                       52
0146.00 C                   ENDSR

 

 











User Comments:



Subscribe

.  


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