Source Code Management, Deployment, and Release Automation - Change a COBOL Program - Compuware Test Drive

Page created by Karen Obrien
 
CONTINUE READING
Source Code Management, Deployment, and Release Automation - Change a COBOL Program - Compuware Test Drive
Compuware Test Drive
Source Code Management, Deployment, and
Release Automation – Change a COBOL Program
6/25/2019
Source Code Management, Deployment, and Release Automation - Change a COBOL Program - Compuware Test Drive
Contents
 Getting Started with SCM - ISPW ............................................................................................. 3
 Code Changes ....................................................................................................................... 7
 Generate (AKA Compile) ....................................................................................................... 30
 Promotion ........................................................................................................................... 38
 NEXT STEPS ........................................................................................................................ 51

                                                                                                                                Page 2
Source Code Management, Deployment, and Release Automation - Change a COBOL Program - Compuware Test Drive
Getting Started with SCM - ISPW
The goal of this Test Drive section is to provide you with experience using Agile Source Code
Management, Deployment, and Release Automation on a mainframe platform. Compuware ISPW
enables developers to quickly and safely build, test and deploy mainframe code.

This test drive will take you through the following activities:
   •   Creating an Assignment
   •   Code changes
   •   Topaz Workbench content assist
   •   Generating/compiling
   •   Promotion to Test and Production runtime environments
Instructions:
   •   This guide contains many screenshots to provide a visual reference
   •   Every action you must take is in BOLD
   •   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

The Compuware Test Drive Experience requires that users complete the Building Your
Environment

http://resources.compuware.com/hubfs/Test%20Drive/Building_Environment_with_Host_and_JES_Ex
plorers_TW_Test_Drive.pdf

exercise before starting any tutorial script. If, at any point during your experience, your
host connection times out, you may need to log back in to the Test Drive host connection.

                                                                                              Page 3
Source Code Management, Deployment, and Release Automation - Change a COBOL Program - Compuware Test Drive
To get started in the Topaz Workbench:
   • Open the Host Explorer perspective
   • Click on the arrow next to Hosts,
   • Right-click on Test Drive and select Login
   • Logon on with the user credentials that were provided to you for with the Test Drive
      and click OK
   •   Select ISPW from the Compuware menu

                                                                                    Page 4
Source Code Management, Deployment, and Release Automation - Change a COBOL Program - Compuware Test Drive
During this Test Drive you will encounter terms specific to ISPW. Here is a glossary for
your convenience.
      Terminology
       Term                    Description
       Application             Business Area

       Stream                  Development Life-Cycle used by one or more
                               Applications
       Life-Cycle              Transitional Code States (DEV, QA, PROD) in the
                               Development Life-Cycle
       Level                   Instance of a Code State (DEV, QA, PROD)
       Component               SCM managed object such as a Cobol source member.
       Component Version       An immutable version of a Component.
       Task                    An instance of a unit of work. For example, a change to
                               a Component.
       Part                    A generated object such as a load module, or a Listing
                               or a DBRM
       Warehouse               Storage location for inactive historical or overlaid
                               Component Versions (source and parts).
       Assignment Container    A package of one or more, usually related, Tasks. A
                               development container that is used to organize and
                               manage development work.
       Release Container       A package of Tasks from one or more Assignment
                               Containers. An operational container that is used to
                               organize and manage operational releases.
       Set Container           A package of Tasks at an instance in time. A special
                               ISPW container that is used internally to organize and
                               manage work requests.
       Add Task                Make a statement of intent, often because of some
                               impact analysis.
       Checkout Task           Copy source to development area
       Edit Task               Make a change to the source in the development area.
       Generate Task           Execute Compile and Link processes.
       Promote Task            Move Task forward to the next Level in the Life-Cycle.
       Regress Task            Move Task backwards to the previous Level in the Life-
                               Cycle.
       Delete Task             Remove a Task from the development area
       Fallback Task           Restore previous version of Task.
       Deploy Task             Implement Task in one or more Run Time
                               environments.

                                                                                         Page 5
Source Code Management, Deployment, and Release Automation - Change a COBOL Program - Compuware Test Drive
Substitute your values in the screenshots
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.

         While taking the test drive, you must substitute your assigned values!

        Variable                         Your Assigned Values

        Application                      Txxx*

        Assignment Prefix                Txxx*

       * For the value of xxx, substitute the last three digits of your test drive username.

                                                                                                   Page 6
Source Code Management, Deployment, and Release Automation - Change a COBOL Program - Compuware Test Drive
Code Changes
   Your development Task in this Test drive is to change a Cobol program using Topaz Workbench’s
      content assist and generate it and promote it thru the Application Life-Cycle to Production.

First, you will find and add a Cobol program into an ISPW Assignment from which you can perform all
this work.

      1. Change the Stream to CWEZ
      2. Change the Application to your assigned application value (Txxx, where xxx is
         your unique number)
      3. 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.
      4. 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)

                                                                                              Page 7
Source Code Management, Deployment, and Release Automation - Change a COBOL Program - Compuware Test Drive
The ISPW Repository View lists the Cobol Components for your application.

                                                                            Page 8
Source Code Management, Deployment, and Release Automation - Change a COBOL Program - Compuware Test Drive
Scroll thru the list and find CWXTCOB at level PRD. Right-Click on it and click Add to
Assignment with Checkout.

                                                                                         Page 9
Source Code Management, Deployment, and Release Automation - Change a COBOL Program - Compuware Test Drive
From the Add Task dialog box, select NEW to the right of Assignment. This will allow you to
create a new Assignment Container to put your Cobol program into.

                                                                                    Page 10
Type a description and Click OK.

                                   Page 11
A message will be displayed providing you with your new Assignment name. Click OK.

Your new Assignment has been created and is ready to have Tasks added to it. An Assignment
Container is the only Container Type in ISPW that Tasks can be added to. The Assignment Container
is where a developer will spend much of their time.

                                                                                           Page 12
Your new Assignment number will appear in the Assignment field. Click OK.

                                                                            Page 13
A message will be displayed to inform you that the task has been added to your Assignment. Click
OK.

Your Assignment has been created and you should now have a Cobol program in it.

The Assignment Task List View will open and the Task that was added will be listed.

Every operation that needs to be performed on this Task and other Components which are impacted
by changing this Task (edit, impact analysis, compile, promote, deployment etc..) can be performed
from this Assignment or other Assignments.

Note that the Cobol program in the Assignment is checked out and sitting in the DEV1 level. The
checkout date/time and userid is reflected in the Task information. At checkout, a destination level for
the checkout was chosen – DEV1.

                                                                                                Page 14
Page 15
To see the ISPW Life-Cycle, path structure, that was constructed for the Application, Click
once on the Task and then Click on the View Life-Cycle icon.

                                                                                      Page 16
A picture of the Life-Cycle is presented. You will notice the levels containing the Versions of the
highlighted Cobol program are colored indicating the existence of a version of that Component at those
levels.

From this picture it is very easy to visually see where Versions exist. By choosing the DEV1 Level, you
have defined the Path to Production → DEV1-QA1-STG-PRD. Other versions of these Components may
also exist at other levels and may be passing thru the other three paths – FIX, DEV2 or DEV3.

Four paths were created for the application – one for emergencies starting at level FIX and three for
development starting at DEV1, DEV2 and DEV3. The application level structure is customizable when
defining the applications to ISPW. Any number of paths can be defined with a minimum of three
Levels.

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

To do this either right-click on CWXTCOB and click Open or simply double-click on it.

                                                                                           Page 18
Change the source using Topaz Workbench’s content assist. First either select Find/Replace from the
Edit menu or scroll down through the program and find it on your own.

                                                                                             Page 19
Select Find/Replace and type HOLD-REGION in the search for field. Click on Find.

                                                                                   Page 20
Page 21
Close the Find and Replace dialog.

                                     Page 22
Hover over the variable and it will show you more information about it. You can do this anywhere
your variable is used in the program.

                                                                                             Page 23
On your keyboard, hold down Ctrl and press G. (Make sure Caps Lock is off) That takes you to
the next occurrence. This takes you to the Procedure-Division and you can see the variable
information from there, eliminating the need to go back to the Data-Division. This can be a time saver
when coding.

                                                                                              Page 24
Hold down your Ctrl key and press F to bring up the find dialog again. Change the search
field to MOVE 1 and Click find.

                                                                                    Page 25
Close the Find and Replace dialog.

Move your insert cursor to the end of the line. There are two ways to do this: 1) click at the end of
the line, or 2) press the End key on your keyboard.

Press enter to insert a line, then type the letter M.

At this point the content assist should pop up and suggest options for you. Double click on MOVE …
TO. You will also see MERGE, MULTIPY and more by scrolling on the down arrow. (This is a sample of
how content assist can aid you with your coding)

                                                                                                Page 26
Your MOVE … TO is now in place.

Now you can fill in the rest of the information. Type a 1 after MOVE and type an S after TO and
scroll until you find START-NUMBER, double-click on START-NUMBER.

You have completed your edit. This technique will work on all the variables in the program. Perhaps
try the same thing with a Perform.

                                                                                             Page 27
Once you have made your changes, close the SlickEdit view. Click Yes to save the changes.

                                                                                   Page 28
Note the Operation, date/time and User ID fields have been updated to reflect the change in the Task
status.

                                                                                             Page 29
Generate (AKA Compile)

The Cobol program will be generated/compiled, and your Assignment Task List will be updated to
reflect the new status.
   •   The Operation will be Generate
   •   You will have the opportunity to change your compile options
   •   The User ID, Date/Time will be updated
   •   The Message will be updated to reflect the successful completion of the generate

Now it is time to compile/generate the Cobol program, so we can do our testing.

To do this, Right-Click on CWXTCOB and click Generate with parms.

                                                                                            Page 30
A screen will appear and give you the opportunity to change some of your compile options. This
screen is customizable for your site. Any options you may need at compile and link time can be added
to this screen.

ISPW retains the generate options for each program at each level, so you do not need to change the
generate options every time you generate.

Click OK to continue.

                                                                                            Page 31
The status column will display a message indicating that the Task is being generated or generate
waiting. 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.

You can browse the Generate listing at any time. To do this, Right-Click on the Task and click
“View Generate Listing”.

                                                                                               Page 32
You might get this
informational
message if there are
characters in your
listing that can’t be
converted for display
purposes. If you do
get it this is not a
problem and you can
click OK.

To jump to the top of the listing, Hold down Ctrl and press Home. Scroll up and down, notice that
everything is available that you normally see in a compile listing.

Close the Listing display when you are finished.

                                                                                           Page 33
You can also view the output of the generate job. Right click on the task and click “View
Generate Job Output”

This displays the output of the job that did the Generate. Close the display when you are
finished.

                                                                                            Page 34
As part of the generate, ISPW collects each of the parts created as part of the generate (Load, listing,
DBRM, etc.) and registers them against the source.

                                                                                                 Page 35
To view the generated parts, Right-Click on the Task, place your cursor on “View” and Click-
on “Parts”.

The generate of this program created an Object, Listing, Load, and a DDIO (part DMEM). The types
of parts created can be unique by application and type of component as well as the values of the
generate parms.

                                                                                          Page 36
Close the ISPW parts view.

                             Page 37
Promotion

At this point you have
   •   Edited a Cobol program
   •   Used SlickEdit content assist to help you make your changes
   •   Generated your program with the option to change the generate parameters
Now you are ready to promote your changes to the QA1 level.

To promote the Task to the QA1 level, Right-Click on the Task and click Promote.

This action will create a Set Container. Sets are a special category of container that are used to
conduct operations such as promotion and deploy. They are temporary and created by ISPW as
needed for the work. This allows you to promote subsets of Tasks within an Assignment container
without the need to act on all, of the Tasks at once.

                                                                                              Page 38
Once you click Promote the selected Task(s) are placed in a SET container for the promotion.

The ISPW Set processor will:
   •   perform the promotion of the source to QA1
   •   cleanup the DEV1 level (source and parts if applicable)
   •   perform generates, in order, of all the Task(s) in the SET which require a generation

Click OK.

                                                                                               Page 39
In the screen shot below you can see the promote operation has completed – the Task has been
promoted to QA1 (see the Level value and the Operation in the Task List as well as the highlighted
Level in the picture).

Note the Operation column shows Generate as the last operation. The SET processor performed a
promotion and then a generation as ISPW recognized a generate was required for COB types at the
QA1 level based on the configuration of this application. This can be configured by the ISPW
administrator.

                                                                                              Page 40
Let us assume all the testing at the QA1 level has been successfully completed and you are ready to
promote to the STG level.

Select the Task as before, right Click and click Promote. A Set container is created. The
selected Task(s) are placed in a SET container for the promotion. The ISPW Set processor will:
   •   Perform the promotions of all the parts to STG
   •   Cleanup the QA1 level (source and parts if applicable)

                                                                                              Page 41
Click OK.

            Page 42
As the Task(s) in the SET are being processed. You can monitor the progress by Clicking the refresh
button.

This screen shot shows:
   •   The promotion has completed
   •   All the Parts have successfully been promoted to STG

                                                                                            Page 43
Note the Operation of the program reflects a Promote as the last operation. The SET processor
performed a promotion and recognized that a Generate was not required for COB types at the STG
level based on the configuration of this application.

Assuming all the testing at the STG level has been successfully completed, you are now ready to
promote the Tasks to the PRD level.

                                                                                             Page 44
Select the Task as before, right Click on it and select Promote.

                                                                   Page 45
Note: ISPW uses your installation’s security (RACF/TopSecret/ACF2) to manage process security
(granular control of permissions by user and function). Process security defines who can perform
which commands at which levels in the Life-Cycle.

While a Developer can perhaps request the Promote operation when promoting to the STG and QA1
levels, perhaps a Change Coordinator role is responsible for requesting the Promotion to PRD.

One or more approvals can be put in place for each application/level promotion, including but not
limited to Application Manager, QA Manager, Impact, DBA, JOB Scheduling, peer, or VP roles.

A Set container will be created. The selected Task(s) are being placed in a SET container for the
promotion. The ISPW Set processor will:
   •   Perform the promotions of all the parts to the PRD Level
   •   Cleanup the STG level source and parts as applicable

Click OK.

                                                                                               Page 46
The application has been configured to require an approval for the Promotion to PRD.

Below the STATUS shows the Tasks are locked in a SET for a Promote process but the SET needs
approval before the promote can proceed.

The Approval can be performed from
   •   Topaz/ISPW
   •   TSO/ISPW in the ISPF interface
   •   Web interface (including mobile browser)

For this Test Drive you will do the approval from Topaz/ISPW. To perform the approval, Click on the
task, then Right-Click on the STG box in the Life-Cycle diagram. Click “APPROVE.” ISPW will
now perform the promotion of the Tasks collected in the SET to the PRD Level.

                                                                                            Page 47
You can see in the updated screen below that
   •   SET processing has completed
   •   The Cobol program has been processed for a Promotion and is now at the PRD level
The Promotion to the PRD level has completed. The source and parts for the Cobol program were
moved to the PRD level Life-Cycle libraries and the STG level libraries were cleaned up as appropriate.

Notice the Operation column shows Implement as the last operation. ISPW performed any tasks that
were configured for deploy and activation.

An example of a Deploy Implementation activity is the copy of the executable load module into a CICS
or IMS runtime library.

Examples of an activation activity would be a DB2 Plan or Package Bind or a CICS Newcopy.

                                                                                               Page 48
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 ISPW Container List View. To Close the
Assignment first click on the “ISPW Container” View and then, Right Click on your
Assignment and click “Close”. A Close confirmation panel is presented.

                                                                                           Page 49
Click OK to complete the Close.

For audit purposes, Closed Assignments, Sets and Releases are never deleted from ISPW. 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 ISPW history and can be viewed at any time.

                                                                                                   Page 50
You are done! your job has been to change a Cobol program. As a part of this exercise, you have
been able to use Compuware Topaz and ISPW to execute a workflow:

   •   Created an Assignment
   •   Added and checked out a Cobol program
   •   Changed it using SlickEdit
   •   Used Topaz content assist to make changes
   •   Compiled/Generated the program
   •   Viewed the generate output from JES
   •   Viewed the listing from the Generate
   •   Viewed the Parts created as part of the Generate
   •   Promoted the Task from DEV1 to QA1 with a generate of the program
   •   Promoted the Task from QA1 to STG
   •   Promoted the Task from STG to PRD
   •   Performed an approval
   •   Closed your Assignment to complete the change cycle
Congratulations! This completes the ISPW tutorial for Compuware Test Drive.

NEXT STEPS

Click on the link below to return to the Compuware Test Drive main page and choose your next road
trip!

COMPUWARE TEST DRIVE

                                                                                            Page 51
You can also read