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.
$ftp_server = "mainframeDNS";
$ftp_user = "userid";
$ftp_pass = "password";
$conn_id = ftp_connect($ftp_server) or die (writeError($logsPath,$errorLog, $gmtDate."\r\n FTP ERROR>> " . $conn_id . "\r\nCould Not Establish FTP Connection to ".$ftp_server.".\r\n\r\n",$rptName,$univDate));
// try to login
if (!ftp_login($conn_id, $ftp_user, $ftp_pass)) {
writeError($logsPath,$errorLog, $gmtDate."\r\n FTP ERROR>> " . $conn_id . "\r\nCould Not Log On To FTP Connection using ".$ftp_user.".\r\n\r\n",$rptName,$univDate);
}
ftp_site($conn_id, 'ascii') or die ("ERROR FTP SITE 1");
ftp_site($conn_id, 'quote site filetype=jes') or die ("ERROR FTP SITE 2");
ftp_site($conn_id, 'put C:\\Reports\\scripts\\cpo070jcl.txt') or die ("ERROR FTP SITE 3"); //cpo070jcl.txt contains valid MVS jcl.
//ftp_put($conn_id, "C:\\Reports\\scripts\\cpo070jcl.txt", FTP_ASCII) or die ("ERROR FTP PUT"); //This one requires 4 parms, including a mainframe file name...which isn't what i need..i'm not storing a file...just trying to send the jcl to the jes reader.
ftp_quit($conn_id);
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.