| # dadlllink_def DLL Usage description This library contains functionality for exchange links and subscriptions. It also contains functions for subscription destroyed messages. Note on the function specifications: "iff" means "if and only if". DLL PROTOTYPES
     function extern
    				long ldef.activate.current.exchange.link.and.commit() pre : Current record of
    				daxch401 is filled with an existing exchange link, having status <>
    				active. post : If return = OK then the current exchange link has been activated
    				successfully; its status has been set to active; else nothing has been done.
    				state : If return = OK then a retry point is set and a commit is given. return:
    				Possible return values are the same as return values for function
    				lmess.send.subscribe() in library dadlllink_mess. risk : If the system goes
    				down during this process, an inconsistency between source and target system may
    				exist (because a two phase commit is not available for multisite). function
    				extern long ldef.activate.exchange.links( domain daxch.link link.f, domain
    				daxch.link link.t ) pre : true post : All exchange links in the specified
    				range, having status <> active, are activated if possible. state : A
    				retry point is set and a commit is given. return: True if no exchange links
    				have been selected or all exchange links selected are activated successfully;
    				false if one or more exchange links in the specified range could not be
    				activated. risk : If the system goes down during this process, an inconsistency
    				between source and target system may exist (because a two phase commit is not
    				available for multi-site). function extern long
    				ldef.activate.exchange.links.detailed( domain daxch.envi senv.f, domain
    				daxch.envi senv.t, domain daxch.comp scom.f, domain daxch.comp scom.t, domain
    				daxch.cxch sxch.f, domain daxch.cxch sxch.t, domain daxch.cbat sbat.f, domain
    				daxch.cbat sbat.t, domain daxch.cxch txch.f, domain daxch.cxch txch.t, domain
    				daxch.cbat tbat.f, domain daxch.cbat tbat.t ) pre : true post : All exchange
    				links in the specified range, having status <> active, are activated if
    				possible. state : A retry point is set and a commit is given. return: True if
    				no exchange links have been selected or all exchange links selected are
    				activated successfully; false if one or more exchange links in the specified
    				range could not be activated. risk : If the system goes down during this
    				process, an inconsistency between source and target system may exist (because a
    				two phase commit is not available for multisite). function extern long
    				ldef.active.exchange.link.exists.for.batch( domain daxch.cxch txch, domain
    				daxch.cbat tbat ) pre : true post : true return: True iff one or more exchange
    				links exist for the specified batch, having status active. desc : This function
    				can be used when importing. When running a regular import and this function
    				returns true, exchange should check the batches to import to see whether there
    				is any data waiting to be imported. If this function returns false, the regular
    				import process can continue without checking the batches to import. function
    				extern long ldef.active.or.partly.active.link.exists.for.batch (domain
    				daxch.cxch txch, domain daxch.cbat tbat) pre : true post : true return: True
    				iff one or more exchange links exist for the specified batch, having status
    				<> inactive (source/target). desc : This function can be used when to
    				check whether a batch can be deleted. A batch should not be deleted as long as
    				there are any exchange links for it having status active or inactive (target
    				only). function extern long ldef.can.delete.all.batches.in.range( domain
    				daxch.cxch cxch.f, domain daxch.cxch cxch.t, domain daxch.cbat cbat.f, domain
    				daxch.cbat cbat.t ) pre : true post : true return: True iff NONE of the batches
    				is used as target batch in any exchange link having status Active or Inactive
    				(target only) desc : If this function returns false this means that one of the
    				batches in the specified range cannot be deleted. function extern long
    				ldef.create.subscription( domain daxch.link subs, domain daxch.cxch sxch,
    				domain daxch.cbat sbat, domain daxch.envi tenv, domain daxch.comp tcom, domain
    				daxch.cxch txch, domain daxch.cbat tbat ) pre : All function parameters are
    				filled (although tcom may be 0). tenv is an existing environment. post : If
    				return: - the subscription defined by the function parameters has been created;
    				- if the subscription already existed (due to an inconsistency) it has been
    				'reinitialized': the export done messages of the subscription have been
    				deleted. state : Before calling this function a retry point must be set; after
    				calling this function a commit must be given; no commit is given in this
    				function. return: True if successful; false means: could not create the
    				subscription, because the exchange scheme or the batch does not exist function
    				extern long ldef.deactivate.current.exchange.link.and.commit() pre : Current
    				record of daxch401 is filled with an existing exchange link, having status
    				<> inactive (source/target). post : If return = OK then the current
    				exchange link has been deactivated successfully and its status has been set to
    				inactive (source/target); the import batches to do and the rejected import done
    				messages are deleted. If return <> OK then the current exchange link
    				could not be deactivated; its status has been set to inactive (target only).
    				state : A retry point is set and a commit is given. return: Possible return
    				values are the same as return values for function lmess.send.unsubscribe() in
    				library dadlllink_mess. risk : If the system goes down during this process, an
    				inconsistency between source and target system may exist (because a two phase
    				commit is not available for multi-site). function extern long
    				ldef.deactivate.exchange.links( domain daxch.link link.f, domain daxch.link
    				link.t, long only.inactive ) pre : true post : If only.inactive: All exchange
    				links in the specified range, having status <> inactive (source/target),
    				are deactivated if possible. If not only.inactive: All exchange links in the
    				specified range, having status inactive (target only), are deactivated if
    				possible. state : A retry point is set and a commit is given. return:.True if
    				no exchange links have been selected or all exchange links selected are
    				deactivated successfully; false if one or more exchange links in the specified
    				range could not be deactivated. risk :If the system goes down during this
    				process, an inconsistency between source and target system may exist (because a
    				two phase commit is not available for multi-site). function extern long
    				ldef.deactivate.exchange.links.detailed( domain daxch.envi senv.f, domain
    				daxch.envi senv.t, domain daxch.comp scom.f, domain daxch.comp scom.t, domain
    				daxch.cxch sxch.f, domain daxch.cxch sxch.t, domain daxch.cbat sbat.f, domain
    				daxch.cbat sbat.t, domain daxch.cxch txch.f, domain daxch.cxch txch.t, domain
    				daxch.cbat tbat.f, domain daxch.cbat tbat.t, long only.inactive ) pre : true
    				post : If only.inactive: All exchange links in the specified range, having
    				status <> inactive (source/target), are deactivated if possible. If not
    				only.inactive: All exchange links in the specified range, having status
    				inactive (target only), are deactivated if possible. state : A retry point is
    				set and a commit is given. return:.True if no exchange links have been selected
    				or all exchange links selected are deactivated successfully; false if one or
    				more exchange links in the specified range could not be deactivated. risk : If
    				the system goes down during this process, an inconsistency between source and
    				target system may exist (because a two phase commit is not available for
    				multi-site). function extern ldef.delete.exchange.links.of.target.batch( domain
    				daxch.cxch txch, domain daxch.cbat tbat ) pre : No exchange links exist for
    				target batch txch/tbat having status Active or Inactive (target only). post :
    				All exchange links for target batch txch/tbat have been deleted. state : Before
    				calling this function a retry point must be set; after calling this function a
    				commit must be given; no commit is given in this function. function extern long
    				ldef.delete.subscription( domain daxch.link subs, domain daxch.envi tenv,
    				domain daxch.comp tcom ) pre : true post : If return then either the
    				subscription defined by the function parameters has been deleted (and the
    				export done messages of the subscription have also been deleted), or the
    				subscription did not exist and the rejected subscription destroyed message has
    				been deleted. state : Before calling this function a retry point must be set;
    				after calling this function a commit must be given; no commit is given in this
    				function. return: True if action was successful; false if subscription does not
    				exist and rejected subscription destroyed message also does not exist. function
    				extern long ldef.delete.subscription.destroyed.message( domain daxch.link subs,
    				domain daxch.envi tenv, domain daxch.comp tcom ) pre : true post : If return
    				then the subscription destroyed message defined by the function parameters has
    				been deleted. state : Before calling this function a retry point must be set;
    				after calling this function a commit must be given; no commit is given in this
    				function. return: True if action was successful; false if the subscription
    				destroyed message did not exist. function extern long
    				ldef.delete.subscriptions.of.source.batch( domain daxch.cxch sxch, domain
    				daxch.cbat sbat ) pre : true post : All subscription of the source exchange
    				scheme/batch have been deleted. If return then all subscription destroyed
    				messages have been delivered to the target site successfully, otherwise one or
    				more rejected subscription destroyed messages have been created state : Before
    				calling this function a retry point must be set; after calling this function a
    				commit must be given; no commit is given in this function. return: False iff
    				one or more subscription destroyed messages could not be delivered. function
    				extern long ldef.environment.is.used.in.exchange.links( domain daxch.envi senv
    				) pre : true post : true return: True iff the environment is used in one or
    				more exchange links. function extern long
    				ldef.environment.is.used.in.subscriptions( domain daxch.envi tenv ) pre : true
    				post : true return: True iff the environment is used in one or more
    				subscriptions. function extern long ldef.exchange.link.exists( domain
    				daxch.link link ) pre : true post : true return: True iff the exchange link
    				exists. function extern long ldef.exchange.link.exists.and.is.not.inactive(
    				domain daxch.link link ) pre : true post : true return: True iff the exchange
    				link exists and has status <> inactive (source/target). function extern
    				long ldef.exchange.link.is.local( domain daxch.link link ) pre : true post :
    				true return: True iff the exchange link exists and the source environment is
    				equal to the current environment function extern long ldef.get.exchange.link(
    				domain daxch.envi senv, domain daxch.comp scom, domain daxch.cxch sxch, domain
    				daxch.cbat sbat, domain daxch.cxch txch, domain daxch.cbat tbat, ref domain
    				daxch.link link ) pre : true post : If return then link = exchange link found.
    				return: True iff exchange link having senv, scom, sxch, sbat, txch and tbat
    				exists. function extern long ldef.get.exchange.scheme.and.batch.of.subscription
    				(domain daxch.link subs, domain daxch.envi tenv, domain daxch.comp tcom, ref
    				domain daxch.cxch sxch, ref domain daxch.cbat sbat) pre : true post : If return
    				then sxch = source exchange scheme of subscription defined by subs/tenv/tcom;
    				sbat = source batch of subscription defined by subs/tenv/tcom. return: True iff
    				subscription subs/tenv/tcom exists. function extern long
    				ldef.get.source.environment.of.exchange.link( domain daxch.link link, ref
    				domain daxch.envi senv, ref domain daxch.comp scom ) pre : true post : If
    				return then senv and scom are filled with the source environment and company of
    				the exchange link. return: True iff the exchange link exists. function extern
    				long ldef.get.source.information.of.exchange.link( domain daxch.link link, ref
    				domain daxch.envi senv, ref domain daxch.comp scom, ref domain daxch.cxch sxch,
    				ref domain daxch.cbat sbat ) pre : true post : If return then senv, scom, sxch
    				and sbat are filled with the source environment, company, exchange scheme and
    				batch of the exchange link. return: True iff the exchange link exists. function
    				extern long ldef.get.subscription( domain daxch.cxch sxch, domain daxch.cbat
    				sbat, domain daxch.envi tenv, domain daxch.comp tcom, domain daxch.cxch txch,
    				domain daxch.cbat tbat, ref domain daxch.link subs ) pre : true post : If
    				return then subs = subscription found. return: True iff subscription having
    				sxch, sbat, tenv, tcom, txch and tbat exists. function extern long
    				ldef.prepare.batch.to.be.deleted( domain daxch.cxch cxch, domain daxch.cbat
    				cbat ) pre : true post : If return then all exchange links of the batch having
    				status Inactive (source/target) and all subscriptions of the batch have been
    				deleted; so the batch doesn't have any exchange links or subscriptions anymore.
    				If not return then nothing has been done. state : Before calling this function
    				a retry point must be set; after calling this function a commit must be given;
    				no commit is given in this function. return: True iff there was no exchange
    				link for this batch having status Active or Inactive (target only). desc :
    				Before deleting a batch we should check whether this can be done; this is the
    				case if there are no exchange links for this batch having status Active or
    				Inactive (target only). If the batch can be deleted then the subscriptions and
    				the exchange links having status Inactive (source/target) must be deleted
    				first. A batch should only be deleted if this function returns true. function
    				extern long ldef.resend.current.subscription.destroyed.message and.commit( )
    				pre : Current record of daxch407 is filled with an existing rejected
    				subscription destroyed message. post : The current rejected subscription
    				destroyed messages is resent. If the message is resent successfully it has been
    				deleted. state : A retry point is set and a commit is given (if return = OK).
    				return: Return value of function lmess.send.subscription.destroyed in
    				dadlllink_mess. risk : If the system goes down during this process, an
    				inconsistency between source and target system may exist (because a two phase
    				commit is not available for multi-site). function extern long
    				ldef.resend.subscription.destroyed.messages( domain daxch.link subs.f, domain
    				daxch.link subs.t, domain daxch.envi tenv.f, domain daxch.envi tenv.t, domain
    				daxch.comp tcom.f, domain daxch.comp tcom.t ) pre : true post : All rejected
    				subscription destroyed messages in the specified range are resent. Each message
    				that is resent successfully has been deleted. state : A retry point is set and
    				a commit is given. return: True if no messages have been selected or all
    				messages selected are sent successfully; false if one or more messages in the
    				specified range could not be delivered. risk : If the system goes down during
    				this process, an inconsistency between source and target system may exist
    				(because a two phase commit is not available for multi-site). function extern
    				long ldef.resend.subscription.destroyed.messages .detailed(domain daxch.cxch
    				sxch.f, domain daxch.cxch sxch.t, domain daxch.cbat sbat.f, domain daxch.cbat
    				sbat.t, domain daxch.envi tenv.f, domain daxch.envi tenv.t, domain daxch.comp
    				tcom.f, domain daxch.comp tcom.t, domain daxch.cxch txch.f, domain daxch.cxch
    				txch.t, domain daxch.cbat tbat.f, domain daxch.cbat tbat.t ) pre : true post :
    				All rejected subscription destroyed messages in the specified range are resent.
    				Each message that is resent successfully has been deleted. state : A retry
    				point is set and a commit is given. return: True if no messages have been
    				selected or all messages selected are sent successfully; false if one or more
    				messages in the specified range could not be delivered. risk : If the system
    				goes down during this process, an inconsistency between source and target
    				system may exist (because a two phase commit is not available for multi-site).
    				function extern long ldef.send.subscription.destroyed.for.current
    				.subscription( ) pre : Current record of daxch402 is filled with an existing
    				subscription to be deleted. post : After calling this function the subscription
    				can (and must!) be deleted. If return <> OK then a rejected subscription
    				destroyed message has been created. state : Before calling this function a
    				retry point must be set; after calling this function a commit must be given; no
    				commit is given in this function. return: Return value of function
    				lmess.send.subscription.destroyed() in dadlllink_mess. function extern long
    				ldef.set.status.of.link.to.inactive( domain daxch.link link ) pre : true post :
    				If return then the status of the exchange link is inactive (source/target),
    				otherwise nothing has been done. state : Before calling this function a retry
    				point must be set; after calling this function a commit must be given; no
    				commit is given in this function. return: True iff status of exchange link has
    				been updated or the exchange was active (source/target) already. (false means:
    				the status could not be updated, because the exchange link does not exist).
    				note : This function will not remove the subscription at the source site.
    				Therefore it should only be used when subscription has already been deleted or
    				is currently being deleted! function extern long ldef.subscription.exists(
    				domain daxch.link subs, domain daxch.envi tenv, domain daxch.comp tcom ) pre :
    				true post : true return: True iff subscription defined by subs, tenv and tcom
    				exists. function extern long ldef.subscription.exists.for.batch( domain
    				daxch.cxch sxch, domain daxch.cbat sbat, domain daxch.comp startup.company )
    				pre : true post : true return: True iff a subscription having source exchange
    				scheme sxch and source batch sbat exists.
Related topics Libraries |