Ability to SFTP to jES2 Internal Reader

Discussion of the Co:Z Co-Processing Toolkit for z/OS
Post Reply
jacobsm
Posts: 37
Joined: Thu Apr 23, 2009 9:18 am
Location: Tampa, Florida

Ability to SFTP to jES2 Internal Reader

Post by jacobsm » Wed Oct 13, 2010 7:45 am

Am I correct in stating that the ability to SFTP to a jES2 Internal Reader is only in the Beta 1.7.4 level of the toolkit?

I've followed the documentation using 1.7.2 but it doesn't seem to allow the CD command to the internal reader.

Do you have a GA date in mind for the 1.7.4 (or higher) production release?

Mark Jacobs

SteveGoetze
Posts: 382
Joined: Fri Jul 30, 2004 5:29 pm

Post by SteveGoetze » Wed Oct 13, 2010 9:43 am

You're right - the job submission feature is in the 1.7.4 beta release.

We don't have a firm date for production yet; but getting feedback on the feature will definitely help us out.

jacobsm
Posts: 37
Joined: Thu Apr 23, 2009 9:18 am
Location: Tampa, Florida

Post by jacobsm » Wed Oct 13, 2010 12:16 pm

I downloaded the 1.7.4 release and try it in our test environment ASAP.

jacobsm
Posts: 37
Joined: Thu Apr 23, 2009 9:18 am
Location: Tampa, Florida

Post by jacobsm » Fri Oct 22, 2010 2:00 pm

I tried it in our test environment and after I followed the documentation correctly I was able to successfully sftp a batch job to the internal reader.

Since this uses sftp and not ftp to submit jobs I assume that the FTP JESINTERFACELEVEL setting has no effect on the process.

Mark Jacobs

dovetail
Site Admin
Posts: 1956
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail » Mon Oct 25, 2010 2:14 pm

Glad it worked for you....

You are correct, JESINTERFACELEVEL is an IBM FTP thing, and is unrelated to Co:Z SFTP.

You may have noticed that we have done a few things different than FTP with respect to JES job management. One thing is that it is possible to wait for any job to complete, using the "jesjobwait" setting.

We will be doing a Webinar on Thursday to review the new features in Co:Z SFTP, especially the JES interface.

To sign up:
https://www3.gotomeeting.com/register/294888390

JohnMcKown
Posts: 39
Joined: Sat Nov 21, 2009 2:59 pm

Post by JohnMcKown » Thu Oct 28, 2010 12:14 pm

One nice thing I've found about this is that if you have SSH on your desktop set to run in "master" mode, then you can SSH to the z/OS system and let it "set" at a UNIX shell prompt. But you can then use sftp on other desktop command prompts or in shell script to do things WITHOUT needing to put in your password again. So, normally to submit a batch job, I would:

Code: Select all

sftp user@host
...enter in passphrase
ls /+mode=text
cd //-jes.intrdr
put job.jcl jobname
quit
But I can now create a file (say called "submit') with the contents above and just

sftp -b submit

This leads to writing a UNIX shell script akin to:

Code: Select all

#!/bin/sh
if [ $# -eq 0 ]; then
        echo "You must supply one or more file names."
        exit 1
fi
file=$(mktemp -q --suffix=.submit --tmpdir=/tmp "${LOGNAME}.XXXX")
if [ $? -ne 0 ]; then
        echo "Could not create temporary submit file."
        exit 1
fi
cat <<EOF >$file
ls /+mode=text
cd //-jes.intrdr
EOF
count=0
for i in "$@";do 
count=$(($count+1))
echo "put $i submit${count}";
done >>$file
sftp -b $file user@host
rm $file
This assumes each file is a separate and complete job. If you had a single job contained in parts contained in multiple files, then a script such as the following would "cat" the files together before doing the submit.

Code: Select all

#!/bin/sh
if [ $# -eq 0 ]; then
        echo "You must supply one or more file names."
        exit 1
fi
file=$(mktemp -q --suffix=.submit --tmpdir=/tmp "${LOGNAME}.XXXX")
if [ $? -ne 0 ]; then
        echo "Could not create temporary submit control file."
        exit 1
fi
jcl=$(mktemp -q --suffix=.jcl --tmpdir=/tmp "${LOGNAME}.XXXX")
if [ $? -ne 0 ]; then
        echo "Could not create temporary submit jcl file."
        exit 1
fi
cat <<EOF >${file}
ls /+mode=text
cd //-jes.intrdr
EOF
cat "$@" >${jcl}
echo "put ${jcl} submit" >>${file}
sftp -b ${file} user@host
rm ${jcl}
rm ${file}
You might do this for a compile where you have various "step" and "data" in different files. Eg:

subcat job.jcl assemble.jcl program.asm link.jcl null.jcl

would "cat" those files together to a temporary file and submit that file.

Post Reply