View previous topic :: View next topic |
Author |
Message |
Vinodch Beginner
Joined: 23 Dec 2002 Posts: 80 Topics: 32 Location: Chennai, India
|
Posted: Tue Mar 30, 2010 1:14 pm Post subject: Unstring - Help |
|
|
REC-1 = A|B|C|D|E|F|G|H|
UNSTRING REC-1 DELIMITED BY '|' INTO
A1
B1
C1
D1
I would like to have the o/p like mentioned below:
A1 = A
B1 = B
C1 = C
D1 = D|E|F|G|H|
but it is like below mentioned:
A1 = A
B1 = B
C1 = C
D1 = D
Please help is anyway D1 could store D|E|F|G|H|. _________________ Thanks,
Vinod. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Tue Mar 30, 2010 2:22 pm Post subject: |
|
|
Vinodch,
Unless i am missing something isn't it simple like this?
Code: |
01 PTR PIC S9(04) COMP.
MOVE +1 TO PTR
UNSTRING REC-1 DELIMITED BY '|' INTO A1 B1 C1
POINTER PTR
MOVE REC-1(PTR: ) TO D1
|
Kolusu |
|
Back to top |
|
|
Vinodch Beginner
Joined: 23 Dec 2002 Posts: 80 Topics: 32 Location: Chennai, India
|
Posted: Tue Mar 30, 2010 3:30 pm Post subject: |
|
|
Kolusu
Yes - you are correct. I looked at one of your earlier replies and solved the issue.
Thanks for your help. _________________ Thanks,
Vinod. |
|
Back to top |
|
|
|
|