Page 1 of 1

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

Posted: Sun Jan 09, 2022 11:22 am
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)

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

Posted: Sun Jan 09, 2022 2:11 pm
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.

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

Posted: Mon Jan 10, 2022 11:14 am
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'.