Fixed-width field
Fixed-width field
I^m creating a report, exporting to an ASCII file. I have a fixed-width field that is numeric, but with a strange twist. For example, if the number is 2578931452.36, the output should show 25789314523F. Something called ^signed conversion equivalents^. The last byte of the field is converted according to it^s sign. I have the conversion table, so I know what number needs to be converted to what character, but I^m having problems figuring the rest out. I^m using the R&R version that is bundled with Abra Suite, version 6.17. Any suggestions?____Thanks, __KellyJ
=> RE: Fixed-width field
You could use:____left(strrep(str(number,14,2),".",""),12)-CASE(right(str(number,14,2),1),"6","F","?")____but changing the last CASE() function to include the appropriate value for the remaining 9 digits.______Kathleen__R&R Support__
==> RE: Fixed-width field
Kathleen,____Thanks for the suggestion, it gave me the output I was looking for. But I have one more twist to add to this: how do I add a substr on this expression so I get output of exactly 10 characters, regardless of if the original field was 2 or 20 in length?____Kelly