Identifying jobs with specific stage and property option

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
padmavathi
Participant
Posts: 8
Joined: Tue Sep 01, 2009 6:16 am

Identifying jobs with specific stage and property option

Post by padmavathi »

Hello All,

I have requirement to identify list of jobs with MQ Connector stage and in that get Message Read Mode (Keep/Delete/...) and Execution Mode property values

Please provide query or any quicker way to get this instead of checking manually.

To get list of jobs , I have used option "Where Used" in Advance find. But There hundreds jobs with MQ connector stage in a project. Is there an option/query to check Message Read Mode, Execution Mode instead of manual check.

I don't have XMETA catalogued and access for that..

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

Post by ArndW »

I suggest doing an export of your project to a .dsx file, and then either using a DataStage job or writing your own script/SED to perform the following type of search:

1. Search for the specific string for the Message Read Mode that you want to identify.
2. From that position, search backwards for the string "BEGIN DSJOB".
3. The next line contains your job name, output that line
4. Repeat Step 1.
5. Goto Step 1.

If writing a program, I just do a single forward iteration through the file, keeping the value of the last Job Name (identified by the line after a "BEGIN DSJOB" string) and then search for my string. I usually end up writing a short BASIC routine or function.
padmavathi
Participant
Posts: 8
Joined: Tue Sep 01, 2009 6:16 am

Post by padmavathi »

Thanks ArnDW..

But in some of projects have 100 jobs with MQ Connector stage and each will different MessageRead mode.

The export takes much time..

Also the MessageRead Mode is not coming as xml tag. Its is coming as CDATA..

'SED' command may work, Please let me know how can relate Job and respective Options when there are multiple jobs in the exported DSX file..
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I didn't say it was easy, just that this is how I usually do it. You will also need to identify exactly the string in CDATA that you need to search for.
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post by asorrell »

I agree with Arnd, there isn't an easy way to do it.

In the past I've done exactly what he recommended. I exported a single job with the correct characteristics to a standard DSX (not XML). That allows you to identify the characteristics you are looking for. Then I did a full export of the project and used Ultra-Edit macros to process the entire file and show job names that matched those characteristics.
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
Post Reply