Submitted by Syd Nicholson on Mon, 11/13/2006 - 00:00
Forums

I would to eliminate the use of QRPGLESRC and keep all of my RPG code in the IceBreak server directory.

I would like to create service programs using .asp or .rpgle technology. The questions I have as follows:

1. The service programs are not required for SOAP, so I don't need the additional procedures created by the IceBreak compiler for the SOAP environment - is there are way to avoid creating these procedures?

2. Instead of using the CRTPGM - what instruction causes IceBreak to use CRTSRVPGM?

3. How do I ensure IceBreak only creates a module, but does not create a program?

4. How do I combine several modules into a single service program with IceBreak?

Thank you in advance.

Syd Nicholson

Niels Liisberg

Mon, 11/13/2006 - 00:00

Hi Syd;

There is no problem by creating service programs within icebreak.

You can make compiler directives as follows:

<%@ pgmtype="NOASPSRV" %>

This will create a service program, and let the client programs bind the ASP service. hench - NO ASP.

This also goes for modules:

<%@ pgmtype="NOASPMOD" %>

and finally you can make any service program a webservice:

<%@ pgmtype="WEBSERVICE" %>

which will expose all "exported" procedures in the service program as webservice functions.

When you want to compile any of the above - just refer to the source in a browser URL - and now you will se the compilation post list, also when it compiles OK.

Alternative - use the CRTASPPGM command.

Binding:
You can control all phases in the compilations:

First phase is if you use SQL ...

<%@ sqlopt="COMMIT(*NONE)" %>

Next the crtxxxmod

<%@ modopt="DBGWIEV(*STMT)" %>

and finally the binding CRTPGM / CRTSRVPGM phase

<%@ pgmopt="MODULE(A B C) BNDSRVPGM(X Y Z) BNDDDIR(D)" %>

(don't mess with the activation group)

Regards,

Niels Liisberg

Hi Guys,

Sorry to bother you again but I still have problems with these pre-compiler directives. You will be aware I am trying to create a service program. The service program does not require web services, it does not require SOAP, it will only be used in calls from other RPG programs.

The source code for the service program is written in RPGLE and the source file resides in the IFS.

Perhaps my brain is too slow - but I havn't quite grasped this yet.

In a green environment using SEU I would first create a module (option 15, or CRTRPGMOD), then use CRTSRVPGM to create the service program. I would like to duplicate this in the IceBreak environment.

These are the symptoms:

1. No matter what compiler directive I use, the compiler always inserts a SOAP interface for every exported procedure I have defined. The compilation fails, because these created interfaces subsequently call that corresponding exported procedure, but with no parameters. The compiler issues RNF5406 "The call passed fewer parameters than the prototype"

2. With directive pgmtype="NOASPMOD", or pgmtype="NOASPTYPE" the SOAP interfaces are still created, but now there are even more errors. The IceBreak functions responseWrite, etc. are no longer defined because the IceBreak definitions are not being copied into the program.

What do I need to do to create a simple bulk standard service program in the IceBreak environment? I don't need SOAP just yet - that will come later.

Many thanks
Syd

Hi Syd,

I have had the same problem. The way I solved it was to indent the 'Export' keyword on all my procedure definitions with one space. IceBreak looks for 'export' starting in the first position of the keywords column, so this is a way to work around the problem until it is fixed.

I hope this helps.

regards,
Bjarke

Thanks Bjarke,

A neat solution - yes that helped a lot. Problem solved. Service program created, running, and currently being tested.

We are cooking with gas!!

Best Regards
Syd