View previous topic :: View next topic
|
Author |
Message |
pkmurali Warnings : 1 Active User
Joined: 15 Dec 2005 Posts: 271
|
|
|
|
Dear All,
Is there alternative way other than reading a file using REXX and checking whether particular line is blank or not? Will Edit macro 'Find' work?
Please let me know.
Murali. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
if You describe better the process we might be able to give better suggestions
but the way You posed Your question
a technically correct ( but probably useless) answer would be a plain YES |
|
Back to top |
|
|
pkmurali Warnings : 1 Active User
Joined: 15 Dec 2005 Posts: 271
|
|
|
|
enrico
To be more clear on the scope,
i have to find the no of blank lines in a program(available as an member of an PDS), right now i am using REXX Program to read the program till the end of the program to get the number of blanks
"EXECIO * DISKR INPUT (FINIS STEM INPUT."
"FREE DD(INPUT)"
.
.
IF SUBSTR(INPUT.M,7,66) = ' ' THEN
BLANKS = BLANKS + 1
ELSE
CODE = CODE + 1
My objective is to remove this piece of code and replace the Edit macros to find the number of blanks in a code. Can you help me whether 'Find' can be used to find the blanks in the code. If so can you give the syntax.
Thanks,
Murali. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
use pf1 in edit mode, look at find command.
there is a P'?' command for non-blanks
(i don't remember the char with which you need to replace the ?
an example P'<' = lower case, p'>' = uppper case
but you can find it in the help screens.
after you have excluded all lines with non-blanks in 7 to 72,
do a find all ' ' in 7. that number will be the number of blank lines.
your edit macro could be something like this:
/* rexx */
isredit macro
reset
x all p'?' 7 72
f all P' ' 7 nx
x = find_counts
end
again, you need to find the special char to replace the ?
but you can find it in the help screens.
my example rexx script may not be syntax pure,
but you can refer to the edit and edit macros manual for exact syntax
for the find_counts |
|
Back to top |
|
|
pkmurali Warnings : 1 Active User
Joined: 15 Dec 2005 Posts: 271
|
|
|
|
Thanks Dick
For rrecollecting the stuff 'x all p'?' 7 72'. I believe it must be p'='. Again Thanks for you explanation.
Murali. |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
Non-blanks are P'¬'. Any character is P'='. |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi Murali,
You can do something like this (untested) from the cmd line:
x all;f all p'^';f all ' ' x 7
The # of hits will appear in the upper right of the screen.
PS My P' ' char is the same as Terry's. Mine displays as "^". |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
Jack,
Try hitting 170 (on the numeric key pad on the right) while holding down the Alt key, then let up on Alt to get the ¬. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
thx for the tip Terry, forget that technical stuff now and then. |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Thanx, Terry. |
|
Back to top |
|
|
|