|
|
I often have sent this edit to people to solve the problem with zero fill/right justify. filePro has an edit called "rj0" it will do the following: I will simulate the data between quotes to help you visualize position. "1 " - I type the data like this and press ENTER - the edit will change it to " 1" " 1" - I type the data like this and press ENTER - the edit will change it to "00001" Now since I use this in a data entry mode to right justify and zero pad, it was not helpful to make the edit process twice to get results. So I developed the following edit. This will work the first time. rj1 \ N | <"0"> rj2 \ N N | <0> rj1 rj3 \ N N N | <0> rj2 rj4 \ N N N N | <0> rj3 rj5 \ N N N N N | <0> rj4 rj6 \ N N N N N N | <0> rj5 rj7 \ N N N N N N N | <0> rj6 rj8 \ N N N N N N N N | <0> rj7 rj9 \ N N N N N N N N N | <0> rj8 rj10 \ N N N N N N N N N N | <0> rj9 rj11 \ N N N N N N N N N N N | <0> rj10 Add the lines to your edit table. Then use the correct edit for the length of the field. For example, if the field length is 5 use the edit called rj5. Add more lines in the same pattern if you need a longer field. This tip posted on October 9, 1998 by Nancy Palmquist. Your comments and suggestions are gratefully accepted. If no one is reading this, I will direct my efforts elsewhere, so let me know if you are finding this helpful. I will be looking for topics that can be covered in a page or two to use for future tips. |