View previous topic :: View next topic
|
Author |
Message |
Kamaleshwaran
New User
Joined: 10 Apr 2010 Posts: 7 Location: Hyderabad
|
|
|
|
I Have a variable 01 Check Pic X(1). The variable Check can have values from A to Z. I need to move value 1 to output variable if check = A, C, E and 2 to output variable if check = B, D, F.
I tried this by following code. But its not working.
Code: |
Evaluate Check
When 'A' 'C' 'E'
Move 1 to output
When 'B' 'D' 'F'
Move 2 to output
When others
Move 0 to output
End-evaluate. |
Please help me in this... |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
I guess the obvious question at this point is:
What is it doing? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Code: |
Evaluate Check
When 'A'
When 'C'
When 'E'
Move 1 to output
When 'B'
When 'D'
When 'F'
Move 2 to output
When other
Move 0 to output
End-evaluate.
|
Evaluate in Cobol Reference |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello and welcome to the forum,
When someone asks for informatoin, you need to provide it.
When someone posts a solution, you need to acknowledge this. Either thank them for the solution or explain why you have a problem with the solution. . .
"Grab and go" is just bad manners. . . |
|
Back to top |
|
|
Kamaleshwaran
New User
Joined: 10 Apr 2010 Posts: 7 Location: Hyderabad
|
|
|
|
Hi all,
Sorry for the late response. Today i tried the logic. Its working fine.
Thanks for your help. |
|
Back to top |
|
|
|