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






Bob,

For starters, this is a convoluted, half-though out idea that will
undoubtedly require revision in order to implement, and has more to do with
CL than RPG but here goes...

I assume speed is the reason why you are rolling your own FTP between two
AS/400's instead of using SNADS.  I'm also assuming that life would be a
lot simpler if you didn't have to worry about passwords because all you
want to do is get a file from here to there.  If SNADS were running you
could do a SNDNETMSG from system A to System B.  On System B you would have
an active job that monitored the message queue for the message.  Once it
got the correct message it would create a user profile with a predefined
password and send a message back to System A.  When the FTP program on
System A got the message it would connect to system B using the newly
created user-id and predefined password to sign in.  The transfer would do
its thing.  When done system A would send a different message to System B.
When System B saw this second message it would blow away the new user
profile.

Granted, there would probably be some object ownership issues to contend
with.  It would also require that SNADS be running on both systems and the
user profile creation job be running on System B.  There's also be the
possibility that something can go awry and the user profile never gets
deleted.  There would be other issues to contend with if multiple people
are trying to use this at the same time.

Perhaps as an alternative you could prompt for a user-id and password on
System A and send that to System B.  When the monitoring job on System B
got the message it would FTP into System A with the prompted user-id and
password and pull the file over.

So much for free advice...  :)  Good luck!


Dave Parnin
Nishikawa Standard Company
Topeka, IN  46571
daparnin@xxxxxxxxxxxxxxxxxx




 

                      Bob Cozzi

                      <cozzi@xxxxxxxxx>         To:
RPGIV@xxxxxxxxxxxxxxx@SMTP@CTB, RPG programming on   
                      Sent by:                   the AS400 / iSeries
<rpg400-l@xxxxxxxxxxxx>@SMTP@CTB          
                      rpg400-l-bounces@m        cc:       (bcc: David A
Parnin/Topeka/NISCO/SPCO)              
                      idrange.com               Subject:  Free FTP CL
Command                                  
 

 

                      03/18/2005 03:32

                      PM

                      Please respond to

                      RPG programming on

                      the AS400 /

                      iSeries

                      <rpg400-l@midrange

                      .com>

 




I just finished a simple CL command that interfaces with OS/400 FTP to send
files to another AS/400.
The goal was to provide a CL-interface for sending a DB2 file via FTP,
something like this:

  ===> FTPSNDFILE RMTSYS(RESCUE.COMPUDESIGNS.NET) FILE(COZZILIB/QRPGLESRC)
+
              MBR(MYMBR) TOFILE(*FROMFILE) USER(BOBCOZZI) PWD(PICKLES) +
                 SRCFILE(RPGLAB/QFTPSRC) LOG(RPGLAB/QFTPSRC) LOGMBR(FTPLOG)


The command generates the FTP source script and then evokes FTP to send the
file.
It works fine and I'm very, very happy with it.
However.  the password parameter for the remote user's password is set to
DSPINPUT(*PROMPT) which means it will display the text that is typed in,
but
does not keep it when Enter is pressed. So I have to re-key it each and
every time I run the command from command entry. Obviously I could change
the source, since I wrote it, but I also don't want my passwords logged.
So here's the question that I assumed would have a NO for the answer:
Is there a way to retrieve and/or transmit a user's password for an FTP
session so that I don't have to require the end-user to enter it each time
they run the FTPSNDFILE command? I mean if they specify USER(*CURRENT) is
there a way I can also allow the PWD parm to default to PWD(*CURRENT)?
I believe there is not, but since there are just too many APIs available
today, I thought I'd throw the question it out there.


-Bob Cozzi
www.RPGxTools.com
If everything is under control, you are going too slow.
- Mario Andretti

--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.