Question on Comparing DataStage Jobs
Moderators: chulett, rschirm, roy
Question on Comparing DataStage Jobs
Some of our programmers who have coverted to DataStage from the mainframe darkside have asked if there is a way to compare DataStage jobs. For example compare the Datastage job in production against same job in Test and have any code differences list out, as they were able to do in the darkside.
Thnxs,
Charlie
Thnxs,
Charlie
Version 8 does it in "stunning" fashion. Nice graphics, drill thru to the link or transform that is different, etc.... prior to that, I've seen posts in here where people compare .dsx's, but it's more challenging.
Ernie
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Thanks Ernie for the quick reply. I have version 8 upgrade on my project plan for the summer, we tried to export and do a dsx compare using utra-edit's compare option, but it listed every timestamp differences it found, a real mess. Knowing that it is available in version 8 will make my darkside developer's smile a little. while I have your attention.
any truth to the rumor that version control is not available in veriosn 8, if so, is there a replacement?
any truth to the rumor that version control is not available in veriosn 8, if so, is there a replacement?
It's not a rumor, it's a fact. And there's no direct replacement, that's coming 'real soon now' as official hooks to supported products. In the meantime, you'd have to roll your own.
For the comparison, yes - timestamps and version numbers will always be an issue - but you quickly learn to discern the differences that matter.
For the comparison, yes - timestamps and version numbers will always be an issue - but you quickly learn to discern the differences that matter.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
I have to do a lot of code reviews and have run into this as well. We are on 7.5.1a and are not slated to move to v8 until later this year or early 2009 (bummer).
When the DSX is compiled, the OSH is visibile in the file. The following alias (on Unix) will parse out the basic OSH:
Put this in your .profile so the command is accessible in your sessions. Then do the following from the commandline:
You will still get more differences than basic code changes, but it does reduce the clutter somewhat. If you have a side-by-side diff tool, it is much easier to eyeball the differences. ClearCase has an X-Windows GUI that works well.
Brad.
When the DSX is compiled, the OSH is visibile in the file. The following alias (on Unix) will parse out the basic OSH:
Code: Select all
alias -x getdsstages='sed -n "/OrchestrateCode =+=+=+=/,/=+=+=+=/p"'
Code: Select all
getdsstages DSXFileVersion1 > old
getdsstages DSXFileVersion2 > new
diff old new
Brad.
For those of you who use buildops, here is a Perl script that grabs your buildop code out of the DSX file for comparison:
This is pretty brute force, but it does simplify the output a bit.
From the commandline:
Again, if you have a side-by-side diff tool, the comparison is much easier.
Also, when you use a diff tool, try to ignore whitespace. I've noticed that helps reduce 'fake' differences...
Brad.
Code: Select all
[mysuerid@myserver 16394]: cat getdsbuildop
#!/usr/bin/perl
$last_rec = undef;
$ind1 = 0;
$ind2 = 0;
$found = 0;
LINE: while(<>) {
if (/CUSTOMPXBUILD/) {
$last_rec = "$_";
$ind1 = 1;
} elsif (/Definition/ && $ind1 == 1) {
# Right occurence, make updates then reset indicator
print "$last_rec";
print "$_";
$ind2 = 1;
} elsif (/InputLinkOrder/) {
print "$_";
$ind1 = 0;
$ind2 = 0;
} elsif ($ind2 == 1) {
print "$_";
}
}
From the commandline:
Code: Select all
getdsbuildop DSXFileVersion1 > old
getdsbuildop DSXFileVersion2 > new
diff old new
Also, when you use a diff tool, try to ignore whitespace. I've noticed that helps reduce 'fake' differences...
Brad.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The new tool (probably coming out with version 8.1) will - initially at least - provide an interface to Clear Case, according to one of the presentations at IoD 2007.
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.