Definition of PR and PI for AS/400

25 pts.
Tags:
AS/400
What is the purpose of PR and PI in calling program and called program?

Answer Wiki

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

Thanks for coming to ITKE

Before we would want to give an answer to this, we would
like to know do you have a business case for asking this question or
is it a homework question.

If you have a good business case for it, please let us
know. It is really not right for us to be doing homework for people. It
deprives them of the extra knowledge they get when doing the research
themselves.

Discuss This Question: 6  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.
  • pdraebel
    RTFM
    7,485 pointsBadges:
    report
  • sathishveeran7
    For business purpose only.
    25 pointsBadges:
    report
  • ToddN2000
    Please post samples of the business code you are questioning so we can understand what you are referring to.
    84,925 pointsBadges:
    report
  • sathishveeran7
     Hdftactgrp(*no)                                        
     DSNO              S              2P 0                  
     DNAME             S             10A                    
     DFoundflg         S              2P 0                  
     DGetEmpDetails    PR                  EXTPGM('BPGM')   
     DSNO                                           LIKE(SNO)        
     DNAME                                         LIKE(NAME)       
     DFOUNDFLG                               LIKE(fOUNDfLG)   
    25 pointsBadges:
    report
  • sathishveeran7
    I'm asking purpose and need of PR and PI in Calling and called program. This not code related, so how can I post samples.
    25 pointsBadges:
    report
  • GregManzo
    PR defines how other programs will call the procedure.
    PI defines the actual interface. In *most* other languages they are one and the same. I'm not sure why the Rochester guys chose to separate them. Most cases I've seen programmers just copy the code from the PI & just change it to PR (or visa versa)
    My preference is to use /IF DEFINE such that the prototype can be /INCLUDE'd into calling programs.
    D Function PR
    D  Parms
     /IF NOT DEFINED(Definitions)
     /EOF
     /ENDIF
    D Function PI
    D  Parms
    C* implementation code...
    1,720 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: