Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Subroutine

Former Member
0 Likes
770

Can we call subroutine defined in Program A to Program B?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
749

Yes as long as you pass the parameters in the way it is expected by the subroutine.

You can have a statement like this in program B to call a subroutine in program A

PERFORM subroutine_of_a IN PROGRAM a TABLES .... USING .... CHANGING...

4 REPLIES 4
Read only

Former Member
0 Likes
750

Yes as long as you pass the parameters in the way it is expected by the subroutine.

You can have a statement like this in program B to call a subroutine in program A

PERFORM subroutine_of_a IN PROGRAM a TABLES .... USING .... CHANGING...

Read only

0 Likes
749

What's the use of Changing in defining Subroutine

Read only

0 Likes
749

Apologize Changing Keyword

Read only

0 Likes
749

Typically if you want to change the value of a passing parameter within the subroutine code, you will use CHANGING. You can read the help on PERFORM which will explain all the options in detail.