Hey! I'm new to using Proc FCMP. This is my first attempt. Just experimenting with replacing some repetitive code that's a string of functions with a Proc FCMP function. However, I've run into a little trouble with the VVALUEX function that's in the string I'm trying to replace. Looking for a little help! Using Base SAS 9.4.
Here's an example of the code I'm trying to replace. I realize this may not make sense - just playing around with Proc FCMP.
LALAE_Lmtd_Paid_LDF_PLmt_Upper = Input(Left(VValueX(Catt('LALAE_',PLmt_Upper_LDF_Char,'Pd'))),8.);
LO_Lmtd_Incd_LDF_Ded_Lower = Input(Left(VValueX(Catt('LO_',Ded_Lower_LDF_Char,'Inc'))),8.);
XS_Incd_LDF_Ded_Lower = Input(Left(VValueX(Catt('XS_',Ded_Lower_XS_LDF_Char,'Inc'))),8.);
LALAE_Lmtd_Incd_LDF_100K = Input(Left(VValueX('LALAE_LDF_100kInc')),8.);
Here's the Proc FCMP code and error message:
Proc FCMP Outlib = My_Lib.functions.myfncs;
Function MyFctrLkp(Fctr_To_Lkp $);
Fctr = Input(Left(VValueX(Fctr_To_Lkp)),8.);
Return(Fctr);
EndSub;
Run;
ERROR: The VVALUEX function is only valid in the DATA step. User defined libraries will be searched for a definition of this function. NOTE: Numeric value converted to character for argument 1 of 'LEFT' operation.
ERROR: Cannot find a library containing subroutine VVALUEX. NOTE: Execution aborted because of errors in program.
Here's what I'm trying to accomplish:
LALAE_Lmtd_Paid_LDF_PLmt_Upper = MyFctrLkp(Catt('LALAE_',PLmt_Upper_LDF_Char,'Pd'));
LO_Lmtd_Incd_LDF_Ded_Lower = MyFctrLkp(Catt('LO_',Ded_Lower_LDF_Char,'Inc'));
XS_Incd_LDF_Ded_Lower = MyFctrLkp(Catt('XS_',Ded_Lower_XS_LDF_Char,'Inc'));
LALAE_Lmtd_Incd_LDF_100K = MyFctrLkp('LALAE_LDF_100kInc');
Thanks!
... View more