| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| misi01 Advanced
 
 
 Joined: 02 Dec 2002
 Posts: 629
 Topics: 176
 Location: Stockholm, Sweden
 
 | 
			
				|  Posted: Wed Apr 06, 2016 3:08 am    Post subject: XMLAGG and rexx |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		| misi01 Advanced
 
 
 Joined: 02 Dec 2002
 Posts: 629
 Topics: 176
 Location: Stockholm, Sweden
 
 | 
			
				|  Posted: Wed Apr 06, 2016 3:09 am    Post subject: |   |  
				| 
 |  
				| BTW - the preview button is failing again and not showing a preview _________________
 Michael
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| kolusu Site Admin
 
  
 
 Joined: 26 Nov 2002
 Posts: 12394
 Topics: 75
 Location: San Jose
 
 | 
			
				|  Posted: Wed Apr 06, 2016 10:46 am    Post subject: |   |  
				| 
 |  
				| misi01, 
 What are the column attributes does the A23.AROWNIDFR ? Show us the complete SQL
 
 Will work on fixing the preview issues.
 _________________
 Kolusu
 www.linkedin.com/in/kolusu
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| misi01 Advanced
 
 
 Joined: 02 Dec 2002
 Posts: 629
 Topics: 176
 Location: Stockholm, Sweden
 
 | 
			
				|  Posted: Thu Apr 07, 2016 3:37 am    Post subject: |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		| kolusu Site Admin
 
  
 
 Joined: 26 Nov 2002
 Posts: 12394
 Topics: 75
 Location: San Jose
 
 | 
			
				|  Posted: Thu Apr 07, 2016 1:52 pm    Post subject: |   |  
				| 
 |  
				| 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
 www.linkedin.com/in/kolusu
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		|  | 
	
		|  |