|
I was going to submit this solution then I saw the triple-do loops solution and was intimidated by its sweetness and clarity. After thinking about it though, I decided I'd post mine anyway since this solution can be a standalone sub routine. 1)Make a one character 26 element array of the alphabet. 2)define three counters CNT1, CNT2, CNT3 with an initial value of 1, and an output field FLD3. If the intial value is to begin at some specified place such as CMU then it would be trivial to do a LOKUP up in the array for each position and use the array index as the initial value for each counter. 3)write a subroutine: (set to fixed font to view) C AAA2ZZZ BEGSR * Set three indices for the array: C CNT3 IFGE 27 C ADD 1 CNT2 C Z-ADD 1 CNT3 C END C CNT2 IFGE 27 C ADD 1 CNT1 C Z-ADD 1 CNT2 C END C CNT1 IFGE 27 C Z-ADD 1 CNT1 C END * Concatenate TO fill FLD3: C MOVE *BLANKS FLD3 C AR,CNT1 CAT AR,CNT2 FLD3 C FLD3 CAT AR,CAT3 FLD3 * Add one to the right-most counter in preparation for * the next call to this sub routine. C ADD 1 CNT3 C ENDSR This method would be useful in a shop that uses traditional techniques. I didn't test it so it may have a stupid error, but the algorithm itself is suitable I think. -- ----------------------------------------------------------- boothm@ibm.net Booth Martin ----------------------------------------------------------- +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.