Using DNFCHECKRMAUTH

To use DNFCHECKRMAUTH, issue the following SQL CALL statement:
Read syntax diagramSkip visual syntax diagramCALL schema.DNFCHECKRMAUTH (ownBIC,corrBIC,authType,SWIFTNetService,requestType,messagingService,date,time, FINCopySpec , authorization,authCode, ASPname,ASPversion, stage,SQLstate,SQLmsg );
Table 1. DNFCHECKRMAUTH input parameters
Parameter Name SQL Data Type Description
ownBIC CHAR(8) The BIC8 of your financial institution.
corrBIC CHAR(8) The BIC8 of the correspondent.
authType CHAR(5) The type of authorisation that is required:
toSnd
An authorisation to send is required. This allows your own BIC to send data to the correspondent BIC.
toRcv
An authorisation to receive is required. This allows your own BIC to receive data from the correspondent BIC.
SWIFTNetService VARCHAR(30) The name of the SWIFTNet service for which authorization is to be verified, for example:
swift.ia
For SWIFTNet InterAct traffic to live destinations.
swift.ia!p
For SWIFTNet InterAct traffic to test and training (T&T) destinations.
requestType VARCHAR(30) The request type for which authorization is to be verified:
  • For FIN messages, this is a FIN message type number. For example, 103 represents a FIN MT103 message.
  • For Interact and FileAct, this is the SWIFTNet request type.
messagingService CHAR(4) The messaging service used by the service:
FIN
The service uses the FIN messaging service.
IAFA
The service uses the InterAct or FileAct messaging service.
date DATE The date, in UTC, for which authorization is to be verified. This date must have one of the following formats:
yyyy-mm-dd
mm/dd/yyyy
dd.mm.yyyy
If a null value is specified, DNFCHECKRMAUTH uses the current UTC date.
time TIME The time, in UTC, for which authorization is to be verified, for example:
00:00
07:15
23:54
If a null value is specified, DNFCHECKRMAUTH verifies the authorization for the current UTC time.
FINCopySpec VARCHAR(12) A string that indicates which FINCopy ASP, if any, is to be used:
  • If the TPS FINCopy service is to be used, specify a name of the form TPS_cid, where cid represents the BIC8 of the central institution destination.
  • If a FINCopy service other than TPS is to be used, specify its 3-letter FINCopy service ID.
  • If the messaging service is not FIN or if a FINCopy ASP is not to be used, the value of this field must be null.
Table 2. DNFCHECKRMAUTH output parameters
Parameter Name SQL Data Type Description
authorization CHAR(1) Whether the request is authorized:
Y
The request is authorized.
N
The request is not authorized.
(blank)
An error occurred that prevented DNFCHECKRMAUTH from determining whether the request is authorized.
authCode SMALLINT The authorization code, which provides information about why the request is or is not authorized:
1
OK - Authorisation not required; not checked. Authorization for this request is not required. The request is authorized. If this information is retrieved from an ASP, the output parameters ASPname and ASPversion indicate the ASP name and version.
0
OK - Authorisation required; available. Authorization for this request is required, and the RM data store contains an authorisation that authorizes the request.
-1
NOT OK - Error.An error prevented DNFCHECKRMAUTH from determining whether authorization for this request is required. The SQLstate and SQLmsg output parameters indicate the nature of this error.
-2
NOT OK - Authorization required; not found. Authorization for this request is required; however, the RM data store does not contain an authorisation for this combination of own BIC, correspondent BIC, service, and direction. The request is not authorized.
-3
NOT OK - Authorization required; revoked. Authorization for this request is required. The RM data store contains an authorisation for this combination of own BIC, correspondent BIC, service, and direction; however, that authorisation is flagged as having been revoked. The request is not authorized.
-4
NOT OK - Authorization required; deleted. Authorization for this request is required. The RM data store contains an authorisation for this combination of own BIC, correspondent BIC, service, and direction; however, that authorisation is flagged as having been deleted. The request is not authorized.
-5
NOT OK - Authorization required; rejected. Authorization for this request is required. The RM data store contains an authorisation for this combination of own BIC, correspondent BIC, service, and direction; however, that authorisation is flagged as having been rejected. The request is not authorized.
-6
NOT OK - Authorization required; insufficient permission. Authorization for this request is required. The RM data store contains an authorisation for this combination of own BIC, correspondent BIC, service, and direction; however, that authorisation does not include the necessary permission. The request is not authorized.
-7
NOT OK - Authorization required; incorrect validity period. Authorization for this request is required. The RM data store contains an authorisation for this combination of own BIC, correspondent BIC, service, and direction; however, the specified date and time are not within the validity period of that authorisation. The request is not authorized.
If more than one of these conditions applies, the authorization code that is closest to 0 is issued.
ASPname CHAR(52) The name of the ASP that was accessed:
For the messaging service FIN
This value depends on which input parameters are specified and whether RMA is to be used:
  • If the specified SWIFTNet service specifies that RMA is to be used, this value is the name of the ASP for that SWIFTNet service.
  • If a FINCopy service is specified and if the ASP for the specified SWIFTNet service specifies that RMA is not to be used, this value is the name of the ASP for the specified FINCopy service.
  • If a FINCopy service is not specified and if the ASP for the specified SWIFTNet service specifies that RMA is not to be used, this value consists entirely of blanks.
For the messaging service IAFA
If an ASP is not accessed, this value consists entirely of blanks. Otherwise, this value is the ASP of the specified service, or, if there is no ASP for that service, the default ASP.
If the ASP cannot be accessed due to an error, this value is null.
ASPversion TIMESTAMP The version of the ASP that was accessed. If an ASP is not accessed, the value is null.
stage CHAR(1) A variable that indicates whether the ASP that is to be used (this might be a SWIFTNet ASP or FINCopy ASP) specifies that the SWIFTNet service uses RMA and, if so, whether the RMA trial stage or mandatory-usage stage has begun:
(null)
An ASP was not accessed.
X
The SWIFTNet ASP specifies that RMA is to be used but it is not yet available, that is, the mode is not trial mode and is not mandatory mode.
T
The SWIFTNet ASP specifies that the service uses RMA. The current date is within the trial stage, that is, it is later than the trial stage begin date and earlier than the mandatory usage begin date specified in the ASP. An application can, but does not have to, use RM data to determine whether the request is authorized.
M
The SWIFTNet ASP specifies that the service uses RMA. The current date is later than the mandatory usage begin date specified in the ASP. An application must use RM data to determine whether the request is authorized.
N
The SWIFTNet ASP specifies that the service does not use RMA.
B
The FINCopy ASP specifies that the corresponding FINCopy service does not use RMA.
SQLstate CHAR(5) The SQLSTATE value returned by DNFCHECKRMAUTH:
00000
DNFCHECKRMAUTH completed without an error.
53P01
An invalid value was specified for a parameter.
53P02
The required SWIFTNet ASP information is not available. Most likely, the contents of the ASP package were not loaded into the database.
53P03
The required FINCopy ASP information is not available. Most likely, the contents of the ASP package were not loaded into the database.
53P04
The SWIFTNet service that was specified is a live service and the messaging service is FIN; however, the 8th character of the BIC8 specified for an ownBIC or corrBIC is zero (0). When a live FIN service is used, the 8th character of either BIC8 cannot be zero.
58X01
An internal error occurred. Contact your IBM® service representative.
58X02
The SWIFTNet ASP does not contain an active RMAFilter element for the specified SWIFTNet service, or the FINCopy ASP does not contain an active FINCopyParam element for the specified FINCopy service.
(any other SQLSTATE value)
This SQLSTATE value is described in DB2: Message Reference.
SQLmsg VARCHAR (32672) A message that provides additional information about the following SQL states:
53P01
This message specifies the invalid value and the parameter for which it was specified.
53P02
This message specifies the name of the service for which no SWIFTNet ASP (including the default ASP) was found.
53P03
This message indicates that a FINCopy ASP could not be found.
53P04
This message specifies the invalid ownBIC or corrBIC BIC8 and the service for which it was specified.
58X02
This message indicates that either:
  • An active RMAFilter element was not found for a SWIFTNet service.
  • An active FINCopyParam element was not found for a FINCopy service.
(any SQLSTATE value issued by DB2®)
This message is described in DB2: Message Reference.