This section describes additional considerations for using batch link in special environments.
Use batch link to debug DB2 applications, provided that the following JCL conversion rules are implemented:
Convert DB2 JCL using the Batch Link JCL Conversion dialog.
The following example shows a DB2 job step that has been converted for batch link:
//RUN EXEC PGM=IKJEFT01,COND=(4,LT),DYNAMNBR=20 //STEPLIB DD DISP=SHR,DSN=CAI.CAILIB // DD DISP=SHR,DSN=USER01.LOADLIB // DD DISP=SHR,DSN=SYS2.DB2510.MAINT.SDSNLOAD //SYSTSPRT DD SYSOUT=* //SYSOUT DD SYSOUT=* //SYSTERM DD SYSOUT=* //SYSPRINT DD SYSOUT=* //SYSIN DD * /* //SYSTSIN DD * DSN SYSTEM(D510) RUN PROGRAM(CAMRBL01) PLAN(DB2DEMO) PARM('ABEND0C7/TRAP(OFF)') END /* //INT1OPTS DD * EXEC=DB2DEMO,PROFILE=USER01 /* //INT1PARM DD DISP=SHR,DSN=CAI.CAISRC //INT1LOAD DD DISP=SHR,DSN=CAI.CAILIB //INT1PNLL DD DISP=SHR,DSN=CAI.CAIPNL1 //INT1MSGL DD DISP=SHR,DSN=CAI.CAIISPM //INT1PROF DD DISP=SHR,DSN=CAI.PROFLIB //INT1CLIB DD DISP=SHR,DSN=CAI.CAISRC //INT1CLOG DD SYSOUT=* //INT1REPT DD SYSOUT=*
Use batch link to debug DB2 stored procedures. Confirm with your systems programmer that the necessary changes have been made to the WLM environment to support debugging DB2 stored procedures. Also, confirm that if the scheduling feature is enabled, described in this chapter, that it is set up to debug your stored procedure.
Since DB2 SP currently runs under the WLM started task, the selection request for DB2 SP is made without the REGION/JOBNAME attribute. Thus REGION/JOBNAME Selection Phase is bypassed. You can continue to specify a REGION/JOBNAME field for DB2 SP schedule entries or you can leave that field blank.
Use batch link to debug your online IMS applications without the use of BTS. Confirm with your systems programmer that the DC transaction that you want to debug has its DC region set up for batch link testing. Also, confirm that if the scheduling feature, described in this chapter, is enabled, it is set up to debug your IMS transaction.
The batch link schedule feature helps you leverage your testing environment by letting you specify exactly which stored procedures or IMS/DC transactions you want the application to monitor. All other programs run unmonitored. This lets you use the same region for debugging as well as executing normal DB2 SP or IMS/DC workload.
Confirm with your systems programmer that the product has been initialized with this feature enabled. You can also confirm this by going into the product and choosing option 5, Batch Link. From there, choose option 4, Scheduling. From there, choose Option 1, supply a database type, and press Enter. If a short message of 'SCHEDULE TABLE NOT ANCHORED' displays, this feature has not been enabled. In this case, all DB2 SPs and IMS/DC transactions will run unmonitored.
Entries in the schedule are organized top down and are tracked and managed by slot numbers (slot #1 through slot #nnnn). Entries are added using the first available scheme. Thus when an entry in the low slot number range (for example #2), is deleted, the next add is added to #2, using the first available scheme:
|
Slot Number |
Region/Job Name |
Program Name |
TYPE |
One Time |
|---|---|---|---|---|
|
1 (top) |
MON |
SP* |
DB2 |
Y |
|
2 |
MON* |
SP* |
IMS |
Y |
|
3 |
|
SP* |
DB2 |
Y |
|
4 |
MONTH* |
SP* |
DB2 |
N |
|
|
|
|
|
|
|
60 (bottom) |
|
|
|
|
Selection of an entry for monitoring is on a first-and-best match basis and in a top down fashion (slot #1 through slot #60). Select an entry for monitoring only after it has passed all the Selection Phases.
Proceed to the next phase if there is a match, otherwise examine the next entry.
We will use the table (on the previous page) to illustrate monitor selection logic and flow. Assuming we have two batch link jobs:
Job 1 is ready to be monitored. Attributes in the first batch link job are used as selection criteria:
Job 2 is now ready to be monitored. Attributes in the second batch link job are used as selection criteria:
Assuming Job 2 is submitted before Job 1, Slot #3 is again selected for monitoring. However because its One Time Schedule is set to Y, Slot #3 is deleted before Job 1's selection request is made. In this case, Job 1 runs unmonitored, since MONTH of MONTH* (slot #4) does not match MONDAY (Job 1's JOBNAME).
Importing a schedule provides you with an easy way to maintain a persistent schedule across IPLs. You can also make significant scheduling changes instead of changing individual schedules manually using the online change option.
You can create the schedule import file manually when you first use the scheduling feature, or you can create it later using the schedule export option, since you can activate the scheduling feature with an empty schedule and later add individual schedules (using the online Schedule Add option) as the need arises.
The schedule export option is an easy way to create a backup copy of your fine-tuned schedule or a uniquely tailored application system schedule to facilitate systems testing.
If a DB2/IMS schedule import file has the JOBNAME or region name specified as * (wildcard for entire name), that line is not imported. A * in column 1 was considered as a comment on import. This solution changes the * for jobname to ? on export and then on import changes the ? back to a *.
The following example shows a sample import file and its supported record layout:
************************************************************************ * CA BATCH LINK SCHEDULES SAMPLE IMPORT * ASTERISK IN COLUMN 1 DENOTES A COMMENT LINE. * THE SYSTEM WILL VALIDATE DATABASE TYPE FIELD, AND ONE TIME SCHEDULE FI ELD. * VALID ONES ARE: DB2 OR IMS FOR DATABASE TYPE; Y OR N FOR ONE TIME SCHEDULE. * OTHER FIELDS ARE ACCEPTED ASIS, WITHOUT VALIDATION. * FORMAT OF IMPORT/EXPORT RECORD: * COLUMN 1 - 8 REGION/JOBNAME (8 BYTES) * COLUMN 10 - 17 PROGRAM NAME (8 BYTES) * COLUMN 19 - 19 ONE TIME SCHEDULE (1 BYTE. Y OR N) * COLUMN 21 - 23 DATA BASE TYPE (3 BYTES. DB2 OR IMS) *---+----1----+----2----+----3----+----4----+----5----+----6----+----7-- BIMNTH01 GL001 Y DB2 BIMNTH01 ASSET* Y DB2 BIMNTH01 SALES* Y DB2 WKLYPAY TIMEATTN Y DB2 QTRLY080 OXLYSABN Y IMS QTRLY090 SAP001 Y IMS QTRLY100 SAP002 Y IMS
The following example shows a sample export file with a system generated record layout:
******************************************************************************* * CA BATCH LINK SCHEDULES SAMPLE EXPORTED FROM SID: CA31 ON 07/14/2005 AT 09:41 * ASTERISK IN COLUMN 1 DENOTES A COMMENT LINE. * THE SYSTEM WILL VALIDATE DATABASE TYPE FIELD, AND ONE TIME SCHEDULE FI ELD. * VALID ONES ARE: DB2 OR IMS FOR DATABASE TYPE; Y OR N FOR ONE TIME SCHEDULE. * OTHER FIELDS ARE ACCEPTED ASIS, WITHOUT VALIDATION. * FORMAT OF IMPORT/EXPORT RECORD: * COLUMN 1 - 8 REGION/JOBNAME (8 BYTES) * COLUMN 10 - 17 PROGRAM NAME (8 BYTES) * COLUMN 19 - 19 ONE TIME SCHEDULE (1 BYTE. Y OR N) * COLUMN 21 - 23 DATA BASE TYPE (3 BYTES. DB2 OR IMS) *---+----1----+----2----+----3----+----4----+----5----+----6----+----7-- BIMNTH01 GL001 Y DB2 BIMNTH01 ASSET* Y DB2 BIMNTH01 SALES* Y DB2 WKLYPAY TIMEATTN Y DB2 QTRLY080 OXLYSABN Y IMS QTRLY090 SAP001 Y IMS QTRLY100 SAP002 Y IMS
An asterisk is used as a wild card character to match all or part of a name. An asterisk in the first column of a name indicates that any name is matched. However, if any region/jobname will be matched, that is - the entire region/jobname is specified as a wildcard, then column 1 must be a ? in the import file. This will be changed to an * when imported. On an export, an * in column 1 for the wildcard of an entire region/jobname will be changed to a ?. When entering the schedule on the panel, use the * in column 1 to specify matching all region/jobnames.
|
Copyright © 2013 CA.
All rights reserved.
|
|