View previous topic :: View next topic
|
Author |
Message |
raghavendrapk
New User
Joined: 06 Oct 2005 Posts: 2
|
|
|
|
Hello everybody
I am Raghavendra P K , beginer in cobol , i have a doubt regarding string comparision .
My doubt is , Is there any specific function, or command to compare two strings .
Thanks and Regards
Raghavendra P K |
|
Back to top |
|
|
Sridevi_C
Active User
Joined: 22 Sep 2005 Posts: 104 Location: Concord, New Hampshire, USA.
|
|
|
|
Hi,
You can declare A & B as alphanumeric and compare using IF as below.
01 A PIC X(20) VALUE 'HELLO WORLD'.
01 B PIC X(20) VALUE 'HELLO WORLD'.
....
IF A=B THEN DISPLAY "A AND B ARE IDENTICAL".
I don't think,we have FUNCTION for this.
Regards,
Sridevi. |
|
Back to top |
|
|
raghavendrapk
New User
Joined: 06 Oct 2005 Posts: 2
|
|
|
|
Thanks Sridevi for clarifying my doubt |
|
Back to top |
|
|
|