I am using TEMP-TABLE files with DATA-RELATIONs and WRITE-XML function to create XML files. However, the NAMESPACE-URI value is printing in both the document header and the first data tag: xmlns="urn:iso:std:iso:20022:tech:xsdain.001.001.03" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <CstmrCdtTrfInitn xmlns="urn:iso:std:iso:20022:tech:xsdain.001.001.03"> This is what I want: xmlns="urn:iso:std:iso:20022:tech:xsdain.001.001.03" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > <CstmrCdtTrfInitn> This is the code that is populating the NAMESPACE-URI DEFINE DATASET Document NAMESPACE-URI "urn:iso:std:iso:20022:tech:xsdain.001.001.03" FOR CstmrCdtTrfInitn, GrpHdr, InitgPty, Id, OrgId, Othr, Purp, PmtInf, PmtTpInf, SvcLvl, ReqdExctnDt, LclInstrm, Dbtr, DbtrAcct, Id-DbtrAct, Othr-DbtrAct, DbtrAgt, FinInstnId, ClrSysMmbId, ClrSysId, PstlAdr-DbtrAgt, CdtTrfTxInf, PmtId, Amt, InstdAmt, CdtrAgt, FinInstnId-CR, ClrSysMmbId-CR, Cdtr, CdtrAcct, Id-CR, PstlAdr, PstlAdr-CR, PstlAdr-Cdtr, Othr-CI, Othr-CAgt, Id-Dbtr, OrgId-Dbtr, Othr-Dbtr, SchmeNm DATA-RELATION XML-1 FOR CstmrCdtTrfInitn, GrpHdr RELATION-FIELDS(MsgId, MsgId) NESTED How can I get rid of the duplicate NAMESPACE-URI attribute? Continue reading...