Wow John, thanks for the lengthy reply. I appreciate it. It's guys like you 
that help us little twits get over the bumps in the road. :)

-----Original Message-----
From: Linux on 390 Port [mailto:[email protected]] On Behalf Of McKown, 
John
Sent: Friday, November 02, 2012 10:51 AM
To: [email protected]
Subject: Re: z/OS and zLinux

You sure can share the data. Perhaps the simplest way is to use NFS. I have 
successfully done a MOUNT of a Linux subdirectory on a z/OS system. Now, it can 
get a bit "hairy" to do it correctly. First, you must use NFS on the Linux  
system to "export" the subdirectory. You must be running the NFS client started 
task on z/OS. You can then MOUNT that subdirectory on z/OS onto a z/OS UNIX 
path. The MOUNT command on z/OS (a TSO or UNIX command, not an operator 
command) says whether to do a "binary" (no data translation) mount or a "text" 
(NFS translates ASCII<->EBCDIC, specifying specific code pages) mount. You then 
write the data on Linux. You z/OS batch job can then read the data via NFS. 
Suppose the data on Linux is in /nfs/zosdata/file.data. Further suppose that 
the path /nfs/zosdata is exported via NFS on the Linux side, and MOUNTED on the 
z/OS side at the path "/linux/data". Also suppose this is a report. That is, it 
is TEXTUAL data, and MOUNT'ed on z/OS that way. In you batch job, you can use 
IEBGENER to copy it easily like:

//COPYDATA EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT2 DD DISP=(NEW,CATLG),
//      DSN=some.output.dsn,
//      DCB=(...)
//SYSUT1 DD PATH='/linux/data/file.data', // PATHOPTS=(ORDONLY),FILEDATA=TEXT, 
// LRECL=??,RECFM=??,BLKSIZE=??
//* REPLACE LRECL, RECFM, AND BLKSIZE WITH GOOD VALUES
//*

===

Now, if you are going to do this sort of thing a lot, I have a strong 
suggestion. *IF* your management will approve! Run, don't walk, over to 
http://dovetail.com/solutions.html and download the Co:Z Co-Processing Toolkit. 
It is cost free to download and use. You don't even need to register! Not even 
tell them your name nor *anything*. Just download it. Commercial support is 
available if wanted. What does it get you? Well, assuming you have SSH running 
on Linux (who doesn't?), this software will allow a batch job to connect to the 
Linux instance and execute one or more Linux commands with the responses coming 
back to the z/OS batch job. If you install the software on the Linux system, 
then you have more commands. The "neatest" ones are: fromdsn, todsn, fromfile, 
and tofile. These commands allow the batch job to send and receive data from 
z/OS datasets (...dsn) and UNIX files (...file). An example of something that I 
actually do, to backup my Linux ${HOME} subdirectory to a z/OS tape:

//BACKUP EXEC PROC=COZPROC,ARGS='[email protected]'
//STDOUT DD SYSOUT=*
//STDERR DD  SYSOUT=*
//CEEDUMP DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//STDIN DD *
tar cvj . |\
todsn -b //DD:TAROUT
/*
//TAROUT DD DSN=TSH009.LINUX.HOME.TAR.BZ2(+1),DISP=(NEW,CATLG),
// SPACE=(CYL,(200,100)),UNIT=(SYSDA,10),
// RECFM=U,BLKSIZE=27998,DSORG=PS

The "tar" and "todsn" commands are sent to my Linux system (I use an IP because 
there is no DNS entry, use DNS if possible). It uses "tar" to put the data in 
my ${HOME} to stdout, compressing it with bzip2. This is piped into the "todsn" 
command on Linux. This command uses the SSH connection to send the data back to 
the batch job, which writes it out to the TAROUT DD statement.

Now, if your DB2 process puts its output out to stdout, you can do the same 
thing with its output. Since it's a report, you don't want to use the "-b" (for 
binary) switch, but can use other switches to specify the source code page and 
target code page, if they are not the defaults of ISO8859-1 and IBM-1047. If 
the DB2 process puts its output to a file, then you can simply use "todsn" to 
put it to a DD allocated to SYSOUT (if wanted), using redirection to read the 
input Linux file. The big plus of this, to me, is that you can schedule this 
job to run the DB2 process (if you have the proper authority) using your z/OS 
automated scheduler.

On the Linux side, if you are using a scheduler, such as cron, to run the DB2 
process, you can send the report back to z/OS by using the "todsn" (SYSOUT or a 
data set) or "tofile" (z/OS UNIX file) command. It rather easy, if you have 
z/OS SSH set up properly. It is as simple as:

cat db2-report.txt | todsn -ssh user@zos "//'hlq.mlq.llq'"

to send the report into the z/OS dataset "hlq.mlq.llq". If the dataset does not 
exist, then you need to include the -x switch to specify allocation parameters, 
if you can't live with the defaults.

--
John McKown
Systems Engineer IV
IT

Administrative Services Group

HealthMarkets(r)

9151 Boulevard 26 * N. Richland Hills * TX 76010
(817) 255-3225 phone *
[email protected] * www.HealthMarkets.com

Confidentiality Notice: This e-mail message may contain confidential or 
proprietary information. If you are not the intended recipient, please contact 
the sender by reply e-mail and destroy all copies of the original message. 
HealthMarkets(r) is the brand name for products underwritten and issued by the 
insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance 
Company(r), Mid-West National Life Insurance Company of TennesseeSM and The 
MEGA Life and Health Insurance Company.SM


> -----Original Message-----
> From: Linux on 390 Port [mailto:[email protected]] On Behalf Of
> Ward, Mike S
> Sent: Friday, November 02, 2012 9:55 AM
> To: [email protected]
> Subject: z/OS and zLinux
>
> I hope one of you can help me out with this. :)
>
> If you have zLinux and z/OS running under zVM and your zLinux ran a
> DB/2 application where the output data needed to get to the z/OS
> system for further processing. Can this be done in that type of environment?
> Or are the two systems so separated that they couldn't share the data?
>
>
> Thanks in advance.
>
> Mike!

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions, send email to 
[email protected] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For more information on Linux on System z, visit http://wiki.linuxvm.org/

==========================
This email, and any files transmitted with it, is confidential and intended 
solely for the use of the individual or entity to which it is addressed. If you 
have received this email in error, please notify the system manager. This 
message contains confidential information and is intended only for the 
individual named. If you are not the named addressee, you should not 
disseminate, distribute or copy this e-mail. Please notify the sender 
immediately by e-mail if you have received this message by mistake and delete 
this e-mail from your system. If you are not the intended recipient, you are 
notified that disclosing, copying, distributing or taking any action in 
reliance on the contents of this information is strictly prohibited.

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For more information on Linux on System z, visit
http://wiki.linuxvm.org/

Reply via email to