Whether a module can consists of many procedures or it can
consist of subprocedures having a main procedure?If it is
possible that it can contain many individual procedures than
can we have different name for complete module and how do
we call this module in main modul?

Answers were Sorted based on User's Feedback



Whether a module can consists of many procedures or it can consist of subprocedures having a main ..

Answer / ps

There can be many apprach . It's depend upon user requirement

Those containing only a main procedure and no sub procedures
Those containing a main procedure and one or more sub procedures
Those with no main procedure but with one or more sub
procedures.

If Your question is can we have many independent procedure
in one module.then answer is YES.
No we can not give it different name . If you do not have
MAIN procudure then you have to specify NO main at H spec
other wise you will not able to compile.

About call i believe In your module if you have specified
EXPORT on prototype definition of procedure then you can
call it outside , You gonna call procedure not complete module.


PS i m new to ILE so could be wrong in understanding your
question.

Is This Answer Correct ?    11 Yes 0 No

Whether a module can consists of many procedures or it can consist of subprocedures having a main ..

Answer / deepak singh

A module may consist of:

1. One main procedure and no sub-procedures.
2. One main procedure and one or more sub-procedures.
3. No main procedure and one or more sub-procedures.

The module name can be different from its sub-procedures.

A module cannot be called on its own. You can call a sub-procedure within a module.

Is This Answer Correct ?    8 Yes 1 No

Whether a module can consists of many procedures or it can consist of subprocedures having a main ..

Answer / nd

Use EXTPROC on the prototype defination.

The EXTPROC keyword indicates the external name of the
procedure whose prototype is being defined. The name can be
a character constant or a procedure pointer. When EXTPROC
is specified, a bound call will be done.

D SQLEnv PR EXTPROC(’SQLAllocEnv’)

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More RPG400 Interview Questions

what is an online rpg?

0 Answers   IBM,


Some times While checking MSGW for object / member / record locks ,I have seen it's locked by itself ...? How it happen and what action we need to perform if job is updating / writing a record....?

6 Answers   HSBC,


Suppose my file has 10 fields and I want to make the 2nd field zeros in all records. And assume I have millions of records and I dont want to read each record and update the desired field with 0. Any other way to do this in one step operation?

1 Answers  


How to check which are the pgms using 1 perticulate file.? I know there is many tool available for X-reference...but need to know is there any command available in the system...?

4 Answers   IBM,


I have one cl program which calls two rpg programs named a & b. I am loading a run time array in Pgm A and the control comes back to cl pgm. i call pgmb and I want to read the runtime array in pgmb which was loaded in pgma. How it can be acheived. I should not use any intermediate file or dataarea to store the loaded values.

2 Answers  






when will come session device error?

4 Answers   TCS,


i have 6 char field in program, but this field is using in all files i want to chage field size as 10 char , how can i do this except using *like defn...?

1 Answers   IBM,


Can AnyOne tell me how to read join logical file in rpg from starting to end?

2 Answers  


I need to generate outfile for object of all the user lib. in the sysmte using cmd DSPOBJD. But this cmd is correcpted in my server,Any body tell me is there any alternative...?

2 Answers  


Can we trigger an rpg program which has user interaction with display file when updating a file using the command ADDPFTRG?

2 Answers  


I have a RPG program of 100 Lines and first line is to SETON indicator LR. Will the program execute rest of the 99 Lines?

6 Answers  


what is importance of 'MAPFLD' IN OPNQRYF FILE ?

2 Answers  


Categories