What is the difference between a Run Unit, SEQNO and TSN?
search cancel

What is the difference between a Run Unit, SEQNO and TSN?

book

Article ID: 44569

calendar_today

Updated On:

Products

Datacom DATACOM - AD CIS COMMON SERVICES FOR Z/OS 90S SERVICES DATABASE MANAGEMENT SOLUTIONS FOR DB2 FOR Z/OS COMMON PRODUCT SERVICES COMPONENT Common Services CA ECOMETER SERVER COMPONENT FOC Easytrieve Report Generator for Common Services INFOCAI MAINTENANCE IPC UNICENTER JCLCHECK COMMON COMPONENT Mainframe VM Product Manager CHORUS SOFTWARE MANAGER CA ON DEMAND PORTAL CA Service Desk Manager - Unified Self Service PAM CLIENT FOR LINUX ON MAINFRAME MAINFRAME CONNECTOR FOR LINUX ON MAINFRAME GRAPHICAL MANAGEMENT INTERFACE WEB ADMINISTRATOR FOR TOP SECRET Xpertware

Issue/Introduction

Question: 

To cancel a task you use the Sequence number (SEQNO)  with REQABORT or the TSN number with the TSN_ABORT  command.  What is the difference between SEQNO and TSN? And how  do they differ from a run unit?

 

Answer: 

Run Unit

A run unit number is assigned to each job that connects to a MUF. This occurs when the job issues an OPEN command to open a URT.

 

Transaction Sequence Number (TSN)

A TSN is assigned to a job when an update command is issued. The TSN represents a logical unit of work. 

After a LOGCP, LOGCR, COMIT, CLOSE or CICS SYNCPOINT the unit of work is committed and subsequent update commands from the same job will be assigned a new TSN.

So a batch job will have one run unit number for the duration of the job but could have many TSNs.

Similarly with CICS it has one run unit number but each transaction from different terminals will have separate TSNs. 

The TSN number can be used in a TSN_ABORT command to terminate a transaction.

 

Internal Request Sequence Number (SEQNO or SEQ)

The SEQNO is a sequential number assigned to each command. This is a MUF wide counter, the first command issued will be 1 then each subsequent command no matter from what job it comes from will be assigned the next sequential sequence number. This number wraps around. The purpose of the SEQNO is to detect looping programs.

A STATUS command will show the low order 6 digits of the sequence number. Only the last 6 digits are needed to do a REQABORT to terminate a transaction.

 

Environment

Release: DATABB00200-14-Datacom/AD
Component: