1 IBM Z/OS Automation and Monitoring UniversitySA Education Creating an APL IBM Z/OS Automation and Monitoring University
2 IBM Z/OS Automation and Monitoring UniversityCreating an APL I will demonstrate how to create a APL that does not require JCL or Programs/Procs. This APL can be used with hands on labs to learn System Automation features and functions. IBM Z/OS Automation and Monitoring University
3 IBM Z/OS Automation and Monitoring UniversityGetting started Get started choosing option 6 APL in the SA Policy Dialogs. IBM Z/OS Automation and Monitoring University
4 IBM Z/OS Automation and Monitoring UniversityCreate a New APL Create a new APL entry using the ‘N’ command. IBM Z/OS Automation and Monitoring University
5 IBM Z/OS Automation and Monitoring UniversityDefine New Entry Fill out a Entry name. This is how SA knows the APL. The Job Type is ‘NONMVS’. This allows us to run without JCL. The Job Name must follow MVS job name requirements. IBM Z/OS Automation and Monitoring University
6 IBM Z/OS Automation and Monitoring UniversityPolicy entries The following policy entries are required. We filled out a description and Application info when the APL was created. Startup and Shutdown are left. IBM Z/OS Automation and Monitoring University
7 IBM Z/OS Automation and Monitoring UniversityStartup commands We are going to define two Startup commands as follows (you will find them in the text box below the video for easy cut&paste): ACTIVMSG JOBNAME=&SUBSJOB UP=NO AFTER 00:00:05 ID=&SUBSJOB ACTIVMSG JOBNAME=&SUBSJOB UP=YES Let’s look closer at the commands. The commands are using ACTIVMSG to set the APL status. Remember that these are NONMVS Job Types, so we have to tell SA what the status of the APL is. AFTER 00:00:05 is setting a timer that waits 5 seconds and then executes the action. &SUSBJOB is the application job name from the automation control file. This way the actual jobname does not need to be coded. We could also code JOHNAPL1 if we like. The reason for using the runtime variable &SUBSJOB is to make a CLASS easier to code. IBM Z/OS Automation and Monitoring University
8 Startup Commands panelSelect Startup from the Policy item list and then Startup Phase IBM Z/OS Automation and Monitoring University
9 IBM Z/OS Automation and Monitoring UniversityStartup Commands Note that the second command is to long to find on the line so you will have to hit f11 to scroll right as shown on next panel. IBM Z/OS Automation and Monitoring University
10 Startup Commands – continuedScroll right to finish coding the command. IBM Z/OS Automation and Monitoring University
11 Startup Commands – completedNotice we now show two Startup commands coded IBM Z/OS Automation and Monitoring University
12 IBM Z/OS Automation and Monitoring UniversityShutdown commands Select the Shutdown Policy item next. We will be coding two commands for the NORM phase. IBM Z/OS Automation and Monitoring University
13 Shutdown Commands – continuedWe are going to code two Shutdown commands (also included in the text box for easy cut&paste): TERMMSG JOBNAME=&SUBSJOB FINAL=NO AFTER 00:00:05 ID=&SUBSJOB TERMMSG JOBNAME=&SUBSJOB FINAL=YES TERMMSG allows us to put the APL into Termination processing and set the final termination message. IBM Z/OS Automation and Monitoring University
14 Shutdown Commands PanelPs is for the Shutdown Pass. All of the Pass1 commands are processed first, then after a delay any pass commands would be processed. IBM Z/OS Automation and Monitoring University
15 Shutdown Commands completedWe see we have two shutdown commands coded IBM Z/OS Automation and Monitoring University
16 IBM Z/OS Automation and Monitoring UniversityAPL is created That is all we need to do to create an APL. Let’s review: Job Type has to be NONMVS. Valid Job Name even though there is no JCL running. Code the two Startup commands to set the APL in Available status. Code the two Shutdown commands to set the APL in Softdown status. See https://ibm.biz/BdH8up for more information. IBM Z/OS Automation and Monitoring University
17 IBM Z/OS Automation and Monitoring UniversityFinal Thoughts Creating an APL for testing is quick and easy. The only cumbersome part is coding the Startup and Shutdown commands. You can make creating an APL even faster if you use an APL CLASS to automatically code entries for you such as Startup and Shutdown commands. Watch the next video on creating an Application Class to see how to do this. IBM Z/OS Automation and Monitoring University