04-04-2003 05:06 AM
Solved! Go to Solution.
04-08-2003 10:47 PM
So, if nothing else helps, you might have to resort to writing your own conversion subroutines to and from a data type that COBOL supports.
You might probably save some effort by registering for a logon to the Invent3K system and using the BBXL compiler there to write a few little conversion subroutines...
The above machine has all HP compilers installed and access is free of charge.
04-08-2003 10:50 PM
Maybe someone else already faced a similar issue in the past and is willing to share his or her solution.
04-09-2003 09:59 AM
Hope that helps.
04-13-2003 11:56 PM
I have already been trying these compiler routines. The routines work fine with R2 or R4 fields but I am having problems trying to convert these BBASIC floating decimals fields. I trying different combinations of the HPFPCONVERT and HPINEXT intrinsics at the moment. Thanks.
04-16-2003 12:40 AM
Also see http://docs.hp.com/cgi-bin/doc3k/B3265090015.10436
04-16-2003 01:25 AM
Something in the line of...
5 GLOBAL OPTION SUBPROGRAM
10 SUB dec2real(SHORT DECIMAL D, SHORT REAL R)
20 LET R=D
This way the Business Basic runtime system has to take care of the conversion work.
Keep in mind, however that real number conversions are "lossy" operations, i.e. typically inexact due to the differences in internal represenation.
So it might be -in some cases- better to add your required operations to the subroutines instead of just doing conversion back and forth.
It depends ;-)
04-22-2003 06:34 AM
04-22-2003 10:44 PM
As far as I recall, a certain Image/SQL version introduced some SIGNED/UNSIGNED ZONED as well as BBASIC related type mapping...
Unfortunately, I don't recall details. Only that it the above changes were related to requests by Interex SIGIMAGE at that time.
The UPDATE TYPE commands in IMAGESQL were enhanced to allow targets like FLOAT with FORMAT=BB1 or BB2 or somesuch.
Sorry for not having better details at hand.
04-22-2003 10:47 PM
Communicator 3000 MPE/iX Release 6.5
-> Announcing a Post 6.5 Release Patch
--> IMAGE/SQL Date Mapping Enhancement
04-22-2003 10:54 PM
Also see http://jazz.external.hp.com/pads/ for info how to obtain a free logon to a 3000 on the public internet, where you could use all available HP compilers to create programs or subprograms as needed.
By the way, my above decimal-to-real example was somewhat silly as COBOL would not be able to use the real numbers easily ;-)