Everyone asks what to do since in /FREE there is no MOVE, and that has me coding a workaround which is rather ugly.
We have a table on our system , which has 3 columns, A, B and C.
A is a number with 5 digits and 0 decimals.
B is a 15 cha string
C is a 50 char string
Let's say a table has the id number and name of all employees on each city where the company is.
If we are going to look for the name of employee 100, city 1, on fixed rpg we would do something like this:
MOVE would convert the number 100 to
, which is what we want since strings are right aligned in the table.
But in /free, we would have to first convert 100 to a string:
parm2=%char(empid);
Which would produce the string
, which is not what we want.
So this is the code we have to use:
This is ugly. Is there another way, besides of course dropping /free whenever we need a MOVE operation?
We have a table on our system , which has 3 columns, A, B and C.
A is a number with 5 digits and 0 decimals.
B is a 15 cha string
C is a 50 char string
Let's say a table has the id number and name of all employees on each city where the company is.
If we are going to look for the name of employee 100, city 1, on fixed rpg we would do something like this:
MOVE would convert the number 100 to
Code:
' 100'
But in /free, we would have to first convert 100 to a string:
parm2=%char(empid);
Which would produce the string
Code:
'100 '
So this is the code we have to use:
Code:
if len(empid)>99; parm2=' '+%char(empid); else; parm2=' '+%char(empid); //one more space end if
Comment