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

Help in Unstring Verb


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

New User


Joined: 11 Oct 2008
Posts: 74
Location: Chicago, IL

PostPosted: Fri Sep 11, 2009 6:42 pm
Reply with quote

Hello All,
I am facing some complexity in unstring the following example.
I/P:
ECDC.BASE.COPYLIB UID(CH11001755) READ(A) WRITE(A) ALLOC(A)
Or
UID(CH11001755) ALLOW
I need to change the "CH11001755" with some new ID.

The format is like
Tk1_UID(<Some id>)_<Access>

Tk1 is not necessary, it may come and depends on runtime.

I need to take

TK1 UID(
<uid>
) <access>

in 3 tokens.

The problem i am facing is that i can use DELIMITED BY "("
so that everu thing before ( can be in token 1,
now i want to use next DELIMITOR at ")"
and then next DELIMITED BY SIZE.

but how to ppreform that....????

Thanks in Advance
Gaurav
Back to top
View user's profile Send private message
GauravKudesiya
Warnings : 1

New User


Joined: 11 Oct 2008
Posts: 74
Location: Chicago, IL

PostPosted: Fri Sep 11, 2009 9:09 pm
Reply with quote

Its done now.......... icon_smile.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: Fri Sep 11, 2009 9:10 pm
Reply with quote

Please share your solution for the benefit of others.
Back to top
View user's profile Send private message
GauravKudesiya
Warnings : 1

New User


Joined: 11 Oct 2008
Posts: 74
Location: Chicago, IL

PostPosted: Fri Sep 11, 2009 9:17 pm
Reply with quote

sure...

i used
WS-D1 PIC X(1) VALUE '('
WS-D2 PIC X(1) VALUE ')'
.
.
.

UNSTRING OLD-REC DELIMITED BY "(" OR ")" INTO
OLD-1 DELIMITER IN WS-D1,
OLD-2 DELIMITER IN WS-D2,
OLD-3 DELIMITER IN SIZE.


EXPLAINATION:

OLD-REC = ECDC.BASE.COPYLIB UID(CH11001755) READ(A) WRITE(A) ALLOC(A)

OLD-1 = ECDC.BASE.COPYLIB UID
OLD-2 = CH11001755
OLD-3 = READ(A) WRITE(A) ALLOC(A)

SO ITS SOLVED....
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Fri Sep 11, 2009 9:47 pm
Reply with quote

Good to hear it is working - thanks for letting us know and posting your solution icon_smile.gif

d
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 Handling the numeric data in unstring... COBOL Programming 18
This topic is locked: you cannot edit posts or make replies. regarding COBOL WRITE verb (VB File H... COBOL Programming 9
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