Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Free form and MOVE

Status
Not open for further replies.

Fooch

Programmer
Dec 19, 2005
63
US
This may be a dumb question, but is there a MOVE equivalent in Free form? There are many times when I have needed to force a numeric into a char for certain reasons, or vice versa. For concatination or things like that where %CHAR won't work because of the deletion on leading zeros.

 
Fooch,

Code:
CharVar = %EDITC( NumVar : 'X' );

Will get you the leading zeros. You can also use %DEC() or %INT() to go the other way.

HTH,
MdnghtPgmr
 
Instead of %CHAR, use %EDITW. You have more control over leading zeros.

For example, I use

Code:
Formatted_SSN = %EDITW(cusssn : '0   -  -    ');

to edit a Social Security number.



Sumptum fac donec consumptus sis.

-- my wife's motto


 
Thanks. Another question on the same kind of thing. Is there a way for free form to turn on/off multiple indicators? Like how you can in IV..MOVEA '0000' *IN(80)...kind of thing.
 
/free
for x = 80 to 83;
*in(x) = *off;
endfor;

Sumptum fac donec consumptus sis.

-- my wife's motto


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top