|
|
|
| |||||||||
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
Hi all,
Trying to FTP some JCL to a mainframe from a winNT box using PHP 4.3.1. I can successfully open a cmd prompt, ftp the commands and the JCL file up and have the m/f run the jcl. I can't get my php script to send the jcl. The ftp_site doesn't seem to be mimicking ftp commands. I can't use ftp_raw cause I can't load 5.0 right now. PHP Code:
Any ideas on a work around? How could I open the windows command prompt and send it (win cmd prompt) the commands? Thanks in advance. |
|
#2
|
||||
|
||||
|
What do you mean "i'm not storing a file"?? You're putting one there, aren't you?
Why not try ftp_put($conn_id, 'cpo070jcl.txt', 'C:\\Reports\\scripts\\cpo070jcl.txt', FTP_ASCII) ---John Holmes... |
|
#3
|
|||
|
|||
|
Thanks for the reply sepodati.
I'm not trying to store the file. What I'm trying to do is send the JCL that is contained in the text file on the client/server...to the mainframe so that the mainframes internal JES reader can kick off the instructions contained in the JCL. So, basically...the file never gets stored. It's contents are used as one time "instructions" on the mainframe. I can manually open a command prompt on the windows box and start an FTP session. Then type: ftp> ascii ftp> quote site filetype=jes ftp> put C:\\Reports\\scripts\\cpo070jcl.txt and with that...the JCL (job control language) starts to run on the mainframe. After the job completes...the JCL "goes away". I just can get this manual command line input to be done by my script. Any other ideas? Thanks. |
|
#4
|
|||
|
|||
|
does anyone offhand know "for sure" if ftp_raw will do the trick?
in other words...will it mimic exactly like as if I were manually typing the ftp commands from a command window? if so, i'll have to have this knowledge to justify the work on our server to complete an upgrade to php 5.0, which isn't "production" stable as of right now. Thanks! |
|
#5
|
|||
|
|||
|
ok...I figured it out with a different approach:
PHP Code:
On the win NT box...that opens a command line screen, starts FTP and reads in line by line the ftp commands found in FTPputFile.txt which contain: Code:
open mainframeDNS userid pass ascii quote site filetype=jes put cpo070jcl.txt quit works like a charm!! |
| Viewing: Dev Shed Forums > System Administration > FTP Help > PHP to FTP JCL to MainFrame? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|