RAW data type variables

Laurent_CIV

New Member
Hi,

I want to open a CSV file with OpenOffice. To parameter the opening, I have the java code :

mProps(0).Name = "FilterName"
mProps(0).Value = "Text - txt - csv (StarCalc)"

mProps(1).Name = "FilterOptions"
mProps(1).Value = "44,34,0,1,1/9/2/2/3/1/4/1/5/1".


With Progress the variable "mProps" must be a "RAW" variable (for the continuing). I found how to put the value on this variable but not a name :

PUT-STRING(mProps,1) = "Text - txt - csv (StarCalc)".
PUT-STRING(mProps,2) = "44,34,0,1,1/9/2/2/3/1/4/1/5/1".

Can you help me please ?

Thanks
Laurent
 

Laurent_CIV

New Member
:confused: What do you mean ?

The variable "mProps" is a RAW variable.

I want to affect, for example, the name "FilterName" and the value "Text - txt - csv (StarCalc)" on the same entry like the example in VB (because the first example is a VB code and not a java code like I said)

EDIT: you can read this topic if it's clearer, it's the same problem : http://www.progresstalk.com/showthread.php?t=84299
 

Dertuop

New Member
How to use setpropertyvalue with Progress 4gl.

Hi.

Did you find how to pass a parameter and a value to OpenOffice with a RAW variable ? I've got the same problem.

Thanks.

Laurent_CIV said:
Hi,

I want to open a CSV file with OpenOffice. To parameter the opening, I have the java code :

mProps(0).Name = "FilterName"
mProps(0).Value = "Text - txt - csv (StarCalc)"

mProps(1).Name = "FilterOptions"
mProps(1).Value = "44,34,0,1,1/9/2/2/3/1/4/1/5/1".


With Progress the variable "mProps" must be a "RAW" variable (for the continuing). I found how to put the value on this variable but not a name :

PUT-STRING(mProps,1) = "Text - txt - csv (StarCalc)".
PUT-STRING(mProps,2) = "44,34,0,1,1/9/2/2/3/1/4/1/5/1".

Can you help me please ?

Thanks
Laurent
 

joey.jeremiah

ProgressTalk Moderator
Staff member
i didn't really understand the example ?

looks like a cross between something like com-handles and raw/memptr hacking, but i don't work with java.

just tell us whats the file you're trying to create.

just a thought but have you considered using openDocument ? then it's just working with an xml document.
 

jdgibson

New Member
Laurent_CIV said:
Hi,

I want to open a CSV file with OpenOffice. To parameter the opening, I have the java code :

mProps(0).Name = "FilterName"
mProps(0).Value = "Text - txt - csv (StarCalc)"

mProps(1).Name = "FilterOptions"
mProps(1).Value = "44,34,0,1,1/9/2/2/3/1/4/1/5/1".


With Progress the variable "mProps" must be a "RAW" variable (for the continuing). I found how to put the value on this variable but not a name :

PUT-STRING(mProps,1) = "Text - txt - csv (StarCalc)".
PUT-STRING(mProps,2) = "44,34,0,1,1/9/2/2/3/1/4/1/5/1".

Can you help me please ?

Thanks
Laurent


Although I do not know Java I think you are making a mistake between some sort of array reference structure with properties

mprops(0).Name where 0 is an array reference

and the offset from the start position of a block of memory


PUT-STRING(mprops,1) =

where 1 is position 1 in the block of memory that is your RAW variable.

In your progress code

PUT-STRING(mProps,1) = "Text - txt - csv (StarCalc)".
PUT-STRING(mProps,2) = "44,34,0,1,1/9/2/2/3/1/4/1/5/1".

the use of off sets 1 and 2 as you have done will result in the second string "44,33,0 etc

overwriting the first string "Text - etc so you will end up with

"T44,34,0,1,1/9/2/2/3/1/4/1/5/1"

You need to work out at what position in the Java structure corresponds to what offsets in the Progres RAW memory and then populate each chunk of memory accordingly.

Name is probably at position 1 and value could be at 11 in your first example as the name value "FilterName" is 10 characters long.

Having said all that I have no idea if it will work.
 
Top