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



On reading this again it seems likely you are concerned that a future customer will expect his longer-than-15 field to be honored on your system.

In that case, I would look to see if you already have an auxiliary file for that file. If so, there may already be a designed solution waiting for you. In any event, I would see what "all of the programs" are that will be conditioning actions based on this field. It may well be just a few. I suspect many of the programs that use that file don't really give a whit about the customer's PO number, and so are not involved in your problem so long as you do not change the existing PO Field.

In other words, you can add your new, longer field to the end of the existing file and recompile only the programs that actually care. Another choice is that you design and add an auxiliary file, so future like-problems have a ready solution.

On 4/26/2014 7:44 AM, Steve Richter wrote:
We have an order header file that contains a PONUM field. Char(15).
But as the business expands to take on new customers sending in orders
with a PO number the 15 char limit might not be enough. The EDI 850
specs I look at say po number can be 1 - 22 characters.

The programmer who handles the RPG code with traditional F spec files
does not want to increase the field size and recompile all of the
programs.

I am thinking of a scheme where I put a special key in the char(15)
ponum field when the po number is longer than 15 characters. That
value being the key to another file that contains the actual value.

Are there any system level, DB2 features that can be used to solve this problem?

Ideal would be something where code written using RPG SQL would
function without any code changes.

d vPonum s 30a

exec sql
select a.ponum, a.shipname
into :vPonum, :vShipName
from dwhpf30c a
where a.ordnum = :inOrdnum ;

In the above code snippet, dwhpf30c is the order header. DWHPF30C is a
CRTPF created file and PONUM is a CHAR(15) field. When the value of
the PONUM field is actually more than 15 characters I need some logic
somewhere that will return the full value from where it is stored into
the char(30) program variable vPonum.

thanks,


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.