View previous topic :: View next topic
|
Author |
Message |
tecnokrat Warnings : 1 Active User
Joined: 22 May 2009 Posts: 160 Location: Bangalore
|
|
|
|
Hi,
Can i get any command in the ISPF to know the prefix of any word. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Please explain clearly exactly what it is that you wish to do, and give as much detail as possible, also examples if you think that it will help explain your question. |
|
Back to top |
|
|
tecnokrat Warnings : 1 Active User
Joined: 22 May 2009 Posts: 160 Location: Bangalore
|
|
|
|
Hi,
Firstly i need to check a word overall in the given PS member and
if the word is suffixed with a X then only i would be able to get to know that its a proper one and i can go ahead with the logic else i need to skip the whole logic. |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
what is it you want : prefix or suffix? |
|
Back to top |
|
|
tecnokrat Warnings : 1 Active User
Joined: 22 May 2009 Posts: 160 Location: Bangalore
|
|
|
|
BOTH PREFIX AND SUFFIX needed so that i can modulate.
sorry for troubling. |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
So a word has to start AND end with a "X" ?
And for the rest follow expat's advice. |
|
Back to top |
|
|
tecnokrat Warnings : 1 Active User
Joined: 22 May 2009 Posts: 160 Location: Bangalore
|
|
|
|
start with a string im searching but end with an X.so it would be a prefix. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
I think you need to be within the editor and your command needs to be an editor macro.
I think you can use the "FIND 'abc' PREFIX" command so that you only process the matching words. |
|
Back to top |
|
|
tecnokrat Warnings : 1 Active User
Joined: 22 May 2009 Posts: 160 Location: Bangalore
|
|
|
|
tHanks for that |
|
Back to top |
|
|
tecnokrat Warnings : 1 Active User
Joined: 22 May 2009 Posts: 160 Location: Bangalore
|
|
|
|
Can i know what would be the value if i give the ISPF command as
Quote: |
"F ALL '"string"'" whole_file
|
Does this return a boolean value 0/1 or true/false. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Return codes
0
Normal completion
12
Invalid command format
20
Severe error |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
tecnokrat wrote: |
"F ALL '"string"'" whole_file |
What is that ??
What happened to all the prefix/suffix mixture ??
It makes me wonder... you are writing a macro, aren't you ?? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
Can i get any command in the ISPF to know the prefix of any word. |
You know what you are talking about - we have confusion
Suggest you post a few sets of sample data and the "answer" you want when these samples are processed by your code. . . |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Code: |
"F ALL '"string"'" whole_file |
I am not sure what 'whole_file' is, but pretty sure you it is not part of the FIND syntax. |
|
Back to top |
|
|
tecnokrat Warnings : 1 Active User
Joined: 22 May 2009 Posts: 160 Location: Bangalore
|
|
|
|
whole_string is the file index that runs till the End Of File |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
whole_string is the file index that runs till the End Of File |
What is this. . . Use more and better words to describe what this says. . .
And, post the info requested earlier if you want help
d |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
and even after 15 posts the issue is completely foggy |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
repeating:
'whole_file' is not part of the FIND syntax. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Yup, complete confusion. . .
If the diaolog isn't helping maybe this would help. . . (Also repeating):
Quote: |
Suggest you post a few sets of sample data and the "answer" you want when these samples are processed by your code. . . |
d |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Quote: |
whole_string is the file index that runs till the End Of File |
You will want to study the Edit and Edit Macros manual. www-03.ibm.com/systems/z/os/zos/bkserv/r11pdf/#ispf
Write a macro that issues FIND repeatedly, until the return code indicates no more instances are found.
For each time FIND is successful, use CURSOR to find the row and column were the text was found. Use LINE to put the line of text into your rexx program. |
|
Back to top |
|
|
|