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



Hi Eric

I'm thinking any way a person can do SQL - The new RUNSQL from IBM could be used, or a QMQRY that is specific to the task.

The thing to do is like this - have a line in the model FTP script that reads like this (the (r is for if it needs to replace at the target)

put ***filename*** (r

Then you'd make a copy of the model into QTEMP, maybe. The SQL statement would be something like

update qtemp/copyofftp set ftptext = replace(ftptext, '***filename***, 'realfilename') where ftptext like '%***filename***%'

Now another approach - I've written the entire script from a program, plugging in the values as needed.

I'm not guaranteeing the order of parameters in the replace function, by the way - doing it by memory.

This applies to the various methods presented, in other words, any way you can run an UPDATE SQL statement. That'd be Paul's idea or Scott's QShell recommendation, which has its db2 command, as I recall.

Scott's FTP API still has the advantage of being able to monitor each step - a script tries to run everything, even when errors occur, such as being unable to log in.

HTH
Vern

On 3/9/2013 1:27 PM, Eric Lehti wrote:
Vernon,
Do you mean using STRQMQRY compiled with a parameter variable
(containing replacement file name) where its SQL updates source member
line that has the put statement?
The source line would PUT a different file each time.
I like that. I also appreciate your comment about doing it with RPG.

One idea is to use a place-marker for the file name, then do an SQL
REPLACE on that line - or do it in RPG native.



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.