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

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,


What is the diff bw PF/LF Name and their Record format name? what is restriction in record format then file name?

0 Answers   Wipro,


When a object will be locked & when a record will be locked? Plz explain.

2 Answers  


I have to change a program. This program is calling a subroutine mor than 100times within it. so will it have any performance issue? if yes than what changes i can make. Thanx for ur valuable answer.

2 Answers  


Can you copy the records created by the OPNQRYF to other files and how?

2 Answers  


how many variables can we declare in cl pgm?

13 Answers  


how can an indexed file be used as arrival sequence in RPG?

3 Answers   IBM,


i have a file with the values 10, 20, 30, 40, if am setll with the value 25 then readp, so what it will return?

6 Answers   Mind Tree,


what is plat file?

6 Answers   Indian Infotech,


Can we possible to key with the date field?

1 Answers   IBM,


Hi all friend, Could Any body send me the code (with coding) of this senario because I have tried but I am stucking somewhere so Please reply ASAp with coding. senario:Q: I have to write the flat file(FLAT1) into the three different PFS (PF1,PF2 and PF3) with the respect of H line data, D line data and Z line data of flat file. where I have different data in flat file(FLAT1) which is mentioned below with data. H0929200909282009092820095529420003000073 D2222220006765555webservi001633.9909222009092820090924200951 8564380134049ROSNER TOYOTA OF FREDE FREDERICKSBURVA 224080000USA840840001633.99001633.99851856492689800208001915 511001633.990408490000000.0000000003446048 1,3 110793145 09070700351 372367 Rosner Motors D3333320006774444webservi000271.2409222009092820090924200951 8564380134049ROSNER TOYOTA OF FREDE FREDERICKSBURVA 224080000USA840840000271.24000271.24851856492689800208001835 511000271.240930680000000.0000000003450293 1 110793254 09072100079 373933 Rosner Motors Z0929200900000020001905.25 FLAT1 has the three pf data H line-represents the header pf data,D-Represent Details pf data,Z-Represents the trailer pf data Now I have to write H line data of flat file into Header pf (PF1),D line data of flat into datails pf(PF2) and Z line data of flat file into pf(PF3) with the spefic position(H,D and Z data of flat file into PF1, PF2 and PF3) of flat file.

4 Answers   IBM,


this is rpg3 code W0RTN IFEQ @CN,002 what is the means @CN,002

1 Answers  


Categories