ZAFTER
ZAFTER, Start Creation of an AFTER Key
ARGS: DUMMY
DESC: ZAFTER starts the creation of a DBMS key. It creates
an "AFTER" key. That is, a key which will be used
to select all CIR/record's whose key comes after the
key that is currently being defined. It is normally
called after one of the case/record level
initialisation routines in order to initialise the
key selection options for case or record loops.
Following a call to ZAFTER, key definitions routines
are called to enter values into the key one at a
time. For a case key only one call is made to enter
the value of the case id. For record keys, the case
id is assumed to be the same as the last CIR
retrieved or restored. Therefore, only the record
sort ids have to be inserted into the key. The
sort-ids must be entered in the order of their
appearance in the key being created.
ENTRY: DUMMY (I * 4 ) Dummy argument needed to make a
syntactically correct FORTRAN function. Should
always be 0.
EXIT: None.
ZCALL
ZCALL, Call HOST Function and Check Its Return Value
ARGS: ZFUNC, PRTFL, ENDFL, LBLNO, CODE1, CODE2
DESC: ZCALL enables the programmer to write a more concise
and easier to maintain program by performing the
testing of the return codes and the eventual error
processing. First, ZCALL calls ZFUNC. If ZFUNC
returns a positive value, zero or a negative value
that is between CODE1 and CODE2, ZCALL returns
immediately. If ZCALL does not return immediately,
the following action is taken: PRTFL is 0, nothing
is printed in the log file. PRTFL is 1, a brief
message is printed that indicates the subroutine
name, the error code, and the statement label LBLNO.
If it is 2, the short message is printed followed by
the complete error message on the next line. If
ENDFL is 0, ZCALL returns. If it is -1, the full
HOST system is shutdown but the subroutine returns.
If it is -2, the full system is shutdown and the
subroutine exits directly. If it is n(positive
integer), the current stream (user) is shutdown, the
system switches to user n and the subroutine
returns.
ENTRY: ZFUNC (I * 4) Z function to call, with all its arguments.
PRTFL (I * 4) Print flag, controls if and how a message is
printed.
ENDFL (I * 4) End flag, controls the flow of control after
an error has occurred
LBLNO (I * 4) Statement label number.
CODE1 (I * 4) Error code (Negative 4 digit number or 0).
CODE2 (I * 4) Error code (Negative 4 digit number or 0).
EXIT: None.
RETURN: Return value of ZFUNC.
ZCCNTD
ZCCNTD, Set Current Database and Initialise COUNT Case-processing Block
ARGS: TCASES,INDEX,START,DBNAME
DESC: ZCCNTD is called to make DBNAME the current database
and to start creating a "PROCESS CASE" block with
the COUNT option. The purpose of this call is to
initialise the retrieval stack with the required
information. The arguments correspond to the
arguments on the COUNT = clause of the PROCESS CASE
command in RETRIEVAL. the database. ZCCNTD can also
be used to process ALL cases by setting INDEX and
START to 1 and TCASES to -1.
ENTRY: TCASES(I * 4) Total number of cases to be processed.
INDEX (I * 4) Every INDEX th case will be processed.
START (I * 4) Starting with the START the case in
the database.
DBNAME(N * 8) The database name to be processed by
this case loop.
EXIT: None.
RETURN: Stack level of the newly created block, negative if error.
ZCFIND
ZCFIND, Find Case with Given Key
ARGS: OPT, LFLAG, DIRECT, BEGIN
DESC: ZCFIND finds an existent case or creates a new case
with a previously specified key. It is called after
routine ZCGDMY or ZCRDMY has created a dummy block
and after putting values into the caseid variable in
CIR and ( if OPT is 1 ) in other common variables.
When ZCFIND is executed, the value of the caseid is
used to create the case key. If the caseid variable
is undefined, then the dummy block is converted into
a PROCESS CASE ALL block and the next or previous
CIR is read. Otherwise, the dummy block is
converted into a CASE IS block and: a) if OPT is 1,
then the undefined values are updated to the values
read from the found CIR or b) if OPT is 2 the full
current CIR is replaced by the read CIR.
ENTRY: OPT (I * 4) Controls the update/replace of the CIR.
LFLAG (I * 4) Lock flag.
DIRECT (I 4) If PROCESS CASE then use 1 to get the
next case and -1 to get the previous
case.
BEGIN (I * 4) Should be 0 to set the range to all
cases (starting with the first case in
the database) and I to convert to a
PROCESS CASES ALL block (if caseid is
undefined) or CASE IS block (if
caseid is defined).
EXIT: None.
RETURN: -4001 if CIR not found;
-3026 if CIR is found but is incompatible locked;
+0003 if CIR is found and has a compatible lock;
+0004 if CIR is found and available for CASE IS;
+0000 if CIR is found and available for PROCESS
CASE;
negative if error.
ZCIS
ZCIS, Initialise CASE IS Block for Current Database
ARGS: NEW,OLD
DESC: ZCIS is the first of a series of routines that can
be called in order to create "CASE IS" block. The
purpose of this call is to initialise the retrieval
stack with the required information.
ENTRY: NEW (I * 4) It is 1 if a new case can be created by
this level, otherwise it is 0. The
database must have been opened for
update to allow a value of 1.
OLD (I * 4) It is 1 if an old case can be accessed
by this level, otherwise it is 0.
EXIT: None.
RETURN: Stack level of the newly created block, negative if error.
ZCISD
ZCISD, Set Current Database and Initialise CASE IS Block
ARGS: NEW,OLD,DBNAME
DESC: ZCISD is called to make DBNAME the current database
and to start creating a "CASE IS" block. The
purpose of this call is to initialise the retrieval
stack with the required information.
ENTRY: NEW (I * 4) It is 1 if a new case can be created by
this level, otherwise it is 0. The
database must have been opened for
update to allow a value of 1.
OLD (I * 4) It is I if an old case can be accessed
by this level, otherwise it is 0.
DBNAME(N*8) The database name to be processed by the
level being created.
EXIT: None.
RETURN: Stack location of the new block, negative if error.
ZDESC
ZDESC, Create Variable Descriptor
ARGS: VDESC,RECTYP,VRNAME,LEVEL
DESC: ZDESC builds-up a variable's descriptor. (Refer to
the Machine Specifics documentation for
additional information on descriptors.) ZDESC can be
called once prior to entering a loop which
references a variable. This avoids the necessity of
creating the variable descriptor for each loop
iteration. Unlike ZDESCD, the database name is not
required.
ENTRY: RECTYP(I * 4) The record type number to which the
variable belongs. Common variables are
indicated by setting this argument to
zero.
VRNAME(N*8) The variable name.
LEVEL (I * 4) Level in the retrieval stack where the
CIR/data record can be found. A zero
value indicates that when the descriptor
is used, the system should start with
the innermost level in the retrieval
stack and search outwards for the first
level which matches the database and
record type specified within the
descriptor. A negative value indicates
that the record is LEVEL levels out from
the innermost level. A positive value
indicates that the record is LEVEL
levels deep in the retrieval stack.
EXIT: VDESC (D*8) Contains the descriptor for the variable
specified by the other arguments.
ZDESCB
ZDESCB, Break Descriptor Into Four Integers
ARGS: VDESC,DBNUM,RECTYP,VARNUM,LEVEL
DESC: ZDESCB breaks a descriptor into 4 integers.
ENTRY: VDESC (I * 4) Contains the descriptor.
EXIT: DBNUM (I * 4) The database number in HOST system.
RECTYP(I * 4) The record-type number.
VRNUM (I * 4) The variable number in record.
LEVEL (I * 4) The stack level.
ZDESCD
ZDESCD, Create Variable Descriptor
ARGS: VDESC,DBNAME,RECTYP,VRNAME,LEVEL
DESC: ZDESCD looks up a common or record variable name and
returns the variable's descriptor. Refer to the
Machine Specifics documentation for additional
information on descriptors. ZDESCD can be called
once prior to entering a loop which references a
variable. This avoids the necessity of creating the
variable descriptor for each loop iteration.
ENTRY: DBNAME(N*8) The database in which the variable
resides.
RECTYP(I * 4) The record type number to which the vari-
able belongs. Common variables are indi-
cated by setting this argument to zero.
VRNAME(N*8) The variable name.
LEVEL (I * 4) This indicates where the CIR/data record
can be found. A zero value indicates
that when the descriptor is used, the
system should start with the innermost
level in the retrieval stack and search
outwards for the first level which
matches the database and record type
specified within the descriptor. A
negative value indicates that the record
is LEVEL levels out from the innermost
level A positive value indicates that
the record is LEVEL levels deep in the
retrieval stack.
EXIT: VDESC (D 8) Contains the descriptor for the variable
specified by the other arguments.
ZDESCM
ZDESCM, Make Descriptor out of Four Integers
ARGS: VDESC,DBNUM,RECTYP,VARNUM,LEVEL
DESC: ZDESCM makes a descriptor from 4 integers.
ENTRY: DBNUM (I * 4) The database number in HOST system.
RECTYP(I * 4) The record type number. It cannot be 0
for a caseless database.
VRNUM (I * 4) The variable number in record.
LEVEL (I * 4) The stack level.
EXIT: VDESC (I * 4) Contains the descriptor for the variable
specified by the other arguments.
ZDTTKY
ZDTTKY, Enter a Date String into a Key
ARGS: DATEST,LENGTH,DATEMP
DESC: ZDTRKY is called after one of the key initialisation
routines in order to insert the value of a date
string into the next location of the key currently
being defined.
ENTRY: DATEST (B * n) Date string to insert into key.
LENGTH (I * 4) Number of characters in strings DATEST
and DATEMP.
DATEMP (B * n) String containing format for decoding
the date specified in DATEST. Legal
characters are I(ignore), Y(year),
M(month), or D(day). For
example 'MMIDDIYY'
EXIT: None.
ZDTTRC
ZDTTRC, Move Date into CIR/Record
ARGS: DATEST,LENGTH,DATEMP,VDESC
DESC: ZDTTRC transfers the value of a date string into a
CIR or data record.
ENTRY: DATEST (B * n) Date string to transfer to record.
LENGTH (I * 4) Number of characters in strings DATEST
and DATEMP.
DATEMP (B * n) String containing format for decoding
the date specified in DATEST. Legal
characters are I(ignore), Y(year),
M(month), or D(day).
VDESC (D * 8) Variable descriptor of variable to receive
value.
EXIT: None.
ZDTXIN
ZDTXIN, Convert Date String into Date Integer
ARGS: DATEST,ORDINAL,DATEMP,LENGTH
DESC: ZDTXIN converts a date encoded as a character string
into a julian integer value.
ENTRY: DATEST (B * n) Date string to convert.
ORDINAL (I * 4) First character in string DATEST to
use.
DATEMP(B * n) String containing format for
decoding the date specified in
DATEST. Legal characters are
I(ignore), Y(year), M(month), or
D(day). For example 'MMIDDIYY'
LENGTH(I * 4) Number of characters in strings
specified above.
EXIT: None.
ZDTXKY
ZDTXKY, Enter Date String into Key
ARGS: DATEST,ORDINAL,LENGTH,DATEMP
DESC: ZDTXKY is called after one of the key initialisation
routines in order to insert the value of a date
string into the next location of the key currently
being defined.
ENTRY: DATEST (B * n) Date string to insert into key.
ORDINAL (I * 4) Starting byte number in area DATA to
transfer the value from. For a
simple variable this value is 1.
LENGTH (I * 4) Number of characters in strings
specified above.
DATEMP (B * n) String containing format for
decoding the date specified in
DATEST. Legal characters are
I(ignore), Y(year), M(month), or D
(day). For example 'MMIDDIYY'
EXIT: None.
ZDTXRC
ZDTXRC, Move Date into CIR/Record
ARGS: DATEST,ORDINAL,LENGTH,DATEMP,VDESC
DESC: ZDTXRC transfers the value of a date string into a
CIR or data record.
ENTRY: DATEST (B * n) Date string to transfer to record.
ORDINAL (I * 4) Starting byte number in area DATA to
transfer the value from. For a
simple variable this value is 1.
LENGTH (I * 4) Number of characters in strings
specified above.
DATEMP (B * n) String containing format for
decoding the date specified in
DATEST. Legal characters are
I(ignore), Y(year), M(month), or
D(day).
VDESC (D * 8) Variable descriptor of variable to
receive value.
EXIT: None.
ZERMSG
ZERMSG, Error Description Routine
ARGS: ERRNUM,BUFFER,BUFLEN,LOGFLG,RNAME
DESC: ZERMSG converts an error code ERRNUM into coded text
that can be printed.
ENTRY: ERRNUM (I * 4) Error code to be converted.
BUFLEN (I * 4) Maximum number of characters to
transfer to error text buffer BUFFER.
LOGFLG (I * 4) Insert error message in log flag. If
the value of this argument is 0 then
no message is placed in the system
log file. If the value of this
argument is I then the message is
placed in the system log file and
also transferred to the BUFFER array.
RNAME (N * 8) Calling routine name to be included
in error message placed in system log
file.
EXIT: BUFFER (B * n) Will contain up to BUFLEN characters
describing the error code ERRNUM.
RETURN: Number of characters in the returned message,
negative if error.
ZFROM
ZFROM, Start Creation of FROM Key
ARGS: DUMMY
DESC: ZFROM starts the creation of a key. It creates a
"FROM" key. That is, a key which is used to select
all CIR/record's whose key matches or comes after
the key that is currently being defined. It is
normally called after one of the case/record level
initialisation routines in order to initialise the
key selection options for case or record loops.
Following a call to ZFROM, other routines are called
to enter values into the key one at a time. For a
case key only one call is made to enter the value of
the case id. For record keys, the case id is
assumed to be the same as the last CIR retrieved or
restored. Therefore, only the record sort ids have
to be inserted into the key. The sort-ids must be
entered in the order of their appearance in the key
being created.
ENTRY: DUMMY(I * 4) Dummy argument to make routine a
syntactically correct FORTRAN function.
Should always be 0.
EXIT: None.
ZINXDT
ZINXDT, Convert Integer into Date String
ARGS: IDAYS,DATEST,ORDINAL,LENGTH,DATEMP
DESC: ZINXDT converts an integer value into a date string
according to a specified format.
ENTRY: IDAYS (I * 4) The integer value to convert.
ORDINAL (I * 4) Starting byte number in area DATEST
to transfer the date string to.
LENGTH (I * 4) Number of characters in strings
specified above.
DATEMP (B * n) String containing format for
decoding the date specified in
DATEST. Legal characters are
I(ignore), Y(year), M(month), or
D(day). For example 'MMIDDIYY'
EXIT: DATEST (B * n) The area in which to place the date
string created. Starting at
position ORDINAL as specified above.
ZINXTM
ZINXTM, Convert Integer into Time String
ARGS: ITIME,TIMSTR,ORDINAL,LENGTH,TIMMAP
DESC: ZINXTM converts an integer value into a time string
according to a specified time format.
ENTRY: ITIME (I * 4) The integer to convert.
ORDINAL (I * 4) Starting byte number in area TIMSTR to
transfer the time string to.
LENGTH (I * 4) Number of characters in strings above.
TIMMAP (B * n) String containing the decoding
format for the time string
contained in TIMEST. Legal values
are I(ignore), H(hour), M(minute),
S(second). For example 'HHMMSS'
EXIT: TIMSTR (B * n) The area to receive the time
string. The location the string is
placed in this area is dependent on
ORDINAL.
ZLABLN
ZLABLN, Get Value Label for Numeric Variable
ARGS: VDESC,VALUE,STRING,LENGTH
DESC: ZLABLN searches the database for the value label
associated with the specified variable and the
numeric value.
ENTRY: VDESC (D * 8) The variable descriptor.
VALUE (R * 8) The specific value whose label is to
be returned.
LENGTH(I * 4) Number of characters of value label to
retrieve.
EXIT: STRING (B * n) Area in which the value label will be
placed.
RETURN: Number of characters actually transferred, negative if error.
ZLABLS
ZLABLS, Get Value Label for String Variable
ARGS: VDESC,VALUE,LENGTHI,STRING,LENGTH2
DESC: ZLABILS searches the database for the value label
associated with the specified variable and the
string value.
ENTRY: VDESC (D * 8) The variable descriptor.
VALUE (B * n) The specific value whose label is to
be returned.
LENGTH1(I * 4) Number of characters in the value.
LENGTH2(I * 4) Number of characters of value label
to retrieve.
EXIT: STRING (B * n) Area in which the value label is to
be placed.
RETURN: Number of characters actually transferred, negative if error.
ZLCKRT
ZLCKRT, Set or Return the Record Type Lock
ARGS: DBNAME,RECTYP,LFLAG
DESC: ZLCKRT sets or returns the lock for a specified
record type. It works only for concurrent HOST.
The routine can be invoked from a regular HOST
program but it does not have any effect, nor does it
return any significant value.
ENTRY: DBNAME(D * 8) The database name to which the record
type belongs.
RECTYP(B * n) If ZLCKRT is invoked to set a record
type lock, RECTYP is the record type
number (0 means CIR). If it is
invoked to return a record type lock,
RECTYP should be set to a negative
value that is the -1 minus the record
type ( i.e. -1 for CIR, - 2 for
rectype 1, etc.)
LFLAG (I * 4) Value to set the lock record type to (
if RECTYP is not negative).
EXIT: LFLAG (B * n) Current value of the lock flag for the
rectype specified by a negative value
of RECTYP.
ZLOGIN
ZLOGIN, Initialisation of Master Link
ARGS: MDSN,MLEN,SDSN,SLEN
DESC: ZLOGIN specifies the MASTER and SLAVE names (DSNS)
and logs the slave (current process) into the
MASTER. It must be the next routine called after
ZSTART. If it is not called, the default master and
slave names are used. For non-concurrent HOST,
ZLOGIN is not operational.
ENTRY: MDSN (B * n) The MASTER DSN.
MLEN (I * 4) The length of the MDSN.
SDSN (B * n) The SLAVE DSN.
SLEN (I * 4) The length of the SDSN.
EXIT: None.
ZMSLAB
ZMSLAB, Return Value Label for Missing Value
ARGS: VDESC,VALUE,STRING,LENGTH
DESC: ZMSLAB retrieves the value label for a specified
missing value of a certain variable.
ENTRY: VDESC (D * 8) The descriptor for the variable.
VALUE (I * 4) The missing value whose label is
being returned. (0, 1, 2, 3)
LENGTH(I * 4) Maximum number of characters to
return.
EXIT: STRING (B * n) String area that will have the label
placed in it.
RETURN: The number of characters actually transferred
negative if error.
ZNVARS
ZNVARS, Get the Number of Variables in Record
ARGS: DBNAME,RECTYP
DESC: ZNVARS returns the number of variables in a
specified record type or the CIR. It can be used to
determine if a database is caseless or not.
ENTRY: DBNAME (N * 8) The database name.
RECTYP (I * 4) The record type number. Use zero for
the CIR. If RECTYP is 0 and the
database is caseless, the function
returns 0.
EXIT: None.
RETURN: The number of variables in the specified record
type, zero for the number of variables in the CIR of
a caseless database, negative if error.
ZORDB
ZORDB, Initialise Specified Random Database
ARGS: DBNAME,DBPASS,HSPASS,RDPASS,WRPASS, UPD,PREFIX,PRELEN
DESC: ZORDB is called to attach the database. It also
verifies the passwords to ensure database security
and accessibility. It must be called prior to any
reference to the new database. Each open database
requires a significant amount of memory to be
allocated in the table area regardless of whether it
is currently being used or not. ZORDB may only be
called for a database that is in random format.
ENTRY: DBNAME(N * 8) Name of the database. This is the same
name that would appear on an "OLD FILE"
command.
DBPASS(N * 8) The password for the database.
HSPASS(N * 8) The password required to access the
database via HOST. If no password is
required then this field should
contain a blank name.
RDPASS(N * 8) The read security password for the
database. This password is used to
define the default read security level
for any stream which does not
specifically set the read security
level for this database. If the
argument contains 8 blanks then the
standard DBMS default is used for
any stream not specifying a read
security password.
WDPASS(N * 8) The write security password for the
database. This password is used to
define the default write security
level for any stream which does not
specifically set the write security
level for this database. If the
argument contains 8 blanks then the
standard DBMS default is used for
any stream not specifying a write
security password.
UPD (I * 4) Update/nonupdate flag. If UPD is 0
then the database is attached for read
only access. If however the value of
this argument is 1 or 2 then the
database is attached for exclusive
usage in order to allow the job to
modify the database. If the value is 2
then every change to the database
causes the changed internal tables to
be rewritten to the database file. If
the value is 1 then only when HOST
determines it is necessary will the
tables be rewritten to the database
file.
PREFIX(B * n) Prefix used for database filenames.
PRELEN(I * 4) Number of characters in "PREFIX".
EXIT: None.
RETURN: The database number used in creating descriptors if
no errors are encountered ( 1 for 1st opened
database, 2 for 2nd, etc. Negative if error.
ZOSDB
ZOSDB, Initialise Specified Sequential Database
ARGS: DBNAME,DBPASS,HSPASS,RDPASS,WRPASS,UPD,
PREFIX,PRELEN,SIFNAM,SOFNAM
DESC: ZOSDB is called initially to attach a sequential
format database. It also verifies the passwords to
ensure database security and accessibility. Each
open database requires a significant amount of
memory to be allocated in the table area regardless
of whether it is currently being used or not. ZOSDB
may only be called for a database which is in
sequential format.
ENTRY: DBNAME(N * 8) Name of the database. This is the same
name that would appear on an "OLD FILE"
command.
DBPASS(N * 8) The password for the database.
HSPASS(N * 8) The password required to access the
database via HOST. If no password is
required then this field should contain
a blank name.
RDPASS(N * 8) The read security password for the
database. This password is used to
define the default read security level
for any stream which does not
specifically set the read security
level for this database. If the
argument contains 8 blanks then the
standard DBMS default is used for any
stream not specifying a read security
password.
WRPASS (N * 8) The write security password for the
database. This password is used to
define the default write security level
for any stream which does not
specifically set the write security
level for this database. If the
argument contains 8 blanks then the
standard DBMS default is used for any
stream not specifying a write security
password.
UPD (I * 4) Update/nonupdate flag. If UPD is 0 then
the database is attached for read only
access. If however the value of this
argument is 1 or 2 then the database is
attached for exclusive usage in order
to allow the job to modify the
database. If the value is 2 then every
change to the database causes the
changed internal tables to be rewritten
to the database file. If the value is I
then only when HOST determines it is
necessary will the tables be rewritten
to the database file.
PREFIX(B * n) Prefix used for database filenames.
PRELEN(I * 4) Number of characters in "PREFIX".
SIFNAM (N * 8) The "FILENAME" of the file containing
the sequential format input database.
SOFNAM (N * 8) The "FILENAME" of the file which will
contain the sequential format output
database. If this is not an update run
then this argument should contain all
blanks.
EXIT: None.
RETURN: The database number used in creating descriptors if
no errors are encountered ( 1 for 1st opened
database, 2 for 2nd, etc ). negative if error.
ZRCNT
ZRCNT, Initialise COUNT Record Processing Block
ARGS: RECTYP,TRECS,INDEX,START
DESC: ZRCNT is the first of a series of routines that can
be called in order to create "PROCESS RECORD" block
with the COUNT option. ZRCNT can be used to process
ALL records by setting INDEX and START to 1 and
TRECS to -1. The arguments correspond to the
arguments on the COUNT = clause of the PROCESS CASE
command in RETRIEVAL.
ENTRY: RECTYP(I * 4) The record type number to be
processed.
TRECS (I * 4) Total number of records to be
processed.
INDEX (I * 4) Every INDEX the record will be
processed.
START (I * 4) Starting with the START the record in
the database.
EXIT: None.
RETURN: Stack level of the newly created block, negative if
error.
ZRCNTD
ZRCNTD, Set Current Database and Initialise COUNT
Record-processing Block
ARGS: RECTYP,TRECS,INDEX,START,DBNAME
DESC: ZRCNTD is called to make DBNAME the current database
and to start creating a "PROCESS RECORD" block with
the COUNT option. The purpose of this call is to
initialise the retrieval stack with the required
information. The arguments correspond to the
arguments on the COUNT = clause of the PROCESS CASE
command in RETRIEVAL.
ENTRY: RECTYP(I * 4) The record type number to be
processed.
TRECS (I * 4) Total number of records to be
processed.
INDEX (I * 4) Every INDEX the record will be
processed.
START (I * 4) Starting with the START the record in
the database.
DBNAME(N * 8) Database name.
EXIT: None.
RETURN: Stack level of the newly created block, negative if
error.
ZRCNTL
ZRCNTL, Initialise COUNT Record Processing Block
Belonging to CIR
ARGS: RECTYP,TRECS,INDEX,START,LEVEL
DESC: ZRCNTL is called to start creating a "PROCESS
RECORD" block (with the COUNT option) that belongs
to the CIR at the specified level. The purpose of
this call is to initialise the retrieval stack with
the required information. Potentially, it can
switch databases. ZRCNTL can be used to process ALL
records by setting INDEX and START to 1 and TRECS to
-1. The arguments correspond to the arguments on
the COUNT clause of the PROCESS CASE command in
RETRIEVAL.
ENTRY: RECTYP(I * 4) The record type number to be
processed.
TRECS (I * 4) Total number of records to be
processed.
INDEX( I * 4) Every INDEX the record will be
processed.
START (I * 4) Starting with the START the record in
the database.
LEVEL (I * 4) Stack level of the CIR block to which
the record should belong.
EXIT: None.
RETURN: Stack level of the newly created block, negative if
error.
ZRCTDT
ZRCTDT, Transfer Date from CIR/Record
ARGS: VDESC,DATEST,LENGTH,DATEMAP
DESC: ZRCTDT retrieves a date value from the specified
CIR/data record and converts it to a date string
according to the user specified date map.
ENTRY: VDESC (D * 8) Variable descriptor of variable to
retrieve.
DATEST(B * n) Location to place date string.
LENGTH(I * 4) Number of characters in strings DATEST
and DATEMP.
DATEMP(B * n) String containing the decoding format
for the date string contained in
DATEST. Legal values are W(day of
week) M(month), D(day), Y(year). For
example, 'MM/DD/YY' would produce
'12/31/86'.
EXIT: DATEST(B * n) Will contain date string retrieved
from current CIR/data record.
ZRCTTM
ZRCTTM, Transfer Time from CIR/Record
ARGS: VDESC,TIMEST,LENGTH,TIMEMP
DESC: ZRCTTM retrieves a time string from the specified
CIR/data record.
ENTRY: VDESC (D * 8) Variable descriptor of variable to
retrieve.
TIMEST (B * n) Location to place time string.
LENGTH (I * 4) Number of characters in strings
TIMEST and TIMEMP.
TIMEMP (B * n) String containing the decoding
format for the time string contained
in TIMEST. Legal values are H(hour),
M(minute), S(second). For example,
'HH:MM:SS' would produce '11:59:59'.
EXIT: TIMEST (B * n) Will contain time string retrieved
from current CIR/data record.
ZRCXDT
ZRCXDT, Transfer Date from CIR/Record
ARGS: VDESC,DATEST,ORDINAL,LENGTH,DATEMP
DESC: ZRCXDT retrieves a date string from the specified
CIR/data record.
ENTRY: VDESC (D * 8) Variable descriptor of variable to
retrieve. See routines ZDESC and
ZDESCD for creating a descriptor.
ORDINAL(I * 4) Starting byte number in area DATA to
transfer the value to. For a simple
variable this value is 1.
LENGTH(I * 4) Number of characters in strings
specified above.
DATEMP(B * n) String containing format for decoding
the date specified in DATEST. Legal
characters are Y(year), M(month), or
D(day). All other characters are
transferred "as is" to DATEST. For
example, 'MM/DD/YY' would produce
'12/25/81'.
EXIT: DATEST(B * n) Will contain date string retrieved
from current CIR/data record.
ZRCXTM
ZRCXTM, Transfer Time from CIR/Record
ARGS: VDESC,TIMEST,ORDINAL,LENGTH,TIMEMP
DESC: ZRCXTM retrieves a time string from the specified
CIR/data record.
ENTRY: VDESC (D * 8) Variable descriptor of variable to
retrieve.
ORDINAL(I * 4) Starting byte number in area DATA to
transfer the value to. For a simple
variable this value is 1.
LENGTH (I * 4) Number of characters in strings
above.
TIMEMP (B * n) String containing the decoding format
for the time string contained in
TIMEST. Legal values are H(hour),
M(minute), S(second). For example,
'HH:MM:SS' would produce '11:59:59'.
EXIT: TIMEST(B * n) Will contain time string retrieved
from current CIR/data record.
ZRFIND
ZRFIND, Find Record with Given Key
ARGS: OPT, LFLAG, DIRECT, BEGINR, BEGINK
DESC: ZRFIND finds an existent record or creates a new
record with a previously specified key. It is
called after ZRGDMY, ZRGDML or ZRRDMY has created a
dummy block and after putting values into the record
id variable in the record and ( if OPT is 1 ) in
other record variables. When ZRFIND is executed,
the values of the record ids are used to create the
record key. If the record ids variable are
undefined, then the dummy block is converted into a
PROCESS RFC ALL block and the next or previous
record is read. Otherwise, the dummy block ZRGDMY
is converted into a REC IS block and: a) if OPT is
1, then the undefined values are updated to the
values read from the found record or b) if OPT is 2
the full current record is replaced by the read
record.
ENTRY: OPT (I * 4) Controls the update/replace of the
CIR.
LFLAG (I * 4) Lock flag.
DIRECT (I * 4) If PROCESS REC then use 1 to get the
next record and -1 to get the
previous record.
BEGINR(I * 4) Number of record ids to include in
range.
BEGINK (I * 4) Number of record ids to include in
starting key.
EXIT: None.
RETURN: -4001 if record not found;
-3026 if record is found but is incompatible locked;
+ 0003 if record is found and has a compatible lock;
+ 0004 if record is found and available for REC IS;
+ 0000 if record is found and available for PROCESS
REC; negative if error.
ZRIS
ZRIS, Initialise RECORD IS Block
ARGS: RECTYP,NEW,OLD
DESC: ZRIS is the first of a series of routines that can
be called in order to create "RECORD IS" block. The
purpose of this call is to initialise the retrieval
stack with the required information.
ENTRY: RECTYP(I * 4) The record type to be processed.
NEW (I * 4) NEW is I if a new record can be created
by this level, otherwise it is 0. The
database must have been opened for
UPDATE to allow a value of 1.
OLD (I * 4) OLD is I if an old record can be
accessed by this level, otherwise it is
0.
EXIT: None.
RETURN: Stack level of the newly created block, negative if
error.
ZRISD
ZRISD, Set Current Database and Initialise RECORD IS
Block
ARGS: RECTYP,NEW,OLD,DBNAME
DESC: ZRISD is called to make DBNAMF, the current database
and to start creating a "RECORD IS" block. The
purpose of this call is to initialise the retrieval
stack with the required information.
ENTRY: RECTYP(I * 4) The record type to be processed.
NEW (I * 4) NEW is 0 if a record cannot be created
by this level. The database must have
been opened for UPDATE to allow a value
of 1.
OLD (I * 4) OLD is 0 if an old record cannot be
accessed by this level, otherwise it is
1.
DBNAME(N * 8) The name of the database from which the
record should be selected.
EXIT: None.
RETURN: Stack level of the newly created block, negative if
error.
ZRISL
ZRISL, Initialise RECORD IS Processing Block Belonging to
CIR
ARGS: RECTYP,NEW,OLD,LEVEL
DESC: ZRISL is called to start creating a "RECORD IS"
block that belongs to the CIR at the specified
level. The purpose of this call is to initialise
the retrieval stack with the required information.
Potentially, it can switch databases.
ENTRY: RECTYP(I * 4) The record type to be processed.
NEW (I * 4) NEW is 0 if a new record is not legal
(NEW record IS). 1 if editing record is
legal (OLD record IS or record IS).
OLD (I * 4) OLD is 0 if an old record is not legal
(OLD record IS). 1 if a new record is
legal (NEW record IS or record IS).
LEVEL (I * 4) Level in stack of the CIR block to
which the record belongs.
EXIT: None.
RETURN: Stack level of the newly created block, negative if error.
ZRSAMD
ZRSAMD, Set Current Database and Initialise SAMPLE
Record-processing block
ARGS: RECTYP,SAMPLE,SEED,DBNAME
DESC: ZRSAMD is called to make DBNAME the current database
and to start creating a "PROCESS CASE" block with
the SAMPLE option. The purpose of this call is to
initialise the retrieval stack with the required
information.
ENTRY: RECTYP(I * 4) Record type.
SAMPLE (R * 4) Sample size ( 0 SAMPLE 1 )
SEED (I * 4) Starting seed.
DBNAME(N * 8) The name of the database form which
the record is selected.
EXIT: None.
RETURN: Stack level of the newly created block, negative if
error.
ZRSAML
ZRSAML, Start SAMPLE PROCESS RECORD Block
Belonging to CIR
ARGS: RECTYP,SAMPLE,SEED,LEVEL
DESC: ZRSAML is called to start creating a "PROCESS
RECORD" block (with the SAMPLE option) that belongs
to the CIR at the specified level. The purpose of
this call is to initialise the retrieval stack with
the required information. Potentially, it can
switch databases.
ENTRY: RECTYP(I * 4) The record type value to be processed.
SAMPLE(R * 4) Sample size ( 0 SAMPLE 1 ).
SEED (I * 4) Starting seed. The same seed always
generates the same sequence of random
numbers.
LEVEL (I * 4) Level in stack of the CIR block to
which the record belongs.
EXIT: None.
RETURN: Stack level of the newly created block, negative if error.
ZSECUR
ZSECUR, Specify Security Passwords
ARGS: DBNAME,RDPASS,WRPASS
DESC: ZSECUR specifies the passwords for the read and
write security levels for a specific database for
the current stream. It should be called for each
database used by each stream, which needs security
levels different from those specified when the
database was initially attached. Otherwise the
default levels specified on the attach call are
assigned. If the passwords specified by ZSECUR
select security levels less than the default values,
then the default values are used.
ENTRY: DBNAME(N * 8) The name of the database the following
security passwords apply to.
RDPASS(N * 8) Read security password for the current
stream.
WRPASS(N * 8) Write security password for the current
stream.
EXIT: None.
ZTMTKY
ZTMTKY, Enter Time String into Key
ARGS: TIMEST,LENGTH,TIMEMP
DESC: ZTMTKY is called after one of the key initialisation
routines in order to insert the value of a time
string into the next location of the key currently
being defined.
ENTRY: TIMEST (B * n) Time string to insert into key.
LENGTH (I * 4) Number of characters in strings TIMEST
and TIMEMP.
TIMEMP (B * n) String containing the decoding format
for the time string contained in
TIMEST. Legal values are 1(ignore),
H(hour), M(minute), S(second). For
example: 'HHMMSS'.
EXIT: None.
ZTMTRC
ZTMTRC, Move Time into CIR/Record
ARGS: TIMEST,LENGTH,TIMEMP,VDESC
DESC: ZTMTRC transfers the value of a time string into a
CIR or data record.
ENTRY: TIMEST (B * n) String containing the time value to transfer
to record.
LENGTH (I * 4) Number of characters in strings TIMEST
and TIMEMP.
TIMEMP (B * n) String containing the decoding format for
the time string contained in TIMEST.
Legal values are I(ignore), H(hour),
M(minute), S(second).
VDESC (D * 8) Variable descriptor of variables to receive
value.
EXIT: None.
ZTMXIN
ZTMXIN, Convert Time String into Integer
ARGS: TIMEST,ORDINAL,TIMEMP,LENGTH
DESC: ZTMXIN converts a time string into a time integer
value.
ENTRY: TIMEST (B * n) Time string to convert.
ORDINAL(I * 4) First character in string TIMEST to use.
TIMEMP (B * n) String containing the decoding format for
the time string contained in TIMEST.
Legal values are I(ignore), H(hour), M(minute),
S(second). For example: 'HHMMSS'.
LENGTH (I * 4) Number of characters in strings above.
EXIT: None.
RETURN: The integer equivalent of the time string (seconds
since midnight), negative if error.
ZTMXKY
ZTMXKY, Enter Time String into Key
ARGS: TIMFST,ORDINAL,LENGTH,TIMEMP
DESC: ZTMXKY is called after one of the key initialisation
routines in order to insert the value of a time
string into the next location of the key currently
being defined.
ENTRY: TIMEST (B * n) Time string to insert into key.
ORDINAL(I * 4) Starting byte number in area DATA to
transfer the value from. For a simple vari-
able this value is 1.
LENGTH (I * 4) Number of characters in strings above.
TIMEMP (B * n) String containing the decoding format for
the time string contained in TIMEST.
Legal values are I(ignore), H(hour),
M(minute), S(second). For example:
'HHMMSS'.
EXIT: None.
ZTMXRC
ZTMXRC, Move Time into CIR/Record
ARGS: TIMEST,ORDINAL,LENGTH,TIMEMP,VDESC
DESC: ZTMXRC transfers the value of a time string into a
CIR or data record.
ENTRY: TIMEST (B * n) String containing the time value to transfer
to record.
ORDINAL(I * 4) Starting byte number in area DATA to
transfer the value from. For a simple vari-
able this value is 1.
LENGTH (I * 4) Number of characters in strings above.
TIMEMP (B * n) String containing the decoding format for
the time string contained in TIMEST.
Legal values are 1(ignore), H(hour),
M(minute), S(second).
VDESC (D * 8) Variable descriptor of variables to receive
value.
EXIT: None.
ZVERS
ZVERS, Return Version, Revision Numbers and Levels of
HOST
ARGS: VERNUM, VERLEV, REVNUM, REVLEV
DESC: ZVERS returns the version and revision number and
levels of the HOST package that the user is
currently using. It also returns an indication of
whether it is regular or concurrent HOST.
ENTRY: None.
EXIT: VERNUM (I * 4) Version number.
VERLEV (I * 4) Version level.
REVNUM (I * 4) Revision number.
REVLEV (I * 4) Revision level.
RETURN: 0 if regular HOST,1 if concurrent HOST.