FTP to a path and not to IP.

Other Mainframe related questions which attracts you and there is no suitable Forum you find for it and related FAQs.
Post Reply
utkarsh
Registered Member
Posts: 66
Joined: Fri Jun 21, 2013 10:32 pm
India

FTP to a path and not to IP.

Post 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?
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1896
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: FTP to a path and not to IP.

Post 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

Code: Select all

cd AA/BBB/GLP/Monthly
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.
utkarsh
Registered Member
Posts: 66
Joined: Fri Jun 21, 2013 10:32 pm
India

Re: FTP to a path and not to IP.

Post 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.
utkarsh
Registered Member
Posts: 66
Joined: Fri Jun 21, 2013 10:32 pm
India

Re: FTP to a path and not to IP.

Post 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.
User avatar
Anuj Dhawan
Founder
Posts: 2802
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: FTP to a path and not to IP.

Post by Anuj Dhawan »

I doubt that you can mask IP address with the way FTP works.
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
utkarsh
Registered Member
Posts: 66
Joined: Fri Jun 21, 2013 10:32 pm
India

Re: FTP to a path and not to IP.

Post by utkarsh »

My lead is asking if we can hide the IP address as it is exposed on FTP.
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1896
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: FTP to a path and not to IP.

Post 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.
utkarsh
Registered Member
Posts: 66
Joined: Fri Jun 21, 2013 10:32 pm
India

Re: FTP to a path and not to IP.

Post 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.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “Other Mainframe Topics, Off-Topics, FAQs.”