Skip to Content
author's profile photo Former Member
Former Member

External subroutines

I have a 3 programs a,b,c

a-- has vlaidations 1,2,3

b- has vlaidations 4,5,

c- has vliadations1,6

How can i write all the validations in a subroutine pool program and call them from the 3 programs

Plz help me.

Its urgent.

Thanks in advance.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on May 16, 2007 at 08:19 PM

    This is a mind boggling mystery to me.

    Can you perhaps give more details on this specific requirement?

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 16, 2007 at 08:20 PM

    Look at the help for PERFORM statement. There is an option for IN PROGRAM.

    You create your subroutine pool and then in each of your programs a, b and c, you can call these subroutines

    PERFORM 1 IN PROGRAM <mysubroutinepool> TABLES ... USING .... CHANGING ....

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 16, 2007 at 08:24 PM

    In your main program write the perform statement some thing like,

    PERFORM Validatons.

    and write the form...endform ina include program. Within this form endform in the include program do all you validations based of the conditions.

    Use the perform satatement in all the 3 programs and dont forget to include the include program in the 3 programs as well.

    I hope this is what your question is?

    Shreekant

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 16, 2007 at 08:56 PM

    Hi,

    Try with

    PERFORM <subr> IN PROGRAM (<fprog>)

    Regards,

    Bhaskar

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 30, 2008 at 07:27 PM

    done

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.