|
I am attempting to use %EDITW to create a character field for a delimited file.
Here is my test code:
D num s 13p 2 inz(14.56)
d neg s 13p 2 inz(-14.56)
d string s 26a
/free // Result
string = %editw(num:'-0 . '); // STRING = '
0000000014.56 '
string = %editw(num:'0 . -'); // STRING = ' 0000000014.56
'
string = %editw(neg:'-0 . '); // STRING = '
0000000014.56 '
string = %editw(neg:'0 . -'); // STRING = '
00000000014.56- '
*inlr = *on;
return;
/end-free
I have two problems.
1. The first character of the number is blank when I want it to be zero. (Not
the negative sign)
2. I can't get a leading negative sign.
Any ideas on how to get the leading negative sign to appear and other than
%subst how do I get the leading zero to appear?
Thanks ahead of time.
Marvin
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.