FTP Card in JCL



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

FTP Card in JCL

Postby Sushmita V » Thu Feb 02, 2012 2:05 pm

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?
Sushmita V
 
Posts: 12
Joined: Thu Jan 19, 2012 9:26 pm
Location: Chennai, India
Has thanked: 0 time
Been thanked: 0 time

Re: FTP Card in JCL

 

Re: FTP Card in JCL

Postby BillyBoyo » Thu Feb 02, 2012 2:07 pm

Are you running this on a Mainframe?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: FTP Card in JCL

Postby Sushmita V » Thu Feb 02, 2012 2:08 pm

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
Sushmita V
 
Posts: 12
Joined: Thu Jan 19, 2012 9:26 pm
Location: Chennai, India
Has thanked: 0 time
Been thanked: 0 time

Re: FTP Card in JCL

Postby BillyBoyo » Thu Feb 02, 2012 2:25 pm

I'm confused, as neither filename is valid on the mainframe.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: FTP Card in JCL

Postby Sushmita V » Thu Feb 02, 2012 2:36 pm

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
Sushmita V
 
Posts: 12
Joined: Thu Jan 19, 2012 9:26 pm
Location: Chennai, India
Has thanked: 0 time
Been thanked: 0 time

Re: FTP Card in JCL

Postby enrico-sorichetti » Thu Feb 02, 2012 2:55 pm

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
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2643
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 130 times

Re: FTP Card in JCL

Postby BillyBoyo » Thu Feb 02, 2012 3:17 pm

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.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: FTP Card in JCL

Postby Ed Goodman » Thu Feb 02, 2012 9:13 pm

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.
Ed Goodman
 
Posts: 342
Joined: Thu Feb 24, 2011 12:05 am
Has thanked: 3 times
Been thanked: 17 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post