Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
D ConvertDollar PR 8S 2
D InValue 11 Value
.
.
.
//=========================================================
// SUBPROCEDURE: ConvertDollar
// PURPOSE: Convert character to dollar value
//
// DATE CHANGED BY REASON
//
//=========================================================
P ConvertDollar B
//---------------------------------------------------------D ConvertDollar PI 8S 2
D CharValue 11 Value
D
D NegativeAmt S N Inz(*Off)
D CharDollar Ds
D DollarAmt 8S 2
//--------------------------------------------------------- /Free
If %Scan('-':CharValue) > 0;
NegativeAmt = *On;
EvalR CharValue = %TrimR(%Replace('':CharValue:
%Scan('-':CharValue):1));
Else;
NegativeAmt = *Off;
EndIf;
DoW %Scan(',':CharValue) > 0;
EvalR CharValue = %TrimR(%Replace('':CharValue:
%Scan(',':CharValue):1));
EndDo;
EvalR CharValue = %TrimR(%Replace('':CharValue:
%Scan('.':CharValue);1));
EvalR CharDollar = CharValue;
If NegativeAmt;
DollarAmt = DollarAmt * -1;
EndIf;
Return DollarAmt;
/End-Free
//--------------------------------------------------------P ConvertDollar E
//========================================================