|
You know, since this is the RPG list, I would have to say that, using RPG to do this task would be all but remedial, especially compared to the caffeine-induced example I gave (BTW, the outer CASE statements should use a 'ELSE' rather than a comma *twitch*). You could simply open up the file, read by key (hopefully this would be keyed by phone#, phoneext#), and set up a loop that detects change in key, writes each customer's ph# and ext#, and first feature code, then for subsequent recs for the cust, writes to the next feature code field in the output file. Read file; Dow Not %EOF(File); If Phone#<>PhoneHold Or PhoneExt#<>Ext#Hold; If OF.Phone#<>0; Write outfile OF; EndIf; Eval OF.Phone#=Phone#; Eval OF.PhoneExt#=PhoneExt#; Eval OF.Feat1=*Blanks; Eval OF.Feat2=*Blanks; Eval OF.Feat3=*Blanks; Eval OF.Feat4=*Blanks; Eval OF.Feat5=*Blanks; Eval PhoneHold=Phone#; Eval Ext#Hold=PhoneExt#; EndIf; Select; When OF.Feat1=*Blanks; OF.Feat1=Feature; When OF.Feat2=*Blanks; OF.Feat2=Feature; When OF.Feat3=*Blanks; OF.Feat3=Feature; When OF.Feat4=*Blanks; OF.Feat4=Feature; When OF.Feat5=*Blanks; OF.Feat5=Feature; EndSL; Read file; EndDo; -- "Enter any 11-digit prime number to continue..."
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.