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

STRING DELIMITED BY verb usage


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

New User


Joined: 29 Jan 2007
Posts: 33
Location: chennai

PostPosted: Thu Nov 20, 2008 1:40 pm
Reply with quote

PLease find below the declaration and STRING verb command.

Is WS-EDIT-PHRASE variable can be used as delimiter in the below string syntax ? Here WS-EDIT-PHRASE can hold the value dynamically based on the external conditions ( say a= b or a=c as shown below).

Please help. Thanks.


01 WS-EDIT-PHRASE PIC X(20) VALUE SPACES.
88 88-NME-CHG-TO VALUE 'NAME CHANGED TO'.
88 88-MERG-INTO VALUE 'MERGE INTO'.
88 88-ACQU-BY VALUE 'ACQUIRED BY'.
88 88-REORG-AS VALUE 'REORGANIZED AS'.

IF a=b
set 88-REGORG-AS TO TRUE
END-IF

If a = c
set 88-nme-chg-to TO TRUE
END-IF

STRING WS-ISSUER-STRING1,
WS-ISSUER-STRING2,
WS-ISSUER-STRING3
DELIMITED BY WS-EDIT-PHRASE INTO WS-ISSUER-STRING.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Thu Nov 20, 2008 2:19 pm
Reply with quote

Quote:
Is WS-EDIT-PHRASE variable can be used as delimiter in the below string syntax ?

Yes it can be used.
Code:

STRING WS-ISSUER-STRING1,
WS-ISSUER-STRING2,
WS-ISSUER-STRING3
DELIMITED BY WS-EDIT-PHRASE INTO WS-ISSUER-STRING.

But remember in your above code WS-EDIT-PHRASE is a delimiter and will be 20 byte delimiter regardless of what value you set remaining will be padded with spaces.
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