Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Regarding String Comparision

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Regarding String Comparision
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    Post subject: Re: Regarding String Comparision
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    Post subject: Thanks
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Checking wether a string starts from ... sundaram.naveen CLIST & REXX 9 Thu Oct 06, 2016 11:56 am
No new posts Random Password (in string format) ge... ezhavendhan COBOL Programming 10 Mon Aug 29, 2016 3:18 pm
No new posts How to insert a lengthy string havin... vidyaa DB2 7 Thu Aug 25, 2016 5:20 pm
No new posts Which function does the Ampersand (&a... Andi1982 PL/I & Assembler 3 Wed Aug 24, 2016 2:05 pm
No new posts Need a help how to replace a string i... gurunath82 CLIST & REXX 12 Tue Jul 26, 2016 11:43 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us