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

Eliminating left paranthesis and right paranthesis in STRING


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

New User


Joined: 11 Jul 2005
Posts: 87

PostPosted: Wed Feb 06, 2008 3:40 pm
Reply with quote

Hi,

I have a string as below

"LOAD VALUE IS (170.25)"

I want to move 170.25 from the above string to a variable WS-LOAD-VALUE.

Can anybody suggest how can we achieve this using only one UNSTRING/INSPECT statement?

Thanks in advance,
Chinni.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Wed Feb 06, 2008 3:52 pm
Reply with quote

sounds like a school project.
Code:

UNSTRING var
                delimited by '(' or ')'
        into   junk
                WS-LOAD-VALUE
                more-junk
end-unstring


learn to use the documentation.
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 Shift left VB record without x00 endi... DFSORT/ICETOOL 11
No new posts file manager is doing string conversion IBM Tools 3
Search our Forums:

Back to Top