Problems get-pointer-value on Unix 64

emidmode

New Member
Hello everybody

I have installed Progress 91D (32bits) on a HP-UX 64bits box, but I had a problem reading a value from a pointer I supposed this is because in a 64bit environment the pointer value uses a 8 byte instead 4 bytes on 32bits, but there is a way to working around this problem to read the pointer value?? I need this value to pass a external C program to run on OS.

This is the snippet of code...

DEFINE VARIABLE Mptr AS MEMPTR.
DEFINE VARIABLE CString AS CHARACTER NO-UNDO.

SET-SIZE(Mptr)= 53631385.
PUT-BYTE(Mptr,1) = 65.
PUT-STRING(Mptr,213) = "SmartNews 2003".
CString = GET-STRING(Mptr,213). /* OK return the string */

DISPLAY CString format "x(50)".
display get-pointer-value(mptr) . /* Here is the problem, on UNIX 64 this statement return ?, but in Windos XP 32 bits it returns a correct value */

SET-SIZE(MPTR) = 0.

Thanks in advance
 
9.1D is ancient, obsolete and unsupported.

Your code works fine on Linux, 10.2B.

I would wonder if your 9.1D issue might be related to the size of the Mptr variable. A 56MB MEMPTR might be an issue for v9.

Also, HPUX is 64 bits but what is the "bitness" of your Progress? Both 32 bit and 64 bit HPUX are possible with v9.

Version 9 doesn't support int64 so if the pointer value being returned is a 64 bit value I would imagine it is going to blow up.
 
Your example also worked fine on the following environments:

AIX 4.3 64-bit / Progress 9.1D06 32-bit
CentOS 5.5 64-bit / OE 10.2B04 64-bit
CentOS 5.5 64-bit / OE 11.0 64-bit
Win7 x64 / OE 11.0 32-bit

The one most like your environment is AIX 4.3 - but this is a rather ancient beasty with very likely not enough RAM (it would surprise me if it even has 2GB, this machine is over 10 years old) to be able to blow up the pointer value.
 
Hello Tom

Thanks for you quickly reply, Yes this version is obsolote but is the actual installed on the box and there is no plans for upgrade to a major version in the short time.

Working with the enterprise DBA he told me that the actual "bit" version of progress 91D is 64 because the command showconf show's a port number 36 on Unix Box (http://progresscustomersupport-surv...1158?retURL=/apex/KnowledgeSearch&popup=false)

$DLC/bin/showcfg $DLC/progress.cfg -B

Sin título.jpg

I already reduce the amount of memory used in order to avoid the 56mb issue but the result is the same

DEFINE VARIABLE Mptr AS MEMPTR.
DEFINE VARIABLE CString AS CHARACTER NO-UNDO.
SET-SIZE(Mptr)= 128.
PUT-BYTE(Mptr,1) = 65.
PUT-STRING(Mptr,2) = "SmartNews 2003".
CString = GET-STRING(Mptr,2).
DISPLAY CString format "x(50)".
display get-pointer-value(mptr). /* problem in unix */
SET-SIZE(MPTR) = 0.

Maybe we are running up Progress without a specific path or service pack, here my version file on unix:

PROGRESS Version 9.1D05 as of Mon Feb 3 07:03:42 EST 2003

Is there another installation we missed?

Any other suggestion to solve this issue??

Thanks in advance
 
We running on current HP UX 11 64bits:

$ getconf KERNEL_BITS
64
$

Errata: This is the version of Progress 9.1D and based on port number the version is a 64 bits, not a 32 bits (http://progresscustomersupport-surv...1158?retURL=/apex/KnowledgeSearch&popup=false)

$DLC/bin/showcfg $DLC/progress.cfg -B

Product Name: Enterprise DB
Installation Date: Fri Nov 15 18:24:00 2002
User Limit:
Expiration Date:
Serial Number:
Control Numbers:
Version Number: 9.1D
Machine Class: KB
Port Number: 36

I already reduce the amount of memory in the example but the result is the same

DEFINE VARIABLE Mptr AS MEMPTR.
DEFINE VARIABLE CString AS CHARACTER NO-UNDO.
SET-SIZE(Mptr)= 128.
PUT-BYTE(Mptr,1) = 65.
PUT-STRING(Mptr,2) = "SmartNews 2003".
CString = GET-STRING(Mptr,2).
DISPLAY CString format "x(50)".
display get-pointer-value(mptr). /*error here */
SET-SIZE(MPTR) = 0.

Maybe we are running up without a Service Pack or Patch, are you guys know something about that?
The version file contains this:
PROGRESS Version 9.1D05

Any other suggestion to solve this?

P.d. We cannnot upgrade to version 10 or major in a short time

Thanks
 

Attachments

  • Sin título.jpg
    Sin título.jpg
    69 KB · Views: 39
I already reduce the amount of the memory on the example but the result is the same

DEFINE VARIABLE Mptr AS MEMPTR.
DEFINE VARIABLE CString AS CHARACTER NO-UNDO.

SET-SIZE(Mptr)= 128.
PUT-BYTE(Mptr,1) = 65.
PUT-STRING(Mptr,2) = "SmartNews 2003".
CString = GET-STRING(Mptr,2).
DISPLAY CString format "x(50)".

display get-pointer-value(mptr). /* same error, return ? */
SET-SIZE(MPTR) = 0.

I already check the version of Progress and its a 64bits based on the port number in result of the command:

$DLC/bin/showcfg $DLC/progress.cfg -B
....
Version Number: 9.1D
Machine Class: KB
Port Number: 36


http://progresscustomersupport-surv...1158?retURL=/apex/KnowledgeSearch&popup=false
 
SLES 10.2 x86_64 / 9.1D09 32-bit

Code:
┌─────────────────────────────────────────────────────────────┐
│CString                                                      │
│──────────────────────────────────────────────────           │
│SmartNews 2003                                     ??????????│
└─────────────────────────────────────────────────────────────┘

** Value -189804536 cannot be displayed using ->,>>>,>>9. (74)

Procedure complete. Press space bar to continue.
 
You have a 64 bit Progress so, according to the documentation, get-pointer-value() returns a 64 bit pointer. However, Progress 9 does not have a 64 bit integer. It only has 32 bit integers. So "display" does not know what to do with it.

You might have better luck assigning it to a decimal variable. Decimals can handle 50 digit numbers.
 
Hello Tom

I tried again,this time assigning to a decimal value the returned value from get-pointer-value but result is the same, I think this is because the built-in function in Progress is making operatios resulting in a null value, for me this is a obvious bug on this version and I are in a dead end, I'll try another way to deliver this data maybe use an OS plain file o something like that

Code:
[FONT=courier new]DEFINE VARIABLE Mptr AS MEMPTR.
DEFINE VARIABLE CString AS CHARACTER NO-UNDO.
DEFINE VARIABLE DValue AS DECIMAL.[/FONT]
[FONT=courier new]SET-SIZE(Mptr)= 128.
PUT-BYTE(Mptr,1) = 65.
PUT-STRING(Mptr,2) = "SmartNews 2003".
CString = GET-STRING(Mptr,2).
DISPLAY CString format "x(50)".[/FONT]
[FONT=courier new]ASSIGN dValue = DECIMAL(GET-POINTER-VALUE(Mptr)).[/FONT]
[FONT=courier new]display dValue. /* same error, ? */[/FONT]
[FONT=courier new]SET-SIZE(MPTR) = 0.

[FONT=Courier New]┌─────────────────────────────────────────────────────────────┐
│CString                                                DValue│
│────────────────────────────────────────────────── ──────────│
│SmartNews 2003                                              ?│
└─────────────────────────────────────────────────────────────┘[/FONT] [FONT=Courier New]
Procedure complete. Press space bar to continue.
[/FONT][/FONT]


 
Back
Top