COBOL String Comparision



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

COBOL String Comparision

Postby GauravKudesiya » Thu Mar 26, 2009 12:21 am

I have to make a check in cobol program.
I have two vatiables,
Var-1 PIC X(7)
Var-2 PIC X(50)

In Var-2, Var-1 is present from 8th Character.
I have to check if Var-1 is present in Var-2, then i have to take Var-2 in file, other wise drop that.

EX:
Var-1 = 'CHANGE XXXXXXX YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY'
Var-2 = 'XXXXXXX'

If Var-2 is samilar to Var-1(8,7), then i have to process furthur
i had put that in IF condition.

IF (COND)

What is the COND to compare like this.

Thanks in Advance.
GauravKudesiya
 
Posts: 4
Joined: Thu Mar 26, 2009 12:19 am
Has thanked: 0 time
Been thanked: 0 time

Re: COBOL String Comparision

Postby dick scherrer » Thu Mar 26, 2009 12:33 am

Please do not post the same question in multiple forums. . . .

d
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: COBOL String Comparision

Postby GauravKudesiya » Thu Mar 26, 2009 1:11 am

Sorry Scherrer, actually i came to know about this forum after that post....
GauravKudesiya
 
Posts: 4
Joined: Thu Mar 26, 2009 12:19 am
Has thanked: 0 time
Been thanked: 0 time


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post