MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

A good Rexx sample to create key-value data structure

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
Ripley
Beginner


Joined: 30 Mar 2005
Posts: 15
Topics: 8

PostPosted: Sun Apr 30, 2006 9:26 pm    Post subject: A good Rexx sample to create key-value data structure Reply with quote

Code:

/* CODE LOOKUP:                                                  */
/*                                                               */
/*     Looks up the areacode for the town the user enters.       */

area. = ''      /* pre-initialize all entries to the null string */

area.Chicago  = 312   ;   area.Wrigleyville = 773
area.Homewood = 708   ;   area.Geneva       = 630
area.Zion     = 847   ;   area.Schaumburg   = 847

do while town <> ''
   say 'For which town do you want the area code?'
   pull town .
   if town <> '' then do
      if area.town = ''
         then  say 'Town' town 'is not in my database'
         else  say 'The area code for' town 'is' area.town
   end
end



i read from the book
http://www.amazon.com/gp/product/0764579967/sr=1-1/qid=1146449456/ref=sr_1_1/104-7996049-5490334?%5Fencoding=UTF8&s=books
Razz
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group