Routine in Basic - its code does not appear!
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
There are two possibilities. The first is that the source code was never imported into your project. In that case you will need to track down where the source code actually is. The second is that the code itself has been removed from your project.
Try a query against DS_ROUTINES to see whether your code actually exists.
If it does, the source code should be in field #15.
(I am assuming in all of this that the code is user-written, not part of the product. You might post the name of the routine so that we can be sure of that.)
Try a query against DS_ROUTINES to see whether your code actually exists.
If it does, the source code should be in field #15.
(I am assuming in all of this that the code is user-written, not part of the product. You might post the name of the routine so that we can be sure of that.)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Actually there is a third possibility, that someone with UniVerse knowledge has cataloged the routine from some other location than DSU.BP. Once we know the name of the routine we may be able to explore this possibility too.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 298
- Joined: Tue Aug 26, 2008 12:17 pm
-
- Participant
- Posts: 298
- Joined: Tue Aug 26, 2008 12:17 pm
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Query DS_ROUTINES on its key (DSRID). The following two queries give you an exact search or a search on partial name. Note that the routine name is case sensitive. (You can modify the queries to make this a case-insensitive search if desired.)
You might also look in VOC for a catalog entry. If it genuinely is a user-written routine, it should have a "DSU." prefix.
All of these queries can be run from the DataStage Administrator client Command window for the project.
Code: Select all
SELECT DSRID FROM DS_ROUTINES WHERE DSRID = '<<RoutineName>>';
SELECT DSRID FROM DS_ROUTINES WHERE DSRID LIKE '%<<part of name>>%';
Code: Select all
SELECT F0 FMT '40L' FROM VOC WHERE "TYPE" = 'V' AND EVAL "UPCASE(F2)" LIKE '%<<PART OF NAME>>%';
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 34
- Joined: Tue Feb 26, 2013 9:36 am
- Location: Chicago
The routine should be present inside the Routines folder in the repository. And this looks to be a server routine and so for the routine to work, the Routine transforms also needs to present.
The routines are called inside the transform, which in turn is used in the Basic transformer stage.
Am not quite sure about your code though.
The routines are called inside the transform, which in turn is used in the Basic transformer stage.
Am not quite sure about your code though.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
That information is not correct, and has not been correct since about version 2.2 (more than ten years ago).sudha03_vpr wrote:The routine should be present inside the Routines folder in the repository. And this looks to be a server routine and so for the routine to work, the Routine transforms also needs to present.
The routines are called inside the transform, which in turn is used in the Basic transformer stage.
Since that release, (also version 2.0.0 of routines) you can invoke routines directly from the Transformer stage. There is no need to encapsulate every routine in a Transform.
When DataStage first appeared (1997) this encapsulation was necessary because the Transform provided the argument passing mechanism to version 1.0.0 Routines. Version 2.0.0 routines have their own argument receiving mechanism.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Premium Member
- Posts: 730
- Joined: Tue Nov 04, 2008 10:14 am
- Location: Bangalore
Usually I call routines directly in a transformer. Since I began with v 4.1 ( Ardent datastage) around 2001 - I dont think I ever needed to call routines from a transform.
For the OP's question , I think the routine could have been imported from another env without source code present . In such a case im not sure if any object stores it in UV with a hidden flag set.
For the OP's question , I think the routine could have been imported from another env without source code present . In such a case im not sure if any object stores it in UV with a hidden flag set.
-
- Participant
- Posts: 298
- Joined: Tue Aug 26, 2008 12:17 pm
Can you log on to Xmeta and run this Query?
You post shows you are in version 8 or above
XXXXXXXX = string suffix for your table name.
See if you can see any source code under the sourceCode_xmeta column. Also Check for the bit value of column SourceFlag_xmeta , a zero means you probably imported without source code
You can find the name of your xmeta routine table using a database explorer tool or quering a list of table names ( all_tables in oracle)
You post shows you are in version 8 or above
Code: Select all
select DSNameSpace_xmeta,moduleName_xmeta,SourceFlag_xmeta ,
sourceCode_xmeta , subtype_xmeta
from xmeta.DataStageX_xmetagen_DSRoutineXXXXXXXX
WHERE moduleName_xmeta = 'DSU.'.<YourRoutineName>and DSNameSpace_xmeta LIKE '%YourFULLProjectName%'
See if you can see any source code under the sourceCode_xmeta column. Also Check for the bit value of column SourceFlag_xmeta , a zero means you probably imported without source code
You can find the name of your xmeta routine table using a database explorer tool or quering a list of table names ( all_tables in oracle)
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
If there is an entry for the routine in DS_ROUTINES the source code is stored in field #15 of that record.
The reason I wanted to see the VOC result was to confirm that it was a user-written routine (with "DSU." prefix) rather than some other kind. Because other kinds are not stored in DS_ROUTINES.
The reason I wanted to see the VOC result was to confirm that it was a user-written routine (with "DSU." prefix) rather than some other kind. Because other kinds are not stored in DS_ROUTINES.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.