PMS Information Systems
Welcome to PMS Information Systems - IBM i (AS/400) Forum !!!

Get Answers for all your queries on IBM i (AS/400).

Join the forum, it's quick and easy

PMS Information Systems
Welcome to PMS Information Systems - IBM i (AS/400) Forum !!!

Get Answers for all your queries on IBM i (AS/400).
PMS Information Systems
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Module Vs Program

Go down

program - Module Vs Program Empty Module Vs Program

Post  razuk_r Tue Jan 12, 2010 2:30 am

Module:
1. Not executable.
2. Needs to be bind with a PGM or SRVPGM in order to use it.
3. In order to execute a subprocedure that resides in a module, we need to use CALLB.

Program:
1. It is independently executable entity.
2. In order to execute it, we need to use CALL.
3. When a program is compiled, the modules used in it(using CALLB) are bind into the object of PGM.


A good example:
Do as follows:
1. PGMA uses MODA, MODB
2. Compile MODA, MODB to create *MODULE type objects(option 15 from WRKMBRPDM)
3. Use CALLB in PGMA to call MODA, and MODB.
3. Compile PGMA now to create a *PGM type object(option 14 from WRKMBRPDM or using CRTPGM).
4. Delete objects of type *MODULE of MODA, MODB.
->Even now PGMA will execute fine, because modules are bind into the object of PGMA.

razuk_r

Posts : 65
Join date : 2009-07-31
Location : Chennai

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum