|
Below are actual zip codes in the input file. Notice how the zip codes are sorted in the input file. All the zip codes listed are for the same city. The 5th position contains the letters A-G. The letters D and F are missing. The program should range/group these records as follows: T4A1A1 - T4A1C9 (E was skipped because E does not come directly after C in the alphabet) T4A1E0 - T4A1E9 T4A1G0 - T4A1G9 Input File: ================================= T4A1A1 T4A1A2 T4A1A3 T4A1A4 T4A1A5 T4A1A6 T4A1A7 T4A1A8 T4A1A9 T4A1B0 T4A1B1 T4A1B2 T4A1B3 T4A1B4 T4A1B5 T4A1B6 T4A1B7 T4A1B8 T4A1B9 T4A1C0 T4A1C1 T4A1C2 T4A1C3 T4A1C4 T4A1C5 T4A1C6 T4A1C7 T4A1C8 T4A1C9 T4A1E0 T4A1E1 T4A1E2 T4A1E3 T4A1E4 T4A1E5 T4A1E6 T4A1E7 T4A1E8 T4A1E9 T4A1G0 T4A1G1 T4A1G2 T4A1G3 T4A1G4 T4A1G5 T4A1G6 T4A1G7 T4A1G8 T4A1G9 "Gary Bowers" <gwbowers@xxxxxxxxxxxxx>@midrange.com on 10/20/2004 09:15:51 AM Please respond to RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> Sent by: rpg400-l-bounces@xxxxxxxxxxxx To: <rpg400-l@xxxxxxxxxxxx> cc: Subject: How many lines of code are allowed in an RPG programs? (verifying what output file SHOULD contain) Hey Frank, shouldn't output be like this for the following data??? 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 - T4A1A3 <<< CITY4 T4A1B1 - T4A1B3 <<< CITY4 T4A1D1 - T4A1D3 <<< Your original output file showed this: CITY1 T0B0Z0 - 000000 CITY2 T0A0A0 - 000000 CITY3 T0A0C0 - 000000 CITY4 T4A1A1 - T4A1B3 (compare w/records for CITY4 above) CITY4 T4A1D1 - T4A1D3 (compare w/records for CITY4 above) Or I may have really missed something important. (Wouldn't be the first time) Let us know. Thanks -G
As an Amazon Associate we earn from qualifying purchases.
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.