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

How to unstring the following using double quotes


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

New User


Joined: 05 Jul 2005
Posts: 49
Location: India

PostPosted: Wed Aug 17, 2005 2:51 pm
Reply with quote

how to unstring the following using double quotes

"NTFILE001" "\O DRIVE\ACCEPT\SWF" 123456.00
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


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

PostPosted: Wed Aug 17, 2005 3:13 pm
Reply with quote

Why to post the same query again ...when you already did in another FORUM.

Quote:
"NTFILE001" "\O DRIVE\ACCEPT\SWF" 123456.00


Is this your I/P string.

place ur desired o/p too....

Regards,

Priyesh.
Back to top
View user's profile Send private message
elonics

New User


Joined: 05 Jul 2005
Posts: 49
Location: India

PostPosted: Thu Aug 18, 2005 9:05 am
Reply with quote

my output should be

ntfile0001
\O DRIVE\ACCEPT\SWF
123456.00

please copy the exact string which i mailed previously.
there are space in between the double quotes.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Fri Aug 19, 2005 7:17 am
Reply with quote

Code:

unstring yr-string delimited by '" "' or '"'
      into  dummy-str
             str1
             str2
             str3


The order of the delims in the stmt is important.
Back to top
View user's profile Send private message
harinatha

New User


Joined: 24 Jul 2005
Posts: 28

PostPosted: Sun Aug 21, 2005 10:53 pm
Reply with quote

Hi Jack,

If the input string will contain zero or one or more spaces between double quotes, then how to delimit that string.

Thanks & Regards,
Hari.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Mon Aug 22, 2005 2:57 am
Reply with quote

Hi Hari,

I'm not sure I understand your ques. My example shows a delim w/a space between the quotes.

Or are you saying that the spaces and or zeros are data you want to unstring into your receiving fields?

Why don't you provide an example of your I/P and the O/P fields after the unstring.
Back to top
View user's profile Send private message
elonics

New User


Joined: 05 Jul 2005
Posts: 49
Location: India

PostPosted: Mon Aug 22, 2005 10:20 am
Reply with quote

Hi All,
I resolved this.Thanx for all Who suggested me.My input string is
"NTFILE001" "\O DRIVE\ACCEPT\SWF" 123456.00 -- WS-INPUT-RECORD

UNSTRING WS-INPUT-REC DELIMITED BY ' " ' INTO WS-DUMMY1
WS-NAME
WS-DUMMY2
WS-DIR
WS-NO

BY DOING THIS I WILL HAVE
DOUBLE QUOTE IN WS-DUMMY1
NTFILE001 IN WS-NAME
SPACE AND DOUBLEQUOTE IN WS-DUMMY2
\O DRIVE\ACCEPT\SWF IN WS-DIR
REMAINING IN WS-NO.




Elo'nics.
--------------------------------------------------------------------------------
I may be the Best or Atleast better than many but i m never worst.
--------------------------------------------------------------------------------
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 Help in extracting data between doubl... DFSORT/ICETOOL 5
No new posts Handling the numeric data in unstring... COBOL Programming 18
No new posts Unstring COBOL Programming 4
No new posts UNSTRING problem COBOL Programming 3
No new posts UNSTRING a big string COBOL Programming 16
Search our Forums:

Back to Top