Re: python code to sumbit batch job to jes
In 51ca273b@aim.com, on 06/25/2013 at 05:26 PM, Paul Gilmartin paulgboul...@aim.com said: BTW, I am exceedingly unhappy with the 200 status codes from the last two SITE commands, but IBM has some twisted logic according to whichthe behavior is proper. WTF? It's not in accordance with RFC 959. 200 Command okay. 500 Syntax error, command unrecognized. 501 Syntax error in parameters or arguments. From a more rational (Solaris) server: Also broken. 500 /dev/null: not a plain file. Should be 501 /dev/null: not a plain file. -- Shmuel (Seymour J.) Metz, SysProg and JOAT Atid/2http://patriot.net/~shmuel We don't care. We don't have to care, we're Congress. (S877: The Shut up and Eat Your spam act of 2003) -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: python code to sumbit batch job to jes
Still getting the Error_perm : 501 invalid data set name. Use ma's dsname conventions. I made the dsname on the pc hlq.test.jcl and I set up the same name on the mainframe I used FTP.voidcmd(SITE FILETYPE=JES) Any other ideas? Hopefully? Thanks .. Really a stumper -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: python code to sumbit batch job to jes
The following worked for me. Entire script. (with host/user/password changed). #!/usr/bin/python from ftplib import FTP; ftp=FTP('host'); ftp.login(user,password); ftp.voidcmd(site filetype=jes); f=open(test.jcl,r); ftp.storlines(STOR what.ever,f); f.close(); ftp.quit(); I think you needed the what.ever after the STOR. And this needs to be a valid z/OS data set name syntax. It is not used for anything. It just must be there. On Wed, Jun 26, 2013 at 3:21 PM, don isenstadt don.isenst...@gmail.comwrote: Still getting the Error_perm : 501 invalid data set name. Use ma's dsname conventions. I made the dsname on the pc hlq.test.jcl and I set up the same name on the mainframe I used FTP.voidcmd(SITE FILETYPE=JES) Any other ideas? Hopefully? Thanks .. Really a stumper -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN -- This is a test of the Emergency Broadcast System. If this had been an actual emergency, do you really think we'd stick around to tell you? Maranatha! John McKown -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: python code to sumbit batch job to jes
On Wed, 26 Jun 2013 15:21:20 -0500, don isenstadt wrote: Still getting the Error_perm : 501 invalid data set name. Use ma's dsname conventions. I made the dsname on the pc hlq.test.jcl and I set up the same name on the mainframe I used FTP.voidcmd(SITE FILETYPE=JES) Any other ideas? Hopefully? Thanks .. Really a stumper Just as an experimental control, are you able to submit a job via FTP from the DOS command tool? This might give some insight, or at least better diagnostics. -- gil -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: python code to sumbit batch job to jes
On Wed, 26 Jun 2013 15:40:38 -0500, John McKown wrote: The following worked for me. Entire script. (with host/user/password changed). #!/usr/bin/python from ftplib import FTP; ftp=FTP('host'); ftp.login(user,password); ftp.voidcmd(site filetype=jes); f=open(test.jcl,r); ftp.storlines(STOR what.ever,f); f.close(); ftp.quit(); I think you needed the what.ever after the STOR. And this needs to be a valid z/OS data set name syntax. It is not used for anything. It just must be there. Interesting. Working from a command line Solaris client with z/OS 1.13 server, I can't make it fail: 220-FTPD1 IBM FTP CS V1R13 ... Remote system type is MVS. ftp put foo=bar 200 Port request OK. 501 Invalid data set name foo=bar. Use MVS Dsname conventions. ftp quote site file=jes 200 SITE command was accepted ftp put foo=bar 200 Port request OK. 125 Sending Job to JES internal reader FIXrecfm 80 250-It is known to JES as JOB06645 250 Transfer completed successfully. local: foo=bar remote: foo=bar 428 bytes sent in 0.28 seconds (1.48 Kbytes/s) ftp quit -- gil -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: python code to sumbit batch job to jes
Thanks I just tried it and it works fine.. Via FTP from windows CID window. I used Put because there is no stor. Got 200 port request ok 125 sending job to JES internal reader fixrecfm 80 -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: python code to sumbit batch job to jes
Thank you so much If you google it or in my case ddg.gg it you will not see the syntax. I never would have found it.. I am one happy camper! :-)) -don -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: python code to sumbit batch job to jes
In 1122827743987211.wa.don.isenstadtgmail@listserv.ua.edu, on 06/26/2013 at 03:21 PM, don isenstadt don.isenst...@gmail.com said: Any other ideas? Try using FTP directly, with explicit SITE and PUT commands. Also try QUOTE SITE. -- Shmuel (Seymour J.) Metz, SysProg and JOAT Atid/2http://patriot.net/~shmuel We don't care. We don't have to care, we're Congress. (S877: The Shut up and Eat Your spam act of 2003) -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: python code to sumbit batch job to jes
Don: I noticed in your entry you did not have the fully qualified name HLQ.yourname. Could that be the issue? Ed On Jun 26, 2013, at 3:21 PM, don isenstadt wrote: Still getting the Error_perm : 501 invalid data set name. Use ma's dsname conventions. I made the dsname on the pc hlq.test.jcl and I set up the same name on the mainframe I used FTP.voidcmd(SITE FILETYPE=JES) Any other ideas? Hopefully? Thanks .. Really a stumper -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: python code to sumbit batch job to jes
On Tue, 25 Jun 2013 15:06:36 -0500, don isenstadt don.isenst...@gmail.com wrote: # note quote already done by ftplib so no quote .. this works fine ftp.voidcmd( site file=JES ) # Attempt to upload the file f = open('tjcl.txt', r) ftp.storlines(STOR,f) -- this is what fails.. ftp.quit() error_perm: 501 Invalid data set name. Use MVS Dsname conventions. - but I am not trying to send a dataset up just the a jobcard and iefbr14 in a text file??? Yes, but FTP is (was?) a moron. It required a valid data set name in the target regardless. I used to get errors of this sort, but I can't reproduce the behavior today on z/OS 1.13. -- gil -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: python code to sumbit batch job to jes
Maybe the SITE command needs to be SITE FILETYPE=JES. That's what I use when I use the FTP class library for DotNet from Kellerman software. -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Paul Gilmartin Sent: Tuesday, June 25, 2013 3:41 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: python code to sumbit batch job to jes On Tue, 25 Jun 2013 15:06:36 -0500, don isenstadt don.isenst...@gmail.com wrote: # note quote already done by ftplib so no quote .. this works fine ftp.voidcmd( site file=JES ) # Attempt to upload the file f = open('tjcl.txt', r) ftp.storlines(STOR,f) -- this is what fails.. ftp.quit() error_perm: 501 Invalid data set name. Use MVS Dsname conventions. - but I am not trying to send a dataset up just the a jobcard and iefbr14 in a text file??? Yes, but FTP is (was?) a moron. It required a valid data set name in the target regardless. I used to get errors of this sort, but I can't reproduce the behavior today on z/OS 1.13. -- gil -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: python code to sumbit batch job to jes
On 2013-06-25 16:50, Roberts, John J wrote: Maybe the SITE command needs to be SITE FILETYPE=JES. That's what I use when I use the FTP class library for DotNet from Kellerman software. An experiment with FTP from the command line: Remote system type is MVS. ftp quote site filetype=jes 200 SITE command was accepted ftp quote site file=jes 200 SITE command was accepted ftp quote site fil=jes 200-Unrecognized parameter 'fil=jes' on SITE command. 200 SITE command was accepted ftp quote site fubar 200-Unrecognized parameter 'fubar' on SITE command. ftp quit 221 Quit command received. Goodbye. BTW, I am exceedingly unhappy with the 200 status codes from the last two SITE commands, but IBM has some twisted logic according to whichthe behavior is proper. From a more rational (Solaris) server: Remote system type is UNIX. Using binary mode to transfer files. ftp quote site checksum /etc/services 200 3645102391 4438/etc/services ftp quote site checksum /dev/null 500 /dev/null: not a plain file. ftp quit -- gil -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN