Previous Topic: Basic Foreground Demo SessionNext Topic: Advanced Demo Session


Basic Batch Link Demo

This chapter takes you step-by-step through the basic Link demo session. Performing the demo at a terminal is the best way to begin learning about the application. If a terminal is not available, you can still learn about this product by reading the chapter as a “paper demo.”

The basic demo session illustrates many of the testing and debugging tasks you use on your own programs. For more information on these tasks, see Testing Your Programs Using Batch Link.

This section contains the following topics:

Demo Session Objectives

Before You Begin

Begin the Batch Link Demo

Test Your Programs Using Batch Link

What You Have Learned

Demo Session Objectives

This demo session builds on what you have learned in the last chapter, “Basic Foreground Demo Session.” The focus in this chapter is on using the Batch Link features:

Before You Begin

The source for the Batch Link Demo program, CAMRCOBB, is in CAI.CAISRC. Use the compile procedure you customized during the install to compile, link, and post-process the COBOL program CAMRCOBB.

Begin the Batch Link Demo

Begin the demo session by accessing the application and selecting the Batch Link Facility option from the menu. This brings you to the Batch Link Option Menu:

------------- CA InterTest™ Batch BATCH LINK OPTION MENU ----------------------- OPTION ===> 1 JCL - Prepare/Submit JCL for Batch Link 2 Batch Link - Select an active batch job for testing 3 Edit JCL - Edit existing Batch Link JCL 4 Scheduling - DB2 SP, IMS MPP Scheduling Functions Batch Link Status ENABLED on SYS1 X EXIT - Return to CA InterTest™ Batch Primary Option Menu PFkeys: HELP - Tutorial END - Exit

From this point, you can select the JCL that executes the program that you want to run in batch. Select Option 1. The Batch Link JCL Conversion panel displays:

---------------------- Batch Link Jcl Conversion PANEL ------------------------ COMMAND ===> Enter JCL Library: Project ===> Library ===> Type ===> Member ===> Other Partitioned Data Set: Data Set Name ===> 'CAI.CAISRC(DEMOJCL)' Volume Serial ===> (If Not Cataloged) Dataset Password ===> (If Password Protected) Enter L for Librarian, P for Panvalet or blank for PDS: ===>

On this panel, you can provide the JCL member that you want to execute in batch. For the demo, enter CAI.CAISRC(DEMOJCL) in the Other Partitioned Data Set field. Note that your installer may have changed CAI to another high-level qualifier; make sure that the data set name is correct.

After entering the JCL that you want to submit, the Batch Link Conversion Options panel displays:

---------------------- Batch Link Conversion Options -------------------------- COMMAND ===> JCL Conversion Proclibs: Proclib 1 ===> Proclib 2 ===> Proclib 3 ===> Proclib 4 ===> Proclib 5 ===> Proclib 6 ===> Proclib 7 ===> Preallocaed DD ===> Converted JCL: Output JCL Lib ===> Output Member ===> Unit ===> SYSDA (for temp JCL file Batch Link Variables: Profile Library ===> 'CAI.PROFLIB' Profile Member ===> USER01 Enter additional Batch Link options for INT1OPTS: ===>

Here you can specify any of the conversion options. For a full description of these options, see the chapter "Batch Link Facility." For the purposes of the demo, no changes are required on this panel. Press Enter. If this were a multi-step job, you would see a STEP SELECTION panel where you could select one or more steps to be debugged. This JCL stream, however, contains just one step.

The next panel shows the converted JCL:

//DEMOJCL JOB (UNKNOWN),UNKNOWN *** JOB STATEMENT SUPPLIED *** //INSTRUCT DD * *---------------------------------------------------------------- * BATCH LINK DEMO INSTRUCTIONS * * * * AFTER MODIFYING THIS JCL TO CONFORM TO YOUR INSTALLATION * * STANDARDS, PLEASE DELETE THIS INSTRUCT DD STATEMENT. * * * * 1. MODIFY THE JOB CARD FOR YOUR INSTALLATION. * * * * 2. MODIFY THE HIGH LEVEL QUALIFIER FOR THE IVP.LOAD * * LIBRARY IN STEPLIB. * * * *---------------------------------------------------------------* //STEP1 EXEC PGM=CAMRBL01,REGION=4M //INT1OPTS DD * EXEC=CAMRCOBB,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=* //STEPLIB DD DISP=SHR,DSN=CAI.CAILIB // DD DISP=SHR,DSN=CAI.IVP.LOAD <=== CHANGE //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=*

Make the necessary changes to the JCL as documented in the JCL. This includes adding a job card to the JCL, changing the “CAI” high level qualifier of the IVP load library to the correct high level qualifier and removing the INSTRUCT DD. When these changes have been made, submit the JCL. You return to the Batch Link Option menu. The demo program, CAMRCOBB, is now waiting to be debugged. Select option 2 to link your ID to the batch job. If, after selecting option 2, you get a message NO BATCH JOBS AVAILABLE, the job you just submitted has not started executing yet.

When it does execute, you see a screen that looks similar to the following panel:

----------------- CA InterTest™ Batch Batch Link Selection -------------------- COMMAND INPUT ===> SCROLL ===> PAGE * * * * * * * # Jobname Stepname Program Owner User Trans SYSID **************************** TOP OF DATA ********************************* 1 JOB01A STEP1 TESTPGM USER01 TSO01 2 JOB02A STEP1 CAMRCOBB USER02 TSO02 3 JOB03X RUN PAYROLL USER03 LINKED BY USER03 TSO01 ************************* BOTTOM OF DATA *********************************

This screen lists programs that are either currently being debugged or waiting to be linked to a terminal. In this case, there are three programs executing, two waiting to be debugged. Select the job that you submitted in batch by typing an S next to it and pressing Enter. The Monitor Control panel displays:

 ---------------- CA InterTest™ Batch MONITOR CONTROL Panel --------------------- COMMAND ===>                                                              Monitor PL/I ==> N  --------------------Monitored Programs -----------------------------                                                                  ==> CAMRCOBB   ==>       ==>       ==>  ==>   ==>            ==>             ==>             ==>         ==>         ==>            ==>             ==>             ==>         ==>         ==>            ==>             ==>             ==>         ==>         ==>            ==>             ==>             ==>         ==>         ==>            ==>             ==>             ==>         ==>                                                                                 ---- Symbolic (PROTYSM) Files ----------------Endevor Auto Populate                                                        -----------------  ==> 'CAI.PROTSYM'                        ==> N |Always  ==>                 ==> N |Auto-Populate | ==>                  ==> |Non-LE-Enabled |  ==>                                            ==>    |Assembler? |  ==>                                            ==>   |==> N (Y/N) |  ==>                                            ==>    -----------------  ==>                                            ==>              

Enter CAMRCOBB in the monitored programs list and enter the PROTSYM that contains the symbolics for CAMRCOBB in the Symbolic Files list. As with the foreground demo, after pressing Enter, the Initial Intercept panel displays. From this point, the use of the Batch Link feature does not differ from using the product in foreground. You can set breakpoints, change the value of data items, control program execution, split your screen, and so on.

Type GO to begin execution of the program. You stop at COBOL statement ADD 1 TO TASKNUM due to an S0C7 ABEND Intercept. Set the value of TASKNUM to a valid value using the SET command: SET TASKNUM = 1

Type GO and the program runs to completion.

You return to the Batch Link Option panel:

------------- CA InterTest™ Batch BATCH LINK OPTION M- ENDED, RETURN CODE = 0000 OPTION ===> 1 JCL - Prepare/Submit JCL for Batch Link 2 Batch Link - Select an active batch job for testing 3 Edit JCL - Edit existing Batch Link JCL 4 Scheduling - DB2 SP, IMS MPP Scheduling Functions Batch Link Status ENABLED on SYS1 X EXIT - Return to CA InterTest™ Batch Primary Option Menu PFkeys: HELP - Tutorial END - Exit

Notice that the completion code of the step is indicated in the upper right corner of the screen.

Test Your Programs Using Batch Link

Note: You must first populate a PROYSYM to create the symbolics for any program you want to debug. This can be done by compiling and post-processing the program using the procs customized during the install or by using the Utility option 2, ADD. For more information on the Utility option, see the chapter "Utilities."

Access CA InterTest™ Batch and select the Batch Link Facility option from the menu. The Batch Link Option Menu displays:

------------- CA InterTest™ Batch BATCH LINK OPTION MENU ----------------------- OPTION ===> 1 JCL - Prepare/Submit JCL for Batch Link 2 Batch Link - Select an active batch job for testing 3 Edit JCL - Edit existing Batch Link JCL 4 Scheduling - DB2 SP, IMS MPP Scheduling Functions Batch Link Status ENABLED on SYS1 X EXIT - Return to CA InterTest™ Batch Primary Option Menu PFkeys: HELP - Tutorial END - Exit

Select Option 1, which lets you prepare existing JCL to be submitted in batch for debugging.

---------------------- Batch Link Jcl Conversion PANEL ---------------- COMMAND ===> Enter JCL Library: Project ===> userid Library ===> test Type ===> jcl Member ===> member Other Partitioned Data Set: Data Set Name ===> Volume Serial ===> (If Not Cataloged) Dataset Password ===> (If Password Protected) Enter L for Librarian, P for Panvalet or blank for PDS: ===>

Specify where the JCL is located. If your JCL is stored in a CA Panvalet or a CA Librarian data set, indicate that on this panel. Press Enter. The Batch Link Conversion Options panel displays.

---------------------- Batch Link Conversion Options -------------------------- COMMAND ===> JCL Conversion Proclibs: Proclib 1 ===> Proclib 2 ===> Proclib 3 ===> Proclib 4 ===> Proclib 5 ===> Proclib 6 ===> Proclib 7 ===> Preallocaed DD ===> Converted JCL: Output JCL Lib ===> Output Member ===> Unit ===> SYSDA (for temp JCL file Batch Link Variables: Profile Library ===> 'CAI.PROFLIB' Profile Member ===> USER01 Enter additional Batch Link options for INT1OPTS: ===>

Enter any system PROCs that are required for this JCL to execute or provide a pre-allocated DD that contains these PROCs. For a description of the fields on this panel, see the chapter “Batch Link Facility.” Press Enter.

The Step Selection List panel displays:

--------------------- CA InterTest/Batch Step Selection List ------------------- COMMAND INPUT ===>                                            SCROLL ===> PAGE      Select one or more of the following Steps:      **************************** TOP OF DATA ********************************      1 //STEP1 EXEC PGM=ISFBR14      2 //STEP2 EXEC PGM=TEST2,REGION=4M    S 3 //RUN   EXEC PGM=COB0C7,REGION=4M,PARM='/RPTOPTS(ON)'      *************************** BOTTOM OF DATA ******************************

The Step Selection List panel displays a list of steps from the JCL you selected to execute. Select the steps that you want to debug. In the previous example, there are three steps: a compile, a link, and execute. Select the execute step. Press Enter. The converted JCL is displayed.

Review the JCL to make sure it is the job that you want to submit in batch. Type SUB to submit the job. Pressing PF3 will take you to the Batch Link Option Menu.

------------- CA InterTest™ Batch BATCH LINK OPTION MENU ----------------------- OPTION ===> 1 JCL - Prepare/Submit JCL for Batch Link 2 Batch Link - Select an active batch job for testing 3 Edit JCL - Edit existing Batch Link JCL 4 Scheduling - DB2 SP, IMS MPP Scheduling Functions Batch Link Status ENABLED on SYS1 X EXIT - Return to CA InterTest™ Batch Primary Option Menu PFkeys: HELP - Tutorial END - Exit

Select option 2. This displays a list of programs that are either currently being debugged or waiting to be linked to a terminal. Select the job that you submitted in batch by typing S next to it and pressing Enter. The Monitor Control panel displays.

Enter your program in the Monitored Programs list and your PROTSYM in the Symbolic Files list. Press Enter to debug your program.

What You Have Learned

This Batch Link Demo has taught you the basics of using this product to test a program running in batch. You have learned how to: