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 

XMLAGG and rexx

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
misi01
Advanced


Joined: 02 Dec 2002
Posts: 616
Topics: 171
Location: Stockholm, Sweden

PostPosted: Wed Apr 06, 2016 3:08 am    Post subject: XMLAGG and rexx Reply with quote

Since this gives a return code of -1, I'm going to guess that isn't supported. Anyone confirm or refute this ???

Code:

SELECT XMLAGG(XMLTEXT(CHAR(A23.AROWNIDFR))) FROM ....


The code fails with a -1 on the PREPARE statement and the error message I get is
Quote:

SQLSTATE = 42803 SQLERRD = -200,0,0,-1,0,0 SQLERRP = DSNXOGB SQLERRMC =
° DSNT408I SQLCODE = -122, ERROR: COLUMN OR EXPRESSION IN THE SELECT LIST
IS NOT VALID
DSNT415I SQLERRP = SQL PROCEDURE DETECTING ERROR

_________________
Michael
Back to top
View user's profile Send private message Send e-mail
misi01
Advanced


Joined: 02 Dec 2002
Posts: 616
Topics: 171
Location: Stockholm, Sweden

PostPosted: Wed Apr 06, 2016 3:09 am    Post subject: Reply with quote

BTW - the preview button is failing again and not showing a preview
_________________
Michael
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


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

PostPosted: Wed Apr 06, 2016 10:46 am    Post subject: Reply with quote

misi01,

What are the column attributes does the A23.AROWNIDFR ? Show us the complete SQL

Will work on fixing the preview issues.
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
misi01
Advanced


Joined: 02 Dec 2002
Posts: 616
Topics: 171
Location: Stockholm, Sweden

PostPosted: Thu Apr 07, 2016 3:37 am    Post subject: Reply with quote

AROWNIDFR DECIMAL(11) NOT NULL

"My" DBA helped with the following code that did the trick

Code:

SELECT XMLSERIALIZE(XMLAGG(XMLTEXT(CHAR(A23.AROWNIDFR))) AS CHAR LARGE OBJECT)
FROM xxxx.xxxxxxx A23                                                         
sqlcode from declare cursor 0                                                 
sqlcode from prepare cursor 0                                                 
sqlcode from open    cursor 0                                                 
sqlcode from FETCH   cursor 0

.... and here is the rexx variable AROWNIDFR after the fetch (the text AROWNIDFR and the parens are the results of a SAY)

AROWNIDFR ( 00014002992. 00016007486. 00016007486. 00016007486. 00016007486. 00
016007494. 00016007494. 00016007494. 00016007494. 00016017766. 00017014762. 000
17014770. 00017014788. 00017014796. 00017014804. 00021369012. 00021923909. 0017
0109854. 00170109904. 00170109904. 00170109912. 00170109912. 00170109912. 00170
109912. 00170109912. 00170109912. 00170109912.)

_________________
Michael
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


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

PostPosted: Thu Apr 07, 2016 1:52 pm    Post subject: Reply with quote

testing the preview option

Code:

SELECT XMLSERIALIZE(XMLAGG(XMLTEXT(CHAR(A23.AROWNIDFR))) AS CHAR LARGE OBJECT)
FROM xxxx.xxxxxxx A23   


Edit : Looks like the preview is working now. Please let me know if you still have issues.
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF 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