Page 1 of 1

Editing built-in routines

Posted: Mon Feb 27, 2017 10:12 am
by randy
I am upgrading datastage from 7.5 to 11.5 and finding that 11.5 will not compile jobs that did compile in 7.5 . One problem is that many of my jobs are using the built-in routine DateTimeStampToOraOCI. If there is a space in the argument before the date it bombs, which it did not do in 7.5 So, is there a way to edit a built-in routine like DateTimeStampToOraOCI to just add a trim around the argument being passed?

If not, I could copy DateTimeStampToOraOCI, add trim. But that would mean editing all my server jobs. Is there global search and replace for something like that?

Thanks for any help you can offer.
Randy

Posted: Mon Feb 27, 2017 5:04 pm
by Mike
DateTimeStampToOraOCI is not a built-in routine that I ever recall seeing.

If it is a user written routine, then you will need to track down the author/source code at your site.

Mike

Posted: Tue Feb 28, 2017 8:35 am
by chulett
It is a "built-in routine", specifically part of the Server SDK library. Sounds to me like you were exploiting a bug in the earlier release, something corrected in the (many) years since 7.5 hit the streets. I don't recall them shipping with source code but could be wrong. Whatever you end up doing there is a "global search and replace" for something like that. It's called exporting your entire project to a dsx file, doing the replacement with your favorite editor and then re-importing the entire project. Or just the jobs you changed. It's a bunch of fun, full of potential for disaster but also sometimes exactly What You Need To Do.

Been there, done that, got the t-shirt. Walked away whole.

Back everything up first. Twice. :wink:

Posted: Tue Feb 28, 2017 11:50 am
by Mike
As usual, Craig's memory is infallible.

Do a quick find in the Designer client with your routine name and it'll jump right to it. Go to its properties and you can examine the source code on the Code tab.

In my 11.3 version the routine is read-only by default, so you may have to remove the read-only flag in order to make changes.

Mike

Posted: Tue Feb 28, 2017 5:33 pm
by ray.wurlod
The built-in routines catalog in a different way to user routines. But there'd be nothing to stop you making a copy of the built-in routine and modifying that to your heart's content.