Page 1 of 1

FTP Card in JCL

PostPosted: Thu Feb 02, 2012 2:05 pm
by Sushmita V
Hi,

My requirement is to FTP a PS file, by converting it to a .txt file, to a share path. FTP card which am using is as below:

\\abcd\Shares\path\Projects
userid
pswd
CD Report File
PUT 'abcde.efgh.123.RPTA' + ABCD_Interface_M.TXT

CLOSE
QUIT

But its giving me error saying unknown host. How am I suppose to give the share path detail? Is thr any syntactical error?

Re: FTP Card in JCL

PostPosted: Thu Feb 02, 2012 2:07 pm
by BillyBoyo
Are you running this on a Mainframe?

Re: FTP Card in JCL

PostPosted: Thu Feb 02, 2012 2:08 pm
by Sushmita V
Yes. My Code looks like this:

//PSTEP011 EXEC PGM=FTP,PARM='(EXIT'
//SYSPRINT DD SYSOUT=*
//OUTPUT DD SYSOUT=*
//OUTPUT2 DD SYSOUT=*
//INPUT DD DSN=ABCD.EFGH.FTPCARD,DISP=SHR

Where,

ABCD.EFGH.FTPCARD holds the FTPCARD which I mentioned in my first post.

With regards,
Sushmita

Re: FTP Card in JCL

PostPosted: Thu Feb 02, 2012 2:25 pm
by BillyBoyo
I'm confused, as neither filename is valid on the mainframe.

Re: FTP Card in JCL

PostPosted: Thu Feb 02, 2012 2:36 pm
by Sushmita V
To make it simple,

//PSTEP011 EXEC PGM=FTP,PARM='(EXIT'
//SYSPRINT DD SYSOUT=*
//OUTPUT DD SYSOUT=*
//OUTPUT2 DD SYSOUT=*
//INPUT DD *
\\abcd\Shares\path\Projects
userid
pswd
CD Report File
PUT 'Report.File.Name' + ABCD_Interface_M.TXT
CLOSE
QUIT
//*

Here, "Report.File.Name" is a PS file which needs to be converted to txt file name "ABCD_Interface_M.TXT". This txt file needs to be placed in a share path given to me as "\\abcd\Shares\path\Projects". I also have the userId and pswd. But this isn't working. Any problem with the share path convention?

Am I still confusing. Hope not!

With regards,
Sushmita

Re: FTP Card in JCL

PostPosted: Thu Feb 02, 2012 2:55 pm
by enrico-sorichetti
But its giving me error saying unknown host.


nowhere in Your FTP control statements You have specified the host to connect to

search the forum for examples, or ask Your peers for a working one, or look at the manuals

Re: FTP Card in JCL

PostPosted: Thu Feb 02, 2012 3:17 pm
by BillyBoyo
If one of the file names had been valid for the mainframe, I'd not have asked. Now it is valid, keep it that way.

The path stuff is where you are by default, or where you can change directory to, when you have actually logged-on to the other system, using your userid and password. As enrico has pointed out, you've failed to specify anything to attempt log-on/connect or anything like that. The way you want to do it, before you ask, is the way that others do it at your site.

Re: FTP Card in JCL

PostPosted: Thu Feb 02, 2012 9:13 pm
by Ed Goodman
I'm betting the way you've specified the server name is tripping up the mainframe FTP.
The first line of you control cards, is it a directory path, or a server name, or a drive mapping path?

In my FTP jobs the first line looks more like:
servername.treename.containername

and my user id looks more like
userid.contextnode.contextnode

The server name would need to be in a DNS somewhere so that the FTP client you are invoking knows what IP address to connect with.