Package Reference

reptor

reptor.py - Event Replication for Adabas main module

class adapya.era.reptor.ParmsSfile(fb='', dmap=None, handler=None, sdbid=0, sfnr=0, tdbid=0, tfnr=0)[source]

Defines parameters for updating the target database source and target database/file parameters and the record format

Parameters
  • sdbid – source database id

  • sfnr – source file number

  • tdbid – target database id

  • tfnr – target file number

  • fb – format buffer when storing data

  • dmap – datamap object describing fields in record

class adapya.era.reptor.ParmsSubscription(subscription='', sversion='', sfiles=[])[source]

defines parameters for updating the target database

class adapya.era.reptor.Replicator[source]

Replicator class can process replication data

A provider or consumer of replication stream can set handlers via setHandler() which will be called to process the different URB* messages

process(buffer, length, status=0, substat=None)[source]

Process a message received from Reptor

Parameters
  • status – uow status

  • substat – may reference the subscription status class instance for processing subscription data

  • subconf – may reference the subscription and subscription-file configuration for processing subscription data

exception adapya.era.reptor.ReptorError[source]
class adapya.era.reptor.SubscriptionStatus[source]

Holds current processing status of message(s) received

adapya.era.reptor.makeURBH(buffer, msgNo=0, senderName='Admin')[source]

write URB header at beginning of buffer

Parameters
  • msgNo – message number (optional)

  • senderName – 8 byte name identifying the sender

adapya.era.reptor.makeURBS(token='TEST')[source]

create an URBS which can be received on an output queue

Parameters

token – token for URBS

Returns

current message size

adapya.era.reptor.requestCloseDest(destination='', rspDest='', token='CLSDrqst')[source]

create URBI ‘close destination’ request element for destination if rspDest (response destination) it will receive a status response URBS as well returns current message size

adapya.era.reptor.requestInst(dbid=0, fnr=0, instname='', token='INSTREQU', rspDest='', isnl=[], value='', arc=0, acode='', wcode='')[source]

create URBI with initial state request element for an initial state definition

Parameters
  • instname – initial state name and

  • dbid – database id

  • fnr – file number

optional are:

Parameters
  • rspDest – response destination

  • isnl – selected ISN list

  • value – selection value

  • arc – architecture

  • acode – alfa encoding

  • wcode – wide encoding

Returns

current message size

adapya.era.reptor.requestOpenDest(destination='', rspDest='', token='OPNDrqst')[source]

create URBI ‘open destination’ request element for destination if rspDest (response destination) it will receive a status response URBS as well returns current message size

adapya.era.reptor.requestPriorTrans(destination='', rspDest='', subscription='', transSeqno=0, token='PRIORRQ')[source]

create URBI Prior Transaction request element for subscription, transaction sequence number within subscription and destination if rspDest (response destination) it will receive a status response URBS as well returns current message size

adapya.era.reptor.requestStatus(destination='', rspDest='', subscription='', token='STATUSRQ')[source]

create URBI status request element for destination and/or subscription if rspDest (response destination) it will receive a status response URBS as well returns current message size

adapya.era.reptor.setURBebcdic(TrueFalse)[source]

Set all URB blocks to EBCDIC or not. Implicitely the byte encoding will be set to CP037 or Latin1

Parameters

TrueFalse – True (set to EBDIC) or False

adapya.era.reptor.setURBnwbo()[source]

set all URB blocks to NETWORKBO byte order

urb.py - User Replication Buffer Definitions

class adapya.era.urb.New_Urb(**kw)[source]

new URB - helper to detect which URB type it is

class adapya.era.urb.Urbc(**kw)[source]

URBC – Continuation element

Contains information related to a transaction that is continued in the current message.

Optional init parms: buffer and offset

class adapya.era.urb.Urbd(**kw)[source]

URBD – Data element

Contains data related to a before or after image associated with one record.

Optional init parms: buffer and offset

class adapya.era.urb.Urbe(**kw)[source]

URBE – End-of-transaction element

indicates the end of the transaction related to the preceding record and data elements.

class adapya.era.urb.Urbf(**kw)[source]

URBF – Reptor Global format field table (GFFT) Header

Urbf is the header for a global format field table (GFFT)

class adapya.era.urb.Urbg(**kw)[source]

URBG – Reptor Global format field table (GFFT) element

Urgb contains one field of many defined in a schema of a file being replicated. One or more Urbg follow one Urbf related to a global format that determines the structure of a related record.

class adapya.era.urb.Urbh(**kw)[source]

URBH - Message header

URBH is put at the start of each buffer sent to the messaging system.

class adapya.era.urb.Urbi(**kw)[source]

URBI – Input element

contains input data for a request from a Target Application to the Reptor.

class adapya.era.urb.Urbi_isns(**kw)[source]

Urbi_isns – Initial-State Request ISN list definitions

either individual ISNs are possible or ranges of ISNs with range indicator and 2 ISNs defining the range

class adapya.era.urb.Urbr(**kw)[source]

URBR - Record Element

contains information related to one record.

class adapya.era.urb.Urbs(**kw)[source]

URBS – Reptor status/response element

Contains status/response information sent from the Reptor to a Target Application.

class adapya.era.urb.Urbsu(**kw)[source]

URBSU – Reptor Status Adabas Utility Service Detail Element Contains information about Adabas Online utiltity Service processed on the input database. This data follows an URBS with urbsst=URBSSTAU

class adapya.era.urb.Urbsu41(**kw)[source]

URBSU41 Change field length

class adapya.era.urb.Urbsu44(**kw)[source]

URBSU44 Delete file

class adapya.era.urb.Urbsu4a(**kw)[source]

URBSU4A Release Descriptor

class adapya.era.urb.Urbsu4b(**kw)[source]

URBSU4B Rename File

class adapya.era.urb.Urbsu4e(**kw)[source]

URBSU4e Reuse ISN ON/OFF

class adapya.era.urb.Urbsu4f(**kw)[source]

URBSU4f Reuse DS ON/OFF

class adapya.era.urb.Urbsu55(**kw)[source]

URBSU55 Modify FCB

class adapya.era.urb.Urbsu5c(**kw)[source]

URBSU5C Change Field Format

class adapya.era.urb.Urbsu68(**kw)[source]

URBSU68 USERISN ON/OFF

class adapya.era.urb.Urbsu69(**kw)[source]

URBSU69 Change MIXDSDEV

class adapya.era.urb.Urbsu70(**kw)[source]

URBSU70 Online Invert

class adapya.era.urb.Urbsu78(**kw)[source]

URBSU78 MUPE count

class adapya.era.urb.Urbt(**kw)[source]

URBT – Transaction element

Contains information related to one transaction.

class adapya.era.urb.Urbu(**kw)[source]

URBU – ADARPE Extract Header User Element

Contains information related to ADARPE extration. It is the first record on the output file when running ADARPE with parameter HEADER=YES (default).

adapya.era.urb.plugrsp131(rsp, subcode, errc)[source]

Set Response 131 Reptor subcodes to text plugin

adapya.era.urb.urbsst_str(s)[source]

convert URBS status code to readable string

Replication Target Adapter for Adabas

o to do:

transaction continuation stats() move into reptor URBS handler sversion checking

class adapya.era.tapada.Tapada(subsparm, lnkuexso=None)[source]

Class implements the Adabas Database Update handlers and processes input data passed via the process() method

metUrbd(dd, substat)[source]

URBD data block handler

metUrbr(rr, substat)[source]

URBR Record block handler

class adapya.era.tapada.UexAdabas(fbl=0, rbl=0, sbl=0, vbl=0, ibl=0, pmutex=None, noexceptions=0, thread=0, multifetch=0, archit=None, password='', cipher='')[source]
call(**cbfields)[source]

issue Call to lnkuex_0 with the Adabas control block class variables

Parameters

cbfields – list of key value pairs that can be used to set the control block before the call