× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Frank,

  One way would be to write each of your 608,400 combinations into a data
file, (in sequential order of course) then chain to the record and see if
the record number is one more than the last one.

~~~~~~~~~~~~~~~~~~~~

Another way would be to only check one character at a time.   
First determine how many characters you need to check.
  i.e.

  Select;
  When zip1.first5chars = zip2.first5chars;
    charsToCheck = 6;
  When zip1.first4chars = zip2.first4chars;
    CharsToCheck = 5;
  Ect

  EndSelect;

  Exsr Check Chars;


  BegSR Chars;
    For I = CharsToCheck to 6;
      // perhaps you know, but since I don't I have to check to see if this
// is a numeric column or character.
      // then do a lookup on the zip1 column and the zip2 column.
      If result2 - result1 = 1
        // see footnote*
        Do your processing;
      Else;
        Not in order;
      EndIf;
    EndFor;
  EndSr;

*  I was going to say that you'd have to check for a change from 9 to 0 or
from Z to A, but now that I think about it, whenever that happens, in order
for it to be in sequence there should have been a change in the previous
column.  You should only have to actually check one column for in-sequence.
Every following column should be a rollover (9-0 or Z-A) and if it isn't,
then the records aren't in sequence.

Unless, of course, some zip codes are skipped.  
~~~~~~~~~~~~~~


        Duane Johnson
        Information Technology Services
        Programming Manager
        Coleman Powermate Inc.
        4970 Airport Rd.
        Kearney, NE 68847
        djohnson@xxxxxxxxxxxxx

-----Original Message-----
From: fkany@xxxxxxxxxxxxxxxxxx [mailto:fkany@xxxxxxxxxxxxxxxxxx] 
Sent: Tuesday, October 19, 2004 1:12 PM
To: CN=RPG programming on the AS400/O=iSeries
Subject: RE: Trivia: How many lines of code are allowed in an RPG Program?





As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.