How to call 2 different programs from a same rpgle program.

2460 pts.
Tags:
#AS400 #RPGLE #as400
Hi, 

How can we call two different programs from a same RPGLE program? And these 2 called programs are also simple rpgle programs only.

Thanks


Software/Hardware used:
AS400
1

Answer Wiki

Thanks. We'll let you know when a new response is added.

Try something like this

C * FIX PRICING ISSUES
C                   IF        S1SEL = 'X'                           
C                   CALL      'FIXPRC'                                
C                   PARM                    ORD#                    
C                   ENDIF   
C*
C * FIX TAX ISSUES
C                   IF        S1TAX = 'X'                           
C                   CALL      'FIXTAX'                                
C                   PARM                    ORD#                    
C                   ENDIF 

Discuss This Question: 5  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • TheRealRaven
    You call two different programs the same way you call one program, except that you code two CALL instructions instead of only one. (Better would be to use two CALLP instructions for prototyped calls.)

    The question probably needs some clarification. The answer is so obvious that it makes it feel as if something is missing.
    34,430 pointsBadges:
    report
  • ToddN2000
    just use a second call command. You can only have one call active at a time as they are running interactively.  You could get fancy and use  a SBMJOB to call a program in a RPG program and submit to different jobqs, but why would you.

    131,550 pointsBadges:
    report
  • 6r
    actually this should be done in rpg only no need to use any cl command and within rpg only we need to call these 2 programs one after another but unfortunately i tried below piece of code and it gave an error:-
         
    2,460 pointsBadges:
    report
  • 6r
    any updates please?
    2,460 pointsBadges:
    report
  • TheRealRaven
    Updates on what? You haven't included any code to comment on.
    34,430 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: