Previous Topic: Use the Batch Link MenusNext Topic: Utilities


Special Considerations

This section describes additional considerations for using batch link in special environments.

DB2 Considerations

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.

DB2 JCL Example

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=*

Debug Your DB2 Stored Procedures

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.

DB2 SP SCHEDULING CONSIDERATIONS

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.

Debug Your Online IMS Programs

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.

Use Batch Link Schedule to Enhance your DB2 SP or IMS/DC Debugging Experience

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.

Select DB2 SPs or IMS/DCs for monitoring

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.

  1. Enter Selection Phase - Match entries first against TYPE. Proceed to next phase if there is a match, otherwise examine the next entry.
  2. REGION/JOBNAME Selection Phase - next REGION/JOBNAME of the entry having a matching TYPE is compared. If REGION/JOBNAME starts with an asterisk (*) or contains all blanks, any region or job name selection request would be treated as a match to the REGION/JOBNAME. Trailing blanks are treated as part of the name, thus the entire length (8 bytes) of REGION/JOBNAME is used for comparison (MON ). Trailing asterisk makes the name generic, thus the characters and length to the left of the asterisk are used for comparison (MON).

    Proceed to the next phase if there is a match, otherwise examine the next entry.

  3. Program Name Selection Phase - When the system finds a matching REGION/JOBNAME entry, it now matches its Program Name against the selection request. Trailing blanks are treated as part of the program name, thus the 8 byte Program Name including blanks is used for comparison. A trailing asterisk makes the program name generic, thus the characters and length to the left of the asterisk are used for comparison. When the program name matches that of the selection request, the program is monitored.

We will use the table (on the previous page) to illustrate monitor selection logic and flow. Assuming we have two batch link jobs:

  1. JOBNAME = MONDAY; PROGRAM NAME = SPECIAL1; TYPE = DB2
  2. JOBNAME = MONTH3; PROGRAM NAME = SPECIAL; TYPE = DB2

Job 1 is ready to be monitored. Attributes in the first batch link job are used as selection criteria:

  1. Slot #1 Type Selection Phase ok. Match on TYPE DB2
  2. Slot #1 REGION/JOBNAME Selection failed. MON (with 5 trailing blanks) does not match MONTHLY.
  3. Slot #2 Type Selection Phase failed. No match on TYPE of DB2.
  4. Slot #3 Type Selection Phase ok. Match on TYPE DB2
  5. Slot #3 REGION/JOBNAME Selection ok. Match on REGION/JOBNAME (all blanks treated as a match)
  6. Slot #3 Program Name Selection Phase ok. SP of SP* matches SP of SPECIAL1.
  7. Slot #3 is deleted (ONE TIME set to Y)
  8. PROGRAM SPECIAL1 is selected for monitoring.

Job 2 is now ready to be monitored. Attributes in the second batch link job are used as selection criteria:

  1. Slot #1 Type Selection Phase ok. Match on DB2
  2. Slot #1 REGION/JOBNAME Selection failed. MON (with 5 trailing blanks) does not match MONTHLY.
  3. Slot #2 Type Selection Phase failed. No match on DB2.
  4. Slot #3 deleted and is skipped.
  5. Slot #4 Type Selection Phase ok. Match on TYPE DB2.
  6. Slot #4 REGION/JOBNAME Selection Phase ok. Generic name MON of MONTH* matches MON of MONTH3
  7. Slot #4 Program Name Selection Phase ok. Generic SP of SP* matches SP of SPECIAL.
  8. Slot #4 is deleted
  9. Slot #4 is selected for monitoring.

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).

Import and Export Schedule Files

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.

Special Processing for DB2/IMS Schedule Export and Import

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 *.

Sample Schedule Import File

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

Sample Schedule Export File

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.