Hello,
Anyone out there know how to find the lenght of a decimal field.
I tried this:
DEFINE VAR ckamount AS DECIMAL FORMAT ">>>>>>>>>9.99":U.
DEFINE VAR blklen AS INT.
ASSIGN blklen = LENGTH(ckamount)
I get the error message: Incompatiable datatypes in expression or assigment.
Later in my code I need to put leading zeros in front of so there are no empty spaces chamount example checkamount 10452.09. I need to output it as (12 spaces I need to fill up right justified zero filled in data format 9(9)V99). 000001045209. I know your thinking what the heck is 9(9)V99) data format that means two decimal places implied. Usually I can figure these things out on my own. This one has me stumped.
filler is a variable that I am going to assign once I figure out the lenght of ckamount.
PUT UNFORMATTED FILL(zero,filler)ckamount.
Is there an easy way to do this? Treading in 4GL.
Thank you all for reading,
Steve
Anyone out there know how to find the lenght of a decimal field.
I tried this:
DEFINE VAR ckamount AS DECIMAL FORMAT ">>>>>>>>>9.99":U.
DEFINE VAR blklen AS INT.
ASSIGN blklen = LENGTH(ckamount)
I get the error message: Incompatiable datatypes in expression or assigment.
Later in my code I need to put leading zeros in front of so there are no empty spaces chamount example checkamount 10452.09. I need to output it as (12 spaces I need to fill up right justified zero filled in data format 9(9)V99). 000001045209. I know your thinking what the heck is 9(9)V99) data format that means two decimal places implied. Usually I can figure these things out on my own. This one has me stumped.
filler is a variable that I am going to assign once I figure out the lenght of ckamount.
PUT UNFORMATTED FILL(zero,filler)ckamount.
Is there an easy way to do this? Treading in 4GL.
Thank you all for reading,
Steve