View previous topic :: View next topic
|
Author |
Message |
shakti
New User
Joined: 20 Jan 2004 Posts: 42
|
|
|
|
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 |
|
|
sandip_datta
Active User
Joined: 02 Dec 2003 Posts: 150 Location: Tokyo, Japan
|
|
|
|
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 |
|
|
shakti
New User
Joined: 20 Jan 2004 Posts: 42
|
|
|
|
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 |
|
|
mdtendulkar
Active User
Joined: 29 Jul 2003 Posts: 237 Location: USA
|
|
|
|
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 |
|
|
mrar_160
New User
Joined: 14 Sep 2005 Posts: 48
|
|
|
|
Which one can be use? |
|
Back to top |
|
|
Rupesh.Kothari
Member of the Month
Joined: 27 Apr 2005 Posts: 463
|
|
|
|
HI Mrar,
Quote: |
Which one can be use? |
JCL given by mdtendulkar works fine.
Regards
Rupesh |
|
Back to top |
|
|
Kevin
Active User
Joined: 25 Aug 2005 Posts: 234
|
|
|
|
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 |
|
|
nitin_agr
New User
Joined: 06 Sep 2005 Posts: 28 Location: Minneapolis US
|
|
|
|
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 |
|
|
Sarfraz S
New User
Joined: 28 Jun 2008 Posts: 1 Location: Chennai, INDIA
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
|