View previous topic :: View next topic |
Author |
Message |
satyenderd Beginner
Joined: 26 Aug 2005 Posts: 144 Topics: 73
|
Posted: Tue Mar 16, 2010 12:49 pm Post subject: REC2XML on Mainframe DB2 |
|
|
Hi all,
This is regarding REC2XML.
When I tried this option it went fine on windows but not able to execute on Mainframes.
Ended with SQLCODE -440 and SQLSTATE 42884 on mainframes.
Could anyone of of please help me in this regard.
Thanks in Advacne.
Herein is the query:
Code: |
SELECT REC2XML(1.0,'COLATTVAL','XML_DATA'
,PAR_ID
, REF_ID_PARTY_TYPE
) AS ROW
FROM TBL_PARTY_PAR;
|
_________________ Satya |
|
Back to top |
|
|
papadi Supermod
Joined: 20 Oct 2009 Posts: 594 Topics: 1
|
Posted: Tue Mar 16, 2010 12:58 pm Post subject: |
|
|
REC2XML is not documented in the mainframe product (at least not for db2 v8 and db2 v9) which would mean it is not available. _________________ All the best,
di |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
satyenderd Beginner
Joined: 26 Aug 2005 Posts: 144 Topics: 73
|
Posted: Tue Mar 16, 2010 1:32 pm Post subject: |
|
|
Hi all for your quick responses.
Kolusu, the query executed on windows without any error.
Code: |
SET CURRENT SQLID = 'ESDD2ADM';
SELECT REC2XML( 1.0, 'COLATTVAL','MKT_MAILING'
,PAR_ID
,REF_ID_PARTY_TYPE) AS ROW
FROM $ETL540."TBL_PARTY_PAR";
------------------------------------------------------------------------------
SET CURRENT SQLID = 'ESDD2ADM'
DB20000I The SQL command completed successfully.
SELECT REC2XML( 1.0, 'COLATTVAL','MKT_MAILING' ,PAR_ID ,REF_ID_PARTY_TYPE) AS ROW FROM $ETL540."TBL_PARTY_PAR"
ROW
----------------------------------------------------------------------------------------------------------------------------------------------
<MKT_MAILING><column name="PAR_ID">10900</column><column name="REF_ID_PARTY_TYPE">6661</column></MKT_MAILING>
<MKT_MAILING><column name="PAR_ID">10903</column><column name="REF_ID_PARTY_TYPE">6661</column></MKT_MAILING>
<MKT_MAILING><column name="PAR_ID">10906</column><column name="REF_ID_PARTY_TYPE">6661</column></MKT_MAILING>
<MKT_MAILING><column name="PAR_ID">10909</column><column name="REF_ID_PARTY_TYPE">6661</column></MKT_MAILING>
<MKT_MAILING><column name="PAR_ID">10912</column><column name="REF_ID_PARTY_TYPE">6661</column></MKT_MAILING>
<MKT_MAILING><column name="PAR_ID">10915</column><column name="REF_ID_PARTY_TYPE">6661</column></MKT_MAILING>
<MKT_MAILING><column name="PAR_ID">10918</column><column name="REF_ID_PARTY_TYPE">6661</column></MKT_MAILING>
<MKT_MAILING><column name="PAR_ID">10921</column><column name="REF_ID_PARTY_TYPE">6661</column></MKT_MAILING>
<MKT_MAILING><column name="PAR_ID">10924</column><column name="REF_ID_PARTY_TYPE">6661</column></MKT_MAILING>
<MKT_MAILING><column name="PAR_ID">10927</column><column name="REF_ID_PARTY_TYPE">6661</column></MKT_MAILING>
<MKT_MAILING><column name="PAR_ID">10930</column><column name="REF_ID_PARTY_TYPE">6661</column></MKT_MAILING>
<MKT_MAILING><column name="PAR_ID">10933</column><column name="REF_ID_PARTY_TYPE">6661</column></MKT_MAILING>
<MKT_MAILING><column name="PAR_ID">10936</column><column name="REF_ID_PARTY_TYPE">6661</column></MKT_MAILING> |
_________________ Satya |
|
Back to top |
|
|
papadi Supermod
Joined: 20 Oct 2009 Posts: 594 Topics: 1
|
Posted: Tue Mar 16, 2010 1:59 pm Post subject: |
|
|
Quote: | REC2XML is available on DB2 UDB | On the mainframe? _________________ All the best,
di |
|
Back to top |
|
|
satyenderd Beginner
Joined: 26 Aug 2005 Posts: 144 Topics: 73
|
Posted: Tue Mar 16, 2010 3:28 pm Post subject: |
|
|
Papadi,
On the mainframes it is throwing an error SQLCODE -440.
_________________ Satya |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Tue Mar 16, 2010 4:15 pm Post subject: |
|
|
satyenderd,
How did you assume it is supported on Mainframe DB2? AFAIK it isn't supported on mainframe DB2
Kolusu |
|
Back to top |
|
|
satyenderd Beginner
Joined: 26 Aug 2005 Posts: 144 Topics: 73
|
Posted: Tue Mar 16, 2010 5:47 pm Post subject: |
|
|
Kolusu,
I am just trying this option on both platforms and I have encountered.
As it is in DB2 UDB, I have assumed that it may also be in Mainframes.
Anyways, thank you for your help.
Thanks to all once again. _________________ Satya |
|
Back to top |
|
|
Cogito-Ergo-Sum Advanced
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
|
Posted: Sun May 09, 2010 9:51 pm Post subject: |
|
|
While not REC2XML, there are a good deal of XML related SQL functions beginning V9. Try XMLELEMENT. _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes. |
|
Back to top |
|
|
|
|