Getting the Jobs list in the Export file

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
boppanakrishna
Participant
Posts: 106
Joined: Thu Jul 27, 2006 10:05 pm
Location: Mumbai

Getting the Jobs list in the Export file

Post by boppanakrishna »

hi all,
Is there any way to get the list of Jobs that got exported in to the export file after exporting

Suppose we are exporting based on a categories in to a export file say test.dsx, after exporting can we check jobs list that got exported


Method i know to check these is to query from Repository using
select name from DS_JOBS where category =' My category Name'

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

Post by ArndW »

I'm not at a machine with an export file, but I think

Code: Select all

cat {file.dsx} | grep BEGIN DSJOB | wc -l
should do the trick
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

That would give you a count, not a list. What you'd need to capture would be the 'Identifier' record that immediately follows that record, it will contain the job's name. An example snippet:

Code: Select all

BEGIN DSJOB
    Indentifier "AnimalCountries"
    DateModified "2005-05-26"
    TimeModified "14.28.35"
-craig

"You can never have too many knives" -- Logan Nine Fingers
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Craig - hmm, I could have sworn I read that the original requestor just wanted a count. Oh well, it would be a bit of BASIC code or perl to locate the BEGIN DSJOB line and the extract the quoted text from the following line.
JoshGeorge
Participant
Posts: 612
Joined: Thu May 03, 2007 4:59 am
Location: Melbourne

Post by JoshGeorge »

You can view them in the manager itself if you choose import selected option. You can view the list of components in the exported dsx file and then opt not to go ahead with import.

Note: Import selected takes a long time because it has to process the whole text file in one pass to get the list of valid objects. As in your case if it is only a category with not so many jobs you might want to try this way.
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
mahmoud_ali
Participant
Posts: 2
Joined: Mon Nov 01, 2004 3:00 am

Small vb application

Post by mahmoud_ali »

I have encountered the same issue but thanks to chulett I created a very small vb application that read the DSX file loop all over the lines searching for this code then displaying every job in the file

Code: Select all

BEGIN DSJOB
    Indentifier "AnimalCountries"
    DateModified "2005-05-26"
    TimeModified "14.28.35"
[/quote]
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Do an Import Selected. All the components in the export file will be listed on the screen.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply