Ctl-opt NOMAIN Debug Datedit(*YMD) option(*SRCSTMT:*NODEBUGIO);

Any IBM i topic that does not fit in another forum
Post Reply
OlivierPierre04
Posts: 17
Joined: Fri Jan 07, 2022 2:56 pm

Ctl-opt NOMAIN Debug Datedit(*YMD) option(*SRCSTMT:*NODEBUGIO);

Post by OlivierPierre04 »

Hi Folks , i have an issue about this option
i have a Free format pgm like an interface (Use service programme)
Module/Pgm - ZSRVMSERVT [srvpgm]

i cant compile my pgm because no main and dont know how the end of this pgm

this is my compilation

CRTBNDRPG PGM(GESCOMOBJ/ZSRVMSERVT)
SRCFILE(LOGCDESRC/QRPGLESRC) DBGVIEW(*no)
DBGVIEW(*LIST)
vhamberg
Posts: 12
Joined: Thu Jul 29, 2021 1:33 am

Re: Ctl-opt NOMAIN Debug Datedit(*YMD) option(*SRCSTMT:*NODEBUGIO);

Post by vhamberg »

I see a couple problems - a program has to have a main procedure, as this quote says -

A module with NOMAIN specified will not have a program entry procedure. Consequently you cannot use the CRTBNDRPG command to compile the source.

That's the "main" problem. You also have DBGVIEW specified twice, and one of them has an invalid parameter - I suspect you mean to use a different parameter.

But the real issue is that you can't create a program this way - you can't even create a program from just a NOMAIN module, as IBM states here -

Therefore, any ILE RPG module may be specified as the entry module as long as it is not a NOMAIN module.

So you need another module that will call the procedure in this module. You need to use CRTRPGMOD to create this module.
OlivierPierre04
Posts: 17
Joined: Fri Jan 07, 2022 2:56 pm

Re: Ctl-opt NOMAIN Debug Datedit(*YMD) option(*SRCSTMT:*NODEBUGIO);

Post by OlivierPierre04 »

So i create the module
i would like have an Object

Can i use this
CRTSRVPGM
if yes

i compile with this command Create a service pgm
but issue with the compilation

i have inside this information

/Include QRPGLESRC,HTTPAPI_H --> inside lot a procedures prototypes like http_url_get ... etc

in my pgm with no main i used these procedures but the compilator does not recognize these procedures

need Help please

XSRVMSERVT RPGLE --> /Include QRPGLESRC,HTTPAPI_H
|
--> // Call microservice
Rc = Http_url_get(In_Url:Filename);

CRTSRVPGM SRVPGM(GESCOMOBJ/XSRVMSERVT) MODULE(GESCOMOBJ/XSRVMSERVT) SRCFILE(LOGCDESRC/QRPGLESRC)

Definition not found for the symbol 'HTTP_COMP'.
Definition not found for the symbol 'HTTP_ERROR'.
Definition not found for the symbol 'HTTP_SETCCSIDS'.
Definition not found for the symbol 'HTTP_TEMPFILE'.
Definition not found for the symbol 'HTTP_URL_GET'.
Definition not found for the symbol 'HTTP_URL_POST'.
Definition not found for the symbol 'HTTP_XPROC'.
Post Reply