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

Concatenate two strings using String Verb


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

New User


Joined: 11 Jun 2005
Posts: 24

PostPosted: Tue Oct 11, 2005 2:17 pm
Reply with quote

Hi,

I want to concatenate the below 2 strings.


05 OUT-TEXT PIC X(550).
05 IN-TEXT.
10 IN-TEXT1 PIC X(200) VALUE
"CH3 3FG GREAT MILLS DIY SUPERSTORE,TARVINON ROAD".
10 IN-TEXT2 PIC X(350) VALUE
"SECTOR-58,UK".

Please let me know how to use Delimited By so that i get output as
"CH3 3FG GREAT MILLS DIY SUPERSTORE,TARVINON ROAD SECTOR-58,UK"

Thanks a lot!!
Richie
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Tue Oct 11, 2005 6:57 pm
Reply with quote

Hi richie....

Try this simple STRING statement.... It should do what you are looking for.....

Code:
STRING STRING1 DELIMITED BY "  "
       " "                     
       STRING2 DELIMITED BY "  "
       INTO OUTSTR.             


It delimits input strings on two consecutive SPACES. That can be changed as per your requirement.

Regards,

Priyesh.
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