Hello, I'm trying to develop a custom function so it can be used with EVAL in a jbase command. To begin, I tried to create a function that receives just one argument, as follows:
FUNCTION FTEST(A) RETURN (A:"-1") END but if use it with LIST, for example: jsh miaeco01 ~ -->LIST F.SPF 'SYSTEM' EVAL'FTEST(@ID)' ** Error [ SUBROUTINE_PARM_ERROR ] ** 'SUBROUTINE FTEST' called with incorrect arguments , Line 1 , Source jql_listcolumnar.b jsh miaeco01 ~ --> It gives an error about an invalid number of arguments, so just out of curiosity I tried the following: FUNCTION FTEST(A,B) RETURN (A:"-1") END And the same command now returns this: jsh miaeco01 ~ -->LIST F.SPF 'SYSTEM' EVAL'FTEST(@ID)' LIST F.SPF 'SYSTEM' EVAL'FTEST(@ID)' PAGE 1 02:52:38 24 SEP 2015 @ID... FTEST(@ID) SYSTEM SYSTEM-1 1 Records Listed jsh miaeco01 ~ --> I don't know what the second argument is for, because if I try to use in the function, the LIST crashes FUNCTION FTEST(A,B) RETURN (A:"-1":B) END jsh miaeco01 ~ -->LIST F.SPF 'SYSTEM' EVAL'FTEST(@ID)' jBASE: Segmentation violation. Aborting Anybody knows about that second argument is, and if I can send more than one argument to the function? Thanks! -- -- IMPORTANT: T24/Globus posts are no longer accepted on this forum. To post, send email to [email protected] To unsubscribe, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jBASE?hl=en --- You received this message because you are subscribed to the Google Groups "jBASE" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
