Getting Started with Workbench for VS Code


Warning

If you wish to rerun this Test Drive Script, simply restart it from here. The files and libraries will be regenerated.

Getting Started with Workbench for VS Code

The goal of this Test Drive is to help you prepare the BMC AMI DevX Workbench for Visual Studio Code (VS Code) environment you'll need for the rest of the Test Drive Experience.

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

In this Test Drive the screenshots provided have used specific values that may differ from your assigned values. Substitute your assigned values provided with the email notice in the screenshots. If at any point during your experience the host connection times out, you may need to log back into the Test Drive host connection.

Workspace Setup & Host Connection

In this section, you’ll create a Visual Studio Code workspace so your settings and configurations are saved and persist between Test Drive logins. Next, you’ll establish a host connection to access mainframe resources such as datasets and jobs.

Create a Visual Studio Code workspace

Information
Do This

In the top toolbar, go to FileSave Workspace As.

1.png

Information
Do This

Name the workspace YOUR TEST DRIVE ID and save it in the root directory PhotonUser.

Workspace.png

Error
Do This

Before continuing, make sure you’re working in the workspace you just created. At the top center of the screen, you should see YOUR TEST DRIVE ID (Workspace) as shown in the screenshot.

If not, go to the top toolbar and select File → Open Workspace From File, then choose your workspace in the PhotonUser root directory (screenshot not shown).

verifyWorkspace.png

Connect To the Host

Now that the workspace is created and verified, the next step is to establish a connection to the host.

Information
Do This

Click the z/OS icon on the left side of the screen to open the DevX Explorer.

2.png

BMC AMI DevX Explorer lets developers access mainframe application development resources through the Host Communications Interface (HCI) in VS Code. The extension also provides quick access to mainframe resources and allows you to search and filter datasets and members.

Information
Do This

To log on to the host, right-click the TestDrive hostname in the DevX Explorer and select Log In. When prompted, enter your Test Drive credentials.

login.png

Dataset Filters & Allocation

In this section, you’ll locate a source dataset and use its attributes to allocate your own dataset. This ensures your new dataset matches the structure and attributes of the original, making it ready for use in subsequent steps.

Add a filter for the source dataset

To locate the source dataset add a filter. 

Information
Do This

Right-click the host in the DevX Explorer and choose Add Filter or click the + icon.

addFilter1.png

Information
Do This

In the Add Filter dialog, type CWEZ000.TOPAZ.WORKSHOP and press Enter. A second dialog will appear asking for an optional filter name (screenshot not shown). Leave it blank and press Enter to apply the dataset filter.

addFilterDialog1.png

The filter for the source dataset has been created and is now visible in DevX Explorer.

Information
Do This

Click the arrow next to the dataset filter to expand and view all datasets under it.

addFilterResult1.png

Allocate your own dataset

Now you can easily allocate your own dataset by copying the attributes from the source dataset. 

Information
Do This

Right-click the CWEZ000.TOPAZ.WORKSHOP dataset and select Allocate Like.

allocateLike.png

Information
Do This

Replace the CWEZ000 high-level qualifier in the dataset name with YOUR TEST DRIVE ID, then press Enter to allocate your own dataset.

7.png

Add a filter for your own dataset

Create a new filter to locate the dataset you just allocated.

Information
Do This

Right-click the host in DevX Explorer and choose Add Filter or click the + icon. In the Add Filter dialog, type YOUR TEST DRIVE ID.TOPAZ.WORKSHOP and press Enter (screenshot not shown). A second dialog will appear asking for an optional filter name (screenshot not shown). Leave it blank and press Enter to apply the data set filter.  

addFilter2.png

Error
Do This

Before continuing make sure you have dataset filters for CWEZ000.TOPAZ.WORKSHOP and YOUR TEST DRIVE ID.TOPAZ.WORKSHOP. Each filter should contain a dataset with the same name. If not, review the previous steps as these datasets are required. 

filterVerify.png

Member Copy & JCL Edit/Submit

In this section, you’ll copy the JCL member WBRSTOR from the source dataset into your own dataset. After copying, edit WBRSTOR to set your Test Drive ID as the job name, then submit it as a job. This job will create several WBSAMP datasets, each qualified by your Test Drive ID, for use in later Test Drive exercises.

Copy a Member to Your Data Set

Your dataset has been allocated with the same attributes as the source dataset, but it currently contains no data. Next, you’ll copy a JCL member from the source dataset into your own.

Information
Do This

Click the expand arrow next to the source dataset CWEZ000.TOPAZ.WORKSHOP to show the member list. Right-click the JCL member WBRSTOR and select Copy.

copyWBRSTOR.png

Information
Do This

Locate your dataset YOUR TEST DRIVE ID.TOPAZ.WORKSHOP. Right‑click it and select Paste to copy the WBRSTOR member into your dataset.

pasteWBRSTOR.png

Edit and Submit JCL

Now that the JCL member WBRSTOR has been copied into your dataset, edit the member and submit to create the WBSAMP datasets. 

Information
Do This

Click the expand arrow next to your dataset to show the member list. Right-click WBRSTOR and select Edit to open the editor. Change the job name CWEZ000A to match YOUR TEST DRIVE ID plus one character.

When finished, click the X on the editor tab and save your changes.

editWBRSTOR.png

Information
Do This

Right-click WBRSTOR and select Submit JCL

submitWBRSTOR.png

Job Explorer

In this section, you’ll find the status of the job that was submitted and view the job output. 

View Job Output

The Job Explorer can be used to monitor the status of jobs and view the job output. 

Information
Do This

Click the toggle panel icon in the top toolbar (as shown in the screenshot). Then select Job Explorer from the bottom panel.

12.png

Information
Do This

To find the job, enter YOUR TEST DRIVE ID* in the Prefix field and click Search.

jobExplorerSearch.png

Information
Do This

Verify the job return code is 0 or status of 'Ended Normally" and double-click the job name to view the output. When finished, click the X on the editor tab to close it.

jobExplorerOutput.png

When you click the job name, the DD statements appear in the right-hand column of Job Explorer, along with the record count:
15.png

WBSAMP datasets

The job created several WBSAMP datasets qualified by YOUR TEST DRIVE ID. These datasets will be used in subsequent Test Drive exercises. 

Add a filter for WBSAMP datasets

To locate the WBSAMP datasets qualified by YOUR TEST DRIVE ID add a dataset filter. 

Information
Do This

Right-click the host in DevX Explorer and choose Add Filter or click the + icon. In the Add Filter dialog, type YOUR TEST DRIVE ID.WBSAMP and press Enter (screenshot not shown). A second dialog will appear asking for an optional filter name (screenshot not shown). Leave it blank and press Enter to apply the data set filter. 

addWBSAMPFilters.png

Error
Do This

Before continuing, ensure the WBSAMP datasets now exist. Your datasets should look similar to the screenshot, but with Your Test Drive ID as the high level qualifier. 

verifyWBSAMP.png

Next Steps

Now that you have built your BMC AMI DevX Workbench for Visual Studio Code environment, you're ready to take a deep dive into the full Workbench experience.

 

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

Test Drive