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
 

 

Trying to use String and have only one space between strings

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Trying to use String and have only one space between strings
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: 6968
Location: porcelain throne

PostPosted: Fri May 29, 2009 11:31 pm    Post subject:
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    Post subject:
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: 6968
Location: porcelain throne

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

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

Site Director


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

PostPosted: Sat May 30, 2009 2:24 am    Post subject: Reply to: Trying to use String and have only one space betwe
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    Post subject:
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    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
No new posts Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts Occurrence of various strings within ... TS70363 JCL & VSAM 1 Thu Apr 27, 2017 8:18 pm
No new posts VSAM Space Allocation mrgnndhmk JCL & VSAM 7 Sat Apr 22, 2017 12:42 am
This topic is locked: you cannot edit posts or make replies. Need help in estimating space of unlo... ashek15 IMS DB/DC 12 Fri Apr 07, 2017 5:11 am
No new posts Need inputs on Space requirement and... ashek15 IMS DB/DC 0 Sat Apr 01, 2017 8:26 am


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