View previous topic :: View next topic
|
Author |
Message |
hussainasgar
New User
Joined: 06 Jul 2006 Posts: 9
|
|
|
|
I am trying to FTP a file to FTP Server, I am getting the following error..
EZA1736I put //DD:SYSUT1 FTPTEST.TXT
EZA1542I Usage: PUT localfile <foreignname>
EZA1735I Std Return Code = 27000, Error Code = 00007
JCL :
Code: |
//STEP0001 EXEC PGM=FTP,PARM='xxxx.xxxx.xxxx.xxx (EXIT'
//OUTPUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//NETRC DD DSN=CDCPAXH.NETRC,DISP=SHR
//SYSUT1 DD DSN=CDCPAXH.TEST,DISP=SHR
//SYSIN DD *
lcd SATYAM
lcd ITICA7
put //DD:SYSUT1 FTPTEST.TXT
quit
/*
|
Regards,
Asgar Hussain |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
PUT //DD:SYSUT1 FTPTEST.TXT |
Where did you learn this syntax?
The PUT should name a local file and the remote file - not jcl. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
I was going to make the same observation myself
//dd:ddname is the notation used inside a C language program
when opening a dataset by dd reference rather than by dsname |
|
Back to top |
|
|
hussainasgar
New User
Joined: 06 Jul 2006 Posts: 9
|
|
|
|
Hi
I learnt the Syntax from this forum only.
Now the JCL is accepting PUT statement if i remove remote file name FTPTEST.TXT .
Please find my PUT statement.
PUT //DD:SYSUT1
But i have got another ERROR.
EZA1736I PUT //DD:SYSUT1
EZA1701I >>> SITE FIXrecfm 133 LRECL=133 RECFM=FBA BLKSIZE=27930
500 'SITE FIXrecfm 133 LRECL=133 RECFM=FBA BLKSIZE=27930': command not understo
EZA1701I >>> PORT 19,59,28,146,4,44
200 PORT command successful.
EZA1701I >>> STOR 00051623
550 00051623: Access is denied.
EZA1735I Std Return Code = 27550, Error Code = 00002
EZA1701I >>> QUIT
221
Regards,
Asgar Hussain |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
I learnt the Syntax from this forum only. |
Please post the link(s) where you found this.
Quote: |
Now the JCL is accepting PUT statement if i remove remote file name FTPTEST.TXT |
I wonder if your PUT statement is being accepted. |
|
Back to top |
|
|
stodolas
Active Member
Joined: 13 Jun 2007 Posts: 632 Location: Wisconsin
|
|
|
|
PUT //DD:SYSUT1 FTPTEST.TXT
is wrong, it needs to be
PUT CDCPAXH.TEST FTPTEST.TXT
Code: |
//STEP0001 EXEC PGM=FTP,PARM='xxxx.xxxx.xxxx.xxx(EXIT'
//OUTPUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//NETRC DD DSN=CDCPAXH.NETRC,DISP=SHR
//SYSIN DD *
LCD SATYAM
LCD ITICA7
PUT CDCPAXH.TEST FTPTEST.TXT
QUIT
/*
|
|
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Gentlemen:
4.2.4 ddname support.
put/get from/to a DDNAME has been around for a while now. It's definitely the way to go if you want to use a GDG for the input. The O/P needs to check if it's supported for HIS release of z/OS.
Also, sendsite should always be supressed unless you're absolutely sure that the remote server can handle it. |
|
Back to top |
|
|
stodolas
Active Member
Joined: 13 Jun 2007 Posts: 632 Location: Wisconsin
|
|
|
|
Wow, knowing that would have made somethings I had to do about a year ago much easier. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Have you read-up on the concept of writing the results of a list or dir command to a dataset, instead of it going to the OUTPUT DD? It also can be quite handy when needed. |
|
Back to top |
|
|
hussainasgar
New User
Joined: 06 Jul 2006 Posts: 9
|
|
|
|
200 PORT command successful.
EZA1701I >>> STOR 00051623
550 00051623: Access is denied.
EZA1735I Std Return Code = 27550, Error Code = 00002
Not able to figure out.
Regards
Asgar Hussain F |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
/rant on
sometimes the IBM docs are difficult to search...
/rant off
I had searched for a long time to use the ddname approach...
maybe I was sleeping because never occurred to me to search the docs for
"ddname"
I did it and the info was right there even if in a place not easy to find
I guess many of us started looking starting from the chapter regarding the
FTP command ( under TSO )
and the option is not described there;
i stopped reading after the put/mput chapter and I missed the info |
|
Back to top |
|
|
stodolas
Active Member
Joined: 13 Jun 2007 Posts: 632 Location: Wisconsin
|
|
|
|
I was in maintenance mode at the time, "change this job to send this file instead". JCL FTP looks quite a bit more interesting and useful now. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Yup, the DDNAME option looks quite interesting.
I wasn't sure if it was ok or not - just that it was something i was not familiar with.
Probably comes from more than 15 years of moving files back&forth between win-based, unix, mainframe systems and never running batch ftp on the mainframe. . .
All of the distributed requirements were handled by the remote system "pushing to" or "pulling from" the mainframe. Which also eliminated any production job problems caused by connection problems to remote servers (which will happen when there are several hundred "remotes" participating )
Thanks, Kevin |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
EZA1701I >>> STOR 00051623
550 00051623: Access is denied. |
You might check with the prople responsible for the remote system and make sure you have the proper permissions for the path/file you are trying to wrtie to. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
Quote: |
Which also eliminated any production job problems caused by connection problems |
Strongly agree, I have always discouraged mainframe initiated tasks to workstations..
the recovery actions in case of troubles,
usually the workstation powered off, or the ftp service not running
are just a pain in the ***
I have alway suggested to initiate the file transfers from the workstation,
and trigger the appropriate jobs with the file trigger...
much more recovery friendly
the only trouble was to implement a watch dog in order to alert in case the missing file would disrupt the daily evening schedule |
|
Back to top |
|
|
hussainasgar
New User
Joined: 06 Jul 2006 Posts: 9
|
|
|
|
Hi,
Can you please let me know how to supress the SENDSITE.
EZA1701I >>> SITE FIXrecfm 80 LRECL=80 RECFM=FB BLKSIZE=19040
500 'SITE FIXrecfm 80 LRECL=80 RECFM=FB BLKSIZE=19040': command not understood
EZA1701I >>> PORT 19,59,28,146,10,76
200 PORT command successful.
Regards,
Asgar Hussain F |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
Back to top |
|
|
hussainasgar
New User
Joined: 06 Jul 2006 Posts: 9
|
|
|
|
Yes,
i Used the SENDSITE subcommand to toggle the automatic sending of the SITE subcommands when sending a data set to a foreign host.
Still i am getting below message..
EZA1701I >>> SITE FIXrecfm 80 LRECL=80 RECFM=FB BLKSIZE=19040
500 'SITE FIXrecfm 80 LRECL=80 RECFM=FB BLKSIZE=19040': command not understood
EZA1701I >>> PORT 19,59,28,146,10,76
200 PORT command successful.
[/u][/i][/b]
I dont know how to make this command accept.
Regards
Asgar |
|
Back to top |
|
|
stodolas
Active Member
Joined: 13 Jun 2007 Posts: 632 Location: Wisconsin
|
|
|
|
The command will only be accepted if the remote system is a mainframe. It doesn't hurt anything if the command is not accepted. Just leave it be and you won't see any adverse side affects. |
|
Back to top |
|
|
hussainasgar
New User
Joined: 06 Jul 2006 Posts: 9
|
|
|
|
Thank you Steve
Regards
Asgar |
|
Back to top |
|
|
|