C Business Functions

XEWANNABE

Member
I'm attempting to write my first C business function in order to call an AS/400 program from Xe. I hope to make a BSFN that JDE can call, on the server, to execute a command or HLL program. This program will receive parameters and return parameters. I assume this can not be accomplished with an NER and therefore am using C. If there is a way to accomplish with NER, and I am mistaken, please advise.

I am running on a thick client. Should I be able to compile this stuff and test on my machine when the ultimate goal is to have it run in the AS/400 server? I have created .C and .H files in my d:/b7/Development environment path. Also, I created the basic DLL library, data structure and BSFN objects in OMW. When I do BUSBUILD, I receive messages about "build failed" as follows:

-------------- begin snippet -------------
Generating Makefile: D:\B7\DV7333\obj\B55RFDLL.mak
Makefile generated.

Building business functions.

************B55RFDLL************



************Build Finished************

B55RFDLL.dll - 0 error(s), 0 warning(s): Build failed. Restored previous dll.
------------ end snippet -----------

When I try to compile the code from MS Visual C++ outside of Xe, I get a whole bunch of messages which appear to indicate that I have errors in what I think is JDE-supplied code as follows:

------------- begin snippet 2 -----------------
--------------------Configuration: B55RICK - Win32 Debug--------------------
Compiling...
B55RICK.C
d:\b7\system\include\jdeuprto.h(263) : error C2081: 'JDEMENUBUILDCALLBACK' : name in formal parameter list illegal
d:\b7\system\include\jdeuprto.h(263) : error C2081: 'JDEMENUSLCTCALLBACK' : name in formal parameter list illegal
d:\b7\system\include\jdeuprto.h(281) : error C2146: syntax error : missing ')' before identifier 'lpFS'
d:\b7\system\include\jdeuprto.h(281) : error C2081: 'LPJDEERFONT_STRUCT' : name in formal parameter list illegal
d:\b7\system\include\jdeuprto.h(281) : error C2061: syntax error : identifier 'lpFS'
d:\b7\system\include\jdeuprto.h(281) : error C2059: syntax error : ';'
d:\b7\system\include\jdeuprto.h(281) : error C2059: syntax error : ')'
d:\b7\system\include\jdeuprto.h(401) : error C2146: syntax error : missing ')' before identifier 'lpzColumns'
d:\b7\system\include\jdeuprto.h(401) : error C2081: 'LPINITCOLUMN' : name in formal parameter list illegal
d:\b7\system\include\jdeuprto.h(401) : error C2061: syntax error : identifier 'lpzColumns'
d:\b7\system\include\jdeuprto.h(401) : error C2059: syntax error : ';'
d:\b7\system\include\jdeuprto.h(401) : error C2059: syntax error : ')'
d:\b7\system\include\jdeuprto.h(402) : error C2146: syntax error : missing ')' before identifier 'lpzColumn'
d:\b7\system\include\jdeuprto.h(402) : error C2081: 'LPINITCOLUMN' : name in formal parameter list illegal
d:\b7\system\include\jdeuprto.h(402) : error C2061: syntax error : identifier 'lpzColumn'
d:\b7\system\include\jdeuprto.h(402) : error C2059: syntax error : ';'
d:\b7\system\include\jdeuprto.h(402) : error C2059: syntax error : ')'
d:\b7\system\include\jdeuprto.h(417) : error C2061: syntax error : identifier 'JdeGridAllocColumns'
d:\b7\system\include\jdeuprto.h(417) : error C2059: syntax error : ';'
d:\b7\system\include\jdeuprto.h(417) : error C2059: syntax error : 'type'
d:\b7\system\include\jdeuprto.h(418) : error C2146: syntax error : missing ')' before identifier 'lpInitColumn'
d:\b7\system\include\jdeuprto.h(418) : error C2081: 'LPINITCOLUMN' : name in formal parameter list illegal
d:\b7\system\include\jdeuprto.h(418) : error C2061: syntax error : identifier 'lpInitColumn'
d:\b7\system\include\jdeuprto.h(418) : error C2059: syntax error : ';'
d:\b7\system\include\jdeuprto.h(418) : error C2059: syntax error : ','
d:\b7\system\include\jdeuprto.h(418) : error C2059: syntax error : ')'
d:\b7\system\include\jdeuprto.h(435) : error C2146: syntax error : missing ')' before identifier 'lpColumns'
d:\b7\system\include\jdeuprto.h(435) : error C2061: syntax error : identifier 'lpColumns'
d:\b7\system\include\jdeuprto.h(435) : error C2059: syntax error : ';'
d:\b7\system\include\jdeuprto.h(435) : error C2059: syntax error : ')'
d:\b7\system\include\jdeuprto.h(436) : error C2061: syntax error : identifier 'jdeGridAllocColumns'
d:\b7\system\include\jdeuprto.h(436) : error C2059: syntax error : ';'
d:\b7\system\include\jdeuprto.h(436) : error C2059: syntax error : 'type'
d:\b7\system\include\jdeuprto.h(508) : error C2122: 'int ' : prototype parameter in name list illegal
d:\b7\system\include\jdeuprto.h(508) : error C2122: 'struct tagGBR_VAR_INFO *' : prototype parameter in name list illegal
d:\b7\system\include\jdeuprto.h(508) : error C2122: 'int ' : prototype parameter in name list illegal
d:\b7\system\include\jdeuprto.h(509) : error C2122: 'int ' : prototype parameter in name list illegal
d:\b7\system\include\jdeuprto.h(531) : error C2146: syntax error : missing ')' before identifier 'lpzGBRMain'
d:\b7\system\include\jdeuprto.h(531) : error C2081: 'LPGBRMAIN' : name in formal parameter list illegal
d:\b7\system\include\jdeuprto.h(531) : error C2061: syntax error : identifier 'lpzGBRMain'
d:\b7\system\include\jdeuprto.h(531) : error C2059: syntax error : ';'
d:\b7\system\include\jdeuprto.h(531) : error C2059: syntax error : ','
d:\b7\system\include\jdeuprto.h(531) : error C2059: syntax error : ')'
d:\b7\system\include\jdeuprto.h(623) : error C2146: syntax error : missing ')' before identifier 'zDSW98826B'
d:\b7\system\include\jdeuprto.h(623) : error C2081: 'DSW98826B' : name in formal parameter list illegal
d:\b7\system\include\jdeuprto.h(623) : error C2061: syntax error : identifier 'zDSW98826B'
d:\b7\system\include\jdeuprto.h(623) : error C2059: syntax error : ';'
d:\b7\system\include\jdeuprto.h(623) : error C2059: syntax error : ')'
d:\b7\system\include\jdeoblib.h(90) : error C2146: syntax error : missing ')' before identifier 'lpGlbl'
d:\b7\system\include\jdeoblib.h(90) : error C2061: syntax error : identifier 'lpGlbl'
d:\b7\system\include\jdeoblib.h(90) : error C2059: syntax error : ';'
d:\b7\system\include\jdeoblib.h(90) : error C2059: syntax error : ','
d:\b7\system\include\jdeoblib.h(93) : error C2059: syntax error : ')'
d:\b7\system\include\jdeoblib.h(112) : error C2146: syntax error : missing ')' before identifier 'lpGlbl'
d:\b7\system\include\jdeoblib.h(112) : error C2061: syntax error : identifier 'lpGlbl'
d:\b7\system\include\jdeoblib.h(112) : error C2059: syntax error : ';'
d:\b7\system\include\jdeoblib.h(113) : error C2059: syntax error : ')'
d:\b7\system\include\jdeoblib.h(121) : error C2146: syntax error : missing ')' before identifier 'lpGlbl'
d:\b7\system\include\jdeoblib.h(121) : error C2061: syntax error : identifier 'lpGlbl'
d:\b7\system\include\jdeoblib.h(121) : error C2059: syntax error : ';'
d:\b7\system\include\jdeoblib.h(121) : error C2059: syntax error : ','
d:\b7\system\include\jdeoblib.h(124) : error C2059: syntax error : ')'
d:\b7\system\include\jdeoblib.h(155) : error C2143: syntax error : missing ')' before '*'
d:\b7\system\include\jdeoblib.h(155) : error C2081: 'LPGLBL' : name in formal parameter list illegal
d:\b7\system\include\jdeoblib.h(155) : error C2143: syntax error : missing '{' before '*'
d:\b7\system\include\jdeoblib.h(156) : error C2059: syntax error : ')'
d:\b7\system\include\jdeoblib.h(164) : error C2146: syntax error : missing ')' before identifier 'lpGlbl'
d:\b7\system\include\jdeoblib.h(164) : error C2061: syntax error : identifier 'lpGlbl'
d:\b7\system\include\jdeoblib.h(164) : error C2059: syntax error : ';'
d:\b7\system\include\jdeoblib.h(165) : error C2059: syntax error : ')'
d:\b7\system\include\jdeoblib.h(173) : error C2146: syntax error : missing ')' before identifier 'lpGlbl'
d:\b7\system\include\jdeoblib.h(173) : error C2061: syntax error : identifier 'lpGlbl'
d:\b7\system\include\jdeoblib.h(173) : error C2059: syntax error : ';'
d:\b7\system\include\jdeoblib.h(174) : error C2059: syntax error : ')'
d:\b7\system\include\jdeoblib.h(182) : error C2146: syntax error : missing ')' before identifier 'lpGlbl'
d:\b7\system\include\jdeoblib.h(182) : error C2061: syntax error : identifier 'lpGlbl'
d:\b7\system\include\jdeoblib.h(182) : error C2059: syntax error : ';'
d:\b7\system\include\jdeoblib.h(183) : error C2059: syntax error : ')'
d:\b7\system\include\jdeoblib.h(191) : error C2146: syntax error : missing ')' before identifier 'lpGlbl'
d:\b7\system\include\jdeoblib.h(191) : error C2061: syntax error : identifier 'lpGlbl'
d:\b7\system\include\jdeoblib.h(191) : error C2059: syntax error : ';'
d:\b7\system\include\jdeoblib.h(191) : error C2059: syntax error : ','
d:\b7\system\include\jdeoblib.h(194) : error C2059: syntax error : ')'
d:\b7\system\include\jdeoblib.h(202) : error C2146: syntax error : missing ')' before identifier 'lpGlbl'
d:\b7\system\include\jdeoblib.h(202) : error C2061: syntax error : identifier 'lpGlbl'
d:\b7\system\include\jdeoblib.h(202) : error C2059: syntax error : ';'
d:\b7\system\include\jdeoblib.h(203) : error C2059: syntax error : ')'
d:\b7\system\include\jdeoblib.h(211) : error C2146: syntax error : missing ')' before identifier 'lpGlbl'
d:\b7\system\include\jdeoblib.h(211) : error C2061: syntax error : identifier 'lpGlbl'
d:\b7\system\include\jdeoblib.h(211) : error C2059: syntax error : ';'
d:\b7\system\include\jdeoblib.h(212) : error C2059: syntax error : ')'
d:\b7\system\include\jdeoblib.h(220) : error C2146: syntax error : missing ')' before identifier 'lpGlbl'
d:\b7\system\include\jdeoblib.h(220) : error C2061: syntax error : identifier 'lpGlbl'
d:\b7\system\include\jdeoblib.h(220) : error C2059: syntax error : ';'
d:\b7\system\include\jdeoblib.h(221) : error C2059: syntax error : ')'
d:\b7\system\include\jdeoblib.h(229) : error C2146: syntax error : missing ')' before identifier 'lpGlbl'
d:\b7\system\include\jdeoblib.h(229) : error C2061: syntax error : identifier 'lpGlbl'
d:\b7\system\include\jdeoblib.h(229) : error C2059: syntax error : ';'
d:\b7\system\include\jdeoblib.h(230) : error C2059: syntax error : ')'
d:\b7\system\include\jdeoblib.h(238) : error C2146: syntax error : missing ')' before identifier 'lpGlbl'
d:\b7\system\include\jdeoblib.h(238) : error C2061: syntax error : identifier 'lpGlbl'
d:\b7\system\include\jdeoblib.h(238) : fatal error C1003: error count exceeds 100; stopping compilation
Error executing cl.exe.

B55RICK.OBJ - 102 error(s), 0 warning(s)
---------------- end snippet 2 -----------------

Clearly I have missed one or more setup steps related to the paths where JDE looks or MS C++ looks. Is there anything obviously wrong that one of you experts can see.

Thank you.

AS/400 enterprise server
Citrix clients for users
Thick clients for developers
B7333 17.1

One World/Xe B7333/15.1
AS/400 Enterprise Server
Citrix
 
Firstly, you can't (without a lot of work) compile a BSFN from within Visual
C++ (the source files alone don't contain all the necessary #include and
#define statements).

Your first trace looks like it hasn't found the .c and .h files. There
should be two .c files compiled between



Did you create skeleton .c and .h files from within OMW? If not I would try
doing this. And look at the .mak file to see if you've placed your files in
the wrong place. Or, maybe the .mak doesn't contain any targets.

Christian
 
My MAK file appears to have a target OBJ and also points to the .C source in the proper directory. I don't know how to make skeleton .H or .C in OMW. I tried using the Edit, Functions, Tables, Create FORM exists and none of these appear to apply. Thanks for the help and any further suggestions would be appreciated.

One World/Xe B7333/15.1
AS/400 Enterprise Server
Citrix
 
1st: When you go on Start BSFN Design Aids.
On the form exit the first option is CREATE.
(Did you create your function into OW into this grid ?)

2nd: Why Creating a custom Parent DLL. You can use
CCUSTOM, it's used only for Customization.
You adding difficulty if you creating new DLL

3rd: All manipulation of C code should be done under OW.
(creating function name, skeleton, compiling, and
.C & .H files)

When its all OK you should get this log in BusBuild:
Generating Makefile: c:\B7\DV7333\obj\CCUSTOM.mak
Makefile generated.

Building business functions.

************CCUSTOM************

B6500100.c
Replacing B6500100.obj
jdertdll.c
Creating library c:\B7\DV7333\lib32\CCUSTOM.lib and object c:\B7\DV7333\lib32\CCUSTOM.exp


************Build Finished************

CCUSTOM.dll - 0 error(s), 0 warning(s): Built successfully.
 
Thank you for your quick response.

1) I do not have a CCUSTOM on my system so I will have to create it or my own DLL. I think I got throught that part ok.

2) I tried the CREATE option as you suggested and it promoted me three times for for skeletons and such, all of which I replied YES.

3) I still do not get linkage when I execute BUSBUILD. Also, I am not clear on the technique for manipulating, attaching or editing relevant .h or .c files. Is there a document that details this procedure? When I click on EDIT from the form exit of SBFN design, I get a message that MSDEV can't be started. Everyone else here gets the same message, so perhaps we don't have it configured properly?

One World/Xe B7333/15.1
AS/400 Enterprise Server
Citrix
 
Hi again,

Did you install MS-Visual C++ after OW. If so, this is why when you click edit it give error. C++ should always install before OW. So OW can initialize jde.ini correctly.

Do you try to create BSFN on citrix PC or a FAT PC with all developement object install ?

When you start BusBuild do you still get a lot of error or only linkage error ?

Jean
 
Visual C first - here is section of JDE.INI that shows linkages
----------- begin
[JDE_CG]
STDLIBDIR=D:\Program Files\Microsoft Visual Studio\VC98\lib
TPLNAME=EXEFORM2
ERRNAME=CGERR
TARGET=Optimize
INCLUDES=D:\Program Files\Microsoft Visual Studio\VC98\include;$(SYSTEM)\include;$(SYSTEM)\cg;$(APP)\include;$(SYSTEM)\includev
LIBS=D:\Program Files\Microsoft Visual Studio\VC98\lib;$(SYSTEM)\lib32;$(APP)\lib32;$(SYSTEM)\libv32
MAKEDIR=D:\Program Files\Microsoft Visual Studio\VC98\bin;D:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin
USER=JDE
------------- end

This is all happening on the FAT client - we aren't allowed to run OMW on Citrix

No change on busbuild (using the function one, not standalone) and still "empty" place where compiling supposed to be
------------- begin
Generating Makefile: D:\B7\DV7333\obj\B55RFDLL.mak

Makefile generated.

Building business functions.

************B55RFDLL************

************Build Finished************

B55RFDLL.dll - 0 error(s), 0 warning(s): Build failed. Restored previous dll.
------------ end

I started again from scratch. My technique must be improving because skeletons have been created (replaced ones I'd previously created) new files: d:\b7\DV7333\include\B55RICK.h and
d:\b7\DV7333\source\B55RICK.c were created. A make file is created but goes under d:\b7\DV7333\Obj when I would have assumed it would go under d:\b7\DV7333\Make - not sure about this.

----------------- make file -----------------
#
#
# Make File For 32 bit Business Functions
#

TARGETOS=BOTH
OBJDIR=D:\B7\DV7333\obj
LIBRARY=D:\B7\DV7333\lib32\B55RFDLL.lib
DLLTARGET=D:\B7\DV7333\bin32\B55RFDLL.dll
PRECOMPHDR=D:\B7\DV7333\obj\jdepch.h
SYSTEM=D:\B7\SYSTEM
APP=D:\B7\DV7333
PDB=..\bin32\debug\B55RFDLL.pdb
STATICLIB=D:\B7\DV7333\lib32\sB55RFDL.lib
STAGE1LIB=D:\B7\DV7333\lib32\1B55RFDLL.lib
EXPORTLIB=D:\B7\DV7333\lib32\B55RFDLL.exp
DUMPFILE=D:\B7\DV7333\obj\B55RFDLL.dmp
DEFFILE=D:\B7\DV7333\obj\B55RFDLL.def
OBJECTDLLMAIN=jdertdll.obj

# include equals system includes plus those added below

INCLUDE=D:\Program Files\Microsoft Visual Studio\VC98\include;$(SYSTEM)\include;$(SYSTEM)\cg;$(APP)\include;$(SYSTEM)\includev
APP= D:\B7\DV7333
LIB=D:\Program Files\Microsoft Visual Studio\VC98\lib;$(SYSTEM)\lib32;$(APP)\lib32;$(SYSTEM)\libv32


cflags= /Gz \
/Zp1 \
/Z7 \
/Yd \
/MD \
/W4 \
/D "WIN32" \
/D "NDEBUG" \
/D "_WINDOWS" \
/nologo \
/c \

# What we are building
#

all: $(DLLTARGET)

OBJECT = B55RICK.obj \


OBJ = B55RICK.obj
SOURCE = D:\B7\DV7333\source\B55RICK.c
$(OBJ): $(SOURCE)
cl $(cflags) $(SOURCE) /Fo$(OBJ)


DLLMAINSOURCE = D:\B7\DV7333\work\jdertdll.c
$(OBJECTDLLMAIN): $(DLLMAINSOURCE)
cl $(cflags) $(DLLMAINSOURCE) /Fo$(OBJECTDLLMAIN)

linklibs=kernel32.lib \
user32.lib \
gdi32.lib \
shell32.lib \
comdlg32.lib \
msvcrt.lib \
jdel.lib \
jdbodbc.lib \
jdekrnl.lib \
jdesetup.lib \
jdeuser.lib \
jdegbr.lib \
jdeoblib.lib \
odbc32.lib \
jdedia.lib \
jdedia1.lib \
jdemail.lib \
envtool.lib \
browser.lib \
jdepkgbld.lib \
jdesetuputil.lib \
jdeomw.lib \
owver.lib \
jdemtdeploy.lib \
jdenet.lib

# set linker options
# use only until single vx multithreading is resolved
#
linkflags= /DLL \
/DEBUG \
/SUBSYSTEM:windows \
/NODEFAULTLIB:LIBCMT.lib \
/NODEFAULTLIB:LIBCMTD.lib \
/NODEFAULTLIB:MSVCRTD.lib \
/PDB:NONE \
/out:$(DLLTARGET) \
/FORCE:MULTIPLE \
/FORCE:UNRESOLVED \
/nologo \
/IMPLIB:$(LIBRARY) \
/MACHINE:IX86 \
/INCREMENTAL:NO \
/DEF:$(DEFFILE)

.IGNORE:
$(STATICLIB): $(OBJECT)
lib.exe /NOLOGO /out:$(STATICLIB) $(STATICLIB) $(OBJECT)

$(DEFFILE): $(STATICLIB)
dumpbin /LINKERMEMBER:1 $(STATICLIB) > $(DUMPFILE)
D:\B7\SYSTEM\bin32\jdegenex $(DUMPFILE) $(DEFFILE)

$(EXPORTLIB): $(DEFFILE)

# Now build/update the dynamic link library
#
$(DLLTARGET): $(STATICLIB) $(OBJECTDLLMAIN) $(EXPORTLIB)
link @<<
$(linkflags) $(STATICLIB) $(OBJECTDLLMAIN) $(linklibs)
<<
---------------- end make file ----------


One World/Xe B7333/15.1
AS/400 Enterprise Server
Citrix
 
I don't known what happend here. BusBuild Didn't see your BSFN.

One thing i remember partially, is i need to copy a existing file to my new DLL file but cannot remember what is exactly.

What you can do is verify all folder (c:\b7\dv733\ : bin32,lib32,obj) for all file look like *callbs*.* compare with *B55RFDLL*.*, you should get 7 files in both case.

If not you should copy "callbs" file to your "b55rf" and keep same extention (but do not copy .dll file).
 
Now maybe we are getting somewhere. I search for *CALLBS* and I have 4 files in each environment - a CALLBSFN.EXP, .DLL, .LIB, and sCALLBSF.LIB - very different from the *B55RF* search where I have only B55RFDLL.mak in the \dv733\obj directory. From your post, I think you are suggesting that I reate by copying a B55RFDLL.EXP and a B55RFDLL.LIB, skip the .DLL but what about the sB55RFDLL.lib which would exceeed the 8.3 naming.

One World/Xe B7333/15.1
AS/400 Enterprise Server
Citrix
 
Did copy from a prior objects (*.lib, *.exp, s*.lib) to a new name TSPEX (shorter so no 8.3 conflict). This produced no changes - still no go. However, when I click on BUSBUILD, it appears to try to do a BUILD, I guess. From the BUSBUILDer menu, there is both BUILD and COMPILE. I tried COMPILE and it listed error message saying B55RICK.OBJ not produced.

Seems logical that if no *.obj is produced, the build can not do very much to generate *.DLL, right? Where do you see the compiler listing? I have not written any code yet, just dumped typedef info from clipboard into the *.h file after the structure line. If this is a business function that is supposed to run on the enterprise server (AS/400 in our case) when does it get compiled, tested, debugged ? and How can you do that at client PC? This is all such a mystery until you see the first one working. I started by attempting to mimic code from B42001140 because it was supposedly a working example.

One World/Xe B7333/15.1
AS/400 Enterprise Server
Citrix
 
I'm not sure this has been mentioned yet so...
One very important step in creating the skeleton is to be sure you've created
the data structure for the function first. Then when creating the skeleton for
the C function, be sure you've attached the correct DS to the BSFN.
The next step is to click the TypeDef button which copies the DS spec to the
memory like ctrl-c would.
Once that's done, open the .H file in visual C++ and copy that spec to it by
hitting ctrl-v.
Without any other code added, try compiling and you should recieve no errors.
This step is often overlooked and can cause headaches....eh Whipping Boy? =0)
(I've made this mistake myself...)
Mike K.



__________________________________________________
 
Yes, this is exactly what I'm doing. Attempting to get a clean compile with no other code added. BUSBUILD "build" ignores my function and "compile" says no object created. Where do I get to view the errors in the compile to fix them?

One World/Xe B7333/15.1
AS/400 Enterprise Server
Citrix
 
Normally all compiles error should be display on the busBuild screen "Build Output".

Are you ever try to compile a standard, already existing OW BSFN (like B42.....). If no, can you try it just to be sure your PC can build BSFN.

Jean.
 
Hi "XEWANNABE",

Although I do not know how to build BSFN/DLL for AS400, but I know that building new DLLs first time is always problematical.

My suggestion is that first try it on a full DEV fat client.
Please check the following post in the archives of the Forum:
======================================
SUBJECT: Re: How do i create a Business Library?
FORUM: One World® / XE Developers
POSTED BY: Zoltan_Gyimesi
DATE/TIME: 7/5/01 12:38 PM
======================================
Please, omit the first few lines of this post which are off-topic to your issue.

Please, keep us informed! Thanks!

Good luck,

Zoltán

P.S.: Would be nice of you to let us know a nick name of you for salutation instead of XEWANNABE.

B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)
 
Zoltan,

I located your prior post, thank you. In it you suggest the standalone, so I tried that just now with these results. I am still frustrated with not knowing where to see the errors referred to by B55RICK.Obj did not build. Is this bad? I assume so but since I've never done one... From this output can you suggest another attempt or should I just log-off OMW and try outside? RF

-- busbuild standalone results for compile of B55RICK in TSPEX.DLL --
Generating Makefile: D:\B7\DV7333\obj\TSPEX.mak
Makefile generated.
Compiling business functions.
************TSPEX************
************Build Finished************
D:\B7\DV7333\obj\B55RICK.obj did not build.
D:\B7\DV7333\bin32\TSPEX.dll - 0 error(s), 0 warning(s): Some selected objects did not build.
-- end --

-- busbuild standalone results for build of same -------------
Generating Makefile: D:\B7\DV7333\obj\TSPEX.mak
Makefile generated.
Building business functions.
************TSPEX************
Rebased at 0x612D0000 : D:\B7\DV7333\bin32\TSPEX.dll
Rebased at 0x612B0000 : D:\B7\DV7333\bin32\TSPTEST.dll
************Build Finished************
TSPEX.dll - 0 error(s), 0 warning(s): Build failed. Restored previous dll.
-- end -------

One World/Xe B7333/15.1
AS/400 Enterprise Server
Citrix
 
Hi Rick,

First some questions:
Q1.) What is the setting of your BSFN for "Business Function Location (C/S)?
* Client only
* Server Only
* Both Client & Server

Q2.) Where do you try BusBuild? Do you do on a fat full DEV client from OMW?

Suggestions:
1.) Check-Out/Get all BSFNs and their DSTRs in your custom DLL onto a fat full DEV client which contains C++ of course and where OW can run C++.
2.) If answer for Q1 = Server Only then change it to Client & Server.
3.) Log-off OW on the client.
4.) Execute the file copies in lib32 folder as it had been adviced.
5.) Run BusBuild.exe outside from OW to build your entire custom DLL. Please, follow the steps and settings which I had described in my post which had been mentioned in my previous reply.

Some further question:
Q3.) Was you able successfully build a standard OW Business Function from OMW?
Q4.) Was you able successfully build a standard OW DLL from OMW?

Good luck again,

Zoltán

B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)
 
XEWANNABE;

Did you under BUSBUILD standalone, rebuild your libraries, if not then take the
option to rebuild the libraries. After you rebuild you libraries then run the
option to syncronize them. These two functions will then need to be done on the
Enterprise Server as well.

Ken Stern
Sr. OneWorld Developer
Andrews Consulting Group
 
I have tried both client/server and server. The intent is that it MUST run on the server to call AS/400 program object. However, I'm not at all clear on where this BSFN should be compiled/built during the development phase. Do I have to CNC promote it to the AS/400 enterprise server just to test? Shouldn't have to, right?

My busbuild is on a FULL client with a development environment and all the requisite JDE and MS tools. I tried the build in OMW, in OMW standalone and with exit from OMW via RUN. All same results.

I discovered a document from JDE titled "Visual C++ Compiler Settings" since my last post and followed the instructions within it to set a variety of settings that I had never set (who knew?)

Paths (Tools?options/Directories)
/b7/system/include
/b7/system/includev
/b7/<pkg>/include

Project Settings (C/C++ tab)
Settings for: Win32 Debug
Category CODE: GENERATION
Processor: Blend *
Use run-time lib: Debug Single-Threaded
Calling convention: _stdcall
Struct member alignment: 1 Byte
Project Options: /D "KERNEL" - added

Project Settings (Link tab)
Object/library modules:
\b7\system\lib32\jdekrnl.lib
\b7\system\lib32\jdel.lib

There was supposed to be sample .C and .H files to test with but I couldn't locate them in the MS or JDE directories so I just forged ahead to create my BSFN. After getting these settings changed to what the JDE document indicates, I load my B55RICK.c file into MS C and press compile and it appeared to work cleanly. I did in fact get an *.OBJ created. When I do a search for this object, I find it under \b7\dv7333\source\debug. Where does busbuild WANT it to live in order to find it? It certainly doesn't find it. Compile, Link and Build options of busbuilder all fail with same old messages.
----------
Makefile generated.
Linking business functions.
************TSPEX************
Rebased at 0x612D0000 : D:\B7\DV7333\bin32\TSPEX.dll
Rebased at 0x612B0000 : D:\B7\DV7333\bin32\TSPTEST.dll
************Build Finished************
TSPEX.dll - 0 error(s), 0 warning(s): Build failed. Restored previous dll.
-----------

I now believe the issue plaguing me is the location of the files: B55RICK.OBJ and TSPEX.MAK and source which can probably be generated to/from a number of places. I hoped I could build using just JDE but since there's no way to edit the C code, then I thought to edit/compile in MS C and link in JDE. Alas, the link or compile in JDE appears to do nothing differently, even if I supply a supposedly-compiled object.

Any non-obscene suggestions about where I can stick my files? I checked the *.MAK file and it appears to be looking for the obj under the obvious /b7/dv733/obj directory so I dragged it there. All of the other file "pointers" seem to be right for source, dll target etc.

Is it possible this is a bug that I need a JDE fix to address?

One World/Xe B7333/15.1
AS/400 Enterprise Server
Citrix
 
Business Function fans,

I have attempted all your excellent suggestions to no avail. This includes "rebuild libraries" and in every case, received error messages (excerpts of mass rebuild below).

Luckily the failed process of the "rebuild" appears to restore if erroneous DLLs are generated. Otherwise wouldn't that action have trashed my installation?

At this point, I guess I will give up for a while. I will probably call JDEdwards for help, as perhaps they are the only ones who really understand this process. Thanks to all who attempted to assist me. If I get the real story on how to create a custom business function, I will post my results here.

FYI, I come to OW from a long heritage on AS/400. One impression I'm forming in the JDE world is that information doesn't seem to be as abundant about the techniques and code sharing appears less. Am I imagining this? Maybe there are many fewer true "experts" on One World/Xe, since the product is newer? In similar cases where I didn't know how to utilize a product or function on OS/400, I would search the Net or post and get people sending code, offering to call me to help. I would do likewise when others posted. I long for the same level of information with One World. Maybe it's out there, maybe not. Thusfar, I find the KG less informative than IBMs sites.

Those of you that have tried to assist me were sincere in your efforts or suggestions but unfortunately no clear document describing the to-do list of C BSFN building is evident. I would appreciate a link to same if anyone knows that it exists. I am perhaps spoiled by IBM's Redbooks, an excellent source of cokk-book type instructions in downloadable PDF format. Many times I've been totally stumped but achived that AHH! moment of success from reading the redbook document.

Is it the hope that JDEList will evolve to a higher level with such sharing of documents? I certainly hope so - it appears off to a good start. Maybe I'll write the Redbook of business function building if I figure it out. I will post it here if I do.

best regards, Rick
----------- excerpt ----------------------
Generating Makefile: D:\B7\DV7333\obj\CBUSPART.mak
Makefile generated.

Generating Makefile: D:\B7\DV7333\obj\CCONVERT.mak
.Makefile generated.
.
.
.
Linking business functions.
************CBUSPART************
************CCONVERT************
.
.
Rebased at 0x612D0000 : D:\B7\DV7333\bin32\TSPEX.dll
Rebased at 0x612B0000 : D:\B7\DV7333\bin32\TSPTEST.dll
************Build Finished************
.
.
JDBTRG1.dll - 0 error(s), 0 warning(s): Build failed. Restored previous dll.
JDBTRG2.dll - 0 error(s), 0 warning(s): Build failed. Restored previous dll.
JDBTRG3.dll - 0 error(s), 0 warning(s): Build failed. Restored previous dll.
JDBTRG4.dll - 0 error(s), 0 warning(s): Build failed. Restored previous dll.
TSPEX.dll - 0 error(s), 0 warning(s): Build failed. Restored previous dll.
TSPMPB.dll - 0 error(s), 0 warning(s): Build failed. Restored previous dll.
TSPTEST.dll - 0 error(s), 0 warning(s): Build failed. Restored previous dll.
COBLIB.dll - 0 error(s), 0 warning(s): Build failed. Restored previous dll.
CCORE.dll - 0 error(s), 0 warning(s): Build failed. Restored previous dll.
CDESIGN.dll - 0 error(s), 0 warning(s): Build failed. Restored previous dll.
CALLBSFN.dll - 0 error(s), 0 warning(s): Build failed. Restored previous dll.
CFIN.dll - 0 error(s), 0 warning(s): Build failed. Restored previous dll.
CMFG.dll - 0 error(s), 0 warning(s): Build failed. Restored previous dll.
CDIST.dll - 0 error(s), 0 warning(s): Build failed. Restored previous dll.
CHRM.dll - 0 error(s), 0 warning(s): Build failed. Restored previous dll.
CAEC.dll - 0 error(s), 0 warning(s): Build failed. Restored previous dll.

One World/Xe B7333/15.1
AS/400 Enterprise Server
Citrix
 
Back
Top