I am not very familiar with REXX in CMS. I don't know how to read files,
but the following may help some. If I understand what you want, which is
problematic.
 
 
/* REXX */
X.=''
INDICES=""
DO FOREVER
      RECORD=/* read a single record */
      PARSE VAR RECORD INDEX DATA
     X.INDEX=X.INDEX DATA
     IF POS(INDEX,INDICES) = 0 THEN INDICES=INDICES INDEX
END
DO I=1 TO WORDS(INDICES)
      INDEX=WORD(INDICES,I)
      SAY INDEX X.INDEX
END

--
John McKown
Senior Systems Programmer
HealthMarkets
Keeping the Promise of Affordable Coverage
Administrative Services Group
Information Technology

This message (including any attachments) contains confidential
information intended for a specific individual and purpose, and its
content is protected by law.  If you are not the intended recipient, you
should delete this message and are hereby notified that any disclosure,
copying, or distribution of this transmission, or taking any action
based on it, is strictly prohibited.
  

 


________________________________

        From: The IBM z/VM Operating System
[mailto:[EMAIL PROTECTED] On Behalf Of Huegel, Thomas
        Sent: Thursday, July 10, 2008 10:58 AM
        To: [email protected]
        Subject: More simple REXX/PIPES
        
        
        This shouldn't be very hard, but I seem to be a little slow
today.. can't find my Geritol.
         
        I can do this with a bunch of 'IF''s and 'DO's but I was looking
for something prettier.
        REXX or a PIPE, it doesn't matter.
        I have input that looks like this:
         
        01 data-a
        01 data-b
        01 data-c
        01 data-d
        02 data-a
        02 data-b
        02 data-c
        02 data-d
        .
        .
        99 data-x
        .
        xx data-a is always unique.
         
        I want to create a variable that looks something like this:
        X.01 data-a data-b data-c data-d
        X.02 data-a data-b data-c data-c
         
        or since data-a is unique I could name the variable data-a and
have data-b data-c data-d in the var... then I'd have to keep track of
all of the names (data-a).
         
        Anyone see a super simple way to do this with pretty code? 
         
         
         

Reply via email to