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

DB2-V8 Vs DB2-V9 problem


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

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Sep 07, 2012 10:45 pm
Reply with quote

just for grins,
what is the pic clause for f1-print-a?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Sep 07, 2012 11:35 pm
Reply with quote

Hello,

Quote:
But we found couple more instances related to GTT, so I feel as far as GTT is concern whatever DB2-V8 supports should also comes up with DB2-V9 package
IBM (as well as many other software vendors) ensures the "new reease" supports what was done correctly in the "old" release. Just because something will run, does not mean it was done correctly . . . (As DBZ has mentioned)

If many, many customers have been caught by the same situation, there may be an IBM workaround or fix available. You need to ask IBM support what choices you might have.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Sep 07, 2012 11:53 pm
Reply with quote

is f1-print-a a PIC 9(?) or PIC S9(?) (display).
db2 stopped messing with that garbage cobol data type.

also, the reason SPUFI works:
you are using Literals and not HOST-VARIABLES.
db2 can determine the data type from the literal
(maybe not what you mean, but db2 can determine a definite data type)
but has stopped trying to figure out some host variables.

when you use functions like DEC, you should CAST the host-variable.
DISPLAY is really x-type and if you try to use a scalar function
that requires a numeric data type, you are going to have problems.
(trying to blame it on anyone except your sub-par coders)

even though IBM has really dumbed-down COBOL,
if you think db2 vsn9 is strict,
wait til you migrate to 10.
all the BS SQL your people have written, is going to keep you busy.
Back to top
View user's profile Send private message
razesh84

New User


Joined: 05 Apr 2010
Posts: 41
Location: Kolkata,India

PostPosted: Sat Sep 08, 2012 1:20 am
Reply with quote

Rohit,

I don't consider myself a sql expert,but seriously that case statement makes no sense.When you have all the information why ask DB2 to manipulate data for you.Use cobol logic to get the value & pass DB2 for insert(As Dick already suggested).

Also the problem is nothing to do with GTT.you can code such query against any tables & run in DB2V9.You'll be getting the same error.

And now comes how to solve this issue?

1> you can always fight with IBM
2> accept the fact(that it was really bad programming) & change the code
3> change the code under performance initiative bucket.though I'm not sure how many times the insert was executed but still if you follow dick's approach you will get some savings.

This is a real good example of Dick's signature comment.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Sat Sep 08, 2012 8:38 am
Reply with quote

and another thing.

it appears that there is no CALL to DSNTIAR,
otherwise you would have told us the offending host-variables name, n'est-ce pas?

If not, suggest that your site enter the computer age
and incorporate a CALL DSNTIAR for every SQLCODE < 0
in all of your programs.

If so, it would help to know what variable was mentioned.
Quote:
all the variables used in the CASE are unrecognized.

is BS.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Sat Sep 08, 2012 10:52 am
Reply with quote

and yet another thought.

I imagine that you have not compile/bind your system under 9 since
installing and running on vsn9.

good chance this -312 would have shown-up in pre-compile or
bind at a vsn 9 level.
(obviously the vsn 8 pre-compiler/bind allowed it)

yes, stuff compiled/bind under vsn 8 will run in 9,
but that is based on the fact that the vsn8 sql is good sql.
if it is not, you end-up with runtime negative sql codes.

and I reiterate,
code in CALL's to DSNTIAR for negative SQLCODEs.
it will make solving your problems a lot easier.

and learn to read all of the documentation about each negative SQLCODE.
to have read about a -312 and then respond with
'it is not dynamic or trigger'
indicates you have a long way to go before you are proficient in solving problems.
you need to change the way you go about analyzing problems
and utilizing the information provided.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3053
Location: NYC,USA

PostPosted: Mon Sep 10, 2012 4:33 pm
Reply with quote

Quote:
besides, most sites do testing prior to migration
or are you in the testing phase?

I will be surprised if it has anything to do with GTT.


Yes, it is only with the GTT same stuff works fine with normal tables.

Quote:
imagine that you have not compile/bind your system under 9 since
installing and running on vsn9

Yes, one more strange that I found is we had 2 SPs in prod which has the same code as we have discussed, now one of the SP got rebind with V9 and failing with -312 but other one is still bound to V8 but running fine in V9.

Another problem we have faced with GTT is that, in V8 the way we were inserting the data to GTT and eventually GTT has some left outer join with some other tables with cursor.Now that cursor when fetched giving the data in the same way that we did insert but in V9 the order gets changed randomly so every such query we have changed and added additional ORDER BY clause.

Quote:

If many, many customers have been caught by the same situation, there may be an IBM workaround or fix available. You need to ask IBM support what choices you might have.


Yes sure, as of now the code has been changed and CASE statement removed from the SQL.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Sep 10, 2012 6:56 pm
Reply with quote

Hello,

As you have continuing issues with GTT (or something), it would be best to have IBM in the loop and learn if this is something they have seen before and what they have done about it (if anything).

If some developer(s) implemented code that IBM does/did not support, they may answer that the code has to be changed, but maybe they can provide info on situations where this has happened to others. Then you will have a better idea what to look for (rather than having production processes misbehave).
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3053
Location: NYC,USA

PostPosted: Mon Sep 10, 2012 7:35 pm
Reply with quote

Thanks Dick. I shall let this get noticed to IBM.
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 Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts z/vm installation problem All Other Mainframe Topics 0
No new posts Job scheduling problem. JCL & VSAM 9
No new posts Problem with IFTHEN=(WHEN=GROUP,BEGIN... DFSORT/ICETOOL 5
No new posts Need to add field to copybook, proble... COBOL Programming 14
Search our Forums:

Back to Top