• Introducing Dark Mode! Switch by clicking on the lightbulb icon next to Search or by clicking on Default style at the bottom left of the page!

Interoperability

jastips

Active Member
Hi List,

I am trying to create an exe file to access business functions and data. I am using VC++ to do this. When I try to create an Oneworld instance with

JDB_InitEnvOvr(&hEnv, szEnv, szUser, szPwd) I am getting some strange errors


Errors :

d:\b7\system\include\jdeuprto.h(263) : error C2061: syntax error : identifier 'JDEMENUBUILDCALLBACK'
d:\b7\system\include\jdeuprto.h(281) : error C2061: syntax error : identifier 'LPJDEERFONT_STRUCT'
d:\b7\system\include\jdeuprto.h(401) : error C2061: syntax error : identifier 'LPINITCOLUMN'
d:\b7\system\include\jdeuprto.h(402) : error C2061: syntax error : identifier 'LPINITCOLUMN'
d:\b7\system\include\jdeuprto.h(417) : error C2146: syntax error : missing ';' before identifier 'JdeGridAllocColumns'
d:\b7\system\include\jdeuprto.h(417) : error C2501: 'LPINITCOLUMN' : missing storage-class or type specifies
d:\b7\system\include\jdeuprto.h(417) : fatal error C1004: unexpected end of file found
Error executing cl.exe.

I am including the file “jde.h” in my program. I hope internally it is calling so many header files but I am getting error with “jdeuprto.h” file.

Can any one can suggest me what header files I need to include in my program to create a Oneworld instance by using “JDB_InitEnvOvr ” function.

Thanks & Regards


Jastips
JDE CNC Consultant
DTI
USA
 

DRezanka

Reputable Poster
Jastips,

I have no experience with this, but have been trying to find a way to do this sort of thing with JAS. This may not apply to your problem at all, but I was told that you have to have the OW client loaded on the machine you attempt to use the API on.

Hope you get some answers. I'm going to watch this thread. I'm still looking for a way to do this with JAS. Anyone reading this is welcome to respond to that thread (OW Login to JAS behind an ASP or HTML page).

Best regards

Doug
dougrezanka@eaton.com

Xe SP13.1, AS400 V4R3, CO-Oracle806, Co-A73c10, Citrix, NT JAS
 

jastips

Active Member
We might have to have client in our machine Coz we are going to execute business functions of Oneworld. So we must have Oneworld client. But what I am thinking is we are going to use only include, lib and source directories so if we can copy those directories in to that machine it might be going to work we can save one Oneworld license. I am not sure on this but logically it should work.

Thanks for your reply.

Jastips
JDE CNC Consultant
DTI
USA
 

twaddell

Member
I have been able to successfully create programs using the JDE API. In
your example, in addition to including "jde.h", you also need to include
"stdio.h" and "windows.h". I think some of the errors you are getting are
because some of the windows structures (i.e. LPINITCOLUMN) are not defined.
Listed below is the code I use to log on and off OneWorld.

You also need to make sure your Visual C++ project settings are correct.
From my experience, the "Struct member alignment" needs to be set to
"1 Byte". This can be found in the project settings under the "C/C++"
tab and "Code Generation" category. If this isn't set correctly your
code will compile and link, but will throw an exception when executing.
You will also need to link the code with the library, \b7\system\lib\jdekrnl.lib

I hope that helps. Feel free to contact me if you need more information
or would like me to send you a small sample Visual C++ project.

Michael Twaddell
Raytheon Systems
twaddell@raytheon.com
(972)344-6548

**************************************************************************
#include <stdio.h>
#include <windows.h>
#include <jde.h>

// JDE Variables
HUSER hUser;
HENV hEnv;

// jdeCallObject variables
ERROR_EVENT_KEY EventKeyLocal;
LPCG_BHVR lpVoid = NULL;
LPVOID lpDS = NULL;
LPBHVRCOM lpBhvrCom = NULL;
int NumErrors;
int NumWarnings;

int LogonJDE(char *pUser, char *pPass, char *pEnv)
{
JDEDB_RESULT rcode;

// Initialize Environment Handle
if ( (rcode = JDB_InitEnvOvr(&hEnv, pEnv, pUser, pPass)) != JDEDB_PASSED)
{
return(FALSE);
}

// Initialize User
if ( (rcode = JDB_InitUser(hEnv, &hUser, NULL, JDEDB_COMMIT_AUTO))
!= JDEDB_PASSED)
{
return(FALSE);
}

return(TRUE);
}

int LogoffJDE()
{
JDEDB_RESULT rcode;

if (hUser)
{
if ((rcode = JDB_FreeUser(hUser)) != JDEDB_PASSED)
{
return(FALSE);
}
}

if (hEnv)
{
if ((rcode = JDB_FreeEnv(hEnv)) != JDEDB_PASSED)
{
return(FALSE);
}
}
return(TRUE);
}

**************************************************************************

jastips wrote:
>
> Hi List,
>
> I am trying to create an exe file to access business functions and data. I am using VC++ to do this. When I try to create an Oneworld instance with
>
> JDB_InitEnvOvr(&hEnv, szEnv, szUser, szPwd) I am getting some strange errors
>
> Errors :
>
> d:\b7\system\include\jdeuprto.h(263) : error C2061: syntax error : identifier 'JDEMENUBUILDCALLBACK'
> d:\b7\system\include\jdeuprto.h(281) : error C2061: syntax error : identifier 'LPJDEERFONT_STRUCT'
> d:\b7\system\include\jdeuprto.h(401) : error C2061: syntax error : identifier 'LPINITCOLUMN'
> d:\b7\system\include\jdeuprto.h(402) : error C2061: syntax error : identifier 'LPINITCOLUMN'
> d:\b7\system\include\jdeuprto.h(417) : error C2146: syntax error : missing ';' before identifier 'JdeGridAllocColumns'
> d:\b7\system\include\jdeuprto.h(417) : error C2501: 'LPINITCOLUMN' : missing storage-class or type specifies
> d:\b7\system\include\jdeuprto.h(417) : fatal error C1004: unexpected end of file found
> Error executing cl.exe.
>
> I am including the file “jde.h” in my program. I hope internally it is calling so many header files but I am getting error with “jdeuprto.h” file.
>
> Can any one can suggest me what header files I need to include in my program to create a Oneworld instance by using “JDB_InitEnvOvr ” function.
>
> Thanks & Regards
>
> Jastips
> JDE CNC Consultant
> DTI
> USA
> --------------------------
> Visit the forum to view this thread at:
> http://198.144.193.139/cgi-bin/wwwthreads/showflat.pl?Cat=&Board=OWDEV&Number=5267
> *************************************************************
> This is the JDEList One World / XE Developers Mailing List.
> Archives and information on how to SUBSCRIBE, and
> UNSUBSCRIBE can be found at http://www.JDELIST.com
> *************************************************************
 
Hi Jasti,

Thanks for Michel Twaddell help regarding
Interoperability tips and sample programs.
I think he is the only person found working on this
subject from JDEList.

Under source files include the following files.
Jdekrnl.lib , jdel.lib and jdeuser.lib .

Still if you get errors then the problem with VC++
Project settings.

If you need any help contact me on (800)-234-7714
Ext.4039

Thanks
Madhusudhan Bandari
Miracle-Ear,Inc.
m_bandarim@ miracle-ear.com

----- Original Message -----
From: "jastips" <jastips@hotmail.com>
To: <jdeowdevml@jdelist.com>
Sent: Thursday, February 08, 2001 9:24 AM
Subject: Interoperability ~~0:5267


> Hi List,
>
> I am trying to create an exe file to access business
functions and data. I am using VC++ to do this. When I
try to create an Oneworld instance with
>
> JDB_InitEnvOvr(&hEnv, szEnv, szUser, szPwd) I am
getting some strange errors
>
>
> Errors :
>
> d:\b7\system\include\jdeuprto.h(263) : error C2061:
syntax error : identifier 'JDEMENUBUILDCALLBACK'
> d:\b7\system\include\jdeuprto.h(281) : error C2061:
syntax error : identifier 'LPJDEERFONT_STRUCT'
> d:\b7\system\include\jdeuprto.h(401) : error C2061:
syntax error : identifier 'LPINITCOLUMN'
> d:\b7\system\include\jdeuprto.h(402) : error C2061:
syntax error : identifier 'LPINITCOLUMN'
> d:\b7\system\include\jdeuprto.h(417) : error C2146:
syntax error : missing ';' before identifier
'JdeGridAllocColumns'
> d:\b7\system\include\jdeuprto.h(417) : error C2501:
'LPINITCOLUMN' : missing storage-class or type
specifies
> d:\b7\system\include\jdeuprto.h(417) : fatal error
C1004: unexpected end of file found
> Error executing cl.exe.
>
> I am including the file "jde.h" in my program. I
hope internally it is calling so many header files but
I am getting error with "jdeuprto.h" file.
>
> Can any one can suggest me what header files I need
to include in my program to create a Oneworld instance
by using "JDB_InitEnvOvr " function.
>
> Thanks & Regards
>
>
> Jastips
> JDE CNC Consultant
> DTI
> USA
> --------------------------
> Visit the forum to view this thread at:
>
http://198.144.193.139/cgi-bin/wwwthreads/showflat.pl?Cat=&Board=OWDEV&Number=5267

>
*************************************************************
> This is the JDEList One World / XE Developers
Mailing List.
> Archives and information on how to SUBSCRIBE, and
> UNSUBSCRIBE can be found at http://www.JDELIST.com
> *************************************************************
 
Fw: Interoperability

Dear Jasti,

Thanks for Michel Twaddell help regarding
Interoperability tips and sample programs.
I think he is the only person found working on this
subject from JDEList.

Under source files include the following files.
Jdekrnl.lib , jdel.lib and jdeuser.lib .

Still if you get errors then the problem with VC++
Project settings.

If you need any help contact me on (800)-234-7714
Ext.4039

Thanks
Madhusudhan Bandari
Miracle-Ear,Inc.

> Hi List,
>
> I am trying to create an exe file to access business
functions and data. I
am using VC++ to do this. When I try to create an
Oneworld instance with
>
> JDB_InitEnvOvr(&hEnv, szEnv, szUser, szPwd) I am
getting some strange
errors
>
>
> Errors :
>
> d:\b7\system\include\jdeuprto.h(263) : error C2061:
syntax error :
identifier 'JDEMENUBUILDCALLBACK'
> d:\b7\system\include\jdeuprto.h(281) : error C2061:
syntax error :
identifier 'LPJDEERFONT_STRUCT'
> d:\b7\system\include\jdeuprto.h(401) : error C2061:
syntax error :
identifier 'LPINITCOLUMN'
> d:\b7\system\include\jdeuprto.h(402) : error C2061:
syntax error :
identifier 'LPINITCOLUMN'
> d:\b7\system\include\jdeuprto.h(417) : error C2146:
syntax error : missing
';' before identifier 'JdeGridAllocColumns'
> d:\b7\system\include\jdeuprto.h(417) : error C2501:
'LPINITCOLUMN' :
missing storage-class or type specifies
> d:\b7\system\include\jdeuprto.h(417) : fatal error
C1004: unexpected end
of file found
> Error executing cl.exe.
>
> I am including the file "jde.h" in my program. I
hope internally it is
calling so many header files but I am getting error
with "jdeuprto.h" file.
>
> Can any one can suggest me what header files I need
to include in my
program to create a Oneworld instance by using
"JDB_InitEnvOvr " function.
>
> Thanks & Regards
>
>
> Jastips
> JDE CNC Consultant
> DTI
> USA
> --------------------------
> Visit the forum to view this thread at:
>
http://198.144.193.139/cgi-bin/wwwthreads/showflat.pl?Cat=&Board=OWDEV&Numbe
r=5267
>
*************************************************************
> This is the JDEList One World / XE Developers
Mailing List.
> Archives and information on how to SUBSCRIBE, and
> UNSUBSCRIBE can be found at http://www.JDELIST.com
>
*************************************************************


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
 
Re: Fw: Interoperability

Hi Jasti
I think you should change the project settings

Goto Project Settings

1. Press C/C++ Tab
2. select PreProcessor category
3. In Additional Include directories column enter the
following path

d:/b7/system/include,d:/b7/system/includev,d:/b7/Mstb733/include,d:/b7/devb733/include,d:/devb733/includev

Let me know if it works.

Thanks
Madhusudhan Bandari
Miracle-Ear,Inc.
mbandari@miracle-ear.com

--- bandari madhusudhan <jdelist600@yahoo.com> wrote:
> Dear Jasti,
>
> Thanks for Michel Twaddell help regarding
> Interoperability tips and sample programs.
> I think he is the only person found working on this
> subject from JDEList.
>
> Under source files include the following files.
> Jdekrnl.lib , jdel.lib and jdeuser.lib .
>
> Still if you get errors then the problem with VC++
> Project settings.
>
> If you need any help contact me on (800)-234-7714
> Ext.4039
>
> Thanks
> Madhusudhan Bandari
> Miracle-Ear,Inc.
>
> > Hi List,
> >
> > I am trying to create an exe file to access
> business
> functions and data. I
> am using VC++ to do this. When I try to create an
> Oneworld instance with
> >
> > JDB_InitEnvOvr(&hEnv, szEnv, szUser, szPwd) I am
> getting some strange
> errors
> >
> >
> > Errors :
> >
> > d:\b7\system\include\jdeuprto.h(263) : error
> C2061:
> syntax error :
> identifier 'JDEMENUBUILDCALLBACK'
> > d:\b7\system\include\jdeuprto.h(281) : error
> C2061:
> syntax error :
> identifier 'LPJDEERFONT_STRUCT'
> > d:\b7\system\include\jdeuprto.h(401) : error
> C2061:
> syntax error :
> identifier 'LPINITCOLUMN'
> > d:\b7\system\include\jdeuprto.h(402) : error
> C2061:
> syntax error :
> identifier 'LPINITCOLUMN'
> > d:\b7\system\include\jdeuprto.h(417) : error
> C2146:
> syntax error : missing
> ';' before identifier 'JdeGridAllocColumns'
> > d:\b7\system\include\jdeuprto.h(417) : error
> C2501:
> 'LPINITCOLUMN' :
> missing storage-class or type specifies
> > d:\b7\system\include\jdeuprto.h(417) : fatal error
> C1004: unexpected end
> of file found
> > Error executing cl.exe.
> >
> > I am including the file "jde.h" in my program. I
> hope internally it is
> calling so many header files but I am getting error
> with "jdeuprto.h" file.
> >
> > Can any one can suggest me what header files I
> need
> to include in my
> program to create a Oneworld instance by using
> "JDB_InitEnvOvr " function.
> >
> > Thanks & Regards
> >
> >
> > Jastips
> > JDE CNC Consultant
> > DTI
> > USA
> > --------------------------
> > Visit the forum to view this thread at:
> >
>
http://198.144.193.139/cgi-bin/wwwthreads/showflat.pl?Cat=&Board=OWDEV&Numbe
> r=5267
> >
>
*************************************************************
> > This is the JDEList One World / XE Developers
> Mailing List.
> > Archives and information on how to SUBSCRIBE, and
> > UNSUBSCRIBE can be found at http://www.JDELIST.com
> >
>
*************************************************************
>
>
>
_________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at
> http://mail.yahoo.com
>
 
Jastips,

I wrote a Windows application to interface with OneWorld about a year ago
and I'm sure I had pretty much the same problem. Try this definition before
you include the JDE header files.

#define IAMWHOAMI

There are a number of other #defines you can use but I never found any
documentation on them so I stuck with this when I got it to compile. They
basically affect what gets defined. If there is a more appropriate #define
I would be interested in hearing about it.

Chris

>From: jastips <jastips@hotmail.com>
>Reply-To: jdeowdev@jdelist.com
>To: jdeowdevml@jdelist.com
>Subject: Interoperability ~~0:5267
>Date: Thu, 8 Feb 2001 07:24:15 -0800 (PST)
>
>Hi List,
>
>I am trying to create an exe file to access business functions and data. I
>am using VC++ to do this. When I try to create an Oneworld instance with
>
>JDB_InitEnvOvr(&hEnv, szEnv, szUser, szPwd) I am getting some strange
>errors
>
>
>Errors :
>
>d:\b7\system\include\jdeuprto.h(263) : error C2061: syntax error :
>identifier 'JDEMENUBUILDCALLBACK'
>d:\b7\system\include\jdeuprto.h(281) : error C2061: syntax error :
>identifier 'LPJDEERFONT_STRUCT'
>d:\b7\system\include\jdeuprto.h(401) : error C2061: syntax error :
>identifier 'LPINITCOLUMN'
>d:\b7\system\include\jdeuprto.h(402) : error C2061: syntax error :
>identifier 'LPINITCOLUMN'
>d:\b7\system\include\jdeuprto.h(417) : error C2146: syntax error : missing
>';' before identifier 'JdeGridAllocColumns'
>d:\b7\system\include\jdeuprto.h(417) : error C2501: 'LPINITCOLUMN' :
>missing storage-class or type specifies
>d:\b7\system\include\jdeuprto.h(417) : fatal error C1004: unexpected end of
>file found
>Error executing cl.exe.
>
>I am including the file “jde.h” in my program. I hope internally it is
>calling so many header files but I am getting error with “jdeuprto.h” file.
>
>Can any one can suggest me what header files I need to include in my
>program to create a Oneworld instance by using “JDB_InitEnvOvr ” function.
>
>Thanks & Regards
>
>
>Jastips
>JDE CNC Consultant
>DTI
>USA
>--------------------------
>Visit the forum to view this thread at:
>http://198.144.193.139/cgi-bin/wwwthreads/showflat.pl?Cat=&Board=OWDEV&Number=5267
>*************************************************************
>This is the JDEList One World / XE Developers Mailing List.
>Archives and information on how to SUBSCRIBE, and
>UNSUBSCRIBE can be found at http://www.JDELIST.com
>*************************************************************
>

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
 

twaddell

Member
For anyone wanting examples of using the OneWorld APIs in their own C
program, please refer to the Knowledge Garden document, CIP-00-0002.
It contains links for downloading 2 Zip files containing sample C code
and projects for the Microsoft Visual C++ environment. Also in these Zip
files is a Word document showing the Visual C++ settings that must be
modified. It is very important to change your settings per this document!
I hope this helps.

Michael Twaddell
B733.1, Oracle 815, Solaris 2.7

jastips wrote:
>
> Hi List,
>
> I am trying to create an exe file to access business functions and data. I am using VC++ to do this. When I try to create an Oneworld instance with
>
> JDB_InitEnvOvr(&hEnv, szEnv, szUser, szPwd) I am getting some strange errors
>
> Errors :
>
> d:\b7\system\include\jdeuprto.h(263) : error C2061: syntax error : identifier 'JDEMENUBUILDCALLBACK'
> d:\b7\system\include\jdeuprto.h(281) : error C2061: syntax error : identifier 'LPJDEERFONT_STRUCT'
> d:\b7\system\include\jdeuprto.h(401) : error C2061: syntax error : identifier 'LPINITCOLUMN'
> d:\b7\system\include\jdeuprto.h(402) : error C2061: syntax error : identifier 'LPINITCOLUMN'
> d:\b7\system\include\jdeuprto.h(417) : error C2146: syntax error : missing ';' before identifier 'JdeGridAllocColumns'
> d:\b7\system\include\jdeuprto.h(417) : error C2501: 'LPINITCOLUMN' : missing storage-class or type specifies
> d:\b7\system\include\jdeuprto.h(417) : fatal error C1004: unexpected end of file found
> Error executing cl.exe.
>
> I am including the file “jde.h” in my program. I hope internally it is calling so many header files but I am getting error with “jdeuprto.h” file.
>
> Can any one can suggest me what header files I need to include in my program to create a Oneworld instance by using “JDB_InitEnvOvr ” function.
>
> Thanks & Regards
>
> Jastips
> JDE CNC Consultant
> DTI
> USA
> --------------------------
> Visit the forum to view this thread at:
> http://198.144.193.139/cgi-bin/wwwthreads/showflat.pl?Cat=&Board=OWDEV&Number=5267
> *************************************************************
> This is the JDEList One World / XE Developers Mailing List.
> Archives and information on how to SUBSCRIBE, and
> UNSUBSCRIBE can be found at http://www.JDELIST.com
> *************************************************************
 

davidlek

Member
Hi,

I am tryiny to write an application to interop with JDE Xe. I have tried the sample example downloaded from the Knowledge Garden. But have the following error. Pls help:

"OCMLOOKUP ERROR: INI file lookup error. Fail to Log on to OneWorld"

What is wrong?
 
Do you have a c:\jdeinterop.ini file on you client machine? It has to
have the server name and port number set up in two places:

[SERVER]
glossaryTextServer=OWES1:6010


[INTEROP]
enterpriseServer=OWES1
port=6010

Replace OWES1 with the name (or IP address) of your JDE Enterprise
Server, and 6010 with your port number (6010 is the default.) The
samples come with a jdeinterop.ini that should work once you make these
changes and copy it to the drive root.
 

milliron

Active Member
Michael,

Thank you for the tip on document CIP-00-0002. The compiler settings document solved my problem.

-mary

XE SP13 AS/400 V4R5 DB2/400
 

David Robertson

Reputable Poster
Excellents stuff!

While a lot of this is beyond my current abilities to code in C, it's great to know where to find it now. THatnks to your tip, I've found a whole swag of stuff on the KG that I didn't know was there previously.

Regards,
David Robertson
 

ziodraw

Member
Hi guys,

after 10 years I found that thread and try to use that login thing with visual studio 2008, JDE 9.00. Enhanced the steps I successfully go through:

1. Create a simple main class which says "Hello World"
2. include jde.h
(libraries = system/lib32; system/libv32; <env>/lib32
includes = system/include; system/includedev; <env>/include)
=> Get some errors like "JDEMENUBUILDCALLBACK not found" see posts below.
=> That is only defined in JDEDECL.H if "defined ( JDENV_PC ) && defined ( _Windows )"
=> comment that condition and the erros are cleared
3. at a jdeStrCpy Statement => can not convert wchar_t ...
=> Project Properties => Configuration Props. => C++/C => Language => Treat wchar_t ... => set it to "No (/Zc:wchar_t-)"

But no I came to a point where I have no more ideas:

main.obj : error LNK2019: unresolved external symbol __imp__JDB_InitUserX@28 referenced in function _main
main.obj : error LNK2019: unresolved external symbol __imp__JDB_InitEnvOvr@16 referenced in function _main
main.obj : error LNK2019: unresolved external symbol __imp__jdeStrncpy@12 referenced in function _main
main.obj : error LNK2019: unresolved external symbol __imp__JDB_GetEnvironment@4 referenced in function _main

Are anyone common with those errors? Do I have include some dll or something?
 
Top