× 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.




This program is a monster and I hope to never see another request for
ranging canadian zip codes<fingers crossed>.  I've written a very small US
zip code ranging program(less than 50 lines of code), but the letters in
the canadian zip codes throws a wrench in the whole process of trying to
make the program small.  I've tried to make the program as simple and easy
to follow as possible. If someone else has a better way, be my guest, I'm
open to ideas.

Below are 2 subroutines: CHECK_6 and CHECK_56.

CHECK_6(N):  The first 5 positions of the current zipcode and the previous
zipcode match, it's easy to check if the 6th position is in sequence since
it's numeric.  Only 9 different combinations to see if the current zipcode
is in sequence with the previous zipcode.

CHECK_56(AN): Here it gets a little more complicated and longer.  There are
234 different combinations to validate the sequence of the zipcodes.  For
each letter of the alphabet there can be 9 different
comninations.(9*26=234)

As you can imagine, the combinations keep multiplying.  CHECK_456(NAN):
234*10 = 2340 combinations, CHECK_3456(ANAN): 2340*26=60,840 combinations,
CHECK_23456(NANAN): 60840*10=608,400 combinations!!!

If someone else has an easier way to shorten this code, PLEASE fill me in,
I'd certainly appreciate it.

Frank


      *
      **********************************************************************
      * CHECK_6 - S/R to Make Sure 6th Position for the Current_Zipcode
      *           is in Sequence with the 6th Position for the
      *           Previous_Zipcode.
      **********************************************************************
     C     CHECK_6       BEGSR
      /FREE
       IN_SEQUENCE = 'N';
       IF (%SUBST(SV_SZIP:6:1)='0' AND %SUBST(XN14:6:1)='1') OR
          (%SUBST(SV_SZIP:6:1)='1' AND %SUBST(XN14:6:1)='2') OR
          (%SUBST(SV_SZIP:6:1)='2' AND %SUBST(XN14:6:1)='3') OR
          (%SUBST(SV_SZIP:6:1)='3' AND %SUBST(XN14:6:1)='4') OR
          (%SUBST(SV_SZIP:6:1)='4' AND %SUBST(XN14:6:1)='5') OR
          (%SUBST(SV_SZIP:6:1)='5' AND %SUBST(XN14:6:1)='6') OR
          (%SUBST(SV_SZIP:6:1)='6' AND %SUBST(XN14:6:1)='7') OR
          (%SUBST(SV_SZIP:6:1)='7' AND %SUBST(XN14:6:1)='8') OR
          (%SUBST(SV_SZIP:6:1)='8' AND %SUBST(XN14:6:1)='9');
       IN_SEQUENCE = 'Y';
       ENDIF;
      /END-FREE
     C                   ENDSR
      *
      **********************************************************************
      * CHECK_56 - S/R to Make Sure 5,6th Position for the Current_Zipcode
      *            is in Sequence with the 5,6th Position for the
      *            Previous_Zipcode.
      **********************************************************************
     C     CHECK_56      BEGSR
      /FREE
       IN_SEQUENCE = 'N';
       IF (%SUBST(SV_SZIP:5:2)='A0' AND %SUBST(XN14:5:2)='A1') OR
          (%SUBST(SV_SZIP:5:2)='A1' AND %SUBST(XN14:5:2)='A2') OR
          (%SUBST(SV_SZIP:5:2)='A2' AND %SUBST(XN14:5:2)='A3') OR
          (%SUBST(SV_SZIP:5:2)='A3' AND %SUBST(XN14:5:2)='A4') OR
          (%SUBST(SV_SZIP:5:2)='A4' AND %SUBST(XN14:5:2)='A5') OR
          (%SUBST(SV_SZIP:5:2)='A5' AND %SUBST(XN14:5:2)='A6') OR
          (%SUBST(SV_SZIP:5:2)='A6' AND %SUBST(XN14:5:2)='A7') OR
          (%SUBST(SV_SZIP:5:2)='A7' AND %SUBST(XN14:5:2)='A8') OR
          (%SUBST(SV_SZIP:5:2)='A8' AND %SUBST(XN14:5:2)='A9') OR
          (%SUBST(SV_SZIP:5:2)='A9' AND (%SUBST(XN14:5:2)='B0' OR
                                         %SUBST(XN14:5:2)='B1') OR
          (%SUBST(SV_SZIP:5:2)='B0' AND %SUBST(XN14:5:2)='B1') OR
          (%SUBST(SV_SZIP:5:2)='B1' AND %SUBST(XN14:5:2)='B2') OR
          (%SUBST(SV_SZIP:5:2)='B2' AND %SUBST(XN14:5:2)='B3') OR
          (%SUBST(SV_SZIP:5:2)='B3' AND %SUBST(XN14:5:2)='B4') OR
          (%SUBST(SV_SZIP:5:2)='B4' AND %SUBST(XN14:5:2)='B5') OR
          (%SUBST(SV_SZIP:5:2)='B5' AND %SUBST(XN14:5:2)='B6') OR
          (%SUBST(SV_SZIP:5:2)='B6' AND %SUBST(XN14:5:2)='B7') OR
          (%SUBST(SV_SZIP:5:2)='B7' AND %SUBST(XN14:5:2)='B8') OR
          (%SUBST(SV_SZIP:5:2)='B8' AND %SUBST(XN14:5:2)='B9') OR
          (%SUBST(SV_SZIP:5:2)='B9' AND (%SUBST(XN14:5:2)='C0' OR
                                         %SUBST(XN14:5:2)='C1') OR
          (%SUBST(SV_SZIP:5:2)='C0' AND %SUBST(XN14:5:2)='C1') OR
          (%SUBST(SV_SZIP:5:2)='C1' AND %SUBST(XN14:5:2)='C2') OR
          (%SUBST(SV_SZIP:5:2)='C2' AND %SUBST(XN14:5:2)='C3') OR
          (%SUBST(SV_SZIP:5:2)='C3' AND %SUBST(XN14:5:2)='C4') OR
          (%SUBST(SV_SZIP:5:2)='C4' AND %SUBST(XN14:5:2)='C5') OR
          (%SUBST(SV_SZIP:5:2)='C5' AND %SUBST(XN14:5:2)='C6') OR
          (%SUBST(SV_SZIP:5:2)='C6' AND %SUBST(XN14:5:2)='C7') OR
          (%SUBST(SV_SZIP:5:2)='C7' AND %SUBST(XN14:5:2)='C8') OR
          (%SUBST(SV_SZIP:5:2)='C8' AND %SUBST(XN14:5:2)='C9') OR
          (%SUBST(SV_SZIP:5:2)='C9' AND (%SUBST(XN14:5:2)='D0' OR
                                         %SUBST(XN14:5:2)='D1') OR
          (%SUBST(SV_SZIP:5:2)='D0' AND %SUBST(XN14:5:2)='D1') OR
          (%SUBST(SV_SZIP:5:2)='D1' AND %SUBST(XN14:5:2)='D2') OR
          (%SUBST(SV_SZIP:5:2)='D2' AND %SUBST(XN14:5:2)='D3') OR
          (%SUBST(SV_SZIP:5:2)='D3' AND %SUBST(XN14:5:2)='D4') OR
          (%SUBST(SV_SZIP:5:2)='D4' AND %SUBST(XN14:5:2)='D5') OR
          (%SUBST(SV_SZIP:5:2)='D5' AND %SUBST(XN14:5:2)='D6') OR
          (%SUBST(SV_SZIP:5:2)='D6' AND %SUBST(XN14:5:2)='D7') OR
          (%SUBST(SV_SZIP:5:2)='D7' AND %SUBST(XN14:5:2)='D8') OR
          (%SUBST(SV_SZIP:5:2)='D8' AND %SUBST(XN14:5:2)='D9') OR
          (%SUBST(SV_SZIP:5:2)='D9' AND (%SUBST(XN14:5:2)='E0' OR
                                         %SUBST(XN14:5:2)='E1') OR
          (%SUBST(SV_SZIP:5:2)='E0' AND %SUBST(XN14:5:2)='E1') OR
          (%SUBST(SV_SZIP:5:2)='E1' AND %SUBST(XN14:5:2)='E2') OR
          (%SUBST(SV_SZIP:5:2)='E2' AND %SUBST(XN14:5:2)='E3') OR
          (%SUBST(SV_SZIP:5:2)='E3' AND %SUBST(XN14:5:2)='E4') OR
          (%SUBST(SV_SZIP:5:2)='E4' AND %SUBST(XN14:5:2)='E5') OR
          (%SUBST(SV_SZIP:5:2)='E5' AND %SUBST(XN14:5:2)='E6') OR
          (%SUBST(SV_SZIP:5:2)='E6' AND %SUBST(XN14:5:2)='E7') OR
          (%SUBST(SV_SZIP:5:2)='E7' AND %SUBST(XN14:5:2)='E8') OR
          (%SUBST(SV_SZIP:5:2)='E8' AND %SUBST(XN14:5:2)='E9') OR
          (%SUBST(SV_SZIP:5:2)='E9' AND (%SUBST(XN14:5:2)='F0' OR
                                         %SUBST(XN14:5:2)='F1') OR
          (%SUBST(SV_SZIP:5:2)='F0' AND %SUBST(XN14:5:2)='F1') OR
          (%SUBST(SV_SZIP:5:2)='F1' AND %SUBST(XN14:5:2)='F2') OR
          (%SUBST(SV_SZIP:5:2)='F2' AND %SUBST(XN14:5:2)='F3') OR
          (%SUBST(SV_SZIP:5:2)='F3' AND %SUBST(XN14:5:2)='F4') OR
          (%SUBST(SV_SZIP:5:2)='F4' AND %SUBST(XN14:5:2)='F5') OR
          (%SUBST(SV_SZIP:5:2)='F5' AND %SUBST(XN14:5:2)='F6') OR
          (%SUBST(SV_SZIP:5:2)='F6' AND %SUBST(XN14:5:2)='F7') OR
          (%SUBST(SV_SZIP:5:2)='F7' AND %SUBST(XN14:5:2)='F8') OR
          (%SUBST(SV_SZIP:5:2)='F8' AND %SUBST(XN14:5:2)='F9') OR
          (%SUBST(SV_SZIP:5:2)='F9' AND (%SUBST(XN14:5:2)='G0' OR
                                         %SUBST(XN14:5:2)='G1') OR
          (%SUBST(SV_SZIP:5:2)='G0' AND %SUBST(XN14:5:2)='G1') OR
          (%SUBST(SV_SZIP:5:2)='G1' AND %SUBST(XN14:5:2)='G2') OR
          (%SUBST(SV_SZIP:5:2)='G2' AND %SUBST(XN14:5:2)='G3') OR
          (%SUBST(SV_SZIP:5:2)='G3' AND %SUBST(XN14:5:2)='G4') OR
          (%SUBST(SV_SZIP:5:2)='G4' AND %SUBST(XN14:5:2)='G5') OR
          (%SUBST(SV_SZIP:5:2)='G5' AND %SUBST(XN14:5:2)='G6') OR
          (%SUBST(SV_SZIP:5:2)='G6' AND %SUBST(XN14:5:2)='G7') OR
          (%SUBST(SV_SZIP:5:2)='G7' AND %SUBST(XN14:5:2)='G8') OR
          (%SUBST(SV_SZIP:5:2)='G8' AND %SUBST(XN14:5:2)='G9') OR
          (%SUBST(SV_SZIP:5:2)='G9' AND (%SUBST(XN14:5:2)='H0' OR
                                         %SUBST(XN14:5:2)='H1') OR
          (%SUBST(SV_SZIP:5:2)='H0' AND %SUBST(XN14:5:2)='H1') OR
          (%SUBST(SV_SZIP:5:2)='H1' AND %SUBST(XN14:5:2)='H2') OR
          (%SUBST(SV_SZIP:5:2)='H2' AND %SUBST(XN14:5:2)='H3') OR
          (%SUBST(SV_SZIP:5:2)='H3' AND %SUBST(XN14:5:2)='H4') OR
          (%SUBST(SV_SZIP:5:2)='H4' AND %SUBST(XN14:5:2)='H5') OR
          (%SUBST(SV_SZIP:5:2)='H5' AND %SUBST(XN14:5:2)='H6') OR
          (%SUBST(SV_SZIP:5:2)='H6' AND %SUBST(XN14:5:2)='H7') OR
          (%SUBST(SV_SZIP:5:2)='H7' AND %SUBST(XN14:5:2)='H8') OR
          (%SUBST(SV_SZIP:5:2)='H8' AND %SUBST(XN14:5:2)='H9') OR
          (%SUBST(SV_SZIP:5:2)='H9' AND (%SUBST(XN14:5:2)='I0' OR
                                         %SUBST(XN14:5:2)='I1') OR
          (%SUBST(SV_SZIP:5:2)='I0' AND %SUBST(XN14:5:2)='I1') OR
          (%SUBST(SV_SZIP:5:2)='I1' AND %SUBST(XN14:5:2)='I2') OR
          (%SUBST(SV_SZIP:5:2)='I2' AND %SUBST(XN14:5:2)='I3') OR
          (%SUBST(SV_SZIP:5:2)='I3' AND %SUBST(XN14:5:2)='I4') OR
          (%SUBST(SV_SZIP:5:2)='I4' AND %SUBST(XN14:5:2)='I5') OR
          (%SUBST(SV_SZIP:5:2)='I5' AND %SUBST(XN14:5:2)='I6') OR
          (%SUBST(SV_SZIP:5:2)='I6' AND %SUBST(XN14:5:2)='I7') OR
          (%SUBST(SV_SZIP:5:2)='I7' AND %SUBST(XN14:5:2)='I8') OR
          (%SUBST(SV_SZIP:5:2)='I8' AND %SUBST(XN14:5:2)='I9') OR
          (%SUBST(SV_SZIP:5:2)='I9' AND (%SUBST(XN14:5:2)='J0' OR
                                         %SUBST(XN14:5:2)='J1') OR
          (%SUBST(SV_SZIP:5:2)='J0' AND %SUBST(XN14:5:2)='J1') OR
          (%SUBST(SV_SZIP:5:2)='J1' AND %SUBST(XN14:5:2)='J2') OR
          (%SUBST(SV_SZIP:5:2)='J2' AND %SUBST(XN14:5:2)='J3') OR
          (%SUBST(SV_SZIP:5:2)='J3' AND %SUBST(XN14:5:2)='J4') OR
          (%SUBST(SV_SZIP:5:2)='J4' AND %SUBST(XN14:5:2)='J5') OR
          (%SUBST(SV_SZIP:5:2)='J5' AND %SUBST(XN14:5:2)='J6') OR
          (%SUBST(SV_SZIP:5:2)='J6' AND %SUBST(XN14:5:2)='J7') OR
          (%SUBST(SV_SZIP:5:2)='J7' AND %SUBST(XN14:5:2)='J8') OR
          (%SUBST(SV_SZIP:5:2)='J8' AND %SUBST(XN14:5:2)='J9') OR
          (%SUBST(SV_SZIP:5:2)='J9' AND (%SUBST(XN14:5:2)='K0' OR
                                         %SUBST(XN14:5:2)='K1') OR
          (%SUBST(SV_SZIP:5:2)='K0' AND %SUBST(XN14:5:2)='K1') OR
          (%SUBST(SV_SZIP:5:2)='K1' AND %SUBST(XN14:5:2)='K2') OR
          (%SUBST(SV_SZIP:5:2)='K2' AND %SUBST(XN14:5:2)='K3') OR
          (%SUBST(SV_SZIP:5:2)='K3' AND %SUBST(XN14:5:2)='K4') OR
          (%SUBST(SV_SZIP:5:2)='K4' AND %SUBST(XN14:5:2)='K5') OR
          (%SUBST(SV_SZIP:5:2)='K5' AND %SUBST(XN14:5:2)='K6') OR
          (%SUBST(SV_SZIP:5:2)='K6' AND %SUBST(XN14:5:2)='K7') OR
          (%SUBST(SV_SZIP:5:2)='K7' AND %SUBST(XN14:5:2)='K8') OR
          (%SUBST(SV_SZIP:5:2)='K8' AND %SUBST(XN14:5:2)='K9') OR
          (%SUBST(SV_SZIP:5:2)='K9' AND (%SUBST(XN14:5:2)='L0' OR
                                         %SUBST(XN14:5:2)='L1') OR
          (%SUBST(SV_SZIP:5:2)='L0' AND %SUBST(XN14:5:2)='L1') OR
          (%SUBST(SV_SZIP:5:2)='L1' AND %SUBST(XN14:5:2)='L2') OR
          (%SUBST(SV_SZIP:5:2)='L2' AND %SUBST(XN14:5:2)='L3') OR
          (%SUBST(SV_SZIP:5:2)='L3' AND %SUBST(XN14:5:2)='L4') OR
          (%SUBST(SV_SZIP:5:2)='L4' AND %SUBST(XN14:5:2)='L5') OR
          (%SUBST(SV_SZIP:5:2)='L5' AND %SUBST(XN14:5:2)='L6') OR
          (%SUBST(SV_SZIP:5:2)='L6' AND %SUBST(XN14:5:2)='L7') OR
          (%SUBST(SV_SZIP:5:2)='L7' AND %SUBST(XN14:5:2)='L8') OR
          (%SUBST(SV_SZIP:5:2)='L8' AND %SUBST(XN14:5:2)='L9') OR
          (%SUBST(SV_SZIP:5:2)='L9' AND (%SUBST(XN14:5:2)='M0' OR
                                         %SUBST(XN14:5:2)='M1') OR
          (%SUBST(SV_SZIP:5:2)='M0' AND %SUBST(XN14:5:2)='M1') OR
          (%SUBST(SV_SZIP:5:2)='M1' AND %SUBST(XN14:5:2)='M2') OR
          (%SUBST(SV_SZIP:5:2)='M2' AND %SUBST(XN14:5:2)='M3') OR
          (%SUBST(SV_SZIP:5:2)='M3' AND %SUBST(XN14:5:2)='M4') OR
          (%SUBST(SV_SZIP:5:2)='M4' AND %SUBST(XN14:5:2)='M5') OR
          (%SUBST(SV_SZIP:5:2)='M5' AND %SUBST(XN14:5:2)='M6') OR
          (%SUBST(SV_SZIP:5:2)='M6' AND %SUBST(XN14:5:2)='M7') OR
          (%SUBST(SV_SZIP:5:2)='M7' AND %SUBST(XN14:5:2)='M8') OR
          (%SUBST(SV_SZIP:5:2)='M8' AND %SUBST(XN14:5:2)='M9') OR
          (%SUBST(SV_SZIP:5:2)='M9' AND (%SUBST(XN14:5:2)='N0' OR
                                         %SUBST(XN14:5:2)='N1') OR
          (%SUBST(SV_SZIP:5:2)='N0' AND %SUBST(XN14:5:2)='N1') OR
          (%SUBST(SV_SZIP:5:2)='N1' AND %SUBST(XN14:5:2)='N2') OR
          (%SUBST(SV_SZIP:5:2)='N2' AND %SUBST(XN14:5:2)='N3') OR
          (%SUBST(SV_SZIP:5:2)='N3' AND %SUBST(XN14:5:2)='N4') OR
          (%SUBST(SV_SZIP:5:2)='N4' AND %SUBST(XN14:5:2)='N5') OR
          (%SUBST(SV_SZIP:5:2)='N5' AND %SUBST(XN14:5:2)='N6') OR
          (%SUBST(SV_SZIP:5:2)='N6' AND %SUBST(XN14:5:2)='N7') OR
          (%SUBST(SV_SZIP:5:2)='N7' AND %SUBST(XN14:5:2)='N8') OR
          (%SUBST(SV_SZIP:5:2)='N8' AND %SUBST(XN14:5:2)='N9') OR
          (%SUBST(SV_SZIP:5:2)='N9' AND (%SUBST(XN14:5:2)='O0' OR
                                         %SUBST(XN14:5:2)='O1') OR
          (%SUBST(SV_SZIP:5:2)='O0' AND %SUBST(XN14:5:2)='O1') OR
          (%SUBST(SV_SZIP:5:2)='O1' AND %SUBST(XN14:5:2)='O2') OR
          (%SUBST(SV_SZIP:5:2)='O2' AND %SUBST(XN14:5:2)='O3') OR
          (%SUBST(SV_SZIP:5:2)='O3' AND %SUBST(XN14:5:2)='O4') OR
          (%SUBST(SV_SZIP:5:2)='O4' AND %SUBST(XN14:5:2)='O5') OR
          (%SUBST(SV_SZIP:5:2)='O5' AND %SUBST(XN14:5:2)='O6') OR
          (%SUBST(SV_SZIP:5:2)='O6' AND %SUBST(XN14:5:2)='O7') OR
          (%SUBST(SV_SZIP:5:2)='O7' AND %SUBST(XN14:5:2)='O8') OR
          (%SUBST(SV_SZIP:5:2)='O8' AND %SUBST(XN14:5:2)='O9') OR
          (%SUBST(SV_SZIP:5:2)='O9' AND (%SUBST(XN14:5:2)='P0' OR
                                         %SUBST(XN14:5:2)='P1') OR
          (%SUBST(SV_SZIP:5:2)='P0' AND %SUBST(XN14:5:2)='P1') OR
          (%SUBST(SV_SZIP:5:2)='P1' AND %SUBST(XN14:5:2)='P2') OR
          (%SUBST(SV_SZIP:5:2)='P2' AND %SUBST(XN14:5:2)='P3') OR
          (%SUBST(SV_SZIP:5:2)='P3' AND %SUBST(XN14:5:2)='P4') OR
          (%SUBST(SV_SZIP:5:2)='P4' AND %SUBST(XN14:5:2)='P5') OR
          (%SUBST(SV_SZIP:5:2)='P5' AND %SUBST(XN14:5:2)='P6') OR
          (%SUBST(SV_SZIP:5:2)='P6' AND %SUBST(XN14:5:2)='P7') OR
          (%SUBST(SV_SZIP:5:2)='P7' AND %SUBST(XN14:5:2)='P8') OR
          (%SUBST(SV_SZIP:5:2)='P8' AND %SUBST(XN14:5:2)='P9') OR
          (%SUBST(SV_SZIP:5:2)='P9' AND (%SUBST(XN14:5:2)='Q0' OR
                                         %SUBST(XN14:5:2)='Q1') OR
          (%SUBST(SV_SZIP:5:2)='Q0' AND %SUBST(XN14:5:2)='Q1') OR
          (%SUBST(SV_SZIP:5:2)='Q1' AND %SUBST(XN14:5:2)='Q2') OR
          (%SUBST(SV_SZIP:5:2)='Q2' AND %SUBST(XN14:5:2)='Q3') OR
          (%SUBST(SV_SZIP:5:2)='Q3' AND %SUBST(XN14:5:2)='Q4') OR
          (%SUBST(SV_SZIP:5:2)='Q4' AND %SUBST(XN14:5:2)='Q5') OR
          (%SUBST(SV_SZIP:5:2)='Q5' AND %SUBST(XN14:5:2)='Q6') OR
          (%SUBST(SV_SZIP:5:2)='Q6' AND %SUBST(XN14:5:2)='Q7') OR
          (%SUBST(SV_SZIP:5:2)='Q7' AND %SUBST(XN14:5:2)='Q8') OR
          (%SUBST(SV_SZIP:5:2)='Q8' AND %SUBST(XN14:5:2)='Q9') OR
          (%SUBST(SV_SZIP:5:2)='Q9' AND (%SUBST(XN14:5:2)='R0' OR
                                         %SUBST(XN14:5:2)='R1') OR
          (%SUBST(SV_SZIP:5:2)='R0' AND %SUBST(XN14:5:2)='R1') OR
          (%SUBST(SV_SZIP:5:2)='R1' AND %SUBST(XN14:5:2)='R2') OR
          (%SUBST(SV_SZIP:5:2)='R2' AND %SUBST(XN14:5:2)='R3') OR
          (%SUBST(SV_SZIP:5:2)='R3' AND %SUBST(XN14:5:2)='R4') OR
          (%SUBST(SV_SZIP:5:2)='R4' AND %SUBST(XN14:5:2)='R5') OR
          (%SUBST(SV_SZIP:5:2)='R5' AND %SUBST(XN14:5:2)='R6') OR
          (%SUBST(SV_SZIP:5:2)='R6' AND %SUBST(XN14:5:2)='R7') OR
          (%SUBST(SV_SZIP:5:2)='R7' AND %SUBST(XN14:5:2)='R8') OR
          (%SUBST(SV_SZIP:5:2)='R8' AND %SUBST(XN14:5:2)='R9') OR
          (%SUBST(SV_SZIP:5:2)='R9' AND (%SUBST(XN14:5:2)='S0' OR
                                         %SUBST(XN14:5:2)='S1') OR
          (%SUBST(SV_SZIP:5:2)='S0' AND %SUBST(XN14:5:2)='S1') OR
          (%SUBST(SV_SZIP:5:2)='S1' AND %SUBST(XN14:5:2)='S2') OR
          (%SUBST(SV_SZIP:5:2)='S2' AND %SUBST(XN14:5:2)='S3') OR
          (%SUBST(SV_SZIP:5:2)='S3' AND %SUBST(XN14:5:2)='S4') OR
          (%SUBST(SV_SZIP:5:2)='S4' AND %SUBST(XN14:5:2)='S5') OR
          (%SUBST(SV_SZIP:5:2)='S5' AND %SUBST(XN14:5:2)='S6') OR
          (%SUBST(SV_SZIP:5:2)='S6' AND %SUBST(XN14:5:2)='S7') OR
          (%SUBST(SV_SZIP:5:2)='S7' AND %SUBST(XN14:5:2)='S8') OR
          (%SUBST(SV_SZIP:5:2)='S8' AND %SUBST(XN14:5:2)='S9') OR
          (%SUBST(SV_SZIP:5:2)='S9' AND (%SUBST(XN14:5:2)='T0' OR
                                         %SUBST(XN14:5:2)='T1') OR
          (%SUBST(SV_SZIP:5:2)='T0' AND %SUBST(XN14:5:2)='T1') OR
          (%SUBST(SV_SZIP:5:2)='T1' AND %SUBST(XN14:5:2)='T2') OR
          (%SUBST(SV_SZIP:5:2)='T2' AND %SUBST(XN14:5:2)='T3') OR
          (%SUBST(SV_SZIP:5:2)='T3' AND %SUBST(XN14:5:2)='T4') OR
          (%SUBST(SV_SZIP:5:2)='T4' AND %SUBST(XN14:5:2)='T5') OR
          (%SUBST(SV_SZIP:5:2)='T5' AND %SUBST(XN14:5:2)='T6') OR
          (%SUBST(SV_SZIP:5:2)='T6' AND %SUBST(XN14:5:2)='T7') OR
          (%SUBST(SV_SZIP:5:2)='T7' AND %SUBST(XN14:5:2)='T8') OR
          (%SUBST(SV_SZIP:5:2)='T8' AND %SUBST(XN14:5:2)='T9') OR
          (%SUBST(SV_SZIP:5:2)='T9' AND (%SUBST(XN14:5:2)='U0' OR
                                         %SUBST(XN14:5:2)='U1') OR
          (%SUBST(SV_SZIP:5:2)='U0' AND %SUBST(XN14:5:2)='U1') OR
          (%SUBST(SV_SZIP:5:2)='U1' AND %SUBST(XN14:5:2)='U2') OR
          (%SUBST(SV_SZIP:5:2)='U2' AND %SUBST(XN14:5:2)='U3') OR
          (%SUBST(SV_SZIP:5:2)='U3' AND %SUBST(XN14:5:2)='U4') OR
          (%SUBST(SV_SZIP:5:2)='U4' AND %SUBST(XN14:5:2)='U5') OR
          (%SUBST(SV_SZIP:5:2)='U5' AND %SUBST(XN14:5:2)='U6') OR
          (%SUBST(SV_SZIP:5:2)='U6' AND %SUBST(XN14:5:2)='U7') OR
          (%SUBST(SV_SZIP:5:2)='U7' AND %SUBST(XN14:5:2)='U8') OR
          (%SUBST(SV_SZIP:5:2)='U8' AND %SUBST(XN14:5:2)='U9') OR
          (%SUBST(SV_SZIP:5:2)='U9' AND (%SUBST(XN14:5:2)='V0' OR
                                         %SUBST(XN14:5:2)='V1') OR
          (%SUBST(SV_SZIP:5:2)='V0' AND %SUBST(XN14:5:2)='V1') OR
          (%SUBST(SV_SZIP:5:2)='V1' AND %SUBST(XN14:5:2)='V2') OR
          (%SUBST(SV_SZIP:5:2)='V2' AND %SUBST(XN14:5:2)='V3') OR
          (%SUBST(SV_SZIP:5:2)='V3' AND %SUBST(XN14:5:2)='V4') OR
          (%SUBST(SV_SZIP:5:2)='V4' AND %SUBST(XN14:5:2)='V5') OR
          (%SUBST(SV_SZIP:5:2)='V5' AND %SUBST(XN14:5:2)='V6') OR
          (%SUBST(SV_SZIP:5:2)='V6' AND %SUBST(XN14:5:2)='V7') OR
          (%SUBST(SV_SZIP:5:2)='V7' AND %SUBST(XN14:5:2)='V8') OR
          (%SUBST(SV_SZIP:5:2)='V8' AND %SUBST(XN14:5:2)='V9') OR
          (%SUBST(SV_SZIP:5:2)='V9' AND (%SUBST(XN14:5:2)='W0' OR
                                         %SUBST(XN14:5:2)='W1') OR
          (%SUBST(SV_SZIP:5:2)='W0' AND %SUBST(XN14:5:2)='W1') OR
          (%SUBST(SV_SZIP:5:2)='W1' AND %SUBST(XN14:5:2)='W2') OR
          (%SUBST(SV_SZIP:5:2)='W2' AND %SUBST(XN14:5:2)='W3') OR
          (%SUBST(SV_SZIP:5:2)='W3' AND %SUBST(XN14:5:2)='W4') OR
          (%SUBST(SV_SZIP:5:2)='W4' AND %SUBST(XN14:5:2)='W5') OR
          (%SUBST(SV_SZIP:5:2)='W5' AND %SUBST(XN14:5:2)='W6') OR
          (%SUBST(SV_SZIP:5:2)='W6' AND %SUBST(XN14:5:2)='W7') OR
          (%SUBST(SV_SZIP:5:2)='W7' AND %SUBST(XN14:5:2)='W8') OR
          (%SUBST(SV_SZIP:5:2)='W8' AND %SUBST(XN14:5:2)='W9') OR
          (%SUBST(SV_SZIP:5:2)='W9' AND (%SUBST(XN14:5:2)='X0' OR
                                         %SUBST(XN14:5:2)='X1') OR
          (%SUBST(SV_SZIP:5:2)='X0' AND %SUBST(XN14:5:2)='X1') OR
          (%SUBST(SV_SZIP:5:2)='X1' AND %SUBST(XN14:5:2)='X2') OR
          (%SUBST(SV_SZIP:5:2)='X2' AND %SUBST(XN14:5:2)='X3') OR
          (%SUBST(SV_SZIP:5:2)='X3' AND %SUBST(XN14:5:2)='X4') OR
          (%SUBST(SV_SZIP:5:2)='X4' AND %SUBST(XN14:5:2)='X5') OR
          (%SUBST(SV_SZIP:5:2)='X5' AND %SUBST(XN14:5:2)='X6') OR
          (%SUBST(SV_SZIP:5:2)='X6' AND %SUBST(XN14:5:2)='X7') OR
          (%SUBST(SV_SZIP:5:2)='X7' AND %SUBST(XN14:5:2)='X8') OR
          (%SUBST(SV_SZIP:5:2)='X8' AND %SUBST(XN14:5:2)='X9') OR
          (%SUBST(SV_SZIP:5:2)='X9' AND (%SUBST(XN14:5:2)='Y0' OR
                                         %SUBST(XN14:5:2)='Y1') OR
          (%SUBST(SV_SZIP:5:2)='Y0' AND %SUBST(XN14:5:2)='Y1') OR
          (%SUBST(SV_SZIP:5:2)='Y1' AND %SUBST(XN14:5:2)='Y2') OR
          (%SUBST(SV_SZIP:5:2)='Y2' AND %SUBST(XN14:5:2)='Y3') OR
          (%SUBST(SV_SZIP:5:2)='Y3' AND %SUBST(XN14:5:2)='Y4') OR
          (%SUBST(SV_SZIP:5:2)='Y4' AND %SUBST(XN14:5:2)='Y5') OR
          (%SUBST(SV_SZIP:5:2)='Y5' AND %SUBST(XN14:5:2)='Y6') OR
          (%SUBST(SV_SZIP:5:2)='Y6' AND %SUBST(XN14:5:2)='Y7') OR
          (%SUBST(SV_SZIP:5:2)='Y7' AND %SUBST(XN14:5:2)='Y8') OR
          (%SUBST(SV_SZIP:5:2)='Y8' AND %SUBST(XN14:5:2)='Y9') OR
          (%SUBST(SV_SZIP:5:2)='Y9' AND (%SUBST(XN14:5:2)='Z0' OR
                                         %SUBST(XN14:5:2)='Z1') OR
          (%SUBST(SV_SZIP:5:2)='Z0' AND %SUBST(XN14:5:2)='Z1') OR
          (%SUBST(SV_SZIP:5:2)='Z1' AND %SUBST(XN14:5:2)='Z2') OR
          (%SUBST(SV_SZIP:5:2)='Z2' AND %SUBST(XN14:5:2)='Z3') OR
          (%SUBST(SV_SZIP:5:2)='Z3' AND %SUBST(XN14:5:2)='Z4') OR
          (%SUBST(SV_SZIP:5:2)='Z4' AND %SUBST(XN14:5:2)='Z5') OR
          (%SUBST(SV_SZIP:5:2)='Z5' AND %SUBST(XN14:5:2)='Z6') OR
          (%SUBST(SV_SZIP:5:2)='Z6' AND %SUBST(XN14:5:2)='Z7') OR
          (%SUBST(SV_SZIP:5:2)='Z7' AND %SUBST(XN14:5:2)='Z8') OR
          (%SUBST(SV_SZIP:5:2)='Z8' AND %SUBST(XN14:5:2)='Z9');
       IN_SEQUENCE = 'Y';
       ENDIF;
      /END-FREE
     C                   ENDSR





"Dan Bale" <dbale@xxxxxxxxxxxxx>@midrange.com on 10/19/2004 12:37:29 PM

Please respond to RPG programming on the AS400 / iSeries
       <rpg400-l@xxxxxxxxxxxx>

Sent by:    rpg400-l-bounces@xxxxxxxxxxxx


To:    "RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx>
cc:

Subject:    RE: Trivia: How many lines of code are allowed in an RPG
       Program?


Buck, you are enough of a luminary <g>, and you ask a fair question.  It,
and my response to it, was omitted from my original post for brevity
because, as you know, this can easily turn into a topic of holy war
proportions.  However, since you have dangled the carrot...

Yes, time is money.  Who wants to spend a week (plus) dismantling a program
so that you understand what is going on and then writing new from scratch?
Assuming you're even given the option.  How often is such a program
modified?  If this were a one-time shot, I might swallow pride and just
change the constant or add code that is completely isolated.  What type of
app, and how critical to the operation of the organization is it?  Payroll?
Year end financials?  Do I get a company-issued flame suit when it goes
into
production?

If you want to talk about costs, how about the cost of properly testing the
modified program?  Frank, you *are* testing this, right?  How will you know
what to test, to ensure that your modifications don't MAKEAMESS of
something?

It would be bad enough if this is 4GL source, but 32k lines?!?!?  You want
to talk about the risk of writing from scratch?  I have had to modify a few
Synon programs in my career, nowhere near the 32k lines, but horrendously
difficult and complex anyway you slice it.  No documentation, no
(meaningful) comments.  Such a program would just about be an automatic
write from scratch candidate.

I know, I know, I sit from an ivory tower in this post.  In real life I may
well be told to modify something ugly like this and I can yell & protest
all
I want, but if I want to continue getting a paycheck...  But, I *would*
yell
& protest.  ("yell" = "speak firmly")

db




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.