* http://www.cobug.com/cobug/forums/cobolLang/130.shtml
*I am tasked with sorting an inputfile via an account
* number. This account number isnotnumeric, it is
* alpha numeric. It contains numbers only but can also
* have letters (in most cases). When I sortby acct
* nbr, the sortis incorrect because acct nbrs that
* aregreaterthan others arenotin the correct
* places. Is there a way for me tosort correctly
* by just the numbers in the account number while
* ignoring the letters?
* The acct nbr can show up like the following
* examples:
*Message:
* If the account number is an alpha field, you can
* check for numberics fir SD SortFile.
01 Sort-record.
05 sr-account-nbr-key pic 9(12).
05 sr-account-nbr-x pic x(12).
readrecord. move in-acct to ws-account-nbr. if in-account-nbr numeric move ws-account-nbr-n to sr-account-nbr-key else perform 0000-handle-alpha.
0000-handle-alpha. movespacesto ws-account-nbr. perform 0000-build-sort-key varying sub from 1 by 1 until sub > 12 or in-acct-entry(sub) numeric.
move ws-account-nbr-n to sr-account-nbr-key.
0000-build-sort-key. move in-acct-entry(sub) to ws-acct-entry(sub).
Messung V0.5
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.1Bemerkung:
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.