View previous topic :: View next topic
|
Author |
Message |
deepak.kec
New User
Joined: 26 Feb 2007 Posts: 71 Location: bangalore
|
|
|
|
Hi All,
I have a PS file in which i want to search a variable starting with "XXX". When it finds the XXX it should display next 6 character present right to "XXX" along with "XXX" in the output file.
Please suggest on this... |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
What have you tried so far, and what errors have you encountered. |
|
Back to top |
|
|
deepak.kec
New User
Joined: 26 Feb 2007 Posts: 71 Location: bangalore
|
|
|
|
I have tried using SUBSTR to display the string if it finds "XXX" but it is displaying whole string. I want it to display only next 6 character after "XXX" |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Show us how you have coded your substring |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
Show us too how you have coded your variable search. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2546 Location: Silicon Valley
|
|
|
|
Hint:
Use the POS builtin function to see if it is there and also to get the offset. And use the offset in SUBSTR. |
|
Back to top |
|
|
deepak.kec
New User
Joined: 26 Feb 2007 Posts: 71 Location: bangalore
|
|
|
|
Thanks to all. I have found a solution using DFSORT in JCL. |
|
Back to top |
|
|
|