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

Trying to use String and have only one space between strings


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

New User


Joined: 23 Apr 2007
Posts: 50
Location: Jefferson City, Mo

PostPosted: Fri May 29, 2009 9:20 pm
Reply with quote

I have 4 occurrences of 72 bytes that are text data. the first occurrence only uses 69 and has 3 spaces at the end.

Example of what I am stringing:

field 1
FAILS WHEN THE BILLING PROVIDER NUMBER IS INAPPROPRIATE FOR THE CLAIM << has three trailing spaces

field 2 TYPE. << the end of the sentence

field 3 and field 4 are blank

I want to string the two together but have only one space between.

My string styatement is below

Code:
STRING EXCI-EXCEP-LONG-DESC(1) DELIMITED BY ' ' 
       ' '                     DELIMITED BY SIZE
       EXCI-EXCEP-LONG-DESC(2) DELIMITED BY ' ' 
       ' '                     DELIMITED BY SIZE
       EXCI-EXCEP-LONG-DESC(3) DELIMITED BY ' ' 
       ' '                     DELIMITED BY SIZE
       EXCI-EXCEP-LONG-DESC(4) DELIMITED BY ' ' 
INTO D-SR250-LONG-DS-TEXT                       


My result comes out as just the first word "FAILS" from string one with one space between "TYPE".
FAILS TYPE.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri May 29, 2009 11:31 pm
Reply with quote

try delimiting the occurances by two spaces
Code:
) DELIMITED BY '  ' 
Back to top
View user's profile Send private message
ScottUrban

New User


Joined: 23 Apr 2007
Posts: 50
Location: Jefferson City, Mo

PostPosted: Fri May 29, 2009 11:59 pm
Reply with quote

You are the Man! thanks that worked! icon_biggrin.gif
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Sat May 30, 2009 2:02 am
Reply with quote

great! glad it worked; got one right this week!
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat May 30, 2009 2:24 am
Reply with quote

A blind squirrel finds an acorn once in a while. . . icon_cool.gif
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Sat May 30, 2009 9:07 am
Reply with quote

A broken clock is right twice a day. . . icon_cool.gif
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