Cobol PGM Selective Deploy


Contents

NOTE: If you wish to rerun this Test Drive Script, simply pick the same element if you ended successfully and start over. If you did not end successfully pick another COBOL program (TPROG01, 02, 03, etc.) to use and start the script over. Any other errors will require that you contactBMC Support Central

Getting Started with SCM – BMC AMI DevX Code Pipeline

The goal of this Test Drive is to deploy a Cobol program to multiple environments using Selective Deploy. BMC AMI DevX Code Pipeline can be configured so that users can select the environment(s) where programs are deployed. Code Pipeline enables developers to quickly and safely build, and test their mainframe code.

This Test Drive will take you through the following activities:

  • Creating an Assignment
  • Adding a Cobol program to the assignment
  • Making a change to the program
  • Generating/compiling
  • Promoting 
  • Selective Deploy
  • Viewing the deployment information
  • Moving to production
  • Automatic Deploy
  • Closing the assignment 

Instructions:

  • This guide contains many screenshots to provide a visual reference
  • Specifies every action you must take
  • Please note each place that you must enter your own specific ID or number
  • You must complete each step before proceeding to the next to successfully follow the guide

If at any point during your experience the host connection times out, you may need to log back into the Test Drive host connection.

In this Test Drive the screen shots provided have used specific values that may differ from your assigned values. These were provided in your email notice. Substitute your values in the screenshots.

Do This

Start your Test Drive by clicking here.

Adding A Cobol Program To The Assignment

Your development task in this Test Drive is to change a Cobol program using the BMC AMI DevX Workbench for Eclipse editor, then generate and deploy it to selected environments using Code Pipeline. After you will complete the promotion through the Application Life-Cycle to Production.  

First, you will find and add a COBOL program into an Code Pipeline Assignment from which you can perform all the work. 

Do This
  • Change the Stream to CWEZ
  • Change the Application to your assigned application value (Txxx, where xxx is your unique number)
  • Note: The SubAppl field will default to Application
  • Set the Level to PRD and ensure the Level option is set to Selected level only or All found in level and above both settings will return the same results since there is nothing above PRD
  • Filter the view even further by setting the Type to COB, this will allow you to focus only on the COBOL program components available in your stream | application at the PRD level. Click Apply (circled)

Screenshot 2023-04-05 113910.png


The Repository View lists the COBOL Components for your application.

2.png

Do This

Scroll through the list and find TPROG01 at level PRD. Right-click on it and click Add to Assignment with Checkout.

3.png

Do This

From the Add Task dialog box (screen shot not shown), select NEW to the right of Assignment. This will allow you to create a new Assignment Container to put your COBOL program into. Change the default path to DEV2 and type a description then click OK.

4.png

Ensure the path is DEV2 as Selective Deploy is only configured for this leg of the lifecycle. 

Do This

Code Pipeline will issue a message confirming that the Assignment was successfully created. Click OK (screenshot not shown). Your new Assignment number will appear in the Assignment field and the PATH should change to DEV2. Click OK. A message will be displayed to inform you that the task has been added to your Assignment. Click OK (screenshot not shown). 

5.png


Your Assignment has been created and you will have a COBOL program in it. The Assignment view will open and the Task that was added will be listed.

Do This

Click on the Tasks View to continue. To see the Life-Cycle path structure that was constructed for the Application, click once on the Task, and then click on the View Life-Cycle icon.

6.png


A picture of the Life-Cycle is presented. By choosing the DEV2 Level, you have defined the Path to Production→DEV2-QA2-STG-PRD.

7.png


If you would like to resize the Life-Cycle navigate to the tool bar on top of the DevX Workbench screen and select the drop down arrow circled in the image below. Preset values of 30%, 80%, 100%, 120% and Page will be presented. Page will automatically size the Life-Cycle to fit the space available within the Life-Cycle view. You can also click on the value within the box and change it to a custom value if desired. If the tool bar is not visible click on Window → Appearance → Show Toolbar. 

8.png


Now that you have a Version of a COBOL program the next step would be to make changes to it. 

Do This

To do this either right-click on TPROG01 and click Edit or simply double-click on it. The version's source will be presented in the DevX Workbench Editor for editing. If you see the Copybook Download message you can either click Yes or check Use this as the default and do not ask again and then click Yes. This will download the contents of the copybooks, so they can be used by the DevX Workbench Editor for various activities.

9.png


Do This

Change the source using the DevX Workbench Editor (don't break the program). Once you have made your changes, close the DevX Workbench Editor view. Click Yes to save the changes.  

Note the Operation, Date/Time, and User ID fields have been updated to reflect the change in the Task status.

10.png


Generate (AKA Compile)

The COBOL program will be generated/compiled, and your Assignment Task List will be updated to reflect the new status.

Do This

To do this, right-click on TPROG01 and click Generate. The status column will display a message indicating that the Task is being generated.

11.png

The Message will be updated to reflect the successful completion of the generate and the date and time will be updated. The screen will refresh automatically when the generate is done. At that time, the Task will be updated with the date and time of the generate, the user who performed the generate, and the operation will reflect a generate has occurred.

Promoting 

At this point you have:

  • Created a new assignment
  • Checked out a Cobol program to the assignment
  • Viewed the lifecycle
  • Changed your program
  • Generated your program

Now you are ready to promote your program to the QA2 level.

Do This

To promote the Task to the QA2 level, right-click on the Task and click Promote.

12.png

Selective Deploy

You will now be prompted to select the environments where TPROG01 will be deployed. Selective Deploy allows for users to choose the runtime / execution environments (Db2, CICS, Batch, etc) that programs are deployed to and can be configured at any hold or production level of the lifecycle. Users have the option to deploy to a select few or all of the environments available. In this Test Drive Selective Deploy is configured at the QA2 level. 

Do This

Select the radio button next to "Deploy to specific environments" and check the boxes next to the QATST1 / QATST2 environments. Click OK to start the promotion and deployment. 

Selective Deploy.png


A notification will appear in the lower right of the DevX Workbench indicating the Promotion has completed. 

PromoteCompleted_1task.png


You will now see TPROG01 at level QA2 with a last operation of implement in the tasks view.

14.png


You can view information on the deployments that occurred to both QATST1 and QATST2 environments. 

Do This

Right-click on TPROG01 and select View → Task History

15.png


The Task History shows all the operations done against TPROG01 along with the time and set that was used to perform the work. 

16.png

Do This

To get to the deployment view right-click on the implement operation and select View Deployments for the Set. 

17.png


The Deployment view is opened and filtered on the set used for the deploys of TPROG01. 

18.png 

Do This

Highlight the set for the deployment to QATST2, right-click and View Package Details.

19.png

Package Details displays the modules that were deployed and the datasets they were deployed to. 

Do This

Highlight the first BATCH deploy. You will see in the window the program that was deployed and the name of the dataset it was deployed to, along with other information.

20.png


If you highlight the next package, you will see the dataset where the Listing (DDIO) was stored. Notice the tasks were deployed to the TST2 sub environment. Click Cancel. 

21.png

Use the scroll bar on the right side of the dialog box to scroll down if you do not see the item when highlighting the package. 

Do This

Now highlight the set for the deployment to QATST2, right-click and View Request Details.

22.png


This View contains additional detailed information on the deploys. You will see all the information pertaining to the deploy request, dates, times, dataset names, etc.

23.png

The steps above showed information for the deploy to QATST2. If you would like to see information for the deploy to QATST1 repeat these steps.  


Moving To Production

Now you want to promote TPROG01 up through the lifecycle and to production. 

Do This

Click on the Tasks View to continue. To promote the Task to the STG level, right-click on the Task and click Promote.

24.png


TPROG01 will now be at the STG level and ready to be promoted to Production. 

25.png

Do This

To promote the Task to the Production level, right-click on the Task and click Promote.

26.png


A notification will appear in the lower right of the DevX Workbench indicating the application has been configured to require an approval for the promotion to PRD. The Tasks are locked in a SET for a Promote process, but the SET needs approval before the promote can proceed.

ApprovalRequired.png


The Approval can be performed from:

  • DevX Workbench/Code Pipeline
  • TSO/Code Pipeline
  • Web browser
  • Mobile browser

For this Test Drive you will do the approval from DevX Workbench/Code Pipeline.

Do This

Right-click TPROG01 and select View → Approvals. 

28.png



Do This

Right-click on CWEZMGR and select Approve. This will approve the promotion and all Parts will be promoted to PRD. Code Pipeline will now perform the promotion of the Tasks collected in the SET to the PRD Level. Now click on the Tasks View to continue. 

29.png


Automatic Deploy

You will see that TPROG01 is now at the production level and the last operation on the task is Implement. This is because the production level is configured to automatically deploy to 2 different LPARs, CWC2 and CWCC. Unlike Selective Deploy, this Automatic Deploy does not give the user an option to choose the environments where the programs are deployed to. The deployment starts once the task is successfully promoted to the production level. 

30.png


Now you want to view the deployment information for the deploy that occurred at production. 

Do This

As earlier in the script, right-click on TPROG01 and select View → Task History. 

31.png


You will see that the promote to production occurred and was immediately followed by the deploy. 

32.png


Do This

To get to the deployment view right-click on the operation Implement at PRD and select View Deployments for the Set. 

33.png


Do This

To view the deployment request and the individual packages / items right-click the set and select View Request Details. 

34.png


On the left it can be seen that 4 packages deployed (2 to lpar CWCC and 2 to lpar CWC2) and all are marked as completed. Within each package is an item, which in this case was either a LOAD or DDIO module. Next we will dig a bit deeper and view information for both the package and item.

35.png


Do This

Click on the package that was used to deploy the LOAD module to CWCC. Here the start / end time, status and environment to where the package was deployed can be seen.  

36.png


Do This

Under the package click on the first Item 1 TPROG01 LOAD. Displayed is details pertaining to the LOAD module that was included in the package. Information such as the Type, Part ID and Storage dataset it was deployed to can be seen here. Now click Cancel. 

37.png


The steps above showed how to view the details of a package and the items included within the package from the deploy request panel. This information can also be viewed by selecting View Package Details when on the Deployment View. If you would like to see details on the remaining packages / items repeat the steps above. 


Closing The Assignment

You have completed your Test Drive, now it is time to close the assignment. As a Developer you are now finished with your Assignment, so it can be closed. Assignments are closed manually and are usually closed to unclutter the Container List View.

Do This

Click on Containers View. To Close your Assignment, right-click on your Assignment and click Close.

38.png

A Close confirmation panel is presented. 

Do This

Click OK to complete the Close.  

39.png

For audit purposes, Closed Assignments, Sets, and Releases are never deleted from Code Pipeline. They are just filtered out of the standard day-to-day filtering. Once an Assignment, Set, or Release is closed it is removed from the standard filtered list, but it is still part of Code Pipeline history and can be viewed at any time.

You are done! Your job has been to change a Cobol program and promote to Production. As a part of this exercise, you have used DevX Workbench and Code Pipeline to execute a workflow:

  • Created an Assignment
  • Checked out a Cobol program to the DEV2 level
  • Made a change to the program
  • Compiled/Generated the program
  • Promoted the Task from DEV2 to QA2
  • Selected the QATST1 and QATST2 environments for deployment
  • Viewed the Task History
  • Viewed details of the Selective Deploy
  • Promoted from QA2 to STG 
  • Promoted from STG to PRD
  • Approved the promotion to PRD
  • Viewed details of the Automatic Deploy
  • Closed your Assignment to complete the change cycle

Congratulations! This completes the Code Pipeline tutorial for BMC Test Drive.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*