Skip to main content

Good Afternoon,

I have a working storage character string for example WS-TEST PIC X(02).

I read information from an ASCII file into this string.

The WS-TEXT variable then contains a hex value for example x"010E".

I then need to know what the decimal value is of this field, in this example 270.

Any advice?

Thanks,

Bob

(ws-hex-value pic x(02)).

Good Afternoon,

I have a working storage character string for example WS-TEST PIC X(02).

I read information from an ASCII file into this string.

The WS-TEXT variable then contains a hex value for example x"010E".

I then need to know what the decimal value is of this field, in this example 270.

Any advice?

Thanks,

Bob

(ws-hex-value pic x(02)).

      working-storage section.

      01 str pic xx value x"010E".

      01 DecRed redefines str.

          02 Dec pic xx comp-x.

      procedure division.

Regards

Yvon


Good Afternoon,

I have a working storage character string for example WS-TEST PIC X(02).

I read information from an ASCII file into this string.

The WS-TEXT variable then contains a hex value for example x"010E".

I then need to know what the decimal value is of this field, in this example 270.

Any advice?

Thanks,

Bob

(ws-hex-value pic x(02)).

Good Morning Yvon,

Thank you for your help.

Happy Holidays,

Bob