Page 1 of 1

Zero compressed value to character conversion

PostPosted: Sun Mar 21, 2010 1:54 am
by rajnivas
Hi All,

Could someone please help me out on conversion of Zero compressed value of the format Z(6)9.999 to character conversion.

thanks
Rajnivas

Re: Zero compressed value to character conversion

PostPosted: Sun Mar 21, 2010 2:24 am
by dick scherrer
Hello and welcome to the forum,

Someone may be able to help if you tell us what "Zero compressed value" means to you. . .

Where is this value? How is it defined? What value(s?) does it contain?

This does not indicate any kind of "compression" - Z(6)9.999

Re: Zero compressed value to character conversion

PostPosted: Sun Mar 21, 2010 2:37 am
by rajnivas
Hi

I want convert the below declared variable to character

02 XXXXX PIC Z(6)9.999

XXXXX is a value displayed on CICS screen. When i initialize the value it displays as 0.000 but the display should be blank when it is initialized that is it should be SPACES.

thanks
rajnivas

Re: Zero compressed value to character conversion

PostPosted: Sun Mar 21, 2010 6:14 am
by dick scherrer
Hello,

The mask you have specified forces the n.nnn result. . .

I'm not connected to a mainframe just now so i've not tested this. Suggest you try:
02 XXXXX PIC Z(6)9.999 BLANK WHEN ZERO.

Re: Zero compressed value to character conversion

PostPosted: Sun Mar 21, 2010 9:17 pm
by rajnivas
Thanks alot... The suggestion you provided is working.

Re: Zero compressed value to character conversion

PostPosted: Sun Mar 21, 2010 9:25 pm
by dick scherrer
Good to hear it is working - thank you for letting us know :)

d