View previous topic :: View next topic
|
Author |
Message |
spriya
New User
Joined: 06 Oct 2005 Posts: 42
|
|
|
|
Hi all ,
explain me string concept in cobol
string field-1 , field-2 delimited by space into field-3
here delimited by space means what it actually doing
what is the difference b/w Delimited by Space and Delimited by Size?
give me a example |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
Quote: |
explain me string concept in cobol |
STRING verb is used to concatenate two or more strings into one. For complete reference check manuals.
Quote: |
string field-1 , field-2 delimited by space into field-3
here delimited by space means what it actually doing |
Means It will concatenate the first string before the first space in first string and add second string in the same way.
Quote: |
what is the difference b/w Delimited by Space and Delimited by Size? |
I hope Size would transfer whole string regardless of character, but space would delimit the strings when find character SPACE. |
|
Back to top |
|
|
chiranjeevi_mca
New User
Joined: 19 Feb 2006 Posts: 27
|
|
|
|
Hi,
01 a pic x(10)
01 b pic x(10)
01 c pic x(20)
think * is space
move "01234*****" to a
move "56789*****" to b
----------------------
delimited by space
means preceding data of space will be stored.
string a b delimited by space into c
c contains "0123456789**********"
-----------------------------------
string a b delimited by size into c
c contains "01234*****56789*****" |
|
Back to top |
|
|
|