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

How to remove spaces while performing STRING operation


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

New User


Joined: 14 Jan 2009
Posts: 24
Location: Mumbai

PostPosted: Tue Jan 20, 2009 6:41 pm
Reply with quote

Hi,
Please find below one solution for your query.
I have not considered the C-QUOTE in the below code.
Below code is for the values:
VENDOR : FIRST DATA
LOCATION : BOMBAY


STRING VENDOR DELIMITED BY X'4040'
LOCATION DELIMITED BY X'4040'
INTO W-OUTPUT-REC.

Inspect W-OUTPUT-REC REPLACING all LOW-VALUES by SPACES.


OUTPUT:FIRST DATABOMBAY

Second inspect will remove all the low values from the string.
I hope this will help you out from the problem. icon_smile.gif

If possible, also confirm to the post of Dick whether the code you have provided was the copy paste or you type it?
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 Remove leading zeroes SYNCSORT 4
No new posts leading spaces can be removed in trai... DFSORT/ICETOOL 1
Search our Forums:

Back to Top