• Subject: Re: 1st rpg question, fellows
  • From: ericadelong@xxxxxxxx
  • Date: Fri, 17 Jul 98 12:02:29 -0500


     Hmmmm.....
     
     Ok, first let me offer a suggestion. You may want to look at 
     multi-occurance data structures as a means of building a multi-column 
     table in RPG.  MODS lets you define a datastructure and then treat it 
     like an array (more or less). When used along with alt table, you end 
     up with something like:
     
     D Ary1            S            10A    dim(100)  <-holds lookup value
     
     D DS1             DS                  Occurs(100)      
     D  Value1
     D  Value2
     D  ...
     D  Valuex
      
     C                Clear     x  
     C      Value     Lookup    Ary1,x       
     C      x         Occur     DS1 
     
     
     When you perform the lookup, the value of x (the index corresponding 
     to "Value") is used to set the data structure occurance. 
     
     I probably did not express that very well. Anyway, look it over and 
     see what you think. Good luck.
     
     Eric A DeLong
     ericadelong@pmsc.com

______________________________ Reply Separator _________________________________
Subject: 1st rpg question, fellows 
Author:  <MIDRANGE-L@midrange.com > at INTERNET
Date:    7/17/98 8:09 AM


well for starters i'm learning tables & arrays.
     
i have a multicolumn report that i'm constructing all 
by tables (arrays are too confusing for me now)
     
rpg iv lets you define only 2 tables in alternating
format. so in order to make a table of say 3 columns, you would need 
to define 2 columns as a single table and then split apart the 2 
pieces after a successful lookup.
     
i think i can do this. but how do i do calculations that will appear 
in a 4th table or even 5th table?
     
confusing? i hope so..
     
M.K.
_________________________________________________________ 
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com
     
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com. 
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. 
| Questions should be directed to the list owner/operator: david@midrange.com 
+---
     


+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].