Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

with statement under SPUFI

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: with statement under SPUFI
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    Post subject:
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    Post subject: Who woulda thought...
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Suppress value reported by BREAK in D... Learncoholic DFSORT/ICETOOL 3 Wed Aug 16, 2017 6:03 pm
No new posts ON 2 AND EVERY 1 - Statement ??? UmeySan COBOL Programming 2 Tue Jul 25, 2017 1:20 pm
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am
No new posts ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 pm
No new posts VALIDATE NULL VALUE IN DB2 CASE STATE... useit DB2 5 Thu Feb 09, 2017 4:34 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us