I've following lines in a file and I need to suffixed with "E" to the 2nd field if the length of 2nd field is greater then 7 digits.
For Example:
MTR16016002001000000000000000OA 2100670 000000000010000000100470000000NN NNE 000 E0000001
change to
MTR16016002001000000000000000OA 2100670E 000000000010000000100470000000NN NNE 000 E0000001
If the 2nd field is less then 7 digits in length, they need to be prefixed with a zero and suffixed with an E
For Example:
MTR16016003001000000000000000CA 2980 000000000590000005900000000000NN NNE 000 E0000001R
change to
MTR16016003001000000000000000CA 0002980E 000000000590000005900000000000NN NNE 000 E0000001R
Thanks for the pointers
For Example:
MTR16016002001000000000000000OA 2100670 000000000010000000100470000000NN NNE 000 E0000001
change to
MTR16016002001000000000000000OA 2100670E 000000000010000000100470000000NN NNE 000 E0000001
If the 2nd field is less then 7 digits in length, they need to be prefixed with a zero and suffixed with an E
For Example:
MTR16016003001000000000000000CA 2980 000000000590000005900000000000NN NNE 000 E0000001R
change to
MTR16016003001000000000000000CA 0002980E 000000000590000005900000000000NN NNE 000 E0000001R
Thanks for the pointers