Re: data conversion with cobol

2005-12-07 Thread Julian Levens
All Shmuel Metz wrote: In [EMAIL PROTECTED], on 12/05/2005 at 08:49 AM, Daniel Cremieux [EMAIL PROTECTED] said: I am converting a rexx program to cobol and having this problem . The data is , for example x'0123' and after conversion , it must have the value 123 (decimal) In rexx ,

Re: data conversion with cobol

2005-12-06 Thread Shmuel Metz (Seymour J.)
In [EMAIL PROTECTED], on 12/05/2005 at 08:49 AM, Daniel Cremieux [EMAIL PROTECTED] said: I am converting a rexx program to cobol and having this problem . The data is , for example x'0123' and after conversion , it must have the value 123 (decimal) In rexx , the statement is : decvalue =

data conversion with cobol

2005-12-05 Thread Daniel Cremieux
Dear all, I am converting a rexx program to cobol and having this problem . The data is , for example x'0123' and after conversion , it must have the value 123 (decimal) In rexx , the statement is : decvalue = x2d(c2x(value)) I don't know how to achieve it in Cobol. CAn you please help ?

Re: data conversion with cobol

2005-12-05 Thread Kirk Talman
05 in-put pic xx value x'0123'. 05 x-o pic s9(5) comp-3 value zero. 10 x-i pic xx. 10 pic x. . . . move in-put to x-i move x-o to wherever IBM Mainframe Discussion List IBM-MAIN@BAMA.UA.EDU wrote on 12/05/2005 09:49:10 AM: Dear all, I am converting a rexx program to cobol and having this

Re: data conversion with cobol

2005-12-05 Thread Bernd Oppolzer
I would put a X'0c' behind the data, and then access the whole thing as a decimal packed value with one digit after the decimal point (the zero). I didn't work with COBOL for 10 years or so, but I guess, the definitions will be something like 01 decval pic 'v9' usage comp-3. 01 charval