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



Bill,

So basically you are changing the company name in all your tables, right?
And you have some logic to determine what columns are your company name?
Are all the company name columns named the same? Like CMPNAM? Or do they
have silly names like RMCMNM, XYCNAM, ABCMPNAM and that sort? Or is it
somewhere in between like xxCMPNAM where xx is some table prefix?

I ALWAYS question using output files from DSPFFD. Is there something that
gives you, which you need to complete this project, that you cannot find
in SYSCOLUMNS? Because you could combine this into a single program and
eschew the whole CL program. This would reduce the outside chance of
someone calling the RPG program with parameters which make it easy to do
the SQL injection. Of course, with 10 character column and 10 character
table names those would be hard to pass an sql injection to. The open
area is the new company name.

select sys_cname, sys_tname, sys_dname
from syscolumns
where sys_cname like '%CMPNAM%'

and if you need further information, like you only want to select 15
character columns, then consider

select sys_cname, sys_tname, sys_dname
from syscolumns
where sys_cname like '%CMPNAM%'
and data_type='CHAR' and length=15


Rob Berendt

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.