View previous topic :: View next topic
|
Author |
Message |
fawzy47 Currently Banned New User
Joined: 22 Oct 2005 Posts: 42
|
|
|
|
I have some difficulty understanding how string and unstring works,
if someone can provides some examples that would be great
Thank you |
|
Back to top |
|
|
fawzy47 Currently Banned New User
Joined: 22 Oct 2005 Posts: 42
|
|
|
|
what parameters you need to specify and in which CICS tables you need to add those entries
Thank you
Fawzy |
|
Back to top |
|
|
smiley Warnings : 1 New User
Joined: 08 Feb 2006 Posts: 27
|
|
|
|
Quote: |
I have some difficulty understanding how string and unstring works,if someone can provides some examples that would be great
|
A STRING statement may be used to combine several fields to one field.
eg:-
Code: |
05 NAME.
10 LAST-NAME PIC X(10) VALUE ?EDISON?.
10 FIRST-NAME PIC X(10) VALUE ?THOMAS?.
10 MIDDLE-NAME PIC X(10) VALUE ?ALVA?.
01 NAME-OUT PIC X(33).
STRING
FIRST-NAME DELIMITED BY ? ?
? ? DELIMITED BY SIZE
MIDDLE-NAME DELIMITED BY ? ?
? ? DELIMITED BY SIZE
LAST-NAME DELIMITED BY ? ?
? ? DELIMITED BY SIZE
INTO NAME-OUT.
|
Output
Code: |
NAME-OUT = THOMAS ALVA EDISON
|
UNSTRING:
The UNSTRING statement may be used to convert keyed data to a more
compact form for storing it on disk.
Code: |
MOVE ?THOMAS,ALVA,EDISON? TO NAME-OUT.
UNSTRING NAME-OUT
DELIMITED BY ?,?
INTO FIRST-NAME
MIDDLE-NAME
LAST-NAME.
|
OUTPUT:
Code: |
FIRST-NAME = THOMAS
MIDDLE-NAME = ALVA
LAST-NAME = EDISON |
|
|
Back to top |
|
|
fawzy47 Currently Banned New User
Joined: 22 Oct 2005 Posts: 42
|
|
|
|
Thank you
That was helpful |
|
Back to top |
|
|
|