Purpose
Establishes an entry point for a subroutine and to define the subroutine processing. At runtime, a subroutine is executed when it is named in a CALL statement.
Syntax
┌───────────────────────┐ ►►─── DEFINE subroutine subroutine-name ─── . ───▼─ command statement. ──┴────►◄
Parameters
Specifies the 1- to 8-character name of the subroutine being defined.
Subroutine-name must be unique within the process.
Specifies the process commands that define the subroutine.
Command-statement can be any process command statement except DEFINE SUBROUTINE.
Usage
Considerations
Example: CALL SUBROUTINE-A. .... CALL SUBROUTINE-B. .... DEFINE SUBROUTINE-A. (within this code which is subroutine-d) DEFINE SUBROUTINE-D. (within this code which is subroutine-b) DEFINE SUBROUTINE-B.
|
Copyright © 2014 CA.
All rights reserved.
|
|