Version 9.5 SP1
 —  EntireX C Wrapper  —

Server Examples for IBM i

The CL sample CRT_C_SRV displayed below is provided in the library EXAMPLE of the IBM i installation kit. It demonstrates how to:

       PGM                                   
       DCL        VAR(&SRCFILE) TYPE(*CHAR) LEN(10) VALUE(QCSRC)
/*-------------------------------------------------------------*/
       MONMSG     MSGID(CZM0613 CPF4102) EXEC(GOTO CMDLBL(ERRXT))

       CRTCMOD    MODULE(DEXAMPLE) +                          
                    SRCFILE(*CURLIB/&SRCFILE) +           
                    OUTPUT(*PRINT) OPTION(*SHOWINC *EXPMAC) + 
                    DBGVIEW(*ALL) SYSIFCOPT(*NOIFSIO)         
       CRTSRVPGM  SRVPGM(DEXAMPLE) MODULE(*CURLIB/DEXAMPLE) + 
                    EXPORT(*ALL) ACTGRP(*CALLER) +            
                    TEXT('C Server Generated Stub') +         
                    BNDSRVPGM(*LIBL/EXPRUNTIME EXA) +         
                    OPTION(*GEN *WARN *NODUPVAR *RSLVREF +
                    *NODUPPROC) DETAIL(*EXTENDED) +           
                    ALWUPD(*YES) ALWLIBUPD(*YES) ALWRINZ(*YES)
                                                          
       CRTCMOD    MODULE(EXAMPLE) +                           
                    SRCFILE(*CURLIB/&SRCFILE) +           
                    OUTPUT(*PRINT) OPTION(*SHOWINC *EXPMAC) + 
                    DBGVIEW(*ALL) SYSIFCOPT(*NOIFSIO)         
                                                          
       CRTSRVPGM  SRVPGM(EXAMPLE) MODULE(*CURLIB/EXAMPLE) +   
                    EXPORT(*ALL) ACTGRP(*CALLER) +            
                    TEXT('C Server Implementation File') +    
                    BNDSRVPGM(*LIBL/EXPRUNTIME EXA) +         
                    OPTION(*GEN *WARN *NODUPVAR *RSLVREF +    
                    *NODUPPROC) DETAIL(*EXTENDED) +           
                    ALWUPD(*YES) ALWLIBUPD(*YES) ALWRINZ(*YES)
/*-----------------------------------------------------------*/
       GOTO       CMDLBL(DONE)                                
ERRXT: SNDPGMMSG  MSG('Compile failed')  
DONE:  ENDPGM

Top of page