Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MVS::JESFTP question 1

Status
Not open for further replies.
Apr 16, 2001
29
0
0
US
I'm really not sure if this is more a mainframe question or an issue with the perl package. But I'm stuck either way.

We have a job that gets run manually on the mainframe, and a perl job on a linux box that runs a little later and grabs the file off of the mainframe that is produced by the first program. I'm trying to automate this system, and not having much luck.

So, I found this package that is supposed to let me kick off jobs using FTP (The module is built on NET::FTP).

I can follow the steps of the package and it claims to have successfully submitted the job, but the job never actually runs on the mainframe. My attempts to get help from our mainframe group resulted in conversations like this:

"That's easy, just go to this screen and type in blah blah blah"

"No, I want to kick off the job using a program through ftp"

"Oh, I have no idea how you could do that. I'm not even sure it is possible"

So...no help there.

Has anyone used this package? Using it LOOKS easy. Here is the code, taken from my test script:

Code:
use MVS::JESFTP;

my($host, $logonid, $password, $job, $jobname) =
    ('hfn2', 'xxxx', 'xxxx', './TestSW.SEQ', 'HACGHHSW');
    
my $timeout = 1200;

$jes = MVS::JESFTP->open($host, $logonid, $password) or die "not ok 2\n";
print "ok 2\n";

$jes->submit($job)                                   or die "not ok 3\n";
print "ok 3\n";

$jes->quit                                           or die "not ok 4\n";
print "ok 4\n";

The SEQ file has this in it:

//logonid1 JOB account,'HACGHH',CLASS=A,MSGCLASS=T,MSGLEVEL=(1,1)
//*LOGONID HACGHH
//*PASSWORD HACGHH19
/*ROUTE PRINT node.logonid
//STEP001 EXEC PGM=IA000000.SW.LIB(SWRAPUP)


Any ideas?


Thanks!
 
I'm not positive, but this might work -
I've done this from a regular windows FTP session using these commands, I assume you can probably do the same thing using Net::FTP. The only thing I'm not sure about is if we have a process on the mainframe that recognizes the arrival of the jcl file, then kicks it off. We do have an application that does that sort of thing, but I'm not sure if it's used in this case.

ascii
quote site file=jes
send /path/JCL.txt

where JCL.txt is just a plain text file containing the JCL. The job runs when the file is done transferring.

My conversations with our mainframe group are exactly the same.. and when they say something is impossible, 99% of the time they're wrong!
 
That looks like it worked. I guess I need to just send in the JCL I want rather than calling the JCL that is already on the mainframe.

Eh. Whatever works.

Thanks chazoid!
 
You're welcome!
Is it possible to write JCL that executes JCL already on the mainframe? Another forum you might want to check out is
 
Well, the test script that comes with the MVS::JESFTP package does that, so I sort of assume it is possible. I'll check out that website. Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top