Removing spaces in a Variable.



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

Removing spaces in a Variable.

Postby sriraj1122 » Thu Jan 20, 2011 4:05 pm

Hi All,

I have a variable like "CS__AD__CS" (underscore represents spaces). I have to remove the spaces in the variable and i have to get a value like "CSADCS" ..
I am able to do with small piece of cobol code.

But is there any cobol function which can perform this easier.

Regards,
Sriraj
sriraj1122
 
Posts: 19
Joined: Thu Nov 18, 2010 10:04 am
Has thanked: 0 time
Been thanked: 0 time

Re: Removing spaces in a Variable.

Postby Robert Sample » Thu Jan 20, 2011 6:00 pm

There's no COBOL function to do this. You're probably best off leaving the existing code in place.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Removing spaces in a Variable.

Postby sriraj1122 » Fri Jan 21, 2011 2:33 pm

Thnx a ton !!!
sriraj1122
 
Posts: 19
Joined: Thu Nov 18, 2010 10:04 am
Has thanked: 0 time
Been thanked: 0 time


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post