Job Searching Facility

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
satheesh_color
Participant
Posts: 182
Joined: Thu Jun 16, 2005 2:05 am

Job Searching Facility

Post by satheesh_color »

Hai All,


How to search a particular job in the repository. Because i have more than 180 jobs.If i want to pick a job we have to go through all the repository folders.Is there any option available to search a job in DS Designer or DS Manager?

Regards,
Satheesh.rajan
sb_akarmarkar
Participant
Posts: 232
Joined: Fri Sep 30, 2005 4:52 am
Contact:

Post by sb_akarmarkar »

Use SELECT * FROM DS_JOBS WHERE NAME LIKE Jobname ... in Datastage Adminstrator command.. this is the only option


Thanks,
Anupam
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

At the moment you need to do a query such as what Anupam has given in the Admin tool or by using TCL or by writing your own routine/job; fortunately with HAWK they have built this search into the client!
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi,
Beyond waht was already said, in the Director there is a search utility.
This utility will only let you find a job in a specific category, so if you used naming convention that uses some connection between job name and the category it's in you should be able to find it in no time even if all 180 jobs are in the same category.

IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
nick.bond
Charter Member
Charter Member
Posts: 230
Joined: Thu Jan 15, 2004 12:00 pm
Location: London

Post by nick.bond »

create a routine with the following code with one input arg called "aSearchString"

Then you can open the routine in designer or manager and use the "TEST" functionality to find what you are looking for.

Code: Select all

      COL_HEADING = @FM
      COL_HEADING := "JOB ID           JOB CATEGORY                    JOB NAME" : @FM
      COL_HEADING := "-------------------------------------------------------------------"

      If UnAssigned(aSearchString) Or IsNull(aSearchString) Or Len(aSearchString) = 0
      Then
         Ans = @NULL
      End
      Else

         ClearSelect 8
         ClearSelect 9

         Ans = ""

         *Get list of jobids that contains aSearchString
         Command = "SEARCH DS_JOBOBJECTS TO 9" : @FM : "DATA " : aSearchString : @FM : "DATA"
         Command := @FM : "IF @SYSTEM.RETURN.CODE = 0 THEN GO SEARCH_FINISH"
         Command := @FM : "SELECT DS_JOBOBJECTS FROM 9 SAVING UNIQUE OBJIDNO TO 8"
         Command := @FM : "SEARCH_FINISH:"

         CALL DSExecute("TCL", Command, vOutput, vReturnCode)

         If vReturnCode < 0 Then
            Ans = "TCL Execute Failed" : @FM : "Command : " : Command : @FM : "Return Code ": vReturnCode
            Ans := @FM: "output : " : vOutput
            Return(Ans)
         End

         Loop
         While ReadNext ObjIdNo From 8

            Command = "SELECT JOBNO FMT'15L', CATEGORY FMT'30L',NAME FMT'30L' FROM DS_JOBS WHERE JOBNO = '"
            Command := ObjIdNo :"' COL.SUP COUNT.SUP;"
            CALL DSExecute("TCL", Command, vOutput, vReturnCode)

            If vReturnCode < 0 Then
               Ans = "TCL Execute Failed" : @FM : "Command : " : Command : @FM : "Return Code ": vReturnCode
               Ans := @FM: "output : " : vOutput
               Return(Ans)
            End


            Ans := vOutput

         Repeat

      End

      IF len(Ans) = 0 then Ans = 'Search For "': aSearchString : '" Not Found.'
      ELSE
         Ans = 'Search For "' : aSearchString : '" Results :' :@FM: COL_HEADING : Ans
      END
Regards,

Nick.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

In Director you can choose (in the View menu) to disable the display of Categories, which will give you a single list of all the jobs in the project. It should be able to refresh 180 jobs in an acceptable time.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Here we find a person who might use 'dssearch' if it was available in his version.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
TNZL_BI
Premium Member
Premium Member
Posts: 24
Joined: Mon Aug 20, 2012 5:15 am
Location: NZ

Can we make this search Case insensitive

Post by TNZL_BI »

Hi all,,, we have used the above routine however we would like to make this case insensitive. Is it possible to change this code slightly ???
Post Reply