EREPLACE won't work in I-descroptors, just like CHANGE doesn't.

I'm not sure why people are looking for other solutions that avoid my
earlier suggestion of enveloping UV's vanilla CHANGE function inside
your own routine that can be called from an I-descriptor.  The same
method is good for those few other functions also not available to
I-descriptors.

Here's an example from VOC using "L" instead of "X".  (I couldn't find
any items with multiple Xs):

>LIST VOC LIKE ...L...L...L...  EVAL "SUBR( '*CHANGE', @ID, 'L', '(L)',
'', '' )" COL.HDG "change example..."


VOC......... change example...

GET.SQLNULL  GET.SQ(L)NU(L)(L)
RELLEVEL     RE(L)(L)EVE(L)
LIST.LABEL   (L)IST.(L)ABE(L)


Again, the function you write collects all the arguments that UV's
vanilla function needs, and returns the result of UV's function to the
calling i-descriptor:


   01: FUNCTION CHANGE( ARG1, ARG2, ARG3, ARG4, ARG5 )
   02: RETURN(  CHANGE( ARG1, ARG2, ARG3, ARG4, ARG5 ) )
   03: END

(I include the optional ARG4 & ARG5 to make it generic enough to be
useful in the future.)


What is the objection?
Do you not like my naming it "CHANGE"?
Do you not like globally cataloging, maybe you're used to Pick flavor?
Are you more comfortable writing subroutines instead of functions?
None of those things are vital.  The above was just one example of how
to do it.  Here's a variation on the theme that accomplishes exactly the
same:

   UTIL.BP CHANGE.IDESC
   01: SUBROUTINE CHANGE.IDESC( OUTARG, INARG1, INARG2, INARG3, INARG4,
INARG5 )
   02: OUTARG = CHANGE( INARG1, INARG2, INARG3, INARG4, INARG5 )
   03: RETURN 
   04: END

CATALOG UTIL.BP CHANGE.IDESC    (Pick flavor creates a VOC, aka MD,
entry)

I-descriptor looks like:
   01: I
   02: SUBR( 'CHANGE.IDESC', @ID, 'X', '(X)', '', '' )


 - Chuck Stevenson


Disclaimer:  All errors are the sole responsibility of the reader.
(Some other list member posted that disclaimer a while back.  I like
it.)
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to