MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » April 2014

Re: how to increase field size without increasing the field size



fixed

the company stocks another companies merchandise in their warehouse
and then packs and ships orders for that merchandise. Sometimes direct
to the consumerl, other times they ship to stores. The RPG record io
programmer is pretty reluctant to change the field size and recompile.
The DP manager wants to recompile. I am just curious if something can
be done at the system level.

Was thinking I could create a 2nd file that has all the fields of the
order header but which expands the ponum field. So there are two
files: ORHEAD and ORHEADN. Then use triggers to mirror the contents
of the two files. So the files are always identical, except ORHEADN
contains the full PONUM and ORHEAD contains the first 15 chars of
PONUM.

Next you change all the RPG SQL code to use ORHEADN instead of ORHEAD.
And do the same for the record IO RPG that you dare to change.

Of course, ORHEAD has a million and a half logicals that the record IO
people have created over time. So new versions of those logical files
have to be created.

-Steve


On Sat, Apr 26, 2014 at 5:41 PM, Paul Nelson <nelsonp@xxxxxxxxxxxxx> wrote:
Steve,

I don't know what business you're in, but how much EDI business are you
projecting into the future? It may be time to bite the bullet and recompile
all those programs. If you go down the path of getting "creative" with this
one field, you're potentially looking at having to modify all of the
programs to incorporate your data handling logic.

David can speak to the capabilities of Implementer, but Aldon has a built-in
dependency database that allows you to check out every object associated
with that order header file, tweak the physical and the display files, and
recompile and deploy in one swoop.

If you don't have the budget for a change control system, it shouldn't be
that difficult for your programmer to write some code to determine
everything he needs to touch.

Paul Nelson
Cell 708-670-6978
Office 409-267-4027
nelsonp@xxxxxxxxxxxxx


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Steve Richter
Sent: Saturday, April 26, 2014 7: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.






Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot 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 here. If you have questions about this, please contact