|
From: Douglas Palme Here is the delimna, I need to move the value to a 7 digit numeric. It is possible that it can have anywhere from 1 to seven digits. Example: '116769 ' - Charcter value
The problem is that the field is left-justified and zero-suppressed (at least that's how it appears). Without a trim() function, the best you can do is to use a loop to find the index of the last digit and then use that index to do a MOVEA into an array pre-filled with zero. For example, the index of the last digit is 6. You want to do fill an array of seven positions with zeros, then do a MOVEA of the field to position 2 of the array. Your target index will be (8-IL), where IL is the index of the last digit. This will work no matter the number of digits (provided there are between 1 and 7 digits). Joe
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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.