Page 1 of 1

Need to revoke job level auto pourge for multiple jobs at 1s

Posted: Thu Jun 04, 2015 8:06 am
by vintipa
Hi Experts,

I can see the below code used in a IBM utility which when setup at the administrator console, we can set job level auto purge for all the jobs in a project at once.

" WRITE DRSET:@FM:DAYS:@FM:RUNS ON LOGFILE,"//PURGE.SETTINGS" ELSE STOP 'WRITE ERROR'"
Can anybody know more about this code? I want to modify this code so that I can revoke all the job level auto purge at once using this code.

Anybody makes any sense of this code?

Thanks in advance!

Posted: Thu Jun 04, 2015 9:05 am
by chulett
Moved you to the appropriate forum, no clue why this ended up in the 'Enhancement Wish List' forum. Unless you were just making a wish. :wink:

Posted: Thu Jun 04, 2015 12:51 pm
by chulett
Search is your friend, found around 30 other posts on this topic or a variation thereof. For example, this should help:

viewtopic.php?t=106690

Posted: Thu Jun 04, 2015 5:28 pm
by ray.wurlod
The code snippet you posted changes the purge settings for one job's log file only. To change all jobs you would need to run the same code against every job's log.

Posted: Mon Jun 08, 2015 10:11 am
by vintipa
Yes Ray,

Exactly, this code changes the auto purge setting of the job. So my query here is
1) I want to understant what this code is.. is it c++ of what?
2) I want to know how can I change this code so that the new code when run on a perticular job, removes the joblevel auto purge and hence project level auto purge becomes active.

In short I want the meaning and use of DRSET, @FM PURGE.SETTING etc.
Please can you help me disect this kind of code so that I can try simple coding myself as mentioned earlier?

Posted: Mon Jun 08, 2015 11:07 am
by chulett
It's BASIC.

Did you SEARCH? Check the link I posted? Or are we just waiting for Ray to come back and save the day?

Posted: Mon Jun 08, 2015 5:58 pm
by ray.wurlod
DRSET is a variable that, presumably, had its value set earlier in your routine.

@FM is a system variable that contains the value of "field mark", the top-level field delimiter in records in hashed files (the local job logs are hashed files).

"//PURGE.SETTINGS" is the record ID of the record in the job log that contains the purge settings.

Why not consult the DataStage BASIC manual or, if you want a learning experience, check out the "Programming with DataStage BASIC" DVD available from the DSXchange Learning Center (www.dsxchange.net)?

Posted: Mon Jun 08, 2015 6:03 pm
by ray.wurlod
I can also ship DSXchange Learning Center DVDs. The price is the same whether shipped from USA or Australia. Postage is included.

Posted: Tue Jun 09, 2015 4:35 am
by vintipa
Thanks Ray for your help. I will see how it goes.

Hi Craig, yes I am trying out SEARCH aswell, but info is quit random hence will take time for me to make a good sense of this information.