Page 1 of 1

Ds repository tables in Basic routines

Posted: Wed May 31, 2006 3:47 am
by Madhu1981
HI,

Shall we use Datastage repository tables in the basic routines.

I would like to calculate the current date of the job and i want to populate to sequential file.

by executing the below query in the administratori am getting the current date value, but i would like to know, how to implement thislogic in the routines

"SELECT INSTANCE,CREATOR,DTC FROM DS_AUDIT WHERE CLASS ='2' AND INSTANCE = <JobName>; "

2) Shall we use the same tables in the scripts also? If yes, please tell me.

Kindly help me

Posted: Wed May 31, 2006 6:26 am
by kumar_s
You can use DSExecute to execute UV commands. But its is also possible to retrive the informations like DSJobStartDate, DSJobStartTime... through DsMacro from JobSequencer itself.

Posted: Wed May 31, 2006 6:45 am
by DSguru2B
I would advise to minimize the use of the DS repository as that is/will change (as heard here on dsx). Then your piece of code will be obsolete and will not work with a newer version.
As kumar suggested, try to utilize macros to get the information you need.
Regards,

Posted: Wed May 31, 2006 4:20 pm
by kduke
I would bet money this command works in the next release. I doubt if the next release changes that much. I think a lot of these types of hacks are the only way you can get this information. If the information is valuable then get it and use it. Hack the new later.

Using the macros are better when they can get what you need. Otherwise hack away and Craig you can quote me.

Posted: Wed May 31, 2006 4:51 pm
by chulett
No worries on that account. :lol:

Posted: Wed May 31, 2006 6:29 pm
by ray.wurlod
kduke wrote:I would bet money this command works in the next release. I doubt if the next release changes that much.
Except that you may need to issue such a request via the Metadata Delivery service.
The Repository database will not be (is not) UniVerse-based, and there's no guarantee that the table names will be (are) identical to those currently used. That's the difficulty with service-oriented architectures - you are isolated from what actually happens.

Posted: Wed May 31, 2006 11:03 pm
by Madhu1981
kumar_s wrote:You can use DSExecute to execute UV commands. But its is also possible to retrive the informations like DSJobStartDate, DSJobStartTime... through DsMacro from JobSequencer itself.
Hello Kumar,

thanks a ton..!!

I want to learn how to use DSExecute command to use UV commands. Could i get the documents related to this topic.

Please give me the syntax of this command. thanks in advance

Posted: Wed May 31, 2006 11:19 pm
by ray.wurlod
DSExecute() is not a command. It is a subroutine callable from your own Routines, which can execute operating system or DataStage commands. You can find the full syntax in on-line help. For a fee, someone might be prepared to transcribe that information into this post for you.

Posted: Thu Jun 01, 2006 10:55 am
by kumar_s
You may find all these information in BASIC guide, which would be installed in your client machine.