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



Since nobody else has mentioned it, problem one (imo) is the design of
your order file. Ideally, you should normalize your database so that
each record in order detail represents one item. Jim's suggestion for a
pick-sort field is a good one, allowing you to support alternative
picking methodologies....

JMO,
Eric DeLong

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Adam West
Sent: Wednesday, December 03, 2008 8:58 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re-ordering fields in a PF

HI Yesterday problems were solved thank you!

OK, I have this file that is a customer order file, with each record
holding up to 5 items. Currently, some of the items are free, that is,
you buy a certain $ amount, you get a choice of a free item from 2 model
groups. There is also a 'discount code' of 0002.

When it prints as an invoice (which is actually used as the pick
ticket), it shows by the 5 items ordered in the file, item1, item2, etc.

The packers would like to see the free items at the end rather than at
the begining. It so happens that the models for free are low order,
altho not the lowest, we have some that start with A. so they come first
but in most cased the free items, are listed first.

The reason they want this order is that when they are printed they can
simply tear off the first say 40 pages are a certain model type etc.

Orignially this print program printed by invoice number and I was able
enhance this to at least print by model number which is fine except for
the free ones.

I tried putting in matching dummy fields in the file and putting a Z in
front of the free ones, but this did not work bec. the order comes out
in the program as item1, item2.etc

Now I am thinking the only way is to re-order the item1-5. If I have a
free one, put it last.

But I am not sure of the best coding technique to do this. I have a
hokey idea which is usually not the best way.



--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.