David,

I get the same result with 7.1.81.30505, the culprit is vtesttxt.

Walkaround:
SET VAR vtestint = 12
SET VAR vwrite = 'ABCDEFGHIJ'
SET VAR vtesttxt = (CTXT(FORMAT(.vtestint,'0000')))
SET VAR vtesttxt = (SGET(.vtesttxt,4,2))
SET VAR vwrite = (SPUT(.vwrite,.vtesttxt,2))

Looks like a boo-boo to me.

Regards

Esbjorn

David Poole wrote:

Dear All

Version: 7.1.80.30421

Would someone kindly confirm if there is a boo-boo or am I misunderstanding
the functions.

If you run the following:

SET VAR vtestint INTEGER = NULL
SET VAR vwrite TEXT = NULL
SET VAR vtesttxt TEXT =NULL

SET VAR vtestint = 12
SET VAR vwrite = 'ABCDEFGHIJ'
SET VAR vtesttxt = (CTXT(FORMAT(.vtestint,'0000')))
SET VAR vwrite = (SPUT(.vwrite,.vtesttxt,2))

The variable values change to:

vwrite = A 0012GHIJ TEXT(10) vtesttxt = 0012 TEXT(5)

But surely they should be:

vwrite = A0012FGHIJ TEXT (10) vtesttxt = 0012 TEXT (4)

It appears as though a space has been added at the front of vtesttxt

Look forward to your help.

Regards David

[EMAIL PROTECTED]







Reply via email to