DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
Author Message
russ356


since May 2006

Group memberships:
Premium Members

Joined: 07 Jun 2005
Posts: 38

Points: 474

Post Posted: Fri Jan 11, 2008 8:36 am Reply with quote    Back to top    

DataStage® Release: 7x
Job Type: Parallel
OS: Unix
For the last couple of days I have been doing some research on how to get a list of jobs from the DS server and what category they are in. I did much research on DSXchange but I didn't find a true solution, so I am posting my solution so maybe it can help someone else.

1. Below is the bat file I wrote to extract the information. This must be run from the client machine. First, it will get a list of projects and then it will loop through each project and populate a text file with the names of the jobs.

2. I then parsed the text file using Access to populate a table and create a report.


Code:

@echo off
    SETLOCAL

    SET Host=
    SET /p Host=Type User and press Enter:

    SET User=
    SET /p User=Type User and press Enter:
 
    SET PW=
    SET /p PW=Type Password and press Enter:

    SET DsJob=C:\Progra~1\Ascential\DataStage7.5.1\dsjob.exe
    SET DsSearch=C:\Progra~1\Ascential\DataStage7.5.1\dssearch.exe
    SET ProjectList=ProjectList.txt
    SET JobList=JobList.txt
 
:: Pull project information

    %DsJob% -server %Host% -user %User% -password %PW% -lprojects > %ProjectList%
    IF NOT %ERRORLEVEL%==0 GOTO END

:: Loop through all projects and populate job list

    for /F "tokens=1" %%i in (%ProjectList%) do
    (
              ECHO PROJECT:  %%i >> %Host%.txt
              %DsSearch% -server %Host% -user %User% -password %PW% -ljobs -matches -sub -oc %%i >> %JobList%
    )

:END
    ENDLOCAL
ray.wurlod

Premium Poster
Participant

Group memberships:
Premium Members, Inner Circle, Australia Usergroup, Server to Parallel Transition Group

Joined: 23 Oct 2002
Posts: 54086
Location: Sydney, Australia
Points: 293338

Post Posted: Fri Jan 11, 2008 8:51 am Reply with quote    Back to top    

Code: cd %ProjectDir% %DSbin%\dssh "SELECT NAME FMT '40L', CATEGORY FMT '35L' FROM DS_JOBS WHERE NAME NOT LIKE '\\%' ORDER BY CATEGORY, NAME;" >> %JobList% might be e ...

_________________
RXP Services Ltd
Melbourne | Canberra | Sydney | Hong Kong | Hobart | Brisbane
currently hiring: Canberra, Sydney and Melbourne
Rate this response:  
Not yet rated
russ356


since May 2006

Group memberships:
Premium Members

Joined: 07 Jun 2005
Posts: 38

Points: 474

Post Posted: Fri Jan 11, 2008 8:54 am Reply with quote    Back to top    

I knew one of you wizards would know a better way but I couldn't find it yesterday. Thanks for the input Ray.
Rate this response:  
Not yet rated
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours