View previous topic :: View next topic
|
Author |
Message |
Vidya Bhama
New User
Joined: 17 Sep 2008 Posts: 41 Location: Chennai
|
|
|
|
Hi,
How to convert numeric to COMP field in COBOL.
I have a variable
05 Ws-year
10 ws-cc pic 9(2).
10 ws-yy pic 9(2).
05 ws-new-year PIC 9(4) comp.
I need to move ws-year to ws-new-year to be used in a sql statement to compare the values in a table.
Can anyone plz help |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Compute ws-new-year = ws-cc * 100 + ws-yy?
Move ws-year to ws-new-year? |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi,
Have you searched the Forum? |
|
Back to top |
|
|
Vidya Bhama
New User
Joined: 17 Sep 2008 Posts: 41 Location: Chennai
|
|
|
|
Hi Anuj,
thanks for the reply. I did search in the forum.
Most of queries were raised on Comp-3 or conversion from Comp to other datastypes. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Curious. . . - you mention the reply from Anuj, but not the one from CG that gave solutions. . .
Did you try the alternatives CG posted?
Is this now working? |
|
Back to top |
|
|
|