Defining sequential (BSAM) devices

You can use a pair of input and output sequential data sets to simulate a terminal to CICS®. For example, you can do this to test an application program before the intended terminal becomes available. You must code the following DFHTCT TYPE= macros:

    DFHTCT TYPE=INITIAL,
           ACCMETH=(NONVTAM)    defining the access
                                method

(Define the following macro instructions contiguously.)

    DFHTCT TYPE=SDSCI,
           DSCNAME=isadscn,     defining the input
           DDNAME=indd, ...      data set
    DFHTCT TYPE=SDSCI,
           DSCNAME=osadscn,     defining the output
           DDNAME=outdd, ...     data set
    DFHTCT TYPE=LINE,
           ISADSCN=isadscn,
           OSADSCN=osadscn, ...
    DFHTCT TYPE=TERMINAL,
           TRMIDNT=name, ...

The two data sets defined by the DFHTCT TYPE=SDSCI macros simulate a CICS terminal known by the name specified in the TRMIDNT operand of the DFHTCT TYPE=TERMINAL macro. The DSCNAMEs of the input and output data sets must be specified in the ISADSCN and OSADSCN operands of the DFHTCT TYPE=LINE macro respectively.

You must code a DD statement for each sequential data set defined by an SDSCI macro. The DD name on the DD statement must be the same as the name coded on the DDNAME parameter (or, by default, on the DSCNAME parameter) of the SDSCI macro. For example, you could use the following DD statements for sequential input and output:

//CARDIN  DD  *,DCB=BLKSIZE=80
       .
    Statements containing valid transactions
       .
/*
//PRINTER DD  SYSOUT=A,DCB=BLKSIZE=132

This example of an I/O combination simulates a terminal to a CICS application program. There is an example of the SDSCI statements supporting this CARDIN/PRINTER combination in the copybook DFH$TCTS, which is defined in the sample TCT, DFHTCT5$. DFH$TCTS is supplied in CICSTS31.CICS.SDFHSAMP. Input to the application program is submitted through the input stream (CARDIN), and output to the terminal is sent to the output stream (PRINTER). If the BLKSIZE parameter is defined in the TCT for the data set, you can omit it from the JCL. However, if it is not defined in the TCT, the block size defaults to 0, and if you also omit it from the DD statement for the data set, you get message IEC141I 013-34. There are other examples of DD statements for I/O sequential data sets in some of the CICS-supplied installation verification procedures. You can find them in CICSTS31.CICS.SDFHINST after installation.

You can also use two DASD data sets to simulate a terminal. You must code a DD statement for each data set defined by an SDSCI macro, and the DD name on the DD statement must be the name coded on the DDNAME (or DSCNAME) parameter of the SDSCI macro.

For example, you might code:

//DISKIN1  DD DSN=SIMULATD.TERMINAL.IN,
//         UNIT=3380,DISP=OLD,VOL=SER=volid
//DISKOT1  DD DSN=SIMULATD.TERMINAL.OUT,
//         UNIT=3380,DISP=OLD,VOL=SER=volid

Input from this simulated terminal is read from the DISKIN1 data set. Output to the terminal is written to the DISKOT1 data set.

Each statement in the input file (from CARDIN or DISKIN1 in the examples used above), must end with a character representing X'E0'. The standard EBCDIC symbol for this end-of-data hexadecimal value is a backslash (\) character, and this is the character defined to CICS in the pregenerated system. You can redefine this for your installation on the EODI system initialization parameter; see Specifying CICS system initialization parameters for details.

Using a sequential device with START requests

You can use a sequential device as the terminal specified on an EXEC CICS START REQUEST. This could be useful in situations where you need to associate the started task with a terminal, but where the termid specified does not need to represent a real terminal. For this purpose, define the sequential device as shown in Figure 1, and add the required DD statement to the CICS startup JCL.

Figure 1. Example of TCT definitions needed to use BSAM device for START commands
*
DFHTCT TYPE=INITIAL,SUFFIX=xx,               X
               ACCMETH=(VTAM,NONVTAM)
*
DFHTCT TYPE=SDSCI,                      X
               DEVICE=1403,             X
               DSCNAME=PRNT001
*
DFHTCT TYPE=LINE,                       X
               ACCMETH=BSAM,            X
               INAREAL=80,              X
               TRMTYPE=CRLP,            X
               OSADSCN=PRNT001          X
               DFHTCT TYPE=TERMINAL,    X
               TRMIDNT=P001,            X
               ERRATT=NO,               X
               LPLEN=80,                X
               PGESIZE=(24,80),         X
               TRMSTAT=RECEIVE
*
DFHTCT TYPE=FINAL

Include the following DD statement in your CICS startup JCL to support the sequential device defined in Figure 1

//PRNT001  DD  DUMMY

Terminating

End-of-file does not terminate sequential input. You should use CESF GOODNIGHT as the last transaction, to close the device and terminate reading from the device. Otherwise, CICS invokes the terminal error program (DFHTEP), and issues the messages in Table 2 at end-of-file on the sequential device.

Table 2. Warning messages if a sequential terminal is not closed
Message Destination
DFHTC2507 date time applid Input event rejected return code
zz {on line w/term|at term}termid
{, trans}tranid{, rel line=} rr,time
CSMT
DFHTC2500 date time applid {Line|CU|Terminal} out
of service {Term|W/Term} termid
CSMT

Use of CESF GOODNIGHT puts the sequential device into RECEIVE status and terminates reading from the device. However, if you close an input device in this way, the receive-only status is recorded in the warm keypoint at CICS shutdown. This means that the terminal is still in RECEIVE status in a subsequent warm start, and CICS does not then read the input file.

You can also use CESF LOGOFF to close the device and terminate reading from the device, but CICS still invokes DFHTEP to issue the messages in Table 2 at end-of-file. However, the device is left in TTI status, and is available for use when restarting CICS in a warm start.

If you want CICS to read from a sequential input data set, either during or following a warm start, you can choose one of the following methods:

If you use BSAM devices for testing purposes, the final transaction to close down CICS could be CEMT PERFORM SHUT. The receive-only status is recorded in the warm keypoint at CICS shutdown. This means that on a subsequent warm start of CICS, the terminal is still in RECEIVE status and CICS does not then read the input file.

If you use the CEMT PERFORM SHUT, perform a cold or initial start of the CICS region to read the input file. This assumes that recoverability of resources is not important to you.

[[ Contents Previous Page | Next Page Index ]]