Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Need FTP JCL which sends the dataset in text format

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
shakti

New User


Joined: 20 Jan 2004
Posts: 42

PostPosted: Thu Feb 26, 2004 10:28 am    Post subject: Need FTP JCL which sends the dataset in text format
Reply with quote

Guru's!

Can you please give some idea about the FTP jcl which sends the dataset in text format to remote server.

Thanks and Refards!

Shakti
Back to top
View user's profile Send private message

sandip_datta

Active User


Joined: 02 Dec 2003
Posts: 151
Location: Tokyo, Japan

PostPosted: Thu Feb 26, 2004 1:30 pm    Post subject:
Reply with quote

Hi Sakti,

Following is the code we use in our shop -
Code:
//STEP1    EXEC PGM=FTP,REGION=8M,
//           PARM='cengprod.dcs.citicorp.com'   <== Destination
//STEPLIB  DD DSN=As your shop
//SYSTCPD  DD DSN=As your shop
//SYSFTPD  DD DSN=As your shop
//SYSPRINT DD SYSOUT=*
//OUTPUT   DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//INPUT    DD *
ceftpjp august07    <=== userid and password
Your Dataset name and destination file/directory
QUIT


Regards,
Sandip.
Back to top
View user's profile Send private message
shakti

New User


Joined: 20 Jan 2004
Posts: 42

PostPosted: Thu Feb 26, 2004 2:13 pm    Post subject:
Reply with quote

sandip_datta wrote:
Hi Sakti,

Following is the code we use in our shop -
Code:
//STEP1    EXEC PGM=FTP,REGION=8M,
//           PARM='cengprod.dcs.citicorp.com'   <== Destination
//STEPLIB  DD DSN=As your shop
//SYSTCPD  DD DSN=As your shop
//SYSFTPD  DD DSN=As your shop
//SYSPRINT DD SYSOUT=*
//OUTPUT   DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//INPUT    DD *
ceftpjp august07    <=== userid and password
Your Dataset name and destination file/directory
QUIT


Regards,
Sandip.




Thanks you very much sandip

Shakthi
Back to top
View user's profile Send private message
mdtendulkar

Active User


Joined: 29 Jul 2003
Posts: 238
Location: USA

PostPosted: Thu Feb 26, 2004 3:16 pm    Post subject:
Reply with quote

Hello shakti,

Below is the FTP jcl you may require.
I have not tested it...but it should work.

Code:

//FTP00001 EXEC PGM=IKJEFT01,DYNAMNBR=50         
//OUT      DD   SYSOUT=*                         
//AMSDUMP  DD   SYSOUT=*                         
//SYSTSPRT DD   SYSOUT=*                         
//SYSIN    DD   DUMMY                             
//SYSPRINT DD   DUMMY                             
//OUTPUT   DD   SYSOUT=*                         
//SYSTSIN  DD  *                                 
FTP (EXIT
IP Address
Userid
password
pwd
ascii
cd <path where you need to put the file>
pwd
PUT '<host file name>' <destination file name>
QUIT
/*


Hope this helps,

Regards
Mayuresh Tendulkar
Back to top
View user's profile Send private message
mrar_160

New User


Joined: 14 Sep 2005
Posts: 48

PostPosted: Wed Sep 14, 2005 12:44 pm    Post subject:
Reply with quote

Which one can be use?
Back to top
View user's profile Send private message
Rupesh.Kothari

Member of the Month


Joined: 27 Apr 2005
Posts: 464

PostPosted: Wed Sep 14, 2005 1:38 pm    Post subject: Re: Need FTP JCL
Reply with quote

HI Mrar,

Quote:
Which one can be use?



JCL given by mdtendulkar works fine.

Regards
Rupesh
Back to top
View user's profile Send private message
Kevin

Active User


Joined: 25 Aug 2005
Posts: 234

PostPosted: Thu Sep 15, 2005 2:07 am    Post subject: Re: Need FTP JCL
Reply with quote

Some things I think you should consider for an FTP job:

- Use a secured dataset for the NETRC DD to securely store the user id's and passwords so they aren't visible to anyone.

- Use of the (EXIT or (EXIT= parameter. You need to determine how you want to handle and report on FTP errors. Personally, I'd want the job to always end with RC=0, but the I'd check the content of the OUTPUT to make sure things worked as planned.

- I prefer to PUT or GET to/from DD's, rather than datasets:
Code:

//NETRC DD DISP=SHR,DSN=HLQ.NETRC
//SYSUT1 DD DISP=SHR,DSN=MY.OUTBOUND.DATA
//SYSUT2 DD DSN=MY.INBOUND.DATA,DISP=(,CATLG,DELETE),...
//INPUT DD *
>sendsite
>ascii
>get filename //DD:SYSUT2
>put //DD:SYSUT1 filename
>quit
Back to top
View user's profile Send private message
nitin_agr

New User


Joined: 06 Sep 2005
Posts: 28
Location: Minneapolis US

PostPosted: Thu Sep 15, 2005 5:12 am    Post subject:
Reply with quote

It will also work fine and will store user id password path etc in another data set.

//STEP010 EXEC PGM=FTP,PARM=' ( EXIT'
//*
//INPUT DD DSN= <name of data set contains details.> ,
// DISP=SHR
//SYSPRINT DD SYSOUT=*
//OUTPUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*


It works fine and also secured way of doing do.
Back to top
View user's profile Send private message
Sarfraz S

New User


Joined: 28 Jun 2008
Posts: 1
Location: Chennai, INDIA

PostPosted: Mon Nov 17, 2008 3:12 pm    Post subject: Need explanation
Reply with quote

mdtendulkar wrote:
Hello shakti,

Below is the FTP jcl you may require.
I have not tested it...but it should work.

Code:

//FTP00001 EXEC PGM=IKJEFT01,DYNAMNBR=50         
//OUT      DD   SYSOUT=*                         
//AMSDUMP  DD   SYSOUT=*                         
//SYSTSPRT DD   SYSOUT=*                         
//SYSIN    DD   DUMMY                             
//SYSPRINT DD   DUMMY                             
//OUTPUT   DD   SYSOUT=*                         
//SYSTSIN  DD  *                                 
FTP (EXIT
IP Address
Userid
password
pwd
ascii
cd <path where you need to put the file>
pwd
PUT '<host file name>' <destination file name>
QUIT
/*


Hope this helps,

Regards
Mayuresh Tendulkar


Hi tendulkar,

Can you please explain the parameters you've used in your code as it's not working for me. What does the IP address refer to? Does it refer to Mainframe IP address or server IP address?
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Mon Nov 17, 2008 3:24 pm    Post subject: Reply to: Need FTP JCL which sends the dataset in text forma
Reply with quote

First, a link to the z/OS V1R9.0 Comm Svr: IP User's Guide and Commands manual.

Second, the IP address given is the address of the remote FTP Server. You will always need to provide a userid and password for that Server. The ascii sub-command indicates that the data needs to be translated to ASCII for that remote Server.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fetch Previous month & year in MM... girishb2 DFSORT/ICETOOL 3 Thu Sep 21, 2017 9:54 pm
No new posts XMITIP sends it out. Can it copy on l... Rommel Dayon Rustia IBM Tools 0 Tue Sep 05, 2017 10:16 am
No new posts Convert rows and column into JSON for... Dinesh Manivannan DB2 2 Sun Sep 03, 2017 6:50 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Mainframe dataset split purushottam DFSORT/ICETOOL 13 Tue Aug 29, 2017 12:28 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us