View previous topic :: View next topic
|
Author |
Message |
bamohan
New User
Joined: 29 Jan 2007 Posts: 33 Location: chennai
|
|
|
|
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 |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
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 |
|
|
|