dev:010how:020doc:010docs:0040trndoc

Document handling for transactions

Module TRNDOC Document handling for transactions

Description

Installation specific methods for documents are also included.

This module contains rules for creation of letters and electronic messages.

As electronic messages have SWIFT character set definitions on tag/field base the standard for all electronic message rules is as follows:
The rule is always defined with format TEXT (SetContext (“DOCFORMAT” “TEXT”)). For every print command the document format is changed to the necessary version and after the print had been completed it is reset to TEXT. To enable this, all print rules for electronic messages get the character set as explicit argument. In case there are print rules without SWTPRT rule in the message body this change of DOCFORMAT has to be done also in the main rule.

/


Properties

Property YES/NO
Single page frame No
Show toolbar No
Show menu No
Show statusbar No
Show hint No
Fit panel size No

Datafields

Name Description Data Type Len Dec. View lines View type Inst. Visible Codetable
DOCROW used rows in DOCEOT Numeric 3 0 Edit Yes Public
DOCNAMSTM List of primary document names + implementation Stream 1 0 Source Yes Public
DOCNAMSEA List of possible structures and implementations Text 80 1 Edit Yes Public
TAG78TXT Content of tag 78 Block 65 12 Block Yes Public
TAG79TXT Content of tag 79 Block 50 35 10 Block Yes Public
TAG79TXTDTA Content of tag 79 Block 50 195 10 Block Yes Public
TAG79TXT999 Content of tag 79 for MT707 Block 50 999 10 Block Yes Public
ADDTXT Additional text for letter Block 90 20 10 Block Yes Public
TAG45TXT Content of tag 45 Block 65 100 Block Yes Public
TAGB11TXT Content of tag B11 (TCO) Block 65 100 Block Yes Public
TAG47TXT Content of tag 47 Block 65 100 Block Yes Public
TAG48TXT Content of tag 48 Block 35 4 Block Yes Public
TAG74TXT Content of tag 74 Block 35 6 Block Yes Public
TAG77ATXT Content of tag 77A Block 35 20 Block Yes Public
TAG77BTXT Content of tag 77B Block 35 3 Block Yes Public
TAG77CTXT999 Content of tag 77C Block 65 999 Block Yes Public
TAG77JTXT Content of tag 77J Block 50 70 Block Yes Public
OLDSTM old contents Stream 1 0 Source Yes Public
DOCTRESTM Document tree Stream 1 0 Source Yes Public
DOCTREIDSTM Ids for Document tree Stream 1 0 Source Yes Public
CONDOCSTM Connected Documents Stream 1 0 Source Yes Public
BUTSHW show doc. Control 10 1 Button Yes Public
BUTADD Details Control 10 1 Button Yes Public
BUTNEW New Entry Control 10 1 Button Yes Public
BUTDEL Delete Entry Control 10 1 Button Yes Public
BUTATT Attach Control 10 1 Button Yes Public
NXTATT Next attachment Numeric 6 0 Edit Yes Public
FILRECV File Receiver Control 16 1 Button Yes Public
SHWINC Show Incoming Messages Text 1 1 Edit Yes Public
SHWOUT Show Outgoing Messages Text 1 1 Edit Yes Public
DOCLBL Lable for CONDOCSTM Text 40 1 Edit Yes Public
NAR754 Narrative :77A: Block 35 20 5 Block Yes Public
MSGINVFLG Mark message as invalid Text 1 1 Edit Yes Public
MSGINVFLGDOC Mark message as invalid curent document Text 1 1 Edit Yes Public
MSGINVTXT Error text for MSGINVFLG Text 255 1 Edit Yes Public
TAG39CTXT Additional Amount covered Block 35 4 4 Block Yes Public
DOCCURORICORTYP Original Medium Text 3 1 Edit Yes Public CORTYP
SHWOUTINT Show Internal Messages Text 1 1 Edit Yes Public
TXTDEFFLG Redefault Text for Document Text 1 1 Edit Yes Public
REGMETCNT Count of 'RegisterDocument' methods Numeric 3 0 Edit Yes Public
DefDocEotBopCUSRule Rule name for customized defdoceoteop Text 30 1 Edit Yes Public
BUTOK OK Control 10 1 Button Yes Public
DOCATTSTM Attachments Stream 1 0 Source Yes Public
DOCATTIDSTM ID Stream Stream 1 0 Source Yes Public
ATTSMXSTM contains original name of attachment Stream 1 0 Source Yes Public
TAG47TXTZ Content of tag 47 for Swift character set Z Block 65 800 Block Yes Public
TAG45TXTZ Content of tag 45 for Swift character set Z Block 65 800 Block Yes Public
TAG77UTXT999 Content of tag 77U Block 65 1200 Block Yes Public
TAG77LTXT999 Content of tag 77L Block 65 1200 Block Yes Public
EMBROL Description of roles Stream 1 0 Source Yes Read only
TAG67ATXT Content of tag 67A for TCO Block 65 250 Block Yes Public

Datafield Description and Properties

Datafield TAG78TXT Content of tag 78

Description

This text block contains the complete content for tag 78 in the messages and is filled via default rules


Datafield TAG79TXT Content of tag 79

Description

This text block contains the complete content for tag 79 in the messages and is filled via default rules


Datafield TAG79TXT999 Content of tag 79 for MT707

Description

For messages that will be split automatically when content of tag 79 is too long (e.g. MT707)


Datafield TAG45TXT Content of tag 45

Description

This text block contains the complete content for tag 45 in the messages and is filled via default rules.


Datafield TAG47TXT Content of tag 47

Description

This text block contains the complete content for tag 47 in the messages and is filled via default rules.


Datafield TAG48TXT Content of tag 48

Description

This text block contains the complete content for tag 48 in the messages and is filled via default rules.


Datafield TAG74TXT Content of tag 74

Description

This text block contains the complete content for tag 74 in the messages and is filled via default rules


Datafield TAG77ATXT Content of tag 77A

Description

This text block contains the complete content for tag 77A in the messages and is filled via default rules


Datafield TAG77BTXT Content of tag 77B

Description

This text block contains the complete content for tag 77B in the messages and is filled via default rules


Datafield TAG77CTXT999 Content of tag 77C

Description

This text block contains the complete content for tag 77C in the messages and is filled via default rules

For messages that will be split automatically when content of tag 77C is too long (e.g. MT767)

Original size is 150×65


Datafield TAG77JTXT Content of tag 77J

Description

This text block contains the complete content for tag 77J in the messages and is filled via default rules


Datafield DOCTRESTM Document tree

Description

Tree representation of list of documents for 'Attachment'-panel. DOCTRESTM is calculated from DOCTRIDSTM For every role an additional line is inserted as group header Tree has the follwoing three levels: - Role - documents (that might carry attachments) - attachments


Datafield DOCTREIDSTM Ids for Document tree

Description

List of documents used to calculate DOCTRESTM for 'Attachment'-panel.

DOCTRESTM conains one line for every document from DOCEOT. Everey line contains the following fields (separated by tabs): - 'ZZZDOC'+Receiver PTYINR (or 'ZZZINT' for internal documents) - id of leading document (i.e. the id of this document for top level documents and the parent id for attachments) - ' 'for top level documents and the id for attachments - index in DOCEOT - document description - receiver name


Datafield MSGINVFLG Mark message as invalid

Description

In the rare case, that during creation of an electronic message is found, that this message can not carry the needed information, this flag should be set.

For tagged messages like SWIFT or TCO the content of the message is converted into a free format message.

For Bolero messages, an error is set and the user has either to choose another CORTYP or to change the message content.


Datafield MSGINVFLGDOC Mark message as invalid curent document

Description

If the invalid information is needed in MakeAndConvertRuleDoc MSGINVFLG may be copied to this field be for beeing cleared


Datafield MSGINVTXT Error text for MSGINVFLG

Description

Error text corresponding to MSGINVFLG.


Datafield TAG39CTXT Additional Amount covered

Description

Content of TAG 39C for electronic messages. Filled from default in AAMMOD.


Datafield DOCCURORICORTYP Original Medium

Description

Original output chanel (CORTYP) of message for DOCCUR (DOCCUR\CORTYP contains result of GetUseCORTYP of current document as result of PrepareDocument)


Datafield TXTDEFFLG Redefault Text for Document

Description

Dummy field to enforce redefaulting of text fields during document generation. For fields, which should be recalculated during document exection a dummy reference to this field in a default is needed. Example: default TAG79TXT order 1 $dummy = TXTDEFFLG


Datafield DefDocEotBopCUSRule Rule name for customized defdoceoteop

Description

The content of this variable may be set in a level 6 init rule and contain the name of a rule to be executed as part of the DefDocEotBOP Processing (e.g. if additional initialization for fields in DOCEOT is required for each run through RegisterDocument-rules)


Datafield TAG47TXTZ Content of tag 47 for Swift character set Z

Description

This text block contains the complete content for tag 47 in the messages and is filled via default rules.


Datafield TAG45TXTZ Content of tag 45 for Swift character set Z

Description

This text block contains the complete content for tag 45 in the messages and is filled via default rules.


Datafield TAG77UTXT999 Content of tag 77U

Description

This text block contains the complete content for tag 77U in the messages and is filled via default rules

For messages that will be split automatically when content of tag 77U is too long (e.g. MT767, section B)

Original size is 150x65z


Datafield TAG77LTXT999 Content of tag 77L

Description

This text block contains the complete content for tag 77L in the messages and is filled via default rules

For messages that will be split automatically when content of tag 77L is too long (e.g. MT767, section C)

Original size is 150x65z


Datafield EMBROL Description of roles

Description

roles in setpay used for Compliance


Panels

Panel Type Description
DOCPAN FramePanel Messages
DOCTRE FramePanel Attachments
TAG79TXTP FramePanel Tag79

FramePanel DOCPAN

Properties
Property Value
Width 788
Height 528
Popup position-X 0
Popup position-Y 0
Visible Yes
Read only No
Show toolbar No
Instanciated Yes
Popup panel No
Global No

FramePanel DOCTRE

Properties
Property Value
Width 788
Height 528
Popup position-X 0
Popup position-Y 0
Visible Yes
Read only No
Show toolbar No
Instanciated Yes
Popup panel No
Global No

FramePanel TAG79TXTP

Properties
Property Value
Width 440
Height 300
Popup position-X 200
Popup position-Y 200
Visible No
Read only No
Show toolbar No
Instanciated Yes
Popup panel Yes
Global No

Rules

Rule Name Additional
function AdrLine text global
function CreateAttachment text method
function DOCEOTadddoc text static
function DOCEOTAllowSend boolean static
function DOCEOTGetCORTYP text static
function DOCEOTGetField text static
function DOCEOTGetORISMHINR text static
function DOCEOTGetRow numeric static
function DOCEOTGetSuppressed boolean static
function DOCEOTIsCORTYPUsed boolean static
function DOCEOTIsCORTYPUsedExcludeId boolean static
function DOCEOTIsPartyUsed boolean static
function DTAFmtDate text static
function DTAGetFileAttr text method
function DTAGetFileAttrForGuar text method
function DTAGetOwnAdr text method
function DTAGetOwnBIC text method
function FmtAmountSic text static
function FullAdrName text global
function GetCorTypDescrANTorRVO text static
function GetCtrAmt text method
function GetCurrentCORLineLength numeric static
function GetCurrentDOCContent text static
function GetCurrentOriginalCORTYP text static
function GetDoceotLineForDocId numeric method
function GetDOCSNF text method
function GetMessageType text method
function GetMsgCreDat text method
function GetRolofDOCPRBROL text static
function GetRowNumfromMsgID numeric static
function GetScore23X text method
function GetTagFieldA3 text method
function GetVisiblePanelforModule text method
function InternMapSWIADDToCon text method
function IsAsteriskAllowedInSector boolean static
function IsDocXReceiver boolean method
function IsRmbCancel boolean static
function IsRoleForCortypAllowed boolean static
function SendTCOinDTAFormat boolean static
function StreamGet2SWIFT text method
function TrnDocGetMandatoryReference text static
function TrnDocGetReference text static
function XMLFmtAmount text static
function XMLFmtAnyFld text static
function XMLFmtCurAmt text static
function XMLFmtDate text static
function XMLGetDate text static
function XMLGetFullPtyNam text static
function XMLGetJustPtyNam text static
function XMLGetLCRTYP text method
function XMLGetLineFromBlock text static
function XMLGetOwnAdr text static
function XMLGetPtyNam text static
function XMLGetSHPPAR text method
function XMLGetSHPTRS text method
function XMLGetTblText text static
function XMLGetTxtSepTxt text static
sub AddTxtToTag79Z method
sub AssertDOCS static
sub BOLPrtDocumentList static
sub ChangeConversionPlan static
sub CheckBlockSize method
sub CheckBlockSizeTar method
sub CheckOldSizeOf77J method
sub ConnectTwoTxtBlk static
sub DefDocAtt method
sub DefDocEot method
sub DefDocEotBop method
sub DefDocEotCUS method
sub DefDocEotEop method
sub DefDocEotEopCUS static
sub DisplayDocument static
sub DOCEOTCopyOriAPF static
sub DOCEOTGetIdGroup method
sub DOCEOTPopup method
sub DOCEOTRestore static
sub DOCEOTShowId method
sub DOCSNFdefault method
sub FillCONDOCSTM method
sub GetAmeFldSortStream method
sub GetETAUIL static
sub HandleDDEReceive method
sub HandleRCVATTUseEvent static
sub MessageIsInvalid static
sub MessageIsInvalidPost static
sub MessageIsInvalidPre static
sub MessageIsInvalidUseLetter static
sub PrintAttention static
sub PrintCurrentDate static
sub PrintDocAmount static
sub PrintDraftImage static
sub PrintTwoAddresses static
sub PrintURC global
sub RegisterDocumentZZZAntMSC method
sub RegisterDocumentZZZRVOMSC method
sub RemoveCORTYPFromList method
sub SaveDocuments method
sub savemb method
sub SendAsFreeMessage static
sub SetAddTxt static
sub SetCopyCount method
sub SetCORTYPList method
sub SetDOCDAT method
sub SetDocPanelFormat static
sub SetDOCSEMDAT method
sub SetDOCUIL method
sub SetEtaSndEty method
sub SetFormatForPanel static
sub SetINVCORTYPList method
sub SetKeyAmount method
sub SetMdtFlg method
sub SetMT734CURProblem static
sub SetOriCount method
sub SetPdxFixStm method
sub SetScore78BFlag method
sub setStandbyLCProblem static
sub SetUseTag79Z method
sub SuppressAttachment method
sub TRNDOCFillDOCTree static
sub TRNDOCShowID static
sub UpdateAttachmentInr method
sub XMLDocEnd static
sub XMLDocStart global
sub XMLGetAllFldAme static
sub XMLGetAllFldMod static
sub XMLGetNomSpc method
sub XMLGetReqCan method
sub XMLPrintFooter static
sub XMLPrintFooterWithSignature global
sub XMLPrintHeader static
sub XMLPrintHeaderNoLogo static
sub XMLPrintQuoted static
sub XMLPrintTitleBold static
sub XMLPrintTitleUnderlineFS11 global
sub xmlprinttrnsum global
sub XMLPrtAdrOfReceiver static
sub XMLPrtAmeFields method
sub XMLPrtAPPRUL method
sub XMLPrtAPPRULRMB method
sub XMLPrtDifHdr method
sub XMLPrtDifIntro method
sub XMLPrtDocumentList method
sub XMLPrtEmptyLine static
sub XMLPrtFldDifFromStream static
sub XMLPrtFldFromStream static
sub XMLPrtModIntro method
sub XMLPrtRefBlk static
sub XMLPrtRefLine static
sub XMLPrtRefLine1 static
sub XMLPrtRefLineOwnPntRef static
sub XMLPrtRefLineOwnRef static
sub XMLPrtRefLinePty static
sub XMLPrtRefLineYourRef static
sub XMLPrtReplyEnd method
sub XMLPrtReplyStart method
sub XMLPrtSalutation static
sub XMLPrtSwiftBody2Letter method
sub XMLPrtTxtAboveBlk static
sub XMLPrtTxtBeforeBlk static
sub XMLPrtTxtBlk static
textfunction ANTMSGNC static
textfunction ANTMSGNM static
textfunction ANTMSGNN static
textfunction ANTMSGNP static
textfunction COVERBA static
textfunction COVERTA static
textfunction COVERXA static
textfunction DTAPrtTagDate static
textfunction PrintSizedBlock global
textfunction PrintTcoTagM2 static
textfunction RVOMSGQC static
textfunction RVOMSGQM static
textfunction RVOMSGQN static
textfunction RVOMSGQP static
textfunction SWTPrtAccAdr static
textfunction SWTPrtAccAdrAD static
textfunction SWTPrtAccAdrAK method
textfunction SWTPrtAdrAD static
textfunction SWTPrtAdrBicOrAdr static
textfunction SwtPrtAdrBlk static
textfunction SWTPrtAdrFG static
textfunction SWTPrtAmeCha static
textfunction SWTPrtAvbWith static
textfunction SWTPrtChgTagFmtBlk static
textfunction SwtPrtCustomerContact static
textfunction SWTPrtDocumentList static
textfunction SWTPrtEndTag static
textfunction SWTPrtExpiry static
textfunction SWTPrtExtAccAdrAorWithoutLetter static
textfunction SWTPrtFmtBlk static
textfunction SWTPrtGovLaw static
textfunction SWTPrtMT410 method
textfunction SWTPrtNomSpc static
textfunction SWTPrtNomSpcAME static
textfunction SWTPrtPreper static
textfunction SWTPrtReference static
textfunction SWTPrtTag24G static
textfunction SWTPrtTag26E static
textfunction SwtPrtTag49 static
textfunction SwtPrtTag72 static
textfunction SwtPrtTag78 static
textfunction SWTPrtTagAccount static
textfunction SWTPrtTagAmount static
textfunction SWTPrtTagAmountAB static
textfunction SWTPrtTagAmountABK method
textfunction SWTPrtTagAmountNul static
textfunction SWTPrtTagApprul static
textfunction SwtPrtTagContact static
textfunction SWTPrtTagDate static
textfunction SWTPrtTagDrafts static
textfunction SWTPrtTagField static
textfunction SWTPrtTagM04 static
textfunction SWTPrtTagS18M12 static
textfunction XMLPrtAvbWth static

Rules Description and Comments

function CreateAttachment( in argID text, in argDsc text, in argATTTYP text, in argATTINR text, in argIDREF text ) : text method

Create a new attachment under document `argID`
function returns new ID


function DOCEOTadddoc( in refid text, in refsubid text, in argCORTYP text, in argORIFLG text, in mandatoryFlag numeric, in ptainr text, in adrblk text, in triggerAPF text, in triggerPTY text, in argMLIFLG text ) : text static

send copy / original to separate address


function DOCEOTGetField( in ArgMsgID text, in ArgFieldName text ) : text static

Get content of field for DOCEOT with specified Id


function DOCEOTIsPartyUsed( in argRol text, in argPtaInr text, in argCorTypLst text, in argInvCorTypLst text ) : boolean static

Checks if there are existing messages for a party which are not suppressed
argRol: Party role. Mutually exclusive with argPtaInr
argPtaInr: Party PTAINR. Mutually exclusive with argRol
argCorTypLst: Optional list of CORTYPs. If empty, then all messages are searched. If not empty, then only messages using these CORTYPs are searched
argInvCorTypLst: Optional list of CORTYPs. If empty, then all messages are searched. If not empty, then only messages not using these CORTYPs are searched
Returns TRUE if at least one message is found for the party


function DTAFmtDate( in ArgDate datetype ) : text static

Format date into DTA standard (most used for :Mxx:-Tags).


function DTAGetFileAttr : text method

Returns a file attribute for Tag :A5: at DTA _and_ DTE messages.
(ddd:hhmm) - ddd = day of actual year/ hh = hours/ mm = minutes


function DTAGetFileAttrForGuar : text method

Returns a file attribute for Tag :A5: at DTA Guarantee messages.
(JJJJMMTTHHMM) - JJJJMMTT = actual date / hh = hours/ mm = minutes


function DTAGetOwnAdr : text method

Returns the own address for DTA/ DTE messages.
Get them as continuous text and convert to 4*35.


function DTAGetOwnBIC : text method

DTA Guarantees A2 - bank code or BIC


function FullAdrName( in grppath text, in rol text ) : text global

grppath should be path from top, e.g. \\xxDGRP


function GetCtrAmt : text method

get contract amount of current contract


function GetCurrentCORLineLength : numeric static

returns the maximum linelength for the medium for which the current document/message is created
-1 is returned for Letter
-2 is returned for `ASCII only` messages without limitation or line length


function GetCurrentDOCContent( in fieldname text ) : text static

returns the content of a field within the DOCEOT for current document


function GetCurrentOriginalCORTYP : text static

returns the medium by which the current document/message will be sent
the value returned by this function has to be respected if
e.g. a letter will generate different parts (e.g. header or settlement)
if the real destination is e.g. telex or fax
DOCCUR\CORTYP contains the result of GetUseCortyp e.g. if the LET template is used for an email


function GetDOCSNF( in main text, in preadvdt text ) : text method

Evaluate the document sending format an returns the numeric expression for TCO and DTx


function GetMessageType( in MsgId text, in CorTyp text ) : text method

returns the MessageType of an electronic message for the CORTYP
if MessageType could not be detemined “NONE” is returned


function GetMsgCreDat : text method

Returns a creationdate in Format.
(JJJJMMTTHHMM) - JJJJMMTT = actual date / hh = hours/ mm = minutes


function GetRowNumfromMsgID( in ArgMsgID text, in ArgPos numeric, in ArgMsgRule text ) : numeric static

Returns a RowID determined from MsgID. Used in document rules to get a row number (e.g. of liaall) out of the msgid.
The Rowno. is encoded into the message ID in the relevant registerdocument method
ArgMsgID = ID of the relevant message
ArgPos = the starting position of the rowID
ArgMsgRule = the name of the calling document rule


function GetScore23X : text method

return content for tag 23X for score if attachment is present


function GetTagFieldA3 : text method

DTA/ DTE Tag A3 - customer/ account no.


function IsDocXReceiver( in ArgPtsPta ptspta ) : boolean method

check, if for address in argument DOCx messages should be created


function IsRmbCancel : boolean static

Get Rembour cancelation status needed for MT747 in LITAME and LTTAME


function IsRoleForCortypAllowed( in ArgPtsPtaPth text, in ArgCorTyp text ) : boolean static

Check, if the Party in ArgPtsPtaPth is allowed to send messages with Cortyp in ArgCorTyp


function SendTCOinDTAFormat( in ArgPtsPta ptspta ) : boolean static

check, if TCO message to be created should be sent in TCO or in DTA/DTG format


function StreamGet2SWIFT( in ArgStm stream, in ArgMaxLin numeric, in ArgMaxLen numeric, in ArgCharSet text ) : text method

Get raw character data from ArgStm
Set errorcode -1 if 1st digit in lines are - or :


function TrnDocGetMandatoryReference( in ArgRol text, in ArgCorTyp text, in ArgTag text ) : text static

get reference of role, in long or short version, depending on cortyp and tag
If role has no reference return “NONREF”


function TrnDocGetReference( in ArgRol text, in ArgCorTyp text, in ArgTag text ) : text static

get reference of role, in long or short version, depending on cortyp and tag


function XMLFmtAmount( in argAMT numeric, in argCUR text ) : text static

get amount at current language of document


function XMLFmtAnyFld( in ArgField field ) : text static

Formats the content of any passed field.


function XMLFmtCurAmt( in argCUR text, in argAMT numeric ) : text static

connect currency and amount at current language of document
with a non-breaking (protected) space


function XMLFmtDate( in argDatTyp text, in argDate datetype ) : text static

get date at current language of document
possible values of argDatTyp are:
“L” = long
“S” = short
“N” = normal


function XMLGetDate : text static

get date for documents
take document date if filled else today


function XMLGetFullPtyNam( in argGrpRol PtsPta ) : text static

Get complete name of party.


function XMLGetJustPtyNam( in argGrpRol PtsPta ) : text static

Get complete name of party.


function XMLGetLCRTYP( in ArgLCRTYP text ) : text method

get text of “Form of L/C”


function XMLGetPtyNam( in argGrpRol PtsPta ) : text static

Get complete name of party.


function XMLGetSHPPAR( in ArgSHPPAR text ) : text method

get text of “Partial Shipment”


function XMLGetSHPTRS( in ArgSHPTRS text ) : text method

get text of “Transhipment”


function XMLGetTblText( in argKey text, in argTable text ) : text static

Get text of table at current language of document.


function XMLGetTxtSepTxt( in argTxt1 text, in argSep text, in argTxt2 text ) : text static

Bind two arguments with a passed seperator.
Insert seperator between argTxt1 and argTxt2.
argSep = seperator, e.g. (“ ”), (“, ”), (“\b”), (CR), (CR + CR)


sub BOLPrtDocumentList( in ArgTag text, in ArgStm stream ) static

Print Received Documents in Bolero XML Format
If no tag is omitted, the tag will not printed


sub ChangeConversionPlan( inout ArgRemainingPlan text ) static

if while execution of textfunction the flag for free message is set, change the remaining plan


sub CheckBlockSize( in ArgWrkBlk text, in ArgField field, in ArgId text, in ArgChrSet text ) method

checks, if content of ArgWrkBlk fits into size of ArgField. Used for format checking of SWIFT fields


sub ConnectTwoTxtBlk( in Txt1 text, in Txt2 text, out TXT text ) static

Dummy rule, please use the new!
connects two textblocks to one without an empty line between
checks, if is empty


sub DefDocAtt( in trigger text, in argID text, in argSUBID text, in argDsc text, in argATTTYP text, in argATTINR text, in argIDREF text ) method

sub to register attachment
`trigger`+`argID` internal ID of parent document
`argSubID` subId under parent
`argATTTYP` record type of attachment (`SMH`, `FIL`, `INT`
`argIDREF` id of attachend internal document if argATTTYP is `INT`
function returns new ID


sub DefDocEot( in trigger text, in SubId text, in argdocpannam text, in APFCOD text, in mandatoryFlag numeric, in argptainr text, in objmod text, in pandsc text, in role text, in argadrblk text ) method

sub to register document for list of documents

arguments:

trigger
which part of the software triggered this document, e.g. “TRN” or “SET”
(to avoid naming conflicts)
subid
id of the registration

trigger+subid identify a line in the list of documents

argdocpannam
rule / panelname to generate document
APFCOD (optional)
application from set
3 digits (to select group) or 6 digits can be specified
mandatoryFlag
= 0 not mandatory
= 1 mandatory
= 2 not mandatory, initially suppressed
ptainr (optional)
PTA of addressee (if role is a valid PTSPTA in objmod, this item is derived from PTSPTA and this parameter is ignored)
objmod
object for which this document is generated (Path)
(e.g. to determine proper OWNREF field)
pandsc
description of line
role
role of addressee (mandatory)
adrblk (optional)
address of addressee (do not pass if it should be derived from PTSPTA in objmod, if set it is used as address of the message to be able to pass a letter to a different address (e.g. attatchment to beneficiary sent to advising bank)


sub DefDocEotCUS( in trigger text, in SubId text, in argdocpannam text, in APFCOD text, inout mandatoryFlag numeric, inout argptainr text, inout objmod text, inout pandsc text, inout role text, inout argadrblk text ) method

Allows overwritting of mandatory flag for all documents within transaction,
i.e. if all documents should be able to be suppressed, set the value to 0


sub DisplayDocument( in argOBJTYP text, in argOBJINR text, in argIDREF text ) static

Display document/attachemnt


sub DOCEOTCopyOriAPF( in idx numeric ) static

Copy # of copies from original to `Send To` entry


sub DOCEOTGetIdGroup( out argIdStm stream, in argId text ) method

collect all ids belonging to argId


sub DOCEOTRestore( in id text ) static

restore old value for DOCEOT as stored in DOCEOTPopup


sub DOCEOTShowId( in argId text, in ArgShwRaw boolean ) method

show document under DOCEOT(id)


sub DOCSNFdefault( in ArgTrigger text, in ArgSubId text, in ArgDOCSNF text ) method

sets the default Dispatch Type (DOCSNF) for the specified document
ArgTrigger first part of the document identification (as defined with defdoceot)
ArgSubId second part of the document identification (as defined with defdoceot)
ArgDOCSNF the DOCSNF value to be used
Is usually called immediately following “defdoceot” in a registerdocument rule


sub FillCONDOCSTM method

CONDOCSTM with connected documents


sub HandleDDEReceive method

Routine to handle records received via DDE (for RCVATT instance)


sub HandleRCVATTUseEvent static

called after a SMH has been selected
Routine to handle selection for RCVATT instance


sub MessageIsInvalid( in ArgMsgInvTxt text ) static

If while creation of an electronic message is found, that no further processing possible because
SWIFT or other standards do not allow the content of the message please use this function to
create a free message for the same channel with the actual content
is used i.e. for settlement messages with more than one currency for one receiver
the call of this rule must follow MessageIsInvalidPre.
the call of this rule must be followed by MessageIsInvalidPost.


sub MessageIsInvalidUseLetter( in ArgMsgInvtxt text ) static

If while creation of an electronic message is found, that no further processing possible because
SWIFT or other standards do not allow the content of the message please use this function to
create a free message for the same channel with an autoconverted letter as if the electronic message definition is not there
is supported for SWIFT (Score) Message e.g. for the MT 776 in LETAMC not allowed before SR2018 ( DNGDEV.001241)
the call of this rule must follow MessageIsInvalidPre.
the call of this rule must be followed by MessageIsInvalidPost.


sub RegisterDocumentZZZAntMSC method

Register an additional message for allNETT, if the relevant customer is connected to allNETT.
In case no business message should be send then check in a second step, if an additional MSC should be created as header message for allNETT attachments


sub RegisterDocumentZZZRVOMSC method

Register an additional message for RIVO, if the relevant customer is connected to RIVO.
In case no business message should be send then check in a second step, if an additional MSC should be created as header message for RIVO attachments


sub RemoveCORTYPFromList( in trigger text, in SubId text, in CORTYP text ) method

Removes the CORTYP from the list of possible CORTYP values for the specified document
must be called after DEFDOCEOT call for that document
if this list contains just one entry, field CORTYP is automatically disabled


sub SetAddTxt( in ArgTxt text ) static

add text to field additional text in DOCEOT
should be used from RegisterAddTxt rules in transactions


sub SetCORTYPList( in trigger text, in SubId text, in CORTYPList text ) method

set allowed CORTYP values for the specified document
if this function has been called onyl CORTYP matching with this list (one CORTYP per line) are allowed
if this list contains just one entry, field CORTYP is automatically disabled


sub SetDOCDAT( in trigger text, in SubId text, in DocDate datetype ) method

set letter date for the specified document
if this function has been called only DOCUIL matching with one entry are allowed


sub SetDOCSEMDAT( in trigger text, in SubId text, in DocSemDat datetype ) method

set letter date for 2nd mail letter
set DOCDAT on panel ADDINF disable. DocSemDat (= BOTP\SEMDAT) is taken for 2nd mail date


sub SetDOCUIL( in trigger text, in SubId text, in DocUil text ) method

set allowed DOCUIL values for the specified document
if this function has been called only DOCUIL matching with one entry are allowed


sub SetEtaSndEty( in trigger text, in SubId text, in ArgEtaSndEty text ) method

set EtaSndEty values for the specified document
Call only necessary if default (take Etasndety) shall not be used


sub SetINVCORTYPList( in trigger text, in SubId text, in CORTYPList text ) method

set forbidden CORTYP values for the specified document
if this function has been called onyl CORTYP matching with this list (one CORTYP per line) are allowed
if this list contains just one entry, field CORTYP is automatically disabled


sub SetKeyAmount( in trigger text, in SubId text, in rol text, in ArgAmount numeric, in currency text ) method

Set Key Amount for Telex/Swift Authentication for document
use at any time after call to defdoceot for document


sub SetMdtFlg( in SubID text, out Mdt numeric ) method

Manages how a document is shown on message panel.
It is used in RegisterDocument (for defdoceot) only.
Has to be called after the connected but before the controlled document.


sub SetPdxFixStm method

documets may not be changed by recalculation
set PTAINR, CORTYP and name of documents in MTABUT\PDXFIXSTM that may not be changed


sub setStandbyLCProblem( in ArgLCRTYP text, in ArgAPPRUL text, in ArgDocNam text ) static

Check if this is a Standby L/C and if related messages shall be created as converted free message. This option can be
configured in DBISYS. If all theses options take place a autogenerated free-format Message will be created.

ArgLCRTYP: Form of L/C (most likely xxDGRP\REC\LCRTYP)
ArgAPPRUL: Applicable Rules (most likely xxDGRP\REC\APPRUL
ArgDocNam: Name of the document most recently “\TRNMOD\TRNDOC\DOCCUR\DOCNAM”
RETURN: function returns TRUE if a auto-converted message will be created. Otherwise false.


sub SetUseTag79Z( in trigger text, in SubId text, in ArgCortypLst text ) method

set list of cortypes that use tag :79Z:
in trigger and SubId:ID and sub id of message as used in defdoceot
ArgCortypLst : CR seperated list of Cortypes supporting Tag 79Z


sub SuppressAttachment( in trigger text, in SubId text ) method

supresses automatic creation of attachment for this message


sub TRNDOCFillDOCTree static

Fill treeview for documents


sub TRNDOCShowID( in argID text ) static

Select specific document-id in treeview


sub UpdateAttachmentInr( in ArgAttId text, in ArgNewAttInr text ) method

Updates INR (i.e. File) of an attachment created with CreateAttachment
ArgAttId : Id retured from CreateAttachment-Call
ArgNewAttInr : New ATTINR (i.e. file identification)


sub XMLDocEnd( in argEncInf text ) static

is used at ordinary letters over all transactions


sub XMLDocStart( in Title text ) global

is used at ordinary letters over all transactions


sub XMLGetAllFldAme( inout ArgStream stream, in ArgNewGrp module, in ArgOldGrp module ) static

Get a list of all full fieldreferences of fields with changed contents into a stream.
All modified fields of ArgNewGrp are compared with there corresponding fields of ArgOldGrp.
If there are changes in content, the fieldreferences are stored in ArgStream with old and new separated by a TAB.
To print the stream use XMLPrtFldDifFromStream after.
Intended to be used by xxTAME + xxTRAM to get the list of changed fields.


sub XMLGetAllFldMod( inout ArgStream stream, in ArgModule module ) static

Get a list of all fieldreferences of fields marked as modified into a stream.
All modified fields of the passed module (without its sub modules) are returned.
To print the stream use XMLPrtFldFromStream after.
Intended to be used by xxTAME + xxTRAM to get the list of amended fields.


sub XMLGetNomSpc( in ArgNomSpc field, in ArgNomTop numeric, in ArgNomTon numeric, out ArgDsc text, out ArgVal text ) method

Get Tag 39A or 39B for letters with description.


sub XMLPrintQuoted( in intro text, in txt text ) static

prints a text within quote and unquote behind an introduction (intro)
If txt is empty, this rule will not be executed.


sub XMLPrintTitleBold( in argTitle text ) static

prints a bold text with an empty line
most used as title of letters


sub XMLPrintTitleUnderlineFS11( in txt text ) global

prints an underline text with an empty line
most used as title of letters


sub XMLPrtAdrOfReceiver static

Receiver address is printed with four empty lines.


sub XMLPrtAmeFields( in ArgOldGrp module, in ArgNewGrp module, in ArgExcludeStm stream ) method

output of fields


sub XMLPrtDifHdr method

Print header for differences (XMLPrtFldDifFromStream).


sub XMLPrtDifIntro method

Print sentence of introduction for changed conditions.
Most used by xxTAME + xxTRAM.


sub XMLPrtEmptyLine( in argNumber numeric ) static

prints a number of empty lines
with following properties for Page-Break:
- widows = 3 (Always one line more than defaulted by A4.XSI)
- keep with previous


sub XMLPrtFldDifFromStream( in ArgStream stream ) static

Print all fields from stream with their description before as table.
In 1 streamline have to be 2 fields separated by an TAB.
Use XMLGetAllFldAme to get the stream before.
A following empty line will be printed after output of all fields.
Most used by xxTAME + xxTRAM.


sub XMLPrtFldFromStream( in ArgStream stream ) static

Print all fields from stream with their description before.
Use XMLGetAllFldMod to get the stream before.
A following empty line will be printed after output of all fields.
Most used by xxTAME and xxTRAM.


sub XMLPrtModIntro method

Print sentence of introduction for amended conditions.
Most used by xxTAME + xxTRAM.


sub XMLPrtRefBlk static

prints a common reference block with four empty lines
is used at ordinary letters over all transactions


sub XMLPrtRefLine( in argText text, in argValue text ) static

Get standard line of reference.
If no argValue is passed, no line of reference will be returned.


sub XMLPrtRefLine1( in argText text, in argValue text ) static

Print field description in one line and content in the next line
If no argValue is passed, no line of reference will be returned.


sub XMLPrtRefLineOwnPntRef static

prints a referenceline using the parent reference if available
is used at ordinary letters over all transactions


sub XMLPrtRefLineOwnRef static

prints a common reference block with four empty lines
is used at ordinary letters over all transactions


sub XMLPrtRefLinePty( in argGrpRol PtsPta ) static

Get complete name of party with his description of role
for standard line of reference block.


sub XMLPrtRefLineYourRef static

prints a common reference block with four empty lines
is used at ordinary letters over all transactions


sub XMLPrtReplyEnd method

print end of reply message


sub XMLPrtReplyStart method

print end of reply message


sub XMLPrtSalutation static

is used at ordinary letters over all transactions


sub XMLPrtSwiftBody2Letter( in ArgDocRulUse text ) method

Print any Swift message (without header tags) as pretty print within a letter.


sub XMLPrtTxtAboveBlk( in argText text, in argValue text ) static

Print any (calling) text (=argText) at 1st line.
Print connected block (=argValue) to next line.
If no argValue is passed, nothing will be returned.


sub XMLPrtTxtBeforeBlk( in ArgText text, in ArgValue text ) static

Print any (calling) text (=argText) at left side.
Print connected block (=argValue) to right side.
If no argValue is passed, nothing will be returned.


sub XMLPrtTxtBlk( in ArgText text ) static

prints a textblock with an empty line


textfunction COVERXA static

Telex Cover Letter
“Free Message” (=CoverA) is created via button [Add New] (=TRNDOC\BUTNEW) on Panel “Attachments”
(see TRNDOC.CreateDocument)


textfunction DTAPrtTagDate( in argTag text, in argdate datetype ) static

prints a complete Tag together with its date content in DTA format
If Tag or date are empty this rule will not create output.
Is called within textfunctions with the “print” statement.


textfunction PrintSizedBlock( in tag text, in txt text, in lines numeric, in lngt numeric ) global

function to print a block within size limitations, adding a comment if cut off at end
blank lines are removed
tag may be blank if not needed, : will be inserted to tag if missing


textfunction PrintTcoTagM2( in main text, in preadvdt text ) static

Prints the M2 tag for TCO messages, including CR
Issuing Medium (of the LC of course, not of this message)


textfunction SWTPrtAccAdr( in ArgTag text, in ArgPtsPta PTSPTA ) static

print addressblock and optional account


textfunction SWTPrtAccAdrAD( in ArgTag text, in ArgPtsPta PTSPTA ) static

format address ArgPtsPta with tag with appropriate option (A or D) and account acc
DOKA knows 4 line address block, thus option B is not needed
suppresses empty addresslines
no output of option A for TCO messages


textfunction SWTPrtAccAdrAK( in ArgTag text, in ArgMT text, in ArgPtsPta PTSPTA, in ArgAcc text ) method

format addressblock of ArgPtsPta with tag


textfunction SWTPrtAdrAD( in ArgTag text, in ArgPtsPta PTSPTA ) static

format address ArgPtsPta with tag with appropriate option (A or D)
DOKA knows 4 line address block, thus option B is not needed
suppresses empty addresslines
no output of option A for TCO messages


textfunction SWTPrtAdrBicOrAdr( in ArgTag text, in ArgPtsPta PTSPTA, in ArgOptBIC text, in ARgOptAdr text ) static

format address ArgPtsPta with tag with appropriate option (A or D)
DOKA knows 4 line address block, thus option B is not needed
suppresses empty addresslines
no output of option A for TCO messages


textfunction SWTPrtAdrFG( in ArgTag text, in ArgPtsPta PTSPTA ) static

format address ArgPtsPta with tag with appropriate option (F or G)
suppresses empty addresslines


textfunction SWTPrtAmeCha( in ArgTag text, in ArgCode text, in ArgTxt text ) static

prints a complete Tag together with its contents
If Tag or Content are empty this rule will not create output.
Is called within textfunctions with the “print” statement.


textfunction SWTPrtChgTagFmtBlk( in argTagOld text, in ArgTagZ text, in argField field ) static

Print Tag with converted Block using charset and tag depending on availability of char set Z .
argTagOld = TAG to be used if option Z is not yet active
argTagZ = TAG to be used if option Z is active
argField = field, which controls size of ConvertBlock

Used to print Tag 71B/71D and 77/77A 000352)


textfunction SWTPrtExpiry( in ArgTag text, in ArgExpDat datetype, in ArgExpPlc text ) static

print date and place of expiry. Usually used to print tag 31D


textfunction SWTPrtExtAccAdrAorWithoutLetter( in ArgTag text, in ArgPtsPta PTSPTA, in ArgAcc text, in ArgOptF text ) static

format address ArgPtsPta with tag with appropriate option (A or without letter option) and account acc
if ArgOptF not empty, use letter Option F if possible
DOKA knows 4 line address block, thus option B is not needed
suppresses empty addresslines
no output of option A for TCO messages


textfunction SWTPrtFmtBlk( in argTag text, in argField field, in ArgCharSet text ) static

Print Tag with converted Block.
argTag = TAG to print
argField = field, which controls size of ConvertBlock
ArgCharSet is set to “Z” if field to be printed allows SWIFT extended character set. Otherwise empty.


textfunction SWTPrtMT410( in ArgGroup module ) method

MT 410 - acknowledgment


textfunction SWTPrtNomSpc( in ArgTag text, in ArgNomSpc field, in ArgNomTop numeric, in ArgNomTon numeric ) static

Print Tag 39A or 39B.
prints always :39A: or :39B:, Argtag only for documentation porposes


textfunction SWTPrtNomSpcAME( in ArgTag text, in ArgNewNomSpc field, in ArgNewNomTop numeric, in ArgNewNomTon numeric, in ArgOldNomSpc field, in ArgOldNomTop numeric, in ArgOldNomTon numeric ) static

Print Tag 39A or 39B.
Output for Amendment and Request an Amendment only, if exists differences.


textfunction SWTPrtReference( in ArgTag text, in ArgCorTyp text, in ArgRol text ) static

print reference of role, in long or short version, depending on cortyp


textfunction SWTPrtTag24G( in ArgCortype text, in ArgCode text, in ArgTxt text ) static

prints information about delivery (4!C[/6x35x])
ArgCortype: Coretype of message to be printed (i.e. SWT, DTG)
ArgTag: Tag to be printed (i.e. 24G). Nothing will be printed if ArgTag is empty!
ArgCode: Code to be pritned (i.e. BENE, APPL, OTHR)
ArgTxt: Additional text. Mandatory if ArgCode = “OTHR”


textfunction SWTPrtTag26E( in argTag text, in Arg26E numeric ) static

add missing zeros to 26E if the content is less as 3 numbers
argTag can contain “:26E:” or “:D6E:” (SCO739)


textfunction SwtPrtTag49( in ArgTag text, in ArgField field, in ArgCharSet text ) static

Customer specific function to print Tag :49G:, :49H: or :49Z:
49G is used in Score-Messages
49H is used in the DTA-Messages of all business sectors
49Z is used in Score-Messages of guaranties from SWIFT 2020 on
ArgTag: Tag incl. number and option. The colon is optional but recommended (:49G:, :49H: or :49Z:)
ArgField: Field to be printed in the message
ArgCharSet: Characterset. Possible Values: tdChrSetSWT, tdChrSetSWT_Z


textfunction SwtPrtTag72( in argTag text, in argField field, in ArgCharSet text ) static

print tag 72 72C 72Z with correct third character and in correct character set depending on SWIFT2018 activation
argSign = postfix for :72 (i.e. C or Z)
argField = field with content to be printed
ArgCharSet = character set to be used if SWIFT 2018 is activ


textfunction SwtPrtTag78( in ArgField field, in ArgCharSet text ) static

Customer specific function to print Tag :78:
ArgField: Field to be printed in the message
ArgCharSet: Characterset. Possible Values: tdChrSetSWT, tdChrSetSWT_Z


textfunction SWTPrtTagAccount( in argTag text, in argAccount text ) static

prints a complete Tag together with its Account content
If Tag or date are empty this rule will not create output.
Is called within textfunctions with the “print” statement.


textfunction SWTPrtTagAmount( in ArgTag text, in ArgCurr text, in ArgAmt numeric ) static

print the amount fields `as is`.
Corresponding functions: SWTPrtTagAmountAB, SWTPrtTagAmountABK, SWTPrtTagAmountNul
If Tag, curr or amount are empty this rule will not be executed.


textfunction SWTPrtTagAmountAB( in ArgTag text, in ArgDat datetype, in ArgCurr text, in ArgAmt numeric ) static

print the amount fields with or without value date,
3rd char of Tag (4th if incl:) is set to A or B accordingly
If Tag, curr or amount are empty this rule will not be executed.
Corresponding functions: SWTPrtTagAmount, SWTPrtTagAmountABK, SWTPrtTagAmountNul


textfunction SWTPrtTagAmountABK( in ArgTag text, in ArgTagOption text, in ArgDocCur text, in ArgDocAmt numeric, in ArgMatDat datetype, in ArgMatPerCnt numeric, in ArgMatPerBeg text, in ArgMatPerTyp text, in ArgDocTypCod text ) method

Corresponding functions: SWTPrtTagAmount, SWTPrtTagAmountAB, SWTPrtTagAmountNul


textfunction SWTPrtTagAmountNul( in ArgTag text, in ArgCurr text, in ArgAmt numeric ) static

print the amount fields `as is`, even if amount is empty
Corresponding functions: SWTPrtTagAmount, SWTPrtTagAmountAB, SWTPrtTagAmountABK
If Tag, curr or amount are empty this rule will not be executed.


textfunction SWTPrtTagApprul( in ArgTag text, in ArgApprul text, in ArgApprulTxt text ) static

prints Applicable Rule and (optional) App.rule text


textfunction SwtPrtTagContact( in ArgTag text, in ArgMod text, in ArgMt text ) static

DTAEA contact person and phone of advising bank (1×35 or 2×35, depending on message type)
DTALCD contact person and phone of issuing bank (2×35)
Get name and phone of responsible user if available.
Otherwise look for login user.


textfunction SWTPrtTagDate( in argTag text, in argdate datetype ) static

prints a complete Tag together with its date content
If Tag or date are empty this rule will not create output.
Is called within textfunctions with the “print” statement.


textfunction SWTPrtTagField( in argTag text, in argContent text, in ArgCharSet text ) static

prints a complete Tag together with its contents
If Tag or Content are empty this rule will not create output.
Is called within textfunctions with the “print” statement.

Should be used for single fields only, which need just one line, because
empty lines will not be deleted, otherwise use “XMLGetTxtSepTxt( <text1>, CR, <text2>)”.
To insert a textblock as Content, use ConvertBlock before.


textfunction SWTPrtTagM04( in ArgMod text, in ArgMt text ) static

DTAEA M4 - contact person and phone of advising bank (1×35 or 2×35, depending on message type)
Get name and phone of responsible user if available.
Otherwise look for login user.


textfunction SWTPrtTagS18M12( in ArgMod text, in ArgMt text ) static

DTAEA M4 - contact person and phone of advising bank (1×35 or 2×35, depending on message type)
Get name and phone of responsible user if available.
Otherwise look for login user.


sub AddTxtToTag79Z( in trigger text, in SubId text, in ArgTxt text ) method

Added text to tag :79Z: if Tag79Z is not modified and text is´t already in `TAG79Z
in trigger and SubId:ID and sub id of message as used in defdoceot
ArgTxt text to be added to Tag 79Z


Modules

Module class Instance Comment
DOCEOT DOCEOT
DOCEOT DOCCUR
SMH SMH
MLI MLI
ETAMOD ETACUR
USR DOCUSR Contains user data of 'sending user' during document generation.
Standard version: Contract owner.
Actually set and used in SwtPrtTagM04.
PTA WRKPTA
DTEMOD DTEMOD
DTAMOD DTAMOD
SYSAMT SYSAMT
SMX SMX
DTGMOD DTGMOD
SMHGET RCVATT
DOMMOD DOMMOD
SXOMOD SXOMOD
ETAMOD ETASND Can be used if messages for another entity are created in current entity with eg. different XSI.
dev/010how/020doc/010docs/0040trndoc.txt · Last modified: 2024/04/05 10:10 (external edit)