IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Regarding String Comparision


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
raghavendrapk

New User


Joined: 06 Oct 2005
Posts: 2

PostPosted: Thu Oct 06, 2005 6:58 pm
Reply with quote

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
View user's profile Send private message
Sridevi_C

Active User


Joined: 22 Sep 2005
Posts: 104
Location: Concord, New Hampshire, USA.

PostPosted: Thu Oct 06, 2005 8:47 pm
Reply with quote

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
View user's profile Send private message
raghavendrapk

New User


Joined: 06 Oct 2005
Posts: 2

PostPosted: Fri Oct 07, 2005 9:18 am
Reply with quote

Thanks Sridevi for clarifying my doubt
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts file manager is doing string conversion IBM Tools 3
No new posts Search string in job at regular Spool... CLIST & REXX 0
Search our Forums:

Back to Top