IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to capture the COUNT for FIND ALL in rexx


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Mon Jul 20, 2009 2:23 pm
Reply with quote

Hi Guyz,

In edit session, we type
Code:
F ALL "ISREDIT"
And we get the count in the top right corner. I want capture this number in a variable in REXX.

What is the variable, which has this information ?

Code:
ADDRESS ISPEXEC "CONTROL ERRORS RETURN"     
    "ISREDIT MACRO (HEADER)"                 
    "ISREDIT F ALL 'START"                   
    SAY "Count for the START = "mystery_variable_name


Sushanth
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Mon Jul 20, 2009 2:37 pm
Reply with quote

Found it!

Code:

"ISREDIT SEEK ALL START"       
"ISREDIT (COUNT) = SEEK_COUNTS"
SAY 'SEEK COUNTS = ' COUNT     


Iam using ISPF Edit & Edit MAcros
Dated Fifth Edition (September 2005)
Any latest edition available, where can i check this ?

Thank You,
Sushanth
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Jul 20, 2009 2:50 pm
Reply with quote

www-01.ibm.com/software/awdtools/ispf/library/
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Mon Jul 20, 2009 4:47 pm
Reply with quote

Thank You Very Much Dino.

Sushanth
Back to top
View user's profile Send private message
Phalgun

New User


Joined: 18 May 2009
Posts: 16
Location: Hyd

PostPosted: Mon Jul 27, 2009 12:45 am
Reply with quote

Hi ,

I have same requirement of Counting specific word(table name) in Error report file and generate Summary Report in new dataset out of error file Dataset . Earlier we used to do F all 'R0BR' it will return number of occurence of that Table in Error file and we used take that count for that table and Update it manually in new dataset , Now we have many tables to be checked in Error file . I see ur code which work fine for one , But i need for more words at a time ..


E.g Input file would be ntfacbs.cbs372r.Gxxxx which is error report file to rexx program it Should generate a Summary report of Count for different words (table name) in new dataset..

out put should be :
Summary Error Report :
Table Count
R0BA XX
R0GA XX
R0BR XX

Pardone me if i'm not clear in my requirement pls suggest me .
Thanks in advance

Phalgun
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Mon Jul 27, 2009 1:57 am
Reply with quote

And what is it that you have done so far? Given the example, it seems pretty easy to repeat the code a few times, or alternatively, read in the words-to-find from a file?

Show your code and someone will help, we don't write the code for you!
Back to top
View user's profile Send private message
Phalgun

New User


Joined: 18 May 2009
Posts: 16
Location: Hyd

PostPosted: Wed Jul 29, 2009 2:06 am
Reply with quote

Prino,

I'm very much new to this Rexx Edit Macro , I just started Learning Edit macros , As you suggested i repeated Same line with different Parameter ,
I know logic but novice to Rexx and Edit Macro concept.. Can you suggest me how to write output to another dataset , Please help me ..

/* Rexx */

"ISREDIT MACRO"
"ISREDIT SEEK ALL R0BA"
"ISREDIT (COUNT) = SEEK_COUNTS"
"R0BA_COUNT = COUNT"
"ISREDIT SEEK ALL R0GA"
"ISREDIT (COUNT) = SEEK_COUNTS"
"ROGA_COUNT = COUNT"
"ISREDIT SEEK ALL R0BR"
"ISREDIT (COUNT) = SEEK_COUNTS"
"R0BR_COUNT = COUNT"

SAY 'SUMMARY ERROR RPT: "

SAY ''TABLE' 'COUNT' '
SAY 'R0BA ' R0BA_COUNT
SAY 'R0GA ' R0GA_COUNT
SAY 'R0BR ' R0BR_COUNT
EXIT CODE (0)
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Wed Jul 29, 2009 10:37 am
Reply with quote

Hi,

If you apply by Prino's idea, it would be good.

Quote:
read in the words-to-find from a file?


And this might help you..........
Code:
ADDRESS ISPEXEC "CONTROL ERRORS RETURN"           
    "ISREDIT MACRO (HEADER)"                       
                                                   
"ALLOC DA('HXSULL.TEST(ISTTI)') F(INPUT) SHR REUSE"
"EXECIO * DISKR INPUT (STEM LINES. FINIS"         
                                                   
DO I = 1 TO LINES.0                               
LINES.I=STRIP(LINES.I)                             
"ISREDIT SEEK ALL '&LINES.I'"                     
"ISREDIT (COUNT) = SEEK_COUNTS"                   
SAY LINES.I "=" COUNT                             
END                                               
"FREE F(INPUT)"                                   
EXIT                                               

But, it doesn't work because of
Code:
"ISREDIT SEEK ALL '&LINES.I'" 

I am missing something.

Sushanth
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts To get the count of rows for every 1 ... DB2 3
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
Search our Forums:

Back to Top