Overview of the sample migration utility

The migration utility is a front-end program that, after converting command statements, can call the CICS BAC batch request utility. The CICS BAC sample migration utility is written in assembler, but you follow its design to write a similar utility in COBOL, REXX, or another suitable language. The following is a summary of the main steps the sample performs:

Obtain storage
This is working storage needed, for example, for control block fields such as file DCBs.
Process parameters
The sample migration utility accepts a parameter that can have one of two values:
CALLCICSBAC
This is the default, and indicates that you want the migration utility to call the CICS BAC batch request utility when it has completed migrating the input statements.
NOCALLCICSBAC
Indicates that you do not want the migration utility to call the CICS BAC batch request utility when it has finished migrating the input statements.
Open the print file
The migration utility uses the print file (DD name PRINT) to log its progress. It prints each statement in its original form and in its CICS BAC equivalent syntax. It also writes any error messages to this print file.
Open the input file
The migration utility opens the input file from which it is to read the existing statements that it is to convert and migrate to CBKIN. The sample procedure to run the utility shown in Figure 1 shows the DD name of the input file as INPUT, but you might want to change this to the DD name of the existing product from which you are migrating.
Allocate and open CBKIN
The migration utility allocates and opens for output the CBKIN data set.

If the CBKIN data set is allocated to the job by a DD statement, it uses that existing data set. Use a predefined data set when you want to keep a permanent copy of the converted statements.

If the CBKIN data set is not allocated by a DD statement, the migration utility allocates a temporary data set for output. You can use a temporary data set in this way when the migration utility is to call the CICS BAC batch request utility and pass to it the statements migrated to CBKIN (the CALLCICSBAC option) and you do not want to keep a copy of the statements.

Allocate CBKPRINT
The migration utility dynamically allocates the print file, if it is not already allocated, to a SYSOUT data set, or uses an existing allocation for CBKPRINT. The print file is required later by the CICS BAC batch request utility.
Read input statements
The migration utility reads each input statement. At this point in its process, the sample program reads input statements with a fictitious syntax and writes an equivalent CICS BAC statement. You should replace this part of the program so that it can process the particular syntax of your existing product. The dummy syntax that the sample migration utility uses is explained within the source code of the program in SCBKSAMP. CBKMIGRT is fully described by comments within the source code, and it explains how you can change it to handle input statements of different syntaxes.
Close CBKIN
The migration utility closes the CBKIN file. This makes the migrated statements available for us by the CICS BAC batch request utility, if it is being called in this run of the migration utility.
Check for errors
The migration utility checks to see if any errors occurred during the migration process and if not, assumes that the migration succeeded and, if requested (by CALLCICSBAC) invokes the CICS BAC batch request utility. When control is returned from the CICS BAC batch request utility, all the migrated statements should have been processed.
Close
The migration utility performs its termination routines. It closes the input and print files and releases work area storage.

The sample migration utility contains all the instructions that you need to help you customize the program for your own needs. The actual routines that convert existing statements to CICS BAC syntax are in the form of subroutines that you call with parameters for the keywords and operand values, simplifying the whole process. There are also some switches at the front of the module that you can customize. These are designed to enable you to control things such as what SYSOUT class to allocate CBKPRINT to, what unit to allocate CBKIN to, and so on.

Figure 1. A procedure to run the sample migration utility
//********************************************************************
//*                                                                  *
//* Copyright (c) 2004 HLA Software, LLC. All Rights Reserved.       *
//*                                                                  *
//********************************************************************
//*                                                                  *
//* You can use the following procedure, suitably modified, to       *
//* execute the sample migration utility.                            *
//* To use this procedure, make the required changes and move it to  *
//* an appropriate procedure library.                                *
//*                                                                  *
//* You can also convert this procedure into an inline set of JCL    *
//* statements to be run independently of a PROC.                    *
//*                                                                  *
//*   1. Make sure all the required data sets are defined and        *
//*      available.                                                  *
//*                                                                  *
//*   2. Change ALL the data sets names in lower case below to the   *
//*      names of the data sets at your installation.                *
//*                                                                  *
//* For more information, see the CICS BAC User's Guide.             *
//*                                                                  *
//********************************************************************
//*                                                                  *
//CBKMGJCL PROC P=''  
//*                 
//CBKMIGRT EXEC PGM=CBKMIGRT,PARM='&P' 
//*                 
//STEPLIB    DD DISP=SHR,DSN=your.cicsbac.loadlib 
//SYSUDUMP   DD SYSOUT=*               
//PRINT      DD SYSOUT=*               
//INPUT      DD DISP=SHR,DSN=your.statements.to.be.migrated 
//         PEND                     

The CICS BAC sample migration utility is designed to read command statements of an existing product and generate the equivalent set of CICS BAC statements. This allows you to convert your existing input statements into the functionally equivalent CICS BAC statements, and allows the CICS BAC batch request utility to execute the migrated statements.

There are possibly two main approaches that you might want to consider when planning the migration to CICS BAC. The one you choose will probably depend upon the number of jobs you have to migrate.


Reference Reference

Feedback


Timestamp icon Last updated: Monday, 2 December 2013


http://pic.dhe.ibm.com/infocenter/cicsts/v5r1/topic/com.ibm.cics.bac.doc/cbka1/cbka1a01.html