Fixed: UBE customization works locally but not when submitted to the server
Big thank-yous to Malcolm and Antoine for writing. Your tips led me down the path to a solution, which I will now share.
I found the
Business Function Location under the business function's Design Tools tab, and it was set correctly to 2 (Both Client & Server Function).
The custom business function is called Convert Cancel Date (CNDJ) to Arrival Time. And, it turns out, it
is calling another business function, B9800460 (Convert to Strings), which was also correctly set as a Client & Server Function.
The problem turned out to be rather simple -- and a programming problem, which was a relief. When the UBE is run locally, the business function converts the Julian date value to mm/dd/yy format, then Microsft Windows converts it to whatever is the default in one's Regional Settings control panel -- in our case, m/d/yy (stripping out any leading zeroes). When the UBE is run on the iSeries server, the leading zeroes are
not removed and so this code did not work on the server:
IF VA evt_Day_dsavinstst is equal to "1/"
VA evt_ArrivalTime_ftime = " 1:00 AM"
IF VA evt_Day_dsavinstst is equal to "2/"
VA evt_ArrivalTime_ftime = " 2:00 AM"...
A simple code change fixed the problem: IF VA evt_Day_dsavinstst is equal to "01"...
So...THANK YOU again!
The whole thing helped me learn some interesting new aspects about development that I have never personally used before, such as the ER Compare utility and this way-cool aspect of debug logging which I've never had to notice before.
I was getting desperate, so
JDE/Oracle Global Support hooked me up with a big gun named Dorothy who directed my beleaguered attention to the debug logs we had generated for each. If I had known better, I would have been embarrassed. I could clearly see the bsfn's input and output, summarized here:
iSeries Enterprise Server
Sep 19 15:33:41 ** Calling Business function ConvertCancelToArrivalTime...
Sep 19 15:33:41 ** *** Start dumping data structure for business function ConvertDateToString
Sep 19 15:33:41 ** IN->[ 1] <Item>: jdDateToConvert <type>: JDEDATE <Value>: [02/06/2050]
Sep 19 15:33:41 ** OUT->[ 2] <Item>: szDateConvertedToString <type>: STRING <Value>: [02/06/50]
Sep 19 15:33:41 ** OUT->[ 3] <Item>: szDateformat <type>: STRING <Value>: []
LOCAL
Sep 21 12:08:48 ** 2740/436 Calling Business function ConvertCancelToArrivalTime...
Sep 21 12:08:48 ** 2740/436 *** Start dumping data structure for business function ConvertDateToString
Sep 21 12:08:48 ** 2740/436 IN->[ 1] <Item>: jdDateToConvert <type>: JDEDATE <Value>: [2/6/2050]
Sep 21 12:08:48 ** 2740/436 OUT->[ 1] <Item>: jdCancelDate <type>: JDEDATE <Value>: [2/6/2050]
Sep 21 12:08:48 ** 2740/436 OUT->[ 2] <Item>: szFormattedTime <type>: STRING <Value>: [ 6:00 AM]
Sometimes, it's just the little things...!