Reading "keys" from RT_Log using shellscript

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
DSUser2000
Participant
Posts: 42
Joined: Tue Oct 20, 2009 8:36 am

Reading "keys" from RT_Log using shellscript

Post by DSUser2000 »

Is it possible to read (and possibly write) special keys like "//JOB.STARTED.NO" from a shell script (unix ksh) and is there a list of these keys? It is possible to do issue commands like Select (with some rather straightforward SQL syntax) using the "uvsh"/"dssh" command from the commandline. However, I don't know what the command should be for selecting such keys and I didn't find any suitable documentation for this.

I found this code in the forum to alter and read the purge settings but thats only for internal routines and not usable for a shell script...

Code: Select all

OPEN JobLogNo TO F.FILE Then 
Read PurgeSettings FROM F.FILE, "//PURGE.SETTINGS" Else            PurgeSettings = "" 
If PurgeType = "DAY" Then 
   PurgeSettings<1> = 1 
   PurgeSettings<2> = PurgeInterval 
   PurgeSettings<3> = 0 
End 
If PurgeType = "RUN" Then 
   PurgeSettings<1> = 2 
   PurgeSettings<2> = 0 
   PurgeSettings<3> = PurgeInterval 
End 
WRITE PurgeSettings ON F.FILE, "//PURGE.SETTINGS"
Writing a Datastage job with such code in it, invoking it and somehow parse the output is not really an option for me...
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Welcome aboard.

There are command line commands UVread and UVwrite that you can use.
For example:

Code: Select all

$DSHOME/bin/UVread RT_LOG42 //PURGE.SETTINGS
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
DSUser2000
Participant
Posts: 42
Joined: Tue Oct 20, 2009 8:36 am

Post by DSUser2000 »

Thanks a lot! Works perfectly :D
Post Reply