Topic
  • 5 replies
  • Latest Post - ‏2011-10-14T12:27:50Z by venkateshv76
venkateshv76
venkateshv76
15 Posts

Pinned topic WSDL2RPG.sh: Need help to get a C module to compile

‏2011-10-03T15:26:50Z |
Hi,

I am trying to get a C module that has been generated by WSDL2RPG.sh in a IFS directory to compile from a traditional iSeries based Library/SourcePhysical file system.

Basically I have copied the "C" source that was generated in IFS to LIBR1/QCSRC as MBR1. But now there are some includes which are there in "/QIBM/PRODDATA/OS/WEBSERVICES/V1/CLIENT/INCLUDE" IFS directory in the c source that was generated by the tool as below:

Code:

#include <axis/Axis.h>
#include <axis/GDefine.h>
#include <axis/AxisUserAPI.h>
#include <axis/SoapEnvVersions.h>
#include <axis/WSDDDefines.h>
#include <axis/TypeMapping.h>
#include <axis/ISoapFault.h>
#include <axis/client/Stub.h>
#include <axis/client/Call.h>

and the compile works fine if I specify my compile like this

Code:

QSYS/CRTCMOD MODULE(&LIB/WSC0) +
SRCSTMF('/qsys.lib/libr1.lib/qcsrc.file/mbr1.mbr') +
TEXT('mbr1.c') +
OPTIMIZE(40) DBGVIEW(*NONE) REPLACE(*YES) +
ENUM(*INT) +
INCDIR('/QIBM/PRODDATA/OS/WEBSERVICES/V1/CL+
IENT/INCLUDE')

but the issue now is our change control uses the Library name convention and the compile is not working.

My question is, how can I compile a C source defined in traditional iSeries LIBRARY/SOURCEFILE system with #includes referring to files in IFS. Mind you I can't specify 'SRCSTMF' on my CRTCMOD command.

Regards,
Venky
Updated on 2011-10-14T12:27:50Z at 2011-10-14T12:27:50Z by venkateshv76
  • venkateshv76
    venkateshv76
    15 Posts

    Re: WSDL2RPG.sh: Need help to get a C module to compile

    ‏2011-10-03T15:33:34Z  
    IBM documentation says this ...
    When a DM file specification is used for the root source file (that is, when the SRCFILE/SRCMBR options are used), all #include directives within that compilation are similarly resolved to the DM filesystem.

    But I want to be able to use a Traditional file system based source management and want my #includes to refer to IFS where the WSDL2RPG
  • barbara_morris
    barbara_morris
    389 Posts

    Re: WSDL2RPG.sh: Need help to get a C module to compile

    ‏2011-10-03T19:33:34Z  
    I don't think there is any way to get the C compiler to support IFS include files with the SRCFILE parameter. The documentation that you quoted seems very clear.
  • venkateshv76
    venkateshv76
    15 Posts

    Re: WSDL2RPG.sh: Need help to get a C module to compile

    ‏2011-10-03T21:50:05Z  
    I don't think there is any way to get the C compiler to support IFS include files with the SRCFILE parameter. The documentation that you quoted seems very clear.
    Barbara,

    Thanks for the reply and valuable suggestions. I was kind of hoping that someone might have come across a scenario where there in they have had to define a C source in traditional iSeries LIBRARY/SOURCEFILE scenario and might have been able to specify by way of some compile directive to be able to include HEADER files defined in IFS.

    I am now out copying the header files from IFS and defining them again in the Source Physical files and then I am sure the compiler will accept them.

    I was also hoping the AXIS header files can be found in some library LIKE QSYSINC/H that includes C header files as well as the /QIBM/includes/ that are like symbolic links.

    I personally didnot want to copy the AXIS header files from the IFS directory but it looks like my last option.

    Thanks,
    Venky
  • SystemAdmin
    SystemAdmin
    535 Posts

    Re: WSDL2RPG.sh: Need help to get a C module to compile

    ‏2011-10-13T21:59:49Z  
    Barbara,

    Thanks for the reply and valuable suggestions. I was kind of hoping that someone might have come across a scenario where there in they have had to define a C source in traditional iSeries LIBRARY/SOURCEFILE scenario and might have been able to specify by way of some compile directive to be able to include HEADER files defined in IFS.

    I am now out copying the header files from IFS and defining them again in the Source Physical files and then I am sure the compiler will accept them.

    I was also hoping the AXIS header files can be found in some library LIKE QSYSINC/H that includes C header files as well as the /QIBM/includes/ that are like symbolic links.

    I personally didnot want to copy the AXIS header files from the IFS directory but it looks like my last option.

    Thanks,
    Venky
    Have you tried to use the CD command. Change it to point to the location of the include files. If this works then maybe, if your CMS tool, support exit points or pre-post commands where you can add commands to execute before and/or after the compile command is executed. This should also link the CD command to the object so that each time the source is compiled it will execute the CD command everytime source is compiled and allowing the compiler to find the included files.
  • venkateshv76
    venkateshv76
    15 Posts

    Re: WSDL2RPG.sh: Need help to get a C module to compile

    ‏2011-10-14T12:27:50Z  
    Have you tried to use the CD command. Change it to point to the location of the include files. If this works then maybe, if your CMS tool, support exit points or pre-post commands where you can add commands to execute before and/or after the compile command is executed. This should also link the CD command to the object so that each time the source is compiled it will execute the CD command everytime source is compiled and allowing the compiler to find the included files.
    Hi,

    I am not sure if we can change our CMS tool. Basically the CRTCMOD commands are defined within the CMS tools with a compile option of CRTCMOD CRTCMOD MODULE(&F/&M) SRCFILE(&LIBL/&SRCPF) and I saw a couple of User defined exit points defined within the CMS.

    For the moment though I have applied the dirty appproach i.e. take copies of these AXIS C Header files from /qibm/ProdData/OS/WebServices/V1/client/include/axis and redefined them within the traditional &LIBR1/QCSRC and changed the C module generated by the WSDL2RPG parser as below:

    #include <QCSRC/AXIS.H>
    #include <QCSRC/GDEF.H>
    #include <QCSRC/AUAPI.H>
    #include <QCSRC/SENV.H>
    #include <QCSRC/WSDDEF.H>
    #include <QCSRC/TYPMAP.H>
    #include <QCSRC/ISPFT.H>
    #include <QCSRC/STUB.H>
    #include <QCSRC/CALL.H>

    After I did this, I was able to compile the C module from within ALDON our CMS tool.

    Thanks for your suggestion as I donot have the time nor the resources at the moment to explain my issue to my Change Control person because he won't be do what you're suggesting and he will need to touchbase with Aldon Support and my work will not progress at all.

    Thanks anyway,
    Venky