Solved

Is it possible to run CMS commands or REXX programs from a zLinux?

Posted on 2011-09-12
6
1,038 Views
Last Modified: 2012-05-12
Hello experts

I have a rather strange question:

I currently have a zVM under Mainframe, which has various virtual machines (Linux SLES 10 SP3) running. I know that there's a command "vmcp" to issue CP commands to the user's vm (vmcp q na for example) which is currently working.

The question is: Is there any way to execute REXX programs residing in the guest vm from zLinux or execute CMS commands from zLinux as with vmcp?

Thanks in advance
0
Comment
Question by:Arrismog
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 57

Expert Comment

by:giltjr
ID: 36536477
Not sure if it is still supported, but IBM did provide a vmcp command for Linux running under z/VM at one time.

If you go here:

     http://linuxvm.org/Patches/index.html

and do a search on cpinit you will find a kernel module that should give you cp access from Linux.

You can also do a search on "vmcp Linux" and you should find refernence to vmcp.h and vmcp.c which are kernel patches that should give you the vmcp command from Linux.
0
 

Author Comment

by:Arrismog
ID: 36536683
@giltjr:

Yes, I already have cp command support via zLinux (new IBM s390 flavored zLinux kernel already have this support), I just added the vmcp module and works fine:

=======================================================
# vmcp q cplevel  <-- ran from linux
z/VM Version 5 Release 3.0, service level 0802 (64-bit)  <-- zVM output
Generated at 02/06/09 17:40:15 CDT
IPL at 07/10/11 04:36:24 CDT
=======================================================

What I'm looking for (if possible), is to run CMS commands (like listfile from the guest vmuser, receive, q cmslevel, etc), or invoking the guest vmuser's REXX programs from zLinux

Thanks in advance
0
 
LVL 57

Expert Comment

by:giltjr
ID: 36538605
My fault.  Focused on the wrong thing.

You can read:

http://www.mainframezone.com/it-management/exploiting-cms-cp-in-z-linux/print

It covers most of what I say here.

One way to do it is to setup NFS on zVM and access it as a NFS client.  There is also a cmsfs command (the article
references it) that allows access  to the CMS file system from Linux.

However, I 'm not sure what you mean by running REXX.  You can execute REXX from Linux, and the REXX file could be on a CMS FS, but it would still be running in Linux, just as if it was on the Linux FS.  You don't have access to CMS functions.

We have not run Linux under VM for awhile (rumor has it we have a project coming up where we need to again) and then it was only to "play with" for a year or so.  But I don't remember being able to execute CMS commands from Linux.  I don't remember having a need, so I never looked at it either.
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

Author Comment

by:Arrismog
ID: 36540032
@giltjr:

Nice article, didn't know the cmsfs package, I've been playing with it a little and now I can list, cat, copy files from cms volumes from zLinux :D!

About running REXX from linux, I meant about a zLinux executing a REXX residing in a vmuser's minidisk, for example:

==================================
On vmUser1's 191 minidisk:

- File TEST EXEC A1:
/* xxxxx */
SAY 'some cms commands here'
'Q DISK'
'LINK TCPMAINT 592 592 RO'
...
...
=========================

- from zLinux, execute TEST.EXEC from vmUser1.195.


0
 
LVL 57

Accepted Solution

by:
giltjr earned 500 total points
ID: 36598610
If you can access the file TEST EXEC A1 from zLinux, then you should be able to execute it, that is assuming you have REXX installed and running under Linux.
0
 

Author Closing Comment

by:Arrismog
ID: 36818646
Finished setting up zVM-NFS-zLinux, ran REXX successfully

Thanks a lot! :D
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
IMAP copying tool 14 76
change script to get csv file on the prompt 8 33
Linux recover lost file deleted by mv 1 32
Bitcoin mining - Is it possible? 6 102
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Utilizing an array to gracefully append to a list of EmailAddresses
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question