Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Problem with asterisks

Former Member
0 Likes
1,542

Hello all,

I need help, and I need it fast!

I have an issue with an asterisk that appears in an extracted (txt File) data from a Z table, the field is a ‘P’ DEC(3) type. The case is simple to understand, but it’s a headache maker too!

The value of this field is inserted into a variable of type DEC(2). In this automatically conversion, apparently, the value is loosing data. So, finally, the program put a different number in the text file that the first one in the table. This is, obviously, a data type error, and I should change the data type of the variable. But the fact is that I’m not worry about this loosing of data. The real problem is that the value printed into the text file includes an asterisk that I couldn’t avoid.

Example:

OriginalTable-Field = 120.000

Variable = OriginalTable-Field

Value printed into the text file:

*0

I had debugged the program, and the variable value seems to be right before print it into the file…

Does anybody have a suggestion?

Thax.

4 REPLIES 4
Read only

Former Member
0 Likes
948

The asterisk is trying to tell you something. Did you make the text field large enough to contain the number. In this case it looks like you might have meant to type:

field(12),

but typed:

field(2),

instead.

Rob

Read only

Former Member
0 Likes
948

Thanx, but that's not the problem...

Read only

0 Likes
948

Please post the "data" statements for the following elements.



OriginalTable-Field = 120.000

Variable = OriginalTable-Field

Regards,

Rich Heilman

Read only

0 Likes
948

Hi Juan Pablo,

define as follows:

data variable type string.

regards Andreas