List of ZBS Subroutines


Initialize Data Structure

CALL KZINIT

Create and initialize a data structure ZBS (Zebra Bank Structure).


File Handling Subroutines

CALL KZFILE(LUN)

Define files for data I/O

LUN Logical unit number assigned to tthe file

CALL KZEND(LUN)

Close the file specified by LUN

LUN Logical unit number assigned to tthe file


Bank Handling Subroutines

CALL KZBCR0(CNAME,IERR)

Create a new ZBS bank of Type 0.

CNAME Name of a new bank with < 33 characters.
IERR Error flag.

CALL KZBCR1(CNAME,LMAST,CFORMM,
            NSEGM,LSEGM,CFORMS,IERR)

Create a new ZBS bank of Type 1.

CNAME Name of the new bank with < 33 characters.
LMAST Length of its master segment.
CFORMM Format of the master segment in ZEBRA format.
NSEMG Number of data segments.
LSEGM Length of data segments.
CFORMS Format of data segments in ZEBRA format.
IERR Error flag.

CALL KZBCR2(CNAME,LMAST,CFORMM,
            NSEGM,LSEGM,CFORMS,IERR)

Create a new ZBS bank of Type 2.

CNAME Name of the new bank with < 33 characters.
LMAST Length of its master segment.
CFORMM Format of the master segment in ZEBRA format.
NSEMG Number of data segments.
LSEGM Length of data segments.
CFORMS Format of data segments in ZEBRA format.
IERR Error flag.

CALL KZBDEL(CNAME)

Delete a bank with a name "CNAME".

CNAME A name of a bank to be deleted.

CALL KZBTYP(CNAME,ITYPE)

Obtain a type of a bank with a name "CNAME".

CNAME A name of a bank to be deleted.
ITYPE A type of the bank


Data Handling Subroutines

CALL KZADD0(CNAME,ISEGM,CFORM,NDATA,IDATA)

Add some data into the given segment of the type 0 bank.

CNAME Name of the bank
ISEGM Segment number
CFORM Format of the data in a character
NDATA Length of the data to be added
IDATA Data words

CALL KZREP1(CNAME,ISEGM,NDATA,IDATA)

Replaces all data of the given segment of the type 1 bank.

CNAME Name of the bank
ISEGM Segment number
NDATA Length of the data to be added
IDATA Data words

CALL KZREP2(CNAME,ISEGM,ISSEG,NDATA,IDATA)

Replaces all data of the given segment of the type 2 bank.

CNAME Name of the bank
ISEGM Segment number
ISSEGM Sub-segment number
NDATA Length of the data to be added
IDATA Data words

CALL KZPUT0(CNAME,ISEGM,NWOFF,CFORM,NDATA,IDATA)

Put some data words into the given segment of the type 0 bank. The position in the segment is specified by the number of offset words.

CNAME Name of the bank
ISEGM Segment number
NWOFF Number of offset words from the beginning of the segment
CFORM Format of the data word in a character
NDATA Length of the data to be added
IDATA Data words

CALL KZPUT1(CNAME,ISEGM,NWOFF,NDATA,IDATA)

Put some data words into the given segment of the type 1 bank. The position in the segment is specified by the number of offset words.

CNAME Name of the bank
ISEGM Segment number
NWOFF Number of offset words from the beginning of the segment
NDATA Length of the data to be added
IDATA Data words

CALL KZPUT2(CNAME,ISEGM,ISSEG,NWOFF,NDATA,IDATA)

Put some data words into the given segment of the type 2 bank. The position in the segment is specified by the number of offset words.

CNAME Name of the bank
ISEGM Segment number
ISSEGM Sub-segment number
NWOFF Number of offset words from the beginning of the segment
NDATA Length of the data to be added
IDATA Data words

CALL KZGET0(CNAME,ISEGM,NDATA,IDATA)

Get the contents of one segment of a bank of type 0.

CNAME Name of the bank
ISEGM Segment number
NDATA Length of the data to be added
IDATA Data words

CALL KZGET1(CNAME,ISEGM,NDATA,IDATA)

Get the contents of one segment of a bank of type 1.

CNAME Name of the bank
ISEGM Segment number
NDATA Length of the data to be added
IDATA Data words

CALL KZGET2(CNAME,ISEGM,ISSEG,NDATA,IDATA)

Get the contents of one segment of a bank of type 1.

CNAME Name of the bank
ISEGM Segment number
ISSEGM Sub-segment number
NDATA Length of the data to be added
IDATA Data words

CALL KZNSEG(CNAME,NSEGM)

Get the number of segments of a bank

CNAME Name of the bank
NSEGM Number of segments

CALL KZLSEG(CNAME,ISEGM,LSEGM)

Get the length of a segment of a bank

CNAME Name of the bank
ISEGM Segment number
LSEGM Length of the segment

CALL KZNSSG(CNAME,ISEGM,NSSEGM)

Get the number of sub-segments of a segment in a bank of type 2

CNAME Name of the bank
ISEGM Segment number
NSSEGM Number of sub-segments


Event Handling Subroutines

CALL KZREAD(LUN,IERR)

Read one event from a sequential file and add it to the event buffer of ZBS. If there are already some events in the buffer, the event becomes the last event and is marked as "current" event.

LUN Logica unit number of the input file
IERR Error flag
= 0 Normal return
= 1 Find EOF while reading event

CALL KZWRIT(LUN)

Write the current event to a file.

LUN Logical unit number of the output file

CALL KZECLR

Erase all existing events in the event buffer.

CALL KZPUTH(IDATA)

Write a data into an event header record.

CALL KZGETH(IDATA)

Get a data from an event header record.


Multi-Event Handling Subroutines

CALL KZENEW

Create new event in the event buffer and mark it as "cuurent" without clearing the event buffer.

CALL KZEDEL

Erase the current event from the event buffer.

CALL KZEFST

Mark the 1st event in the event buffer as "current".

CALL KZELST

Mark the last event in the event buffer as "current".

CALL KZENXT(ICOND)

Mark the next event in the event buffer as "current".

ICOND Return code
= 0 Normal return
= 1 The event is the last event in the event buffer. There is no next event more.

CALL KZEPRV(ICOND)

Mark the previous event in the event buffer as "current".

ICOND Return code
= 0 Normal return
= 1 The event is the first event in the event buffer. There is no previous event more.

CALL KZEJMP(NEVJMP,ICOND)

Skip forward or backward events and mark an event as "current".

NEVJMP Number of events to be skipped
ICOND Return code
= 0 Normal return
= 1 If the skip of events exceeds the event buffer.

CALL KZENUM(NEVENT,IEVENT)

Obtains the total number of events and the event number of the current event in the event buffer.

NEVENT Total number of events in the event buffer.
IEVENT Event number of the current event in the event buffer

CALL KZECUR(IEVENT,ICOND)

Mark an event as "current".

IEVENT Event number of the event in the event buffer which is to be marked at "current".
ICOND Return code
= 0 Normal return
= 1 Target event is not included in the event buffer.


Sub-Event Handling Subroutines

CALL KZEMRK

Set an event mark on the current event.

CALL KZEMRG

Merge marked events into the current event.

CALL KZMDEL

Erase the current sub-event from the event.

CALL KZMFST

Mark the 1st sub-event in the event as "current".

CALL KZMLST

Mark the last sub-event in the event as "current".

CALL KZMNXT(ICOND)

Mark the next sub-event in the event as "current".

ICOND Return code
= 0 Normal return
= 1 The sub-event is the last sub-event in the event. There is no next sub-event more.

CALL KZMPRV(ICOND)

Mark the previous sub-event in the event as "current".

ICOND Return code
= 0 Normal return
= 1 The sub-event is the first sub-event in the event. There is no previous sub-event more.

CALL KZMJMP(NEVJMP,ICOND)

Skip forward or backward sub-events and mark a sub-event as "current".

NEVJMP Number of sub-events to be skipped
ICOND Return code
= 0 Normal return
= 1 If the skip of sub-events exceeds the event.

CALL KZMNUM(NSBEVT,ISBEVT)

Obtains the total number of sub-events and the sub-event number of the current sub-event in the event.

NSBEVT Total number of sub-events in the event.
ISBEVT Sub-event number of the current sub-event in the event

CALL KZMCUR(ISBEVT,ICOND)

Mark an sub-event as "current".

ISBEVT Sub-event number of the sub-event in the event which is to be marked at "current".
ICOND Return code
= 0 Normal return
= 1 Target sub-event is not included in the event.