How to pass information from DS Jobs to Job Sequence

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
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

cat will work in an Information Server 8.1 installation on Windows. The MKS toolkit which is installed with IS provides many Unix commands, including cat.

Regards,
- james wiles


All generalizations are false, including this one - Mark Twain.
kondeti
Premium Member
Premium Member
Posts: 67
Joined: Sat Mar 04, 2006 11:38 am

Post by kondeti »

Oh ok. Thank you.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

In DOS it's "type". :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
kondeti
Premium Member
Premium Member
Posts: 67
Joined: Sat Mar 04, 2006 11:38 am

Post by kondeti »

Thanks for the correction chulett.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

But cat will work, as noted. Or, particularly if the first check is done in a server job (which I recommend as best practice when only one row is being processed), the count can be placed in that job's user status area and retrieved using the $UserStatus activity variable of the Job activity.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

ray.wurlod wrote:But cat will work, as noted.
Of course, just noting what the DOS equivalent would be.
-craig

"You can never have too many knives" -- Logan Nine Fingers
BI-RMA
Premium Member
Premium Member
Posts: 463
Joined: Sun Nov 01, 2009 3:55 pm
Location: Hamburg

Post by BI-RMA »

Another possibility is:
Build a new Server-Routine UpdateUserStatus (or whichever name you prefer) with the following code:

Call DSSetUserStatus(Arg1)
Call DSLogInfo(Arg1,'UpdateUserStatus')
Ans = Arg1

The routine writes its input to the variable UserStatus of a ServerJob (cannot be used in PX-jobs) as a string - and to the job log (just for informational purposes).

Now build a simple ServerJob which runs the above query and passes its result to a Dummy-Output-Column of a transformer with the derivation UpdateUserStatus(<<Input-Column-from-Query>>). On Unix-Systems you can send the result to /dev/null using a Sequential-File-Stage.

The Sequence looks as follows

ServerJob_with_UpdateUserStatus -- Control Email notification Or Execute depended Job. Use two links with Custom triggers and evaluate Activity-Variable ServerJob_with_UpdateUserStatus.UserStatus to manipulate the logic according to your requirements.

No writing and reading files involved. Nothing to cleanup afterwards.

You can also use this to pass an array of semicolon separated parameters to subsequent jobs in a sequence, which can afterwards be split using the field() function.
"It is not the lucky ones are grateful.
There are the grateful those are happy." Francis Bacon
Post Reply