TSO-ISPF JCL COBOL VSAM DB2 CICS IMS-DB IMS-DC Tools Articles Forum Quiz Interview Q&A

IMS Batch Terminal Simulator


One of the more popular tools used to test IMS online application programs is the IBM Batch Terminal Simulator II. This product offers many advantages to the systems engineer that otherwise would not be available in the IMS online environment. These advantages include the following:

  • The ability to test an online program before the actual IMS system generation has been done for the transaction (PSB, DBD, data base Dynamic Allocation Table, and hardware). Testing can also be done before the Application Control Block (ACB) has been generated.

  • The ability to dynamically trace all message queue and data base calls, as well as display their I/O areas, PCB masks, and SSA’S.

  • The ability to see the actual MFS screen layout, as well as the message I/O area.

  • BTS II can, and should, be used to also test IMS batch and BMP application programs.


Let's take a closer look at the three major advantages of using BTS II to see why they are beneficial.

  1. Before you can run anything in the IMS online environment, you must define all hardware, software, data you intend to use.

    The hardware includes display terminals and printers. Some of the things that need to be defined are the device type, model, and what type of communication link exists, such as BISYNC or SDLC.

    The software includes your transaction name and its associated PSB. In the online environment, your application program name and PSB name must be the same.

    The data includes all DBD’S, DD names, and data base data sets. You must also have an ACB control block created for all your PSB’S and DBD’S, because the IMS online system does not dynamically build ACB’S from the PSB and DBD libraries.

    As you can see, it takes planning to implement IMS online applications. Furthermore, most IPC’S only perform the IMS online system generation once or twice a month. (Could you imagine having to wait a month before you could test a program?) BTS II allows us to simulate that environment before it actually exists, so the testing and implementation of IMS applications can be timely.

  2. The second advantage is that through the use of BTS II control statements (which will be discussed later), you can display the contents of all message and data base I/O areas. PCB masks, SSA’S, scratch pad areas and program statistics can also be displayed. Having all this information available to you on a call-by-call basis is tremendously helpful in a debugging situation. It speeds up the debugging phase of coding, as well as the implementation phase. Another feature is that all these output options can be turned on or off, depending on your needs.

  3. The third advantage is the ability to see how MFS displays will look to the client when actually run in the online environment. As we will see later, the TSO foreground implementation of BTS II will present you with the display exactly as it will look, including the attributes assigned to each field. This is a very effective method of prototyping a system to your client prior to the online system generation.

If the foreground TSO implementation of BTS II is not available to you, the batch version will draw a picture of the display, as well as indicate attribute values and cursor position. Although the batch version is not as effective in presenting screen displays, it is very effective in providing you with a hard copy of your program calls and I/O area contents. This is the version that we will be using for hands on in this class.


BTS II Batch:

The BTS II batch execution is used most often to obtain a hard copy of the I/O areas and call sequence that an IMS application program makes. It is accomplished by submitting a batch job and using BTS II control statements as input.

See the section on Project work for sample procedures and JCL. An illustrative sample is shown below.

//JS010     EXEC PGM=BTSRC000,
//          PARM='DLI,007,0000,,O..N,O,T'.REGION=1500K
//STEPLIB   DD DSN=IMSVST1.RESLIB,DISP=SHR
//          DD DSN=IMSVST1.PGMLIB,DISP=SHR
//IMS       DD DSN=IMSVST1.DBDLIB,DISP=SHR
//          DD DSN=IMSVST1.PSBLIB.DISP=SHR
//DFSRESLB  DD DSN=IMSVST1.RESLIB.DISP=SHR
//IEFRDER   DD DUMMY
//SYSPRINT  DD SYSOUT=$
//SYSOUT    DD SYSOUT=$
//DFSVSAMP  DD DSN=IMSVST1.VSAMBUFF.DISP=SHR
//database  DD DSN=*** your test data base ***
//FORMAT    DD DSN=IMSVST1.TFORMAT.DISP=SHR
//OIOPCB    DD UINIT=SYSDA,SPACE=(CYL.(1,1),RLSE).
//          DCB=(LRECL=512,BLKSIZE=3072)
//QALTPCB   DD UNIT=SYSDA,SPACE=(CYL.(1,1),RLSE),
//          DCB=(LRECL=512,BLKSIZE=3072)
//QALTRAN   DD UNIT=SYSDA,SPACE=(CYL,(1,1),RLSE).
//          DCB=BLKSIZE=532
//BTSOUT    DD SYSOUT=$,DCB=(RECFM=LRECL=133,BLKSIZE=1330)
//BTSIN     DD DSN=CTDS???.IMSCLASS.LIB (BTSIN),DISP=SHR

BTS II Batch JCL

The EXEC card, DD names, and their purposes are described below:

JS010:

This is the EXECUTE card. Program BTSRC000 is the batch BTS II application program. Check with your installation as to the value of the parameters supplied to BTS II. Refer to the IBM manual Batch Terminal Simulator II Program Description/Operations Manual- as to the meaning of each parameter. The only parameter that you are likely to change is the first one. The figure above shows DLI as the value. This will be the normal value used; DBB and BMP are also valid. In the case of DBB and BMP, you will need to add DD name 'IMSACB' and point it to the ACB library where your ACB’S reside.

STEPLIB:

This should point to (concatenated if need be) the libraries where not only BTSRC000 resides, but all the IMS application programs you intend to execute with this batch job.

IMS:

This DD points to the PSB and DBD libraries. It must be a concatenation of the two, but the order does not matter.

DFSRESLB:

This DD points to the library containing the IMS modules.

IEFRDER:

This is the IMS log file DD statement. This log facility is only simulation and the log file itself is not valid for database back out utilities. Because this file is usually dummied out, it is highly recommended that you use test databases for testing purposes.

DFSVSAMP:

This DD refers to the IMS data base VSAM buffer specifications.

Database:

Here you will include all DD names required for the IMS databases needed to support the IMS application programs you are executing.

FORMAT:

This DD statement points to the MFS format library where your format control blocks are stored.

QIOPCB:

This DD statement is a BTS II work dataset containing the output message queue to the 3270 screen and printer.

QALTPCB:

This DD points to the work dataset containing the message queue for alternate PCBs to 3270 screens and printers.

QALTRAN:

This DD is for a BTS II work dataset.

BTSOUT:

This is the DD statement where all the BTS II output is produced.

BTSIN:

This DD statement is where the BTS II control cards are input. They can be in line with BTSIN DD * , or a dataset.

Note: Look at the section Project for the JCL to run BTS.

If you have any doubts or queries related to this chapter, get them clarified from our Mainframe experts on IBMMainframer Community!

Are you looking for Job Change? Job Portal