Mainframes 360
The one stop destination for System Z professionals

Thursday, March 31, 2011

Compuware Xpediter

Q. What is meant by Debugging?
To debug is the process of running a step-by-step trace of a software-program source-code in slow-motion, to remove program bugs, defects and resolve Abends. Compuware Xpediter is a debugging tool for COBOL Programs. In my last work-assignment, after the build(coding and unit-testing) phase, during the QA(Quality Assurance) Phase, the Software-Testing team found a lot of defects. Xpediter came to my rescue. I solved and turned around the defects quickly, by xpediting my COBOL modules. You can debug Batch Programs as well as Online Transactions in Xpediter. Here's a crash-course on Xpediter.

clip_image002 

Q. What is a DDIO File?
A DDIO File is a VSAM Dataset containing the Source-program Listing. If you want to debug(xpedite) a COBOL Program PROG01, you'd compile it. After compilation, you would get the Compiler SYSPRINT Listing in the spool. The Compiler SYSPRINT Listing tells you if Program compiled successfully, or there were Syntax Errors. This Compiler SYSPRINT Listing is very important, and should be stored permanently. We store them in a VSAM Dataset called the
DDIO File.image
Q. How to create a new DDIO Dataset in Xpediter?
You can create and format a new(Blank) DDIO Dataset through Xpediter Menu Screens. On the Primary Menu, enter Option 5 (Utilities).

clip_image006

Enter the Option 3 (DDIO File Facility) on the Utilities Menu.

clip_image008

Enter the name of the DDIO File like VS90610.DDIO.FILE and type C, to create the file.

clip_image010

There are three different options to create a DDIO File – Shared Directory, Database and DDIO File. Select the Third option(3) DDIO File. Enter Option 3 (Create a non-database DDIO File).

clip_image012 

Enter EDITJCL as the mode of preparation.

clip_image014 
Q. How to prepare your Program for Xpediter?
You must now compile your Program, and store the Compile-Listing in the DDIO VSAM Dataset. This process involves two steps – First, modify your JCL Statements used to compile-and-link the COBOL Program and Second, you must compile-link the COBOL Program using the new, modified Job.

You must add some DD Statements to your Compile-Link Job. These additional DD Statements shown below :

 
The CWPDDIO DD card represents the DDIO File and should be set to your DDIO File like VS90610.DDIO.FILE

The XOPTIONS DD Statement represents the Xpediter Options dataset, and this dataset is site-specific. For example, in my shop it is SDPROD.XPEDITER.XOPTIONS.

The CWPPRMO DD Card represents the COBOL Compiler Options, and you should code the compiler options in-stream(in the body of the JCL itself) as shown.
Q. How to modify the Compile-Link JCL Statements using Xpediter utilities?
Enter Option 1 (Prepare) on the Xpediter Primary Menu.

clip_image020

Enter Option 2 (Compile Facility) to ask Xpediter to modify your compile-link job.

clip_image022 

Enter the name of the Dataset, containing the Compile-Link Job-Stream. My Compile-Link Job is stored in the Dataset 'VS90609.CPARS.JCLLIB(#IMSCOMP)'. Type EDITJCL as the mode of preparation.

clip_image024

Press the ENTER Key. The Compile-Step Configuration is displayed on the screen. Type the name of your DDIO VSAM File in the DDIO-File Field.

clip_image026

Press the Enter Key. The Link-Edit Step Configuration is displayed on the Screen. Enter the LOADLIB name, in which to store the load-module after compilation.

clip_image028

Press the Enter Key, to save the Compile and Link-Edit Configuration.
Xpediter will modify your Compile-Link JCL Statements, make appropriate changes and display the new Modified version before you, as seen in the below picture. You are expected to SUBMIT this JCL by typing SUB, and compile your Program.

clip_image030 
Q. I have Serena Changeman installed at my shop. Can I use Changeman to compile my Program for Xpediter?
At many production-sites, Serena Changeman suite is installed for change-management of COBOL Programs. Serena Changeman and Xpediter are well-integrated. During the process of compilation in Changeman, you can turn ON a special-option, which will automatically prepare your Program for Xpediter. The screenshot below shows, how to compile-link the COBOL Program, with the Xpediter option turned ON. 

clip_image033 
Q. How to browse the compile Listings inside my DDIO Dataset?
In Xpediter, you can browse the Compile-Listings of programs stored in your DDIO VSAM Dataset. On Primary Menu, enter Option 5 (Utilities) and then, go to Option 3 (DDIO File Facility). Enter S against the DDIO Dataset.

clip_image035

My personal DDIO Dataset VS90610.XPEDITER.DDIO, has the following compile-listings.

clip_image037
Q. What is a Profile in Xpediter?
While tinkering with your home television, you must have come across several settings like Brightness, Color or Contrast to adjust the Picture Quality. Once you adjust these picture-settings all the they will apply to all television channels that run on you TV. Just as Televisions have picture-settings, Xpediter has Settings that will apply to Programs, when you run them in Xpediter. A Profile is a collection of settings, that will apply to a Program when it runs in Xpediter.

Initially, as a one-time activity, you first create a new profile for the Program you want to run. Then, you can use the same Profile or Program-Settings, every time you want to run the Program.
Q. How to create a new Profile for you Program in Xpediter?
Type the name of your Profile in the Profile Field on Xpediter Primary Menu. I am creating a new Profile called GRAP733B. Xpediter will create a new profile for the session, prompts you to enter a description of the new profile.

image

Enter a Profile Description and add the Profile.

image

Type Option 2 (TSO) on the Command line of the Primary Menu.

image

On the Environment Menu screen, enter the type of Program – Is it a Batch COBOL-Program or an Online Transaction? For example, I have selected Option 8 to xpedite(run) my online transaction.

image

Enter the Program-name, which you want to Xpedite like GRAP733B. Enter any other options as necessary. Then, type the SETUP command.

image

Type Option 1 (LOADLIBS) on the Setup Menu.

image

Enter the Application Load-Libraries. My application Load-libs are shown in the snap below.

image

Press Enter.

Type Option 2 (DDIO) on the Setup Menu.

image

On the DDIO Files Screen, enter your DDIO Dataset name, that contains the Source Listing, for example 'VS90610.XPEDITER.DDIO'.

image

Press Enter. Enter END to return back to the MPP Test Screen.

image

Sunday, March 20, 2011

Segment Search Arguments(SSA)

Q. Is it easy to search for Data in an IMS Database?
image My computer keeps crashing, these days. I make a phone-call to the Computer Technician in my vicinity, and ask him to pay a visit. I have got to search, "What's the Phone number of the Technician guy?" I pull out my Yellow-Pages Directory to find out.

Its remarkably easy to look-up the Yellow-pages, coz’ the business contacts are organized in alphabetical order. I don't need to read the entries from first page, one-by-one sequentially till I reach the desired entry!

Under the Alphabet 'C', I just jump to the "Computer Technician's Section", and voila! I have before me, a List of the phone number's of all computer repair shops. Had it not been for the Yellow-Pages Directory, find the phone-number of the Computer guy would be like finding a needle in a haystack.

Just like the Yellow-Pages directory, an IMS Database also keeps things in a tidy order. The data in an IMS Database is sorted. Searching an IMS Database is a piece of cake! If would like to search in particular for something in the IMS Database, there's no need to run a  scan on the database sequentially...
Q. What is an SSA(Segment Search Argument)? 
An SSA(Segment Search Argument) answers the question, "What are you looking for in the IMS Database?" While performing a search on the Database, IMS-DB System looks at SSA to determine, what data you need? For example in the Inventory Database containing Vendors, Items and Stock-Locations data, you may like to confine your search just to Vendors. Or your supervisor wants to search only for Items. One may decide to search for only those Items whose Price is greater than > 500 rupees. While searching an IMS Database, you may supply extra-parameters to be more precise. 

image

If you supply an SSA on an IMS-DB Call, the SSA will be taken into consideration, during execution and fetching the results. Only those results that satisfy the SSA, and pass through its filter criterion shall be present in the final solution.
Q. How to build(construct) a simple SSA?
First, you must construct or build the COBOL Definition of the SSA. You can then use this SSA on an IMS-DB Call.

The simplest form of an SSA, that you can build is an Unqualified SSA. An Unqualified SSA just contains the segment-name you wish to process. A picture of an unqualified SSA is shown below. Unqualified SSA always contains the segment-name in the first 8-Bytes, followed by one Blank Space.

image
 
First declare all the SSA's you intend to use under the Working-Storage Section of the COBOL Program. This is how, you'd declare an Unqualified SSA in a COBOL-Program.

image

"I want to search for Vendors Data in my IMS Database."
Suppose, you would like to search only for Vendor data in an IMS Database. In the Inventory IMS Database, the Vendors Data is represented by the VENDRSEG Segment-Type. So, I would store the segment-name 'VENDRSEG' in the Unqualified SSA. A picture of it is shown below.

image
Q. Can I supply two SSA's? How does it work?
The Inventory-Database has three Segments : VENDRSEG, ITEMSSEG and STLOCSEG. The root segment type VENDRSEG at Level 01, represents the Vendors Data. Vendors manufacture or produce Items. ITEMSSEG Segment at Level 02, represents the Line-items that are supplied by a Vendor. Each Item may be stocked at different locations like Mumbai, Delhi, Chennai etc. STLOCSEG Segment at Level 03, represents the warehouse-locations at which the stock of an Item is kept.(stored). The Database Structure is shown in the figure below.

image
Now, what if you don’t want to search for Vendors, but rather you'd like to search for the Items Data, under these Vendors. In IMS, you are allowed to supply an SSA, at each hierarchical-level in the IMS Database. This implies, you can specify one SSA at the VENDRSEG Segment-level, and a second SSA at the ITEMSSEG Segment-Level.

imageIn the above picture, I have constructed two SSA's – VENDR-USSA(Vendor Unqualified SSA) and ITEMS-USSA(Items Unqualified SSA). When you supply two SSA's like this, it indicates to IMS – Search only for ITEMS Data, under the VENDOR Data.
image
On the same lines, if you would like to search only for Stock-Data in the IMS Database, you would have supply three SSA's – one at VENDRSEG Level 01, second at ITEMSSEG Level 02 and third at STLOCSEG Level 03. This indicates to IMS – Search only for STOCK Data, under the ITEMS Data which is under the VENDORS Data.

In general, the thumb-rule is that, the last-level SSA determines which segment the IMS-DB System will process.
Q. What is a Qualified SSA?
A Qualified SSA allows you to specify a particular occurrence of a
Segment-Type. The format of the Qualified SSA, is illustrated in the snapshot below.

image
The Qualified SSA is composed of an Eight-Bytes Segment-Name. This is followed by the Field-name, the relational operator, and the search-value. The
Field-name, operator and value are enclosed in round-brackets(parenthesis).



The Database Descriptor DBD for the Inventory Database System is shown above. There are three Segments – VENDRSEG, ITEMSSEG and STLOCSEG. Each segment-type has several fields.

Tuesday, March 1, 2011

To many people who are thrown to work at a mainframe computer on their first job, they feel lost. Mainframe people seem to speak a completely different language and that doesn't make life easy. What's more, the books and manuals are incredibly hard to comprehend.

"What on earth is a Mainframe?" is an absolute beginner's guide to mainframe computers. We'll introduce you to the hardware and peripherals. We'll talk about the operating system, the software installed on a mainframe. We'll also talk about the different people who work on a mainframe. In a nutshell, we'll de-mystify the mainframe.

Readers based in India, can buy the e-book for Rs. 50 only or the print book. International readers based in the US and other countries can click here to purchase the e-book.