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



Thanks for your reply Charles
Ive read this quite a few times and probably will need to read it a few more times before it will sink into my thick noggin

Alan Shore
E-mail : ASHORE@xxxxxxxx
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
'If you're going through hell, keep going.'
Winston Churchill


-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxxxxxxxx] On Behalf Of Charles Wilt
Sent: Wednesday, July 31, 2019 1:13 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: [EXTERNAL] Re: Expanding a field in a file or adding a new field to the file

This is the option I'd go with...

Specifically,
Create the new table with the new longer field Create a logical (or view) with the name of the original table/PF and the just original set of columns.
Modify all existing logicals & views to point to the new table with just the original set of columns.

Done properly, you don't have to recompile _any_ programs.
(RPG programs using native I/O on Indexes are problematic, as while you can create an index with a subset of included columns, the DB will put the index columns first in the record layout. So you may need to recompile those. )

Create a new view (or index or logical) that explicitly includes all the existing columns.
Now modify all of the programs that actually need access to the token to use the new view.

Lastly decide if you want to simply blank out the original token field, or store some some substring of the new token in it. If the latter, I'd add a before insert/update on change of NEWTOKEN trigger to the table to maintain the old column.

Going forward, make sure you don't have any RPG program using native I/O to the actual table, they should always be accessing the data through an view/logical/index with an explicitly set of included columns. Now you can add columns to your hearts content without recompiling the world.

Char;es



On Wed, Jul 31, 2019 at 8:02 AM Justin Taylor <JUSTIN@xxxxxxxxxxxxx> wrote:

I don't personally like option 2 in general.

If option 1 is too much work to accomplish for one massive deploy, how
about this strategy?
Create a new table (different name) that matches the layout of the
original except the column in question will be longer. Create a LF
over the new table with the matching layout, except the column in
question has the original length. Load the new table with the
original data, and then replace the old table with the new LF (rename LF to be old table name).
Existing programs have the layout they expect and you have more time
to migrate to the longer column.





-----Original Message-----
From: Alan Shore via MIDRANGE-L [mailto:midrange-l@xxxxxxxxxxxxxxxxxx]
Sent: Wednesday, July 31, 2019 8:03 AM
To: midrange-l@xxxxxxxxxxxxxxxxxx
Cc: Alan Shore <ashore@xxxxxxxx>
Subject: Expanding a field in a file or adding a new field to the file

Hi everyone
Before I forget - we are on V7r3
Are we all sitting comfortably - then let me begin

We presently hold tokens instead of credit card numbers and the web
service calls that are made for settling, authorization, refunds etc.
use the token The token was of a length that we could store it in the
old credit card number field - 17 characters However - we have been
informed that the size of the token is going to increase - to larger
than 17 characters

I understand that there will be NUMEROUS service programs, files,
programs etc, that will need to be changed and tested

Here is my question -
Opinion based or fact based - What would be better -

1. expanding the present field from 17 to a much larger field (say
50 - just in case of future increases)

2. Adding a new field (at the end of all the files)

Each has their own foibles (for want of a better word) For example:-

Option 1 - EVERY program that even touches any of the files that this
type of file change is applied to will need to be re-compiled
(minimum) - even if the program has nothing directly to do with this
expanded field. However it will be the same field name, therefore only
need to be concerned about the new field size and what is happening to
that field (populating another field for example)

Option 2 - EVERY program, service program etc. will need to be changed
to use the new field name. Not only need to be concerned about
replacing the old field name with the new field name within the
program, service program etc. but also need to be concerned about the
new field size and what is happening to that field (populating another
field for example)


If anyone has more options - please feel free to pass those on

As always - all answers gratefully accepted

Alan Shore
E-mail : ASHORE@xxxxxxxx
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
'If you're going through hell, keep going.'
Winston Churchill


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.