No, a read trigger is available only after the read so you can't alter the buffer returned to the program
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Roger Harman
Sent: Sunday, 27 April 2014 9:13 a.m.
To: 'Midrange Systems Technical Discussion'
Subject: RE: how to increase field size without increasing the field size
Perhaps a read trigger?
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Steve Richter
Sent: Saturday, April 26, 2014 5:45 AM
To: Midrange Systems Technical Discussion
Subject: how to increase field size without increasing the field size
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,
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at
http://archive.midrange.com/midrange-l.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at
http://archive.midrange.com/midrange-l.
#####################################################################################
This correspondence is for the named person's use only. It may contain confidential
or legally privileged information, or both. No confidentiality or privilege is waived
or lost by any mistransmission. If you receive this correspondence in error, please
immediately delete it from your system and notify the sender. You must not disclose,
copy or rely on any part of this correspondence if you are not the intended recipient.
Any views expressed in this message are those of the individual sender, except where
the sender expressly, and with authority, states them to be the views of Veda.
If you need assistance, please contact Veda on either :-
Australia customerassistance@xxxxxxxxxxx or New Zealand +64 9 367 6200
As an Amazon Associate we earn from qualifying purchases.