moving alphanumeric value to numeric pic clause



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

moving alphanumeric value to numeric pic clause

Postby manishgaikwad05 » Thu Jan 07, 2010 5:05 pm

Hi All,

I want to move alphanumeric value to numeric comp-3 picture clause.
I have tried using Redefine clause but didnt succeeded.
please suggest.

Destination pic clause is : A pic 9(9) comp-3.
manishgaikwad05
 
Posts: 1
Joined: Thu Jan 07, 2010 4:50 pm
Has thanked: 0 time
Been thanked: 0 time

Re: moving alphanumeric value to numeric pic clause

 

Re: moving alphanumeric value to numeric pic clause

Postby dick scherrer » Fri Jan 08, 2010 12:42 am

Hello,

If the data really is alphanumeric, you cannot move it to a comp-3 field. . . Well, you can, but it causes problems.

Only valid numeric values may be moved to and used by a field defined as comp-3.

If you clarify what actual data you have and the "rules" about how it should be dealt with someone may have a more useful reply than this one.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: moving alphanumeric value to numeric pic clause

Postby dick scherrer » Fri Jan 08, 2010 12:44 am

Hello,

And, redefining something improperly also causes problems. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post