Saturday, June 20, 2009

To add Spaces to the Character Fields in Front

Data : one(5) type C value 'ABC',
Two(5) type n value '10000',
three(10),
l1 type n,
l type n,
var(5) type C.
l = strlen( one ).
l1 = 5 - l.
Var+l1(l) = one..
concatenate VAR two into three.
* write one.
* Write three.
write : three.


OUTPUT:
' ABC1000'