BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
blindgaurdien16
Fluorite | Level 6

Hi All,

My query is to export a CSV file into an XML file with direct one to one mapping with no transformation,

but unfortunately i am getting some problems at the last step during the XML creation.

After the XML writer, i am creating an XML library and mapping a table for the same.

Still not able to populate the XML.

Please Suggest an ALTERNATE opinion for this, if this is not right !!

Regards

Prakash

1 ACCEPTED SOLUTION

Accepted Solutions
Grandhi4
Calcite | Level 5

First you have to create a 'XML library' ex:- 'SAS library'  in "New Library Wizard" (last but one 'if using 4.2 ver ) then

1) Then give 'Libref' name

2) Then Path 'where you want to save the file' (ex: C:\work\Append.xml) [ Append  data set should be there in that folder that data set 'columns & dataset' only u have to use as a source]

3) Select 'XML Type' ----->  ''GENERIC''

4) Create a job

5) Create a new table

6) DBMS ------>   'XML-All Douments'

7) Library ------>    what u created on point '1'

😎 Fallow the point '2'

9) Drag 'Append data set'

10) Drag 'XML Writer'

11) Drag out put dataset (Target table data set)

12) Map 'Source to ---------->XML Writer ---------->Target data set

13) F3 (Run)

Done u can see the XML file on the path Smiley Happy

thx

Suresh

View solution in original post

3 REPLIES 3
blindgaurdien16
Fluorite | Level 6

A simple process flow will help, please help.

Grandhi4
Calcite | Level 5

First you have to create a 'XML library' ex:- 'SAS library'  in "New Library Wizard" (last but one 'if using 4.2 ver ) then

1) Then give 'Libref' name

2) Then Path 'where you want to save the file' (ex: C:\work\Append.xml) [ Append  data set should be there in that folder that data set 'columns & dataset' only u have to use as a source]

3) Select 'XML Type' ----->  ''GENERIC''

4) Create a job

5) Create a new table

6) DBMS ------>   'XML-All Douments'

7) Library ------>    what u created on point '1'

😎 Fallow the point '2'

9) Drag 'Append data set'

10) Drag 'XML Writer'

11) Drag out put dataset (Target table data set)

12) Map 'Source to ---------->XML Writer ---------->Target data set

13) F3 (Run)

Done u can see the XML file on the path Smiley Happy

thx

Suresh

blindgaurdien16
Fluorite | Level 6

Hi Suresh,

First thanks for this Job flow, but i managed to create this Job flow and now facing some issues with XSD.

I need to create my XML based on a XSD.

In the XML library i have created, i have mapped the SCHEMA(XSD) for the same in the advanced options.

But while the job is running i seem to be facing this error

NOTE: The SAS System stopped processing this step because of errors.

NOTE: There were 1 observations read from the data set WORK.W63UAVD1.

      WHERE BrokerRef in ('ABCD1234', 'ABCD1235', 'ABCD1236', 'ABCD1237', 'ABCD1238');

NOTE: There were 5 observations read from the data set WORK.W63UBJOQ.

NOTE: There were 1 observations read from the data set WORK.W63TUS5B.

WARNING: The data set LIB_OUT.TAB_AGENCY may be incomplete.  When this step was stopped there were 0

observations and 22 variables.

Segmentation Violation In Task [ DATASTEP ]

2006      

2007       %perfstop(metrVal6=%sysfunc(max(&etls_recnt,-1)));

MACROGEN(PERFSTOP):   options notes nosource nosource2 nosymbolgen nomprint nomlogic

NOTE: _DISARM|A5UQOBQF.BY0008AB|lavanya|XMLWriter| _DISARM|         STOP| _DISARM| 2012-02-23T15:24:

42,285+05:1800| _DISARM|

      SAS_Data_Integration_Studio| _DISARM| SAS| _DISARM| -1| _DISARM| 12619776| _DISARM| 11571200|

_DISARM| 12| _DISARM| 12|

      _DISARM| 0| _DISARM| 0| _DISARM| 0.040000| _DISARM| 0.072680| _DISARM| 1645610082.213303| _DIS

ARM| 1645610082.285983|

      _DISARM| 0.072680| _DISARM| | _ENDDISARM

Do you have any idea rgd this SEGMENT VIOLATION in TASK and have you tired creating an XML using XSD ?

Any pointers to this will be of great HELP !!

Thanks

Prakash Ramesh

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 2061 views
  • 0 likes
  • 2 in conversation