|
|
| Author |
Message |
kiran
New User
Joined: 08 Apr 2004 Posts: 26 Location: hyd
|
|
|
|
| How can i compare two strings in cobol |
|
| Back to top |
|
 |
References
|
Posted: Thu Apr 08, 2004 2:48 pm Post subject: Re: comparing strings |
 |
|
|
 |
mdtendulkar
Active User
Joined: 29 Jul 2003 Posts: 257 Location: USA
|
|
|
|
Hello kiran,
| Code: |
ws-string1 pic x(05) value 'india'
ws-string2 pic x(08) value 'india '
|
Strings comparison is as below
| Code: |
if ws-string1 = ws-string2
display 'both the strings are same'
else
display 'strings are not same'
end if
|
|
|
| Back to top |
|
 |
|
|