Ibc233
This presentation is the property of its rightful owner.
Sponsored Links
1 / 20

IBC233 PowerPoint PPT Presentation


  • 83 Views
  • Uploaded on
  • Presentation posted in: General

IBC233. Calling Programs Updated Fall 2011. Agenda. Calling Programs Lab 11. OPM (static) Call. CALL Parameters: PGM PARM. How it works. When the call statement is executed: Your authority to the program object is checked Do you have access to all the resources required?

Download Presentation

IBC233

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Ibc233

IBC233

Calling Programs

Updated Fall 2011


Agenda

Agenda

  • Calling Programs

  • Lab 11


Opm static call

OPM (static) Call

  • CALL

    • Parameters:

      PGM

      PARM


How it works

How it works

  • When the call statement is executed:

    Your authority to the program object is checked

    Do you have access to all the resources required?

    Gather resources

    Program opened


Passing parameters in cl opm

Passing Parameters in CL (OPM)

Call program1 (‘test’ ‘new’)

then program 1must have a pgm statement that looks like this:

pgm (&parm1 &parm2)

dcl &parm1 *char 10

dcl &parm2 *char 5


Passing parameters in cl opm1

Passing Parameters in CL (OPM)

pgm

dcl &var1 *char 6 value ‘IBC233’

call pgm2 &var1

call pgm(pgm3) parm(&var1)

endpgm

Pgm2 and pgm3 must have a pgm statement similar to this:

pgm parm(&parm1)


Passing parameters cl to rpg opm

Passing Parameters CL to RPG (OPM)

pgm

call pgm2 (‘RPG’)

endpgm

RPG program must have the fixed format C spec code:

F1OperationF2 Result

*entryplist

parmvarName


Ile dynamic call

ILE (dynamic) Call

  • CALLPRC

    Parameters:

    PRC

    PARM

    RTNVAL


How it works1

How it works

  • When the application is created, authority to modules is checked and entire application is bound

  • When application is called

    all resources are allocated

    entire application is opened


Passing parameters in cl ile

Passing Parameters in CL (ILE)

Call appl1 (‘test’ ‘new’)

then the first *module in the application must must have a pgm statement like this:

pgm (&parm1 &parm2)

dcl &parm1 *char 10

dcl &parm2 *char 5


Passing parameters in cl ile1

Passing Parameters in CL (ILE)

pgm

dcl &var1 *char 6 value ‘IBC233’

call pgm2 &var1

callprc (mod3) parm(&var1)

endpgm

mod2 and mod3 must have a pgm statement similar to this:

pgm &parm1


Passing parameters cl to rpg ile

Passing Parameters CL to RPG (ILE)

pgm

callprc pgm2 (‘RPG’)

endpgm

RPG procedure must have the fixed format C spec code:

F1OperationF2 Result

*entryplist

parmvarName


Advantages of opm

Advantages of OPM

  • Don’t have to have all parts of the application done to test.

  • Parts of the application can be changed without affecting the entire application


Disadvantages of opm

Disadvantages of OPM

  • Integrated Language not supported


Advantages of ile

Advantages of ILE

  • Integrated Language Support

    • Best language for the task

  • You don’t have to pass all parameters to the program – previous values will be used


Disadvantages of ile

Disadvantages of ILE

  • All modules must be in place to test application

  • Version Control


What you need to know for lab 11

What you need to know for Lab 11


Lab 11 clle new commands

Lab 11 – CLLE new commands


Ovrdbf

OVRDBF

  • Allows you to use a different file instead of the one that is defined by the RPG program


Ovrprtf

OVRPRTF

  • Changes attributes about the spool file.


  • Login