View previous topic :: View next topic
|
Author |
Message |
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Hi Guyz,
In edit session, we type
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 |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
Back to top |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Thank You Very Much Dino.
Sushanth |
|
Back to top |
|
|
Phalgun
New User
Joined: 18 May 2009 Posts: 16 Location: Hyd
|
|
|
|
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 |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
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 |
|
|
Phalgun
New User
Joined: 18 May 2009 Posts: 16 Location: Hyd
|
|
|
|
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 |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
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 |
|
|
|