SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

How can we create an XML file using SAS DI 4.2

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 6
Accepted Solution

How can we create an XML file using SAS DI 4.2

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


Accepted Solutions
Solution
‎02-23-2012 03:31 PM
Frequent Contributor
Posts: 86

How can we create an XML file using SAS DI 4.2

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'

8) 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


All Replies
Occasional Contributor
Posts: 6

How can we create an XML file using SAS DI 4.2

A simple process flow will help, please help.

Solution
‎02-23-2012 03:31 PM
Frequent Contributor
Posts: 86

How can we create an XML file using SAS DI 4.2

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'

8) 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

Occasional Contributor
Posts: 6

How can we create an XML file using SAS DI 4.2

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

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

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