Page 1 of 1
FTP to a path and not to IP.
Posted: Mon May 28, 2018 6:16 pm
by utkarsh
Hi,
Is there a way in FTP that allows to send the data to a server path like \\aaxyzfnp1000\AA\BBB\GLP\Monthly
rather than sending the data to an IP like 111.222.33.44? I had been searching all over but looks like I am not correct key words to find it. Could someone of you please help for this?
Re: FTP to a path and not to IP.
Posted: Mon May 28, 2018 8:17 pm
by Robert Sample
FTP is a machine to machine process, so you MUST go to an IP address -- period.
server path like \\aaxyzfnp1000\AA\BBB\GLP\Monthly
That server has an IP address -- that is what will be required for an FTP (either directly or through DNS lookup of aaxyzfnp1000). You can then issue an FTP subcommand
to set the working directory on the server. But you cannot expect FTP to take the full path and parse it to find the server name -- FTP just doesn't do that.
Re: FTP to a path and not to IP.
Posted: Tue May 29, 2018 3:39 pm
by utkarsh
Thanks Robert.
I have used the below job and it seems to work for me:
Code: Select all
//S005 EXEC PGM=EZACFSM1
//SYSIN DD DSN=ABCDE.ABCD.CNTLLIB(XYZ12MT1),DISP=SHR
//SYSOUT DD DSN=&&TEMP,DISP=(,PASS),
// RECFM=FB,LRECL=80
//********************************************************
//*** STEP TO FTP THE FILE
//********************************************************
//S010 EXEC PGM=FTP,PARM='(EXIT'
//SYSPRINT DD SYSOUT=*
//INPUT DD DSN=ABCDE.ABCD.CNTLLIB(XYZ12MT2),DISP=SHR
// DD DSN=&&TEMP,DISP=(OLD,DELETE)
//OUTPUT DD SYSOUT=*
In the SYSOUT, I got the message:
Code: Select all
EZA1617I 475200 bytes transferred in 0.050 seconds. Transfer rate 9504.00 Kbyte
So it seems to work but the end user has not verified it yet.
Thank you again.
Re: FTP to a path and not to IP.
Posted: Tue May 29, 2018 3:42 pm
by utkarsh
Forgot to tell, the content of
XYZ12MT1:
Code: Select all
PUT 'file.name...' server-file-name-&LYYMMDD.-&LHHMMSS..TXT
QUIT
XYZ12MT2:
Code: Select all
111.222.33.44
ID
Password
cd AA/BBB/GLP/Monthly
In this is it possible to mask the IP address? I am not sure why it is being asked though.
Re: FTP to a path and not to IP.
Posted: Wed May 30, 2018 11:39 am
by Anuj Dhawan
I doubt that you can mask IP address with the way FTP works.
Re: FTP to a path and not to IP.
Posted: Sat Jun 02, 2018 7:12 am
by utkarsh
My lead is asking if we can hide the IP address as it is exposed on FTP.
Re: FTP to a path and not to IP.
Posted: Sat Jun 02, 2018 7:39 am
by Robert Sample
If you need to hide the IP address, then FTP is not the mechanism to use. SFTP will not provide human-readable logs but it requires additional system set up (on both ends) to be usable.
Re: FTP to a path and not to IP.
Posted: Mon Dec 17, 2018 2:41 pm
by utkarsh
Robert Sample wrote: Sat Jun 02, 2018 7:39 amIf you need to hide the IP address, then FTP is not the mechanism to use. SFTP will not provide human-readable logs but it requires additional system set up (on both ends) to be usable.
Thanks Robert.