Previous Topic: Use of GOTO

Next Topic: Format Names in RPG III

Standard RPG III Subroutines

System-wide subroutines should have names beginning with the letter ‘Z’. You may use the RPG III /COPY statement to include the subroutines if you wish. The following are two common examples:

Message Sending Subroutine—This subroutine calls an CA 2E Toolkit utility subprogram to send a message to the calling program’s message queue. From V2R1 of OS/400 the QMHSNDPM API can be used instead.

Message Executing Subroutine—This subroutine calls a CA 2E Toolkit utility subprogram to retrieve a request string stored in a message file, and executes it.