Module Vs Program
Page 1 of 1
Module Vs Program
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.
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
Similar topics
» Lower level program error handled in Higher level program
» What is an I/O Module ?
» What is the use of EXIT POINT program?
» Compling CL Program
» Is that valid in CL program?
» What is an I/O Module ?
» What is the use of EXIT POINT program?
» Compling CL Program
» Is that valid in CL program?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|