In your code you do not show an END statement after the last ITERATE.
You should have two (2) ENDs for both DOs.


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED]
Behalf Of Alan Schwartz
Sent: Friday, November 18, 2005 12:54 PM
To: IBM-MAIN@BAMA.UA.EDU
Subject: REXX Question


I'm stuck in a REXX routing and haven't figured my way out yet. 

I'm going through a file of CICS shutdown statistics with the intent of 
generating a list of programs used and their counts.   Simple stuff.  The 
data where the routine falls apart is (hope this formats fairly decently. 
I'm not including all columns):

0PROGRAMS 
+________ 
0  Program 
   Name            Times Used 
+  ___________________________
 
   ABCAARCH              1219 
   ABIGSNP                          0 
   ABOCFTM                    946 
   ABOCHOM              14667 

My code to process the data is:

Do a = 1 to cics.0 
  Parse upper var cics.a pgmname.a timesused.a .
    If pgmname.a ¬= '0PROGRAMS' 
      Then Iterate 
        Else 
trace i 
        Do a = a to cics.0 
          If pgmname.a = '*TOTALS*' 
            Then Leave 
          If Datatype(timesused.a) ¬= 'NUM' 
            Then Iterate 

My problem, as shown by the trace, is the last Iterate is going back to 
the first Do and not the second Do.
The TSO REXX Reference says that Iterate steps the innermost Do. 

The trace does show that when it found 0PROGRAMS it executed the test for 
Datatype.  On lthat line the test
fails and it Iterates but to the first Do not the second.

I'm continuing to look at this but I welcome all help. 

Alan Schwartz
Assurant Shared Business Services
Lead Systems Programmer
Phone:  651-361-4758
Fax:       651-361-5625
**************************************************************************************
This e-mail message and all attachments transmitted with it may contain legally 
privileged and/or confidential information intended solely for the use of the 
addressee(s). If the reader of this message is not the intended recipient, you 
are hereby notified that any reading, dissemination, distribution, copying, 
forwarding or other use of this message or its attachments is strictly 
prohibited. If you have received this message in error, please notify the 
sender immediately and delete this message and all copies and backups thereof.

Thank you.
**************************************************************************************

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to