> -----Original Message-----
> From: Stuart Boydell
> [...] in basic I would do a LOCATE [...]

** nested formula in DICT FILEB:
TRIM(
   IFS(
      EQS(
         FILEA.CAT.CODES ,
         REUSE( CAT.CODE ) ) ,
      FILEA.CAT.NAMES ,
      "" ) ,
   @VM )

** or an un-nested formula, using semi-colons:
EQS( FILEA.CAT.CODES , REUSE( CAT.CODE ) ) ;
IFS( @ , FILEA.CAT.NAMES , "" ) ;
TRIM( @ , @VM )

** semi-colon style is usually nicer and more readable
** than deeply nested parentheses,
** but usually at the cost of not being able to use
** your ITYPE from inside another ITYPE,
** and that's not so nice.

** other attributes in DICT FILEB:
** (this is for Universe - - in Unidata, you wouldn't do RAISE.)
FILEA.CAT.NAMES = RAISE( TRANS( "FILEA" , CUST.ID ,
                  "CAT.NAMES" , "X" ) ) ... M
FILEA.CAT.CODES = RAISE( TRANS( "FILEA" , CUST.ID ,
                  "CAT.CODES" , "X" ) ) ... M
CUST.ID         = D  6 ... S
CAT.CODE        = D 12 ... S

** fields in DICT FILEA:
CAT.CODES = D 50 ... M ASSOC_CATEGORIES
CAT.NAMES = D 51 ... M ASSOC_CATEGORIES

===

** if u2 dictionaries were Perl-like,
** and if %FILEA_CAT_NAMES were a Perl hash,
** then the formula would be short and unconvoluted:
** $FILEA_CAT_NAMES{ $CAT_CODE }
** 
** how's 'bout we get IBM to put Perl into the next version of u2?

===


The information contained in this e-mail message may be privileged 
and confidential information and is intended only for the use of 
the individual and/or entity identified in the alias address of 
this message.  If the reader of this message is not the intended 
recipient, or an employee or agent responsible to deliver it to the 
intended recipient, you are hereby requested not to distribute or 
copy this communication. If you have received this communication in 
error, please notify us immediately by telephone or return e-mail and 
delete the original message from your system.
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to