Data formats used by SDF

The SDF input or output can have either of the following data formats:
File
A hierarchical file system (HFS) or zFS file is a data stream with one or more FIN messages which are separated by a specific record delimiter character or records delimiters. SDF supports the following formats:
SWIFT RJE
In an RJE stream, FIN messages are encoded in ASCII and separated by a dollar ($) character. A carriage-return line-feed (CRLF) character sequence in a FIN message is represented by a carriage-return/newline character sequence (X'0D0A').
Records delimited by CRLF
SDF supports data input streams in which individual FIN records are delimited using a carriage-return line-feed (CRLF) (X'0D0A') character sequence.
No record delimiter
This format assumes that SWIFT FIN messages are stored without any record delimiter in the input stream. This means that the Sequential Data Facility tries to interpret the FIN block structures and assumes a new record if a new (not nested) block 1 structure is detected.
XML
The XML format can be used to import MX based messages (for example CBPR+). The messages can be loaded from files encoded using CCSID 1208 (code page UTF-8) containing the following structure:
Table 1. The structure of XML file used to import messages in XML format.
Syntax elements and structure Notes
<Messages>
An element that defines information for all messages contained in the input. The Messages element has the following optional attributes:
OU
The organizational unit for which the templates were exported. It will be compared against the OU provided in the command invocation.
transferoptionset
The transfer option set name to be used for all messages within this file, unless set directly in the message element itself.
localDN
The local DN to be set for all messages imported, unless set directly in the message element.
remoteDN
The remote DN to be set for all messages imported, unless set directly in the message element.
 <Message>
A message to be imported. The Message element has the following optional attributes:
localDN
The local DN to be set for this message. The value overwrites any value set in the common localDN attribute.
remoteDN
The remote DN to be set for this message. The value overwrites any value set in the common remoteDN attribute.
  <MsgStandardInfo>
    <Domain>…</Domain>
    <DefinitionSet>…</DefinitionSet>
    <State>…</State>
    <Type>…</Type>
    <Option>…</Option>
  </MsgStandardInfo>
A folder that contains information about message standards (see Message standards, message definitions, and message domains).
  <Function>
    <DNF_O_FT>
     <SendMsg>
      <Request>
        ⋮
      </Request>
     </SendMsg>
    </DNF_O_FT>
   </Function>
Information to be used as MSIF transfer service SendMsg scenario. The element is optional and, if used, is overwriting the data specified through the attributes in the Messages element and the optional content of the AppHdr element.
  <AppHdr>…</AppHdr>
The application header information to be used for the message. This element is optional and no application header information will be created if not set.
  <Document>…</Document>
The message to be imported in XML format.
 </Message>
 <Message>
    ⋮
 </Message>
  ⋮
</Messages>
 
The following example show the input file for 2 messages which will be imported. The first message has no additional attributes set for localDN or remoteDN, so the values from the Messages element will be used. The second message overwrites the remoteDN value and has a different message standard information.
<?xml version="1.0" encoding="UTF-8"?>
<Messages OU="OU1"  
          transferoptionset="TOPT_common"
          localDN="cn=msif,ou=OU1,o=ptsadejj,o=swift"
          remoteDN="ou=1039,o=anpafrp0,o=swift">
  <Message>
  <MsgStandardInfo>
    <Domain>DNIFINPLUS</Domain>
    <DefinitionSet>finplus2022</DefinitionSet>
    <Option>swift.cbprplus.02</Option>
  </MsgStandardInfo>
  <Document xmlns="urn:iso:std:iso:20022:tech:xsd:camt.052.001.08">
    <BkToCstmrAcctRpt>
      <GrpHdr>
        <MsgId>4711</MsgId>
         ⋮
    </BkToCstmrAcctRpt>
  </Document>
 </Message>
 <Message remoteDN="ou=OU2,o=anpafrp0,o=swift">
  <MsgStandardInfo>
    <Domain>DNIFINPLUS</Domain>
    <DefinitionSet>finplus2021</DefinitionSet>
    <Option>swift.cbprplus.01</Option>
  </MsgStandardInfo>
  <Document xmlns="urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08">
   <FICdtTrf>
    <GrpHdr>
     <MsgId>MYREF2032100001</MsgId>
     <CreDtTm>2022-04-21T11:07:50+01:00</CreDtTm>
         ⋮
  </Document>
 </Message>
</Messages>
PS data set or PDS member
A physical sequential (PS) data set or a partitioned data set (PDS) member with a variable blocked record structure (DSORG=VB). Typically, each FIN message in the data set corresponds to one data set record. If the maximum record length is smaller than the largest FIN message, all FIN messages in this data set must be segmented. In a data set containing segmented FIN messages, each record starts with one of the following segmenting identifier characters:
0 (X'F0')
Only segment of a message.
1 (X'F1')
First segment of a message.
2 (X'F2')
Last segment of a message.
3 (X'F3')
Middle segment of a message.