Skip to main content

ILE Interview Questions

Q: What is a Module?

The module is a non-executable program and contains one or more procedures. If you have modules without a procedure, it means that you have only one default procedure.

We are creating an RPGLE module with CRTRPGMOD and a CL module with CRTCLMOD commands.

Q: What is activation group?

Activation Group is used to run programs and for Loading & Unloading programs together. Group programs together so they can share resources with one another and be deactivated together.

Q: What is Service Program?

A Service Program is a collection of runnable procedures which will be easily accessible by other ILE programs.

Q: What is bind by copy?

once the MODULE is created, we will bind it with CRTPGM command to make it as a runnable object. After binding we can delete MODULE, the program will still work, because a COPY of all of the compiled code has been included into your program. This is called “Bind By Copy”.

In simple terms, we can say it as module bound with and PGM(CRTPGM) is nothing but a Bind By Copy.

Q: What is bind by reference?

You can bind the module with a service program (*SRVPGM).  We can run the procedures in service program instead of copying them into programs. This is called “Bind By Reference”.

Q: Command which we use to build a service program?

CRTSRVPGM

Q: Is module executable?

No, You need to create an RPG prog to run the module

Q: What is Procedure?

Procedure is a set of statements that can perform a specific task and then returns to caller.

Q: How to define a procedure?

Define Procedure Prototype names(PROC1) along with all parameters and PR. Then define Procedure with Begin/End

D PROC1                                           PR

P          PROC1                                  B                   Export                         //Procedure Name Begin/End

D         PROC1                                          PI                                                 5   0 //Then define Procedure Interface along with parameter and PI

D         PARMA                                                                                              5   0

D         PARMB                                                                                              5   0

Define all the parameters as a variable to the procedure

D         PARMA                                  S                                                          5   0

D         PARMB                                  S                                                          5   0

In not returnable procedure, the procedure should end with

C         PROC1                                               E

 In returnable procedure, it should end with

C                     RETURN                PARMA + PARMB

Q: What is Procedure Prototype and Procedure Interface.

In Procedure Prototype section, we specify the name of the procedure along with PR.

D PROC1                                           PR

Procedure Interface is where we define all the parameters which are receiving/returning some values.

D         PROC1                                          PI                                                 5   0

D         PARMA                                                                                              5   0

D         PARMB                                                                                              5   0

Q:  What is the difference in between CALL, CALLB, and CALLP?

·         CALL is a dynamic call where the control will be transferred when the program is executed.

·       Whereas CALLB and CALLP are static calls. If you have modules without procedure, then it means that it is having only one default procedure and in case we can use CALLB.

·         A module is having more than one procedure then we can give explicitly the procedure name to be called in case of CALLP out of these three CALLP is the most efficient one.

Q: Which command is used to replace modules of an ILE bound program with other modules on the system, without recompiling the bound program?

UPDPGM

Q: How do you import and export any data between two programs?

If you use an export statement when defining a variable, then you can import the data type into any module that is binding either by value or by reference. So, we can pass values between modules in this case, instead of using PLIST and * ENTRY.

Q: What happens when the activation group is completed/ends

1. Any files that are opened in the activation group will be closed

2. The static storage used by programs and service programs will be released.

3. Allocated storage (%ALLOC) is released

4. Activation-Scoped Override End

5. Activation-Scoped Commitment-Control is over

Q: What are Program Entry Procedure (PEP) and User Entry Procedure (UEP)?

·         If we are binding many modules together to form a program, then we have to specify which module has to take control first when it has been called and that module is called as PEP for that program.

·         User entry procedure (UEP) is the first statement that takes the control when a program has been called. For example, in C programs main () will be executed first

Q: What is binder language in simple terms?

List the procedures you want to export.

Q: When we receive Signature Violation ”error?

The SIGNATURE parameter works in a similar manner as the the level checks do.  When you bind a program, it remembers/stores the signature.  If the signature changes, you’ll get a “Signature Violation” error.

Q: What is Binding Directory?

·         Binding directories contain a list of *SRVPGM and *MODULE objects. In terms we can say it as similar to library lists.

·         Use as BNDDIR instead of listing any object on the CRTPGM command.

 

Comments