View previous topic :: View next topic |
Author |
Message |
vak255 Intermediate

Joined: 10 Sep 2004 Posts: 384 Topics: 79
|
Posted: Wed Jul 06, 2005 4:15 pm Post subject: FTP one file to three different servers???? |
|
|
FTP one file to three different servers.
I need to transmit a flat file to three different servers thru FTP.any comments ???
//FTPKIIS1 EXEC PGM=FTP,REGION=2M,PARM='(EXIT'
//SYSPRINT DD SYSOUT=*
//INPUT DD DSN=xxxxx.CNTLCARD(t),DISP=SHR
// DD DSN=xxxxx.CNTLCARD(t),DISP=SHR
// DD DSN=xxxxx.CNTLCARD(t),DISP=SHR
//OUTPUT DD SYSOUT=*
//*
******************************** Bottom of Data ********************************
CNTLCARD: xxxxx.CNTLCARD(TQ941A1C)
========
XXD01/BATCH.com
username password
ASCII
PUT 'xxxx.BILLEXTR.T.TABLE(0)' T.TXT
QUIT |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Wed Jul 06, 2005 4:51 pm Post subject: |
|
|
vak255,
I may be missing something here but isn't it as simple as running the above posted JCL as 3 steps each time changing the server name??
kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
vak255 Intermediate

Joined: 10 Sep 2004 Posts: 384 Topics: 79
|
Posted: Wed Jul 06, 2005 5:29 pm Post subject: a new line Sysin dd * |
|
|
a new line //Sysin dd * is inserted next to Job when i run this job and abended with Jcl error. |
|
Back to top |
|
 |
vak255 Intermediate

Joined: 10 Sep 2004 Posts: 384 Topics: 79
|
Posted: Wed Jul 06, 2005 5:30 pm Post subject: |
|
|
STMT NO. MESSAGE
2 IEFC019I MISPLACED DD STATEMENT
this statement points to sysin statement which is generated. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Thu Jul 07, 2005 6:11 am Post subject: |
|
|
vak255,
Post your JCL that you tried to run.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
vak255 Intermediate

Joined: 10 Sep 2004 Posts: 384 Topics: 79
|
Posted: Thu Jul 07, 2005 7:47 am Post subject: JOB - JCL |
|
|
Kolusu,If u have a jcl for this.pls post it.This is wht I run , the statement which is generated is in bold.
//KIRAN5FT JOB (BLPP,39U7,2,50),'FTP SERVER ',
// CLASS=A,NOTIFY=&SYSUID,MSGCLASS=E
IEFC653I SUBSTITUTION JCL - (BLPP,39U7,2,50),'FTP SERVER
//SYSIN DD * GENERATED STATEMENT
//FTPPUTS1 EXEC PGM=FTP,REGION=2M,PARM='(EXIT'
//NETRC DD DSN=AV9425.DE.JCL(USERPASS),DISP=SHR
//SYSPRINT DD SYSOUT=*
//OUTPUT DD SYSOUT=*
//INPUT DD *
*** |
|
Back to top |
|
 |
superk Advanced

Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Thu Jul 07, 2005 8:24 am Post subject: |
|
|
It can be accomplished in a single job, although it might make restart of a transmission failure more complicated:
Code: |
//STEP0001 EXEC PGM=FTP,PARM='(Exit=8'
//OUTPUT DD SYSOUT=*
//NETRC DD DISP=SHR,DSN=&SYSUID..NETRC
//SYSUT1 DD DISP=SHR,DSN=&SYSUID..MY.GDG(0)
//INPUT DD *
site1
sendsite
ascii
put //dd:sysut1 ftptest.txt
close
open site2 21
sendsite
ascii
cd temp
put //dd:sysut1 ftptest.txt
close
open site3 21
sendsite
ascii
cd temp
put //dd:sysut1 ftptest.txt
close
quit
/*
//*
|
|
|
Back to top |
|
 |
taltyman JCL Forum Moderator

Joined: 02 Dec 2002 Posts: 310 Topics: 8 Location: Texas
|
Posted: Thu Jul 07, 2005 9:08 am Post subject: |
|
|
As requested please post the JCL that you submitted, do NOT post the JCL that shows up in SDSF. It appears you have a statement after the job card that is not recognized as a valid JCL statement so it is assumed to be sysin data. |
|
Back to top |
|
 |
vak255 Intermediate

Joined: 10 Sep 2004 Posts: 384 Topics: 79
|
Posted: Thu Jul 07, 2005 10:31 am Post subject: |
|
|
Thanks Superk, Kolusu and taltyman for all your help. |
|
Back to top |
|
 |
vak255 Intermediate

Joined: 10 Sep 2004 Posts: 384 Topics: 79
|
Posted: Thu Jul 07, 2005 10:41 am Post subject: |
|
|
superk/taltyman: this the jcl i used. Any comments r welcome.
JCL:
********************************* Top of Data **********************************
//SER1C JOB (G012,CPSC,9,99),'T FTP',
// SCHENV=SHORT
// JCLLIB ORDER=(SITEE.PROCLIB)
//**
//** EXECUTION JCL FOR FTP JCL
//**
//SER01 EXEC SER1C
//*
******************************** Bottom of Data ********************************
PROC:
********************************* Top of Data **********************************
//SER1C PROC
//**
//* THIS PROCEDURE TRANSFERS THE T TABLE TO THE SERVERS
//**
//*
//FTPPUTS1 EXEC PGM=FTP,REGION=2M,PARM='(EXIT'
//SYSPRINT DD SYSOUT=*
//INPUT DD DSN=SITEE.CNTLCARD(SER1C),DISP=SHR
// DD DSN=SITEE.CNTLCARD(SER2C),DISP=SHR
// DD DSN=SITEE.CNTLCARD(SER3C),DISP=SHR
//OUTPUT DD SYSOUT=*
//*
******************************** Bottom of Data ********************************
CNTLCARD:
SITEE.CNTLCARD(SER1C)
********************************* Top of Data **********************************
SER1
username password
ASCII
PUT 'SITEE.BILLEXTR.TFIT.TABLE(0)' T.TXT
QUIT
******************************** Bottom of Data ********************************
SITEE.CNTLCARD(SER2C)
********************************* Top of Data **********************************
SER2
username password
ASCII
PUT 'SITEE.BILLEXTR.TFIT.TABLE(0)' T.TXT
QUIT
******************************** Bottom of Data ********************************
SITEE.CNTLCARD(SER3C)
********************************* Top of Data **********************************
SER3
username password
ASCII
PUT 'SITEE.BILLEXTR.TFIT.TABLE(0)' T.TXT
QUIT
******************************** Bottom of Data ******************************** |
|
Back to top |
|
 |
vak255 Intermediate

Joined: 10 Sep 2004 Posts: 384 Topics: 79
|
Posted: Thu Jul 07, 2005 10:54 am Post subject: |
|
|
superk,
Do u think I need to start with "sendsite" before entering userid and password.U just 'close' the connection and Quit only at last.what is the need to 'cd temp' . Pls explain. Quote: |
sendsite
ascii
cd temp
put //dd:sysut1 ftptest.txt
close
quit
|
|
|
Back to top |
|
 |
superk Advanced

Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Thu Jul 07, 2005 1:29 pm Post subject: |
|
|
A couple of points:
1. Your JCL and PROC is working fine at my site. I see nothing wrong.
2. The use of SENDSITE command to turn OFF or ON the SITE command needs to be determined on a per-server basis. A lot of FTP servers don't support the SITE command.
3. In the example I gave, that particular server only allows data to be "put" into files in the temp folder, so that's why I need to "cd temp" first.
4. The "quit" command caused the FTP program to stop reading any more input through the INPUT DD, so only use it once at the very end. The first two control cards need to end with a "close" command. |
|
Back to top |
|
 |
superk Advanced

Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Thu Jul 07, 2005 1:30 pm Post subject: |
|
|
A couple of points:
1. Your JCL and PROC is working fine at my site. I see nothing wrong.
2. The use of SENDSITE command to turn OFF or ON the SITE command needs to be determined on a per-server basis. A lot of FTP servers don't support the SITE command.
3. In the example I gave, that particular server only allows data to be "put" into files in the temp folder, so that's why I need to "cd temp" first.
4. The "quit" command caused the FTP program to stop reading any more input through the INPUT DD, so only use it once at the very end. The first two control cards need to end with a "close" command. |
|
Back to top |
|
 |
vak255 Intermediate

Joined: 10 Sep 2004 Posts: 384 Topics: 79
|
Posted: Thu Jul 07, 2005 2:21 pm Post subject: |
|
|
Its marvelous and Thanks a lot superk....ure simply super at FTP. |
|
Back to top |
|
 |
|
|