Automated Testing

Automated Testing

Automated Testing

Build an automated testing process to enable continuous integration of your hybrid cloud applications including z/OS

 View Only
Expand all | Collapse all

Automate Startup & Shut down of zDnT v10.0

  • 1.  Automate Startup & Shut down of zDnT v10.0

    Posted Tue June 13, 2017 01:18 AM

    Hi Team,

       We want to automate startup & shut down of zDnT v10.0 so that we can schedule the same.

    We have zDnT v10.0 with ADCD z/OS v2.2 installed on Cloud.

    However, for starting zDnT/zOS, there is dependency of executing the start command in Linux GUI.

    So that, z/OS console can start while starting zDnT.

    Is there any way we can automate the startup of zDnT/zOS alongwith zOS console in Linux GUI.

     

    Regard

    Gautam

    GautamSGhosh


  • 2.  Re: Automate Startup & Shut down of zDnT v10.0

    Posted Mon June 19, 2017 10:06 AM

    Could you explain more in detail? There is the way to automate in linux using shell scripting. But, it all depends what do you want to automate..

     

    ZDTNeeraj


  • 3.  Re: Automate Startup & Shut down of zDnT v10.0

    Posted Mon June 19, 2017 11:22 AM

    Please see this post also. I am not sure, if it suffice your needs.

     

    https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014617809&ps=25

    ZDTNeeraj


  • 4.  Re: Automate Startup & Shut down of zDnT v10.0

    Posted Tue June 20, 2017 08:40 AM

    Thanks Neeraj,

       I referred the other post, prior to posting this question.

    However, my requirement is that zDnT & z/OS should start/stop alongwith the Linux server on Cloud without any manual intervention.

    As mentioned in other post, since there is no facility to orderly shutdown z/OS from Linux.

    We were planning to schedule 'awsstop' command prior to bringing down of Linux server on cloud. Kindly confirm if this approach is good as per requirement.

    Also, for starting zDnT/zOS, there is dependency of executing the start command (i.e. runzpdt script) in Linux GUI.

    So that, z/OS console can start while starting zDnT.

    Is there any way we can automate the startup of zDnT/zOS alongwith zOS console in Linux GUI ?

     

    Kindly suggest. Also me know if any more information is required.

     

    Regards

    Gautam

     

    GautamSGhosh


  • 5.  Re: Automate Startup & Shut down of zDnT v10.0

    Posted Tue June 20, 2017 09:30 AM

    Hi Gauthan,

    You will need good knowledge of Linux script, what I believe you and your team have. Just follow all the steps documented in our Knowledgecenter for the installation and startup of the z?OS and put all the commands in the script.

    Put this script In the Linux activation directories/files and it should bring up your z/OS automatically. 

     

    AdilsonColombo


  • 6.  Re: Automate Startup & Shut down of zDnT v10.0

    Posted Tue June 20, 2017 11:06 AM

    To have your shutdown automated..You can write the linux bash script and do the following procedure in the linux script.

    1, activate console.

    2, invoke the shut down mainframe member.

    3, issue stop JES2 command.

    4, deactivate console.

    5, issue awsstop

     

    ZDTNeeraj


  • 7.  Re: Automate Startup & Shut down of zDnT v10.0

    Posted Tue June 20, 2017 11:20 AM

    Hi All,

    You can use below command to activate and deactivate the console.

     

    oprmsg 'vary cn(*),activate'

    oprmsg 'vary cn(*),deactivate'

    I tried to create the Linux bash as below.

    #!/bin/bash
    pf=`oprmsg V 'CN(*),ACTIVATE'`
    `oprmsg "$1"`
    sleep 2
    pf=`oprmsg V 'CN(*),DEACTIVATE'`

     

    Please see the document, If you want console messages to capture

     

    ZDTNeeraj


  • 8.  Re: Automate Startup & Shut down of zDnT v10.0

    Posted Tue June 27, 2017 07:59 AM

    Hi Neeraj,

       Thanks a lot for sharing the document for capturing console messages to Linux File.

    Just had a query about the same.

    Is possible to automatically create new 'console_log.lst' file for each IPL.

    Eg. parameterizing file name to append timestamp, so that we have new console file for each IPL. 

     

    Regards

    Gautam

    GautamSGhosh


  • 9.  Re: Automate Startup & Shut down of zDnT v10.0

    Posted Tue June 27, 2017 11:07 AM

    Hi Gautam,

    You can do it. You need to use series of Linux commands. You need to write some bash or shell script for it. Feel free to write some commands in the runzpdt script for your purpose too. Take a backup before you edit anything.

     

    Thanks,

    Neeraj

    ZDTNeeraj


  • 10.  Re: Automate Startup & Shut down of zDnT v10.0

    Posted Tue June 27, 2017 03:47 PM

    Hi Gautam,

     

    As soon as you issue oprmsg 'vary cn(*),activate'..All message will be captured in the log (logs directory logs_console file). This is not deleted and keeps records of all logs in there. You can modify the runzpdt and include console activate command after wait (sleep(10 or 20)). I think it will serve your purpose. If your requirement is slightly different, you can write bash/shell script to write and automate.

    Below command can also be helpful for your automation:

     

    /home/ibmsys1/z1090/logs directory



    Run the command tail -f log_console*

     

    You can see all the console messages on your linux screen. It does nothing but reading the last updated line from log file and display on screen. There are many ways to automate, but, it all depends on your requirement and objectives.

     

    Thanks,

    Neeraj

    ZDTNeeraj


  • 11.  Re: Automate Startup & Shut down of zDnT v10.0

    Posted Wed July 26, 2017 09:08 AM

    Hi Neeraj,

       Thanks for you inputs. We were working on the same.

    We are now able to schedule shutdown through crontab.

    Regarding the startup script, we are able to execute manually & using 'at' command.

    However, when scheduling using crontab, we are getting error as below.

    UIM Child program cannot start. rc=-1 errno=2 (No such file or directory)

    PFA startupscript, runzpdt & error log.

     

    Kindly help us to resolve the same.

    Awaiting your response.

     

    Regards

    Gautam

    GautamSGhosh