How to differentiate a Job from a Job Sequence in script
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
PTERM CASE INVERT as a default stems from the early days if UniVerse (and precursor products) when the input device was a teletypewriter that only had upper case; this default recognizes the fact that most components are named in all upper case because of this historical artifact. You can institute automatic change of the default in the LOGIN paragraph.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
I tried this from my home directory in a bash shell:
So, is there any way to invoke uvsh or dssh without actually cd'ing to a project directory?
Code: Select all
sbass1:~ > uvsh <<EOF
> LOGTO DEV_GGS
> SELECT JOBTYPE,NAME FROM DS_JOBS WHERE NAME='TestJob_Seq' AND JOBTYPE='2'
> EOF
This directory is not set up for DataStage.
Would you like to set it up (Y/N)?LOGTO DEV_GGS
Some people are the Michael Jordan's of Datastage. I'm more like Muggsy Bogues
As always, thanks for the help Craig. Genuinely appreciated.
In case others might find this useful, here is my final (test) script. It was slightly tricky getting the here document output captured in a variable, but Google saved the day:
$1 is the Project Name
$2 is the JobName
Returns 1 if JobName is a sequence, 0 if JobName is not a sequence.
In case others might find this useful, here is my final (test) script. It was slightly tricky getting the here document output captured in a variable, but Google saved the day:
Code: Select all
#!/bin/bash
cd $DSHOME
FOUND=$(uvsh <<EOF | egrep 'records listed' | cut -f1 -d" "
LOGTO $1
SELECT NAME,JOBTYPE FROM DS_JOBS WHERE NAME='$2' AND JOBTYPE='2';
EOF)
echo $FOUND
$2 is the JobName
Returns 1 if JobName is a sequence, 0 if JobName is not a sequence.
Some people are the Michael Jordan's of Datastage. I'm more like Muggsy Bogues
-
- Premium Member
- Posts: 730
- Joined: Tue Nov 04, 2008 10:14 am
- Location: Bangalore
A slight addition to the long discussion :D
Not all of my sequences are checkpointed and my intension is to figure out if the sequence i am running is checkpointed or not (by looking into the repository) and based on this either to reset or leave it in aborted/restartable status
Any info would be greatly appreciated
Thanks
Not all of my sequences are checkpointed and my intension is to figure out if the sequence i am running is checkpointed or not (by looking into the repository) and based on this either to reset or leave it in aborted/restartable status
Any info would be greatly appreciated
Thanks
- Zulfi
-
- Premium Member
- Posts: 730
- Joined: Tue Nov 04, 2008 10:14 am
- Location: Bangalore
Here are sample Director messages for a checkpointed job, with actual names genericized:
In light of past threads discussing extracting log messages, I suppose you could use those to find checkpointed jobs, and have negative proof that jobs that lack those messages are not checkpointed.
Code: Select all
<sequence job name>..JobControl (@Coordinator): Starting new run of checkpointed Sequence job
<sequence job name>..JobControl (@<sequence stage 1 name>): Checkpointed run of job '<job 1 called by sequence stage 1>'
<sequence job name>..JobControl (@<sequence stage 2 name>): Checkpointed run of job '<job 2 called by sequence stage 2>'
<sequence job name>..JobControl (@Coordinator): Removed checkpoint record at successful completion of sequence
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson
Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson
Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872