> From: Louie Bergsagel
> Ron Pingilley's solution works, with his posted correction to
> plug in fields 5 and 9.
Ron's method does indeed work. Nice work, Ron!
Now let's generalize it a bit. Suppose the final answer is a string
instead of numeric.
You can replace the outer
02: SUM(MULS(...))
with
o2: CONVERT(@VM,'',IFS(...,'')
as follows:
02:CONVERT(@VM,'',IFS(EQS(RAISE(TRANS("FILE2",OCONV(@ID,"G1*1"),5,"X")),
REUSE(OCONV(@ID,"G3*1"))),RAISE(TRANS("FILE2",OCONV(@ID,
"G1*1"),9,"X")),''))
or equivalently:
02:
@ID['*',4,1];TRANS(FILE2,@ID['*',2,1],-1,'X');EQS(@2<1,5>,REUSE(@1));IFS
(@,@2<1,9>,'');CONVERT(@SM,'',@)
depending on taste/standards manual.
Of course, we're still left with the problem of maintainability.
Chuck Stevenson
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/