REXX Loop
REXX Loop
(OP)
Hello all,
I'm having some difficulty looping through a queued() list and retrieving only information that's displayed more than 5 times. I have working JCL which uses PGM=ISRSUPC and scans through the syslog gathering information. I then use REXX coding to iterate through that information and only show the information needed. I would like to use REXX to loop through this information and only display entries that occur more than 5 times. Basically I'd like to grab the first entry then loop through the dataset seeing if it occurs more than 5 times, if so, then queue that information and move onto the next entry and perform the same task. Any information would be greatly appreciated. Thanks
I'm having some difficulty looping through a queued() list and retrieving only information that's displayed more than 5 times. I have working JCL which uses PGM=ISRSUPC and scans through the syslog gathering information. I then use REXX coding to iterate through that information and only show the information needed. I would like to use REXX to loop through this information and only display entries that occur more than 5 times. Basically I'd like to grab the first entry then loop through the dataset seeing if it occurs more than 5 times, if so, then queue that information and move onto the next entry and perform the same task. Any information would be greatly appreciated. Thanks
RE: REXX Loop
First iterate over the queue with DO WHILE QUEUED() and extract all queue items with PARSE PULL and count their occurrence into a stem.
Than you can iterate over your stem and select only those items which occurrence is more than 5.
Here is an little example: cweinber21.rex
CODE
Output:
CODE
RE: REXX Loop
RE: REXX Loop
RE: REXX Loop
Now try this:
CODE
Output:
CODE
Hopefully this will work for you.
RE: REXX Loop
It should work for you too.
CODE
RE: REXX Loop
RE: REXX Loop