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
876

How can you call a subroutine which is located in program A from program B?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
833

Hi pinky,

1. One way of calling is like this also.

In program B, write

<b>perform mysubourtine(ProgramA)

using xyz.</b>

(Note, The Brackets are important)

regards,

amit m.

6 REPLIES 6
Read only

Former Member
0 Likes
833

Hi Pinky,

Check the syntax:

In Program B.

PERFORM form IN PROGRAM A.

Read only

Former Member
0 Likes
833

Hi Pinky,

Using 'Include Program' u can call a subroutine from One program to Another.

Read only

Former Member
0 Likes
834

Hi pinky,

1. One way of calling is like this also.

In program B, write

<b>perform mysubourtine(ProgramA)

using xyz.</b>

(Note, The Brackets are important)

regards,

amit m.

Read only

Former Member
0 Likes
833

Hi pinky,

subroutines can be used in two types. one is internal subroutine and external subroutine.

Internal subroutine means we can use subroutine within the program.

External subroutine means we can call in any program.

********rewords some points.

Rgds,

P.Naganajna Reddy

Read only

Former Member
0 Likes
833

hi Pinky,

if the program A is subroutine pool then u can call using

perform <subr> in program <program name>

if it's ana include, then include that program in the program B.

regards,

Navneeth.K

Read only

Former Member
0 Likes
833

perform sub_add(<program name>).