Restore purge settings

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
prasad111
Premium Member
Premium Member
Posts: 173
Joined: Fri May 19, 2006 10:53 am

Restore purge settings

Post by prasad111 »

Hi,

I followed the below link for clear.file and restore the purge settings.
viewtopic.php?t=92145&highlight=%2F%2Fpurge

[code]
cd $DSHOME
bin/uvsh
>COPY FROM RT_LOGnnn........
>CLEAR.FILE RT_LOGnnn
>COPY FROM .............. TO RT_LOGnnn
[/code]

There is a situation where clear.file was executed without copying the purge settings to VOCLIB.

[code]
cd $DSHOME
bin/uvsh
>CLEAR.FILE RT_LOGnnn
[/code]
How can I restore the purge settings from administrator to assign the value to the RT_LOGnnn.

I can get the administrator settings value from DSParams file

[AUTOPURGE]
PurgeEnabled=4
DaysOld=4
PrevRuns=4

how can assign these value to the purge settings for the job in the basic command at
bin/uvsh......

suggestions are highly appreciated
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Use the GUI, i.e. the Director.
-craig

"You can never have too many knives" -- Logan Nine Fingers
prasad111
Premium Member
Premium Member
Posts: 173
Joined: Fri May 19, 2006 10:53 am

Post by prasad111 »

We are trying to write a UNIX shell script to automate the cleanup/archive process.........
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You don't need to anything. If you want the same settings as project default to be in place, just run the job again - the absence of control records will be understood to mean (a) that you want the log to be purged using default settings and (b) that you want the control records to be created. This is how newly-created jobs do it too.
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 »

Interesting... that makes sense but I don't recall anyone explaining it like that. I've always assumed I had to put them back (which is no big deal) or they would be gone forever. 8)
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You only need to put non-default ones back.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
prasad111
Premium Member
Premium Member
Posts: 173
Joined: Fri May 19, 2006 10:53 am

Post by prasad111 »

Current project default is to Auto purge the job log up to 5 previous runs.

But when I execute CLEAR.FILE RT_LOGnnn and rerun the job, it keeps on adding the log it is not getting purged (its keep the log for more than 5 previous runs).
prasad111
Premium Member
Premium Member
Posts: 173
Joined: Fri May 19, 2006 10:53 am

Post by prasad111 »

Current project default is to Auto purge the job log up to 5 previous runs.

But when I execute CLEAR.FILE RT_LOGnnn and rerun the job, it keeps on adding the log it is not getting purged (its keep the log for more than 5 previous runs).

Any suggestions is highly appreciated........
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

OK, so put the control record //PURGE.SETTING into the job log.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
prasad111
Premium Member
Premium Member
Posts: 173
Joined: Fri May 19, 2006 10:53 am

Post by prasad111 »

How, that is my original question?

I tried to use couple of commands, but not succesfull.
COPY '//PURGE.SETTINGS' TO RT_LOGnnn
WRITE RT_LOGnnn
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

If it's in VOCLIB, then

Code: Select all

COPY FROM VOCLIB TO RT_LOGnnn '//PURGE.SETTINGS'
It it's not in VOCLIB but is in another job log, then

Code: Select all

COPY FROM RT_LOGkkk TO RT_LOGnnn '//PURGE.SETTINGS'
Note that neither of these is SQL, so there is no terminating semi-colon.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply