How do you compile an OSA DLL?

jolly

VIP Member
Hi All,

I have read the OSA documentation in the Report Writing guide, and have seen the sample code, but there is no instruction on how to compile and install the dll.

There is a document on Oracle Support with instructions to compile an OSA on iSeries - but nothing for Windows or Unix.

Any pointers, anyone?

TIA,
JohnO
 
I second Mr. Oliver's Plea - where are the special destructions!

(db)
 
Oli,

I looked all over the place, last week - trying to find the "How-To" guide.... If someone is willing to teach - I'll do the legwork!

(db)
 
Raised it as an SR with Oracle and the first level support can't find it either. It's been kicked upstairs to development.

Not holding my breath now.
 
Here's what I have done. I'm sure there is a better way ...

Create a Win32 app in Visual Studio and select DLL, and Export symbols options.

Add the following lines to your source file (make sure jdeosa.h is available in your include path)

typedef unsigned short JCHAR;
#include "jdeosa.h"

Declare your function like this ...
<font class="small">Code:</font><hr /><pre>
extern "C" OSA_API void _cdecl OSA_StartDoc(POSA_REPORT_INFO pOSAReportInfo)
{
}
</pre><hr />

Now my project name is OSA so the OSA_API #define is built in the header file automatically. Yours will be 'your project'_API

After building the DLL, put it somewhere in the path and when the UBE engine calls LoadLibrary your funcs will be called.

Of course, this is assuming you setup the OSA stuff in P986168
 
Craig,

When I have time - I'm going to have to test and document your steps.

Jolly,

Did you ever get a formal reply with 'de'structions from bOrgacle? If so - point us in that direction?

(db)
 
Thanks Craig - that was so straight forward that I am sure it *is* the best way!

I had assumed there would be a page of compiler switches and directives required to get it to compile.

Cheers,
JohnO
 
[ QUOTE ]
Craig,

When I have time - I'm going to have to test and document your steps.

Jolly,

Did you ever get a formal reply with 'de'structions from bOrgacle? If so - point us in that direction?

(db)

[/ QUOTE ]

Nope - still says 'Awaiting response from Development' or something similar. :-/

For your test, DB, I suggest you just use the OSA Sample code. First run R0010P or similar through the OSASample DLL as supplied with E1, then build and install your one own (use a different OSA name) and run the UBE through it. Should produce identical output files.
 
I forgot one thing in the example ... you need to set the byte alignment to 1 for the JDE includes.
<font class="small">Code:</font><hr /><pre>#pragma pack(push,1)
typedef unsigned short JCHAR;
#include "jdeosa.h"
#pragma pack(pop)</pre><hr />

or set the compiler switch /Zp1
 
Right on, seg. I should have qualified that. Thanks.

I'm pretty sure the fat client is the only platform where the alignment is not the default.
 
[ QUOTE ]
Is that Byte Alignment 'dependent' on which type of server?

[/ QUOTE ]

Pretty sure servers for all platforms are using 8 byte struct alignment with JDE.
 
Back
Top