Dan,

I'm trying to group/range Canadian zip codes.

Here's how I want to range the Canadian zip codes:
Program reads an Input file similar to this(zip codes are real, city1-city4
do not exist ;-):
CITY1       T0B0Z0
CITY2       T0A0A0
CITY3       T0A0C0
CITY4       T4A1A1
CITY4       T4A1A2
CITY4       T4A1A3
CITY4       T4A1B1
CITY4       T4A1B2
CITY4       T4A1B3
CITY4       T4A1D1
CITY4       T4A1D2
CITY4       T4A1D3

Output file:
Program needs to group/range the zip codes like this:
CITY1       T0B0Z0 - 000000
CITY2       T0A0A0 - 000000
CITY3       T0A0C0 - 000000
CITY4       T4A1A1 - T4A1B3
CITY4       T4A1D1 - T4A1D3

Frank






"Dan Bale" <dbale@xxxxxxxxxxxxx>@midrange.com on 10/19/2004 01:51:37 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?


Frank, far be it from me to steal your joy.  <g,d,&r>

Dang those Canadiens, eh?

I won't even begin to guess how this can be shortened.  Typically, when I
look at a complex problem like this, I get a long continuous scrap of green
bar and sketch out scenarios.  I did this with my fanciful "subset sum
problem" that I detailed here last month.

I think I remember you mentioning this particular problem not too long ago.
I checked the archives and couldn't find it.  Could you either restate the
problem or provide an archive link?  Just looking at the code you provided
doesn't tell me what you're trying to accomplish.

There's gotta be a way.

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.