I am trying to output the data into XML. I am using the code which is in the attached XML code.docxsas. I get the output as shown in the attached Tstg.txt. Actually, I copied the output from browser and pasted in the txt file. But I actually need the output as shown in Tstg-expected.txt file. I am using 'SAS ENTERPRISE GUIDE 5.1'. Here are the issues: I am not able to insert the data, which says Level1 in the code into the mainlevelsubmission which is the top level in the XML output. I am unable to create and output variable called 'Record' with a sequential value(1,2,3..) in all the levels except the mainlevelsubmission in the output as shown in tstg-expected file. I do not need that repeated 'includedcompany' and 'includedMember' level in the output except for a distinct 'COMP_ID' and 'IDS' value respectively. For eg: In the tstg.txt file there is repeated level for 'includedcompany' with the same COMP_ID value '10000', but I need only those distinct 'includedcompany' levels with COMP_ID value '10000' and '20000' (you can see this in the tstg-expected.txt file) Similarly, there is a repeating level of 'includedmember' for the same IDS value of '1234567' in the tstg.txt file, which I do not need in the output either. 4.I also need to output the labels of variables in the output rather than variable names, I want to do this because there are some variable names whose length is greater than 32, for eg 'TotalcountOfPeriodsForIncludedMembers'. I cannot output this name as column name so I use it as a label instead and trying to output it. well, I have a template for this to output the labels of variables in XML output instead of names. Here it is proc template; define tagset tagsets.uselabs; parent=tagsets.sasxmog; NOTES "USE LABEL INSTEAD OF NAME FOR TAGS"; DEFINE EVENT SASCOLUMN; start: ndent; put '<'; put TEXT / if cmp(XMLDATAFORM, "ATTRIBUTE"); put ' name="' / if cmp(XMLDATAFORM, "ATTRIBUTE"); put LABEL; put '"' / if cmp(XMLDATAFORM, "ATTRIBUTE"); break; finish: xdent / if exist (MISSING); break / if exist(MISSING); put ' / >' / if cmp(XMLDATAFORM, "ATTRIBUTE"); put CR / if cmp(XMLDATAFORM, "ATTRIBUTE"); xdent / if cmp(XMLDATAFORM, "ATTRIBUTE"); break / if cmp(XMLDATAFORM, "ATTRIBUTE"); put '</'; put label; put '>'; put CR; xdent; break; end; end; run; But, I cannot use this template above and the other one which is in the attached code at once. I can only use either of them. So best I could do it is to insert this tagset above into the already existing template 'tagsets.custom' which is in the attached XML code sas. I have no idea how to do that as I am not an expert in writing customized tagsets. 5. And finally I need that ns1: to go in the tag like '<ns1:includedMemberPeriods>' in my output. When I tried to do that the code doesn't show any error but the output says The operation completed successfully. Error processing resource 'file:///C:/Tstg.XML'... <ns1:MainLevelSubmission> 6. "Note: SAS variable labels, formats, and lengths are not written to DBMS tables." This note appears in the log, how can I write SAS variable labels, formats, and lengths into DBMS tables? So if somebody could help me out in resolving these issue or any ideas in doing so are highly appreciated Thank you.
... View more