OPS/MVS

 View Only
  • 1.  How to validate USS Mounts in OPS/MVS

    Posted Jan 23, 2017 08:48 AM

    I have a z/OS application that needs the mounts available when it runs.  However, there are times when they get unmounted.  Is there a way in OPS/MVS to

     

    1) To verify the file is mounted, like D OMVS,F,FN=

    2) If not mount, then issue a MOUNT process

    3) be able to verify when the file gets unmount

    4) Be able to query STDERR and STDOUT to validate Unix messages

     

    I am not familiar with the USS function of OPS/MVS and I am curious if what I need to do can be done with the USS function.   I can see I can do this with batch Shell processes.  That is, OPS/MVS submit a batch BPXBTCH process and then have REXX review the output.  I am looking to see if there is a more direct path with OPS/MVS.


    Thank you

     

    Lizette



  • 2.  Re: How to validate USS Mounts in OPS/MVS

    Posted Jan 23, 2017 05:24 PM

    Hello Lizette,

     

    When time permits review the sample code we provide at CCLXSAMP(OMVSPID).

    This code does provide exactly all you are asking for but is a good starting point.

    As a sample you can customize it and add logic to do all you need to do.

     

    Let us know if this is good for starters Lizette

    Regards, Cesar



  • 3.  Re: How to validate USS Mounts in OPS/MVS

    Posted Jan 24, 2017 08:57 AM

    I was hoping that the ADDRESS USS might be helpful in this process.  I have not reviewed or used this function in OPS/MVS and had hoped it might provide the interface needed to review USS messages that are produced in STDOUT or STDERR.  Or that it could do the checks and mounts of USS files in z/OS

     

    Lizette



  • 4.  Re: How to validate USS Mounts in OPS/MVS

    Posted Jan 24, 2017 10:06 AM

    Hello Lizette,

     

    It is possible to use the ADDRESS USS OPS/REXX host command environment to issue USS commands and retrieve command responses. The commands are sent to the USS class of OSF servers for execution in a USS environment. The responses are then returned to the issuing OPS/REXX program in the form of REXX stem variables.

     

    When time permits today review if your OPSSPAxx parameter file have been setup properly to use these features:


    /*--------------------------------------------------------------------*/
    /* Activates the USS command and USS rule interfaces */
    /*--+----1----+----2----+----3----+----4----+----5----+----6----+----7*/
    T = OPSPRM_Set("INITUSS","YES")
    T = OPSPRM_Set("INITUSSPROC","YES")
    T = OPSPRM_Set("BROWSEUSSPROC","YES")
    T = OPSPRM_Set("USSACTIVE","ON")
    T = OPSPRM_Set("USSPROCRULES","YES")
    T = OPSPRM_Set("USSSTC","OPSD0USS")
    T = OPSPRM_Set("USSMIN","1")

     

    Also feel free to visit KD TEC1674318 I have created for clients working with OPSUSS Servers:

    https://www.ca.com/us/services-support/ca-support/ca-support-online/knowledge-base-articles.tec1674318.html

     

    Keep us posted Lizette on your progress.

     

    In the meantime I will be looking for installation provided OPS/REXX programs that can show you how one can interact with the USS environment using this feature. 

     

    Regards, Cesar



  • 5.  Re: How to validate USS Mounts in OPS/MVS

    Posted Jan 25, 2017 10:36 AM

    Hello Lizette,

     

    Hope you had the chance to review the last update on this Communities question from our Software Engineer team.

    Since I promised to provide you a sample on how to use Address USS this is a very simple one: 

     

    /* REXX */ 

     

    Say "This is a VTAM display: " 
    Address Oper 
    "C('D NET,E,ID=OPSWEB')" 
    Do while Queued() > 0 
    pull it 
    say it 
    end 

     

    Say "This is a TCP/IP display: " 
    ADDRESS USS "USSCMD COMMAND('nslookup -silent mvsxe38') STEM(UOUT.)", 
    "WAIT(120) LOG(Y)" 
    if UOUT.0 > 1 then 
    do y=1 to UOUT.0 
    say UOUT.y 
    end 

     

    This code, once it is customized to meet your VTAM id and TCP/IP hostname standards, is an example on how you can write code to gather information from two different sources. Once you have completed the steps I provided earlier to setup CA OPS/MVS and the USS class of OSF Servers you can use this OPS/REXX code to exercise both interfaces.

     

    Be aware that for the nslookup command to work you need to configure the USSENV00 member used by the OPSUSS PROC to change the RESOLVER_CONFIG= parameter to point to the TCPIP.DATA dataset in use by yout TCP/IP Stack. Since nslookup might not be something you need for your specific automation needs then you can change this command for something simple like a ls -la just to list the home directory where the user the OPSUSS task is running under has setup to use.

     

    Hope this all helps Lizette and feel free to cut a Customer Support issue in case you need more help.

     

    Regards, Cesar



  • 6.  Re: How to validate USS Mounts in OPS/MVS
    Best Answer

    Posted Jan 24, 2017 10:42 AM

    Full blown OPS/MVS => USS interface as mentioned would and will be useful if and when your automation needs to issue some unix shell command (same cmds that you would issue in JCL via BPXBATCH) AND there is not some direct OPS/MVS function (OPSUSS() to interrogate Unix processes) or z/OS command (like the D OMVS,F) to 'get' the information that you need. For this particular automation 'need' that is outlined, I would simply stick to an OPS/REXX pgm that issues the D OMVS,F,FN=name command and manipulates the output. If NOT found then issue the z/OS Mount command. Ideally, loop back and check status to verify that it MOUNTED. The CMDRESP(REXX) and TOKEN(YES) keywords added to Address OPER , facilitates the logic needed to manipulate command response output. In the output returned by the D OMVS,F command, it looks like you can either look at the mount mode status (4th word of 5th line) or the 4th line to include 'NOT FOUND' (not mounted). Here is a generic template of this Address OPER if needed to get you started. If you like this method and need more detailed coding logic to do this request, I can email over some specific code.


    /* Set the file name to be checked */
    filename = 'CHORUSYS.INO.CONF.CETJUDOC'

     

    /* Issue z/OS display command. Set up */
    /* To set all output variables.                   */

    address OPER
    "C(D OMVS,F,NAME="filename")",
    "Cmdwait(10) Cmdresp(REXX) Token(YES)"

     

    /* Just say the variable that would         */
    /* have the mount status value.             */

    say 'value of cmdout.5.4='cmdout.5.4

     

    /* Dump all variables for viewing to                     */
    /* assist with creating process logic if needed.    */

    d=dump()    



  • 7.  Re: How to validate USS Mounts in OPS/MVS

    Broadcom Employee
    Posted Feb 01, 2017 03:00 PM

    Lizette,  if you know of a file that needs to exist, you could issue a USSCMD  referencing it.   if

    ie.  The userid for the server will of course have permissions to view the directory in question.  

    cmd.0 = 0

    address uss 

    "USSCMD COMMAND("cd /abc/def/ghi/")  stem(cmd1.)"

    then if  RC=0 and USSCODE = 0 it exists.    if USSCODE = 1001 then it doesn't exist and you will see

    CMD.1=cd: /abc/def/ghi/: EDC5129I No such file or directory.

     

    if you point to a file, then you'll get  USSCODE = 1001 but cmd.0 won't be 0... 

    CMD.1=cd: /sys/usr/lpp/ops116/index.html/: EDC5135I Not a directory. 

    This sounds like what you had in mind...