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

EDIT MASK

Former Member
0 Likes
2,880

Hi,

I am using EDIT MASK to displayt he amount as per the data which I am ex[pecting

Write V1 to V2 using edit mask '1.23,456'

But it is not converting the data to the edit mask...

its just displaying the value as what I am giving in the editmask..

for example:

V1 is 1000.00

Write V1 to V2 using edit mask '1.23,456'

I want to display as 1.00,000

Instead, it is displaying '1.23,456'

5 REPLIES 5
Read only

former_member784222
Active Participant
0 Likes
1,679

Hi,

Before the write statement:

SET COUNTRY 'DE'. "Now this would give the number format

"as you expected

write statement.

SET COUNTRY SPACE.

Thanks and regards,

S. Chandra Mouli.

Read only

Former Member
0 Likes
1,679

Parameters : v1 type p decimals 2 default '100.00'.

data : v2(7).

write v1 to v2 using edit mask '_,__.__'.

write 😕 v1,

/ V2.

Sample code : u should use '_'

Read only

Former Member
0 Likes
1,679

Hi,

U can use SET COUNTRY as well as the other code as posted by madhavi...I.e Using Edit Mask...

But remeber one thing..

When u use SET COUNTRY..DNT 4get to set space again..

SInce it applies to all currency format throughout ur program.

Thanx,

Navin.

Read only

Former Member
0 Likes
1,679

I gave as write v1 to v2 using edit mask '_,__.___',___' only...

I have amount as 1,904,80

It should be converted as 1,90.480

But it is displaying as 1,90.480, (Last one comma)

Read only

0 Likes
1,679

Hi,

First split the value at ',' and concatenate and save it.

Finally use edit mask.

var1 = 1,904,80

split var1 at ',' into s1 s2 s3.

concatenate s1 s2 s3 into var2.

write: var2 using edit mask '_,__.___'.

Reward,if useful.

Thanks,

Chandu