IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

with statement under SPUFI


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
madmartinsonxx

New User


Joined: 10 Dec 2010
Posts: 96
Location: Massachusetts

PostPosted: Fri Jan 14, 2011 2:28 am
Reply with quote

When i run the following under SPUFI i am getting an Sqlcode -104. We have release 9. Is this particular approach only valid in a DB2 program with cursor processor ? Thanks in advance.

Code:

WITH XXXX1(C1) AS               
(VALUES (' ABC')               
,(' ABC ')                     
,('ABC '))                     
SELECT C1 AS C1                 
,STRIP(C1) AS C2               
,LENGTH(STRIP(C1)) AS L2       
,STRIP(C1,LEADING) AS C3       
,LENGTH(STRIP(C1,LEADING)) AS L3
,STRIP(C1,LEADING,'A') AS C4   
FROM XXXX1;
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Fri Jan 14, 2011 2:00 pm
Reply with quote

"with xxxx1 as (values ...)" isn't supported on the DB2 z/OS

you'll have to do something like

Code:
with xxxx1(C1) as (
select ' ABC'  from sysibm.sysbummy1 union ALL
select ' ABC ' from sysibm.sysbummy1 union ALL
select 'ABC ' from sysibm.sysbummy1 )

select ...
Back to top
View user's profile Send private message
madmartinsonxx

New User


Joined: 10 Dec 2010
Posts: 96
Location: Massachusetts

PostPosted: Fri Jan 14, 2011 7:06 pm
Reply with quote

Thank you for response. That's awesome. I looked this morning but could not find a link to exactly what I can do under z/os and what I cannot do. If such a thing exists and you have it handy that would be greatttttt! Have a great weekend and go Patriots.
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Fri Jan 14, 2011 7:34 pm
Reply with quote

you could check out
The SQL Reference for Cross-Platform Development
But that doesn't really says what you can't do, only what you can do and works on both platforms.( about 97% of the sql they claim)
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts DELETE SPUFI DB2 1
No new posts Adding QMF and SPUFI to the ISPF menu DB2 20
No new posts JOIN STATEMENT PERFORMANCE. DFSORT/ICETOOL 12
No new posts Beautifying the SPUFI output DB2 5
No new posts Relate COBOL statements to EGL statement All Other Mainframe Topics 0
Search our Forums:

Back to Top