About Me

My photo
I work for Fusion5 Australia . Connect with me on linked in here . I'm raising money for a good cause at the moment, follow donate to leukemia foundation

Wednesday, 24 July 2013

Structure member alignment for client and server programming with JDE

Quick note to self:

When writing an OSA to work on a windoze (windows) server, use a structure member alignment of 4, /Zp4 .  If you are testing your OSA on the client then ensure that the struct member alignment is 1, or /Zp1.  It's easy too look at the command in various iterations of visual studio to ensure that the struct member alignment is correct.

Highlight the project (not the solution) and fork project, properties

Open general menu item
Then c/C++ then code generation.  Under there you'll find "Struct Member Alignment" - set this.

Then goto command line under the c/c++ window and you're command will look something like:

/Od /I "D:\E910_1\DV910\include" /I "D:\e910_1\system\includev" /I "d:\e910_1\system\include" /D "_WINDLL" /D "_MBCS" /Gm /EHsc /RTC1 /MDd /Zp1 /Fo"Debug\\" /Fd"Debug\vc90.pdb" /W3 /nologo /c /Wp64 /ZI /TP /errorReport:prompt

What is that for?  windows CLIENT of course!

Note also (to help you if you're struggling), the link command looks like:

/OUT:"C:\Users\shannonm\Documents\Visual Studio 2008\Projects\myBIGPDF\Debug\myBIGPDF.dll" /NOLOGO /DLL /MANIFEST /MANIFESTFILE:"Debug\myBIGPDF.dll.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"c:\Users\shannonm\Documents\Visual Studio 2008\Projects\myBIGPDF\debug\myBIGPDF.pdb" /DYNAMICBASE:NO /MACHINE:X86 /ERRORREPORT:PROMPT kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib

Ensure that you include jde.h (you'll need this).  You'll need to include dirs like "include and include) under system and you'll also need to include lib and libV dirs.  Also the specific resource files for functions that you call will need to be added to the project.

Friday, 12 July 2013

JDE BSFN Return Values

It might defy logic, but the following is true:


#define ER_SUCCESS   0L
#define ER_WARNING   1L
#define ER_ERROR   2L

as defined in jdekdfn.h

So, when you read things like:


Jul 12 15:47:41.167618  jdeobj.c2711     - 3900/-258356336 WRK:POAPPROVE_EF810FD0_DConnector    **********************************************************************************
Jul 12 15:47:41.167629  jdeddapi.c315    - 3900/-258356336 WRK:POAPPROVE_EF810FD0_DConnector    Entering jdeCloseDictionary
Jul 12 15:47:41.167642  jdeddapi.c349    - 3900/-258356336 WRK:POAPPROVE_EF810FD0_DConnector    Exited jdeCloseDictionary with DDType 0
Jul 12 15:47:41.167657  jdeobj.c2404     - 3900/-258356336 WRK:POAPPROVE_EF810FD0_DConnector    Return value is 2 for ApproveOrRejectOrder. (BSFNLevel = 2)
Jul 12 15:47:41.167674  jdeobj.c3189     - 3900/-258356336 WRK:POAPPROVE_EF810FD0_DConnector    Entering AddObjectCache

The 2 means Error, simple!