Page 1 of 1

Reading "keys" from RT_Log using shellscript

Posted: Mon Nov 02, 2009 4:18 am
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...

Posted: Mon Nov 02, 2009 5:22 am
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

Posted: Mon Nov 02, 2009 8:34 am
by DSUser2000
Thanks a lot! Works perfectly :D