On Wed, May 22, 2013 at 10:28 AM, Roberts, John J <[email protected]> wrote: > Here at DHS we are developing a major application that runs on Linux and > Oracle. > > This application will need to have batch file interchanges with the z/OS > Mainframe. Most of the file transfers are inbound to z/OS, but a few are > outbound back to Linux. > > Security rules dictate that we must use secure protocols for file transfers, > even though the Linux Servers and the Mainframe will be side-by-side in the > Intranet. For us this means SFTP. So for inbound this means that shell > scripts on the Linux boxes will initiate an SFTP session with the UNIX side > of our mainframe and PUT files. Then we need to run an MVS job to pull the > data from the Unix File system into a regular MVS Generation Data Set. And > we need to tell the CONTROL-M Scheduler that this has been done so that it > can schedule all the follow-on work. > > For outbound we need to push the file from an MVS dataset into the Unix File > System. Then we need to initiate a shell script to cause the file to be sent > to the remote Linux server. And once it arrives there, we need to tell a > different instance of the CONTROL-M Scheduler that the file has been > transmitted successfully. > > I know how to do some parts of this, but I wonder about some details: > > 1. Is it possible for a z/OS UNIX Shell Script to SUBMIT an MVS JOB? I > know I can do plain FTP with FILETYPE=JES. But is there a more direct way > that doesn't involve putting plain text passwords on the wire?
If you are running a z/OS UNIX shell, you can submit a job using /bin/submit. This is a standard z/OS UNIX command in at least z/OS 1.12 and above. This can submit from a z/OS UNIX resident UNIX file or from "stdin", if no file is specified in the UNIX command line. > > 2. Is the CONTROL-M Scheduler capable of monitoring the creation of MVS > files and kicking off a job when this event is detected? Is this a basic > capability of the product, or is a special add-on needed (we have a very > small CTM Environment, w/o many of the goodies). Ask vendor? I don't know. > > 3. Is CONTROL-M capable of monitoring file creation in the UNIX side? Ask vendor? I don't know. > > 4. I know that z/OS Unix Shell Scripts can use the "cp" command to copy > files from HFS to MVS, using the "//'HLQ.WHATEVER'" notation. But will this > work with GDG's to create the +1 generation? And how do you control > DCB/SPACE attributes for the receiving file? No, you cannot output to a relative GDG at all. Not even SOME.GDG(-1). The parser thinks that is a PDS with the name SOME.GDG with the member name "-1". > > 5. What are the chances of being able to transfer BINARY VB files > successfully? I note that SFTP doesn't seem to have LOCSITE RDW options. What are the chances of winning the Powerball 17 times in a row? <grin/> I don't think you have any hope of doing this directly. See below for a 3rd party recommendation. > > 6. Does CONTROL-M have any basic capability to be signaled that an > event has occurred such that it will then trigger follow-up processing? If > so, can you do this from shell script? Ask vendor? I don't know. > > If any can help with this, it would be much appreciated. I only know enough > about Unix System Services to be dangerous, and even less about CONTROL-M. > For CONTROL-M we are really running on autopilot since our expert departed a > couple years back. ==== alternative 3rd party product endorcement ==== Run, don't just walk over to: http://dovetail.com/solutions.html This is for Co:Z from Dovetailed Technologies. You, being in the U.S. Gov, may not be allowed to install this. But this can be installed by a normal user with full usability. It does not require any special authority to install (i.e. you don't need to be root, nor have APF, or install to a system load library). Co:Z has programs: fromdsn - read a legacy data set and write to stdout; todsn - read "stdin" and write to file; tofile - read "stdin" and write to UNIX file; fromfile - read from UNIX file and write to stdout. The first two uses are obvious, they are an easy way to read a z/OS data set to process it in a shell script. But wait! There's more! There are binaries for Linux/Intel, AIX, Solaris, and Windows, and source to port these to some other UNIX variant. When you run these on a remote system, you can use a parameter "-ssh user@zossystem" to read z/OS sequential data sets (fromdsn) and z/OS UNIX files (fromfile), writing to "stdout" so on the remote you could do: fromdsn -ssh user@zos 'my.sequential.data.set.non.gdg' >my.ascii.output file If you need binary, then include the -b switch. If you need something other than from IBM-1047 to ISO8859-1, then use the "-f zos-ccsid" to specify the z/OS code page and "-t receiver-ccsid" to specify the receiver's code page. Oh, you want binary RDWs too? Not a problem: "-b -l rdw " on the command. The todsn / tofile do the opposite. They read "stdin" and write to a z/OS legacy data set or a z/OS UNIX file respectively. Who needs sftp? Also, in this package is an improved sftp server which can read/write z/OS legacy data sets, in either BINary or ASCII mode. Read more at the referenced site. The package can do even more if you want to run UNIX scripts "in line" in z/OS batch jobs. Even to remote ssh servers such as Linux, UNIX, and Windows. > > John > -- 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 [email protected] with the message: INFO IBM-MAIN
