MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

REC2XML on Mainframe DB2

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
satyenderd
Beginner


Joined: 26 Aug 2005
Posts: 144
Topics: 73

PostPosted: Tue Mar 16, 2010 12:49 pm    Post subject: REC2XML on Mainframe DB2 Reply with quote

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
View user's profile Send private message
papadi
Supermod


Joined: 20 Oct 2009
Posts: 594
Topics: 1

PostPosted: Tue Mar 16, 2010 12:58 pm    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Tue Mar 16, 2010 1:17 pm    Post subject: Reply with quote

satyenderd,

Your syntax for REC2XML is wrong. Check this link for correct syntax

http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/admin/r0004488.htm


papadi , REC2XML is available on DB2 UDB

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
satyenderd
Beginner


Joined: 26 Aug 2005
Posts: 144
Topics: 73

PostPosted: Tue Mar 16, 2010 1:32 pm    Post subject: Reply with quote

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
View user's profile Send private message
papadi
Supermod


Joined: 20 Oct 2009
Posts: 594
Topics: 1

PostPosted: Tue Mar 16, 2010 1:59 pm    Post subject: Reply with quote

Quote:
REC2XML is available on DB2 UDB
On the mainframe?
_________________
All the best,

di
Back to top
View user's profile Send private message
satyenderd
Beginner


Joined: 26 Aug 2005
Posts: 144
Topics: 73

PostPosted: Tue Mar 16, 2010 3:28 pm    Post subject: Reply with quote

Papadi,

On the mainframes it is throwing an error SQLCODE -440.
Sad
Sad
_________________
Satya
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Tue Mar 16, 2010 4:15 pm    Post subject: Reply with quote

satyenderd,

How did you assume it is supported on Mainframe DB2? AFAIK it isn't supported on mainframe DB2

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
satyenderd
Beginner


Joined: 26 Aug 2005
Posts: 144
Topics: 73

PostPosted: Tue Mar 16, 2010 5:47 pm    Post subject: Reply with quote

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
View user's profile Send private message
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Sun May 09, 2010 9:51 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group