Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all.
I do a loop in my script and I would like to avoid to log all the loops in the log file. If I have 1000 loops, the final log file is about 20 MB, which is huge when the application is launched many times per day.
So it is possible to activate a stop-log option and deactivate it at a point of the script ?
If not, how can I achieve it ? Moving this part of the script in an hidden script ?
Thanks all.
Yes, it appears you can declare a subroutine in the hidden script and call it from the main load and it won't log it - useful to know.
eg.
Hidden script ...
sub HiddenLog
let tablename= 'HiddenDataLoad' & floor(rand()*1000);
$(tablename):
load hiddenFld as $(tablename) inline [
hiddenFld
1
2
3
4
5
6
7
8
9];
end sub
... logs as ...
25/01/2013 09:08:09: | Joining/Keeping |
25/01/2013 09:08:09: 0055 Call HiddenLog
25/01/2013 09:08:09: 0056 Call HiddenLog
25/01/2013 09:08:09: 0057 Call HiddenLog
25/01/2013 09:08:09: 0059 MoreData:
flipside
Yes, it appears you can declare a subroutine in the hidden script and call it from the main load and it won't log it - useful to know.
eg.
Hidden script ...
sub HiddenLog
let tablename= 'HiddenDataLoad' & floor(rand()*1000);
$(tablename):
load hiddenFld as $(tablename) inline [
hiddenFld
1
2
3
4
5
6
7
8
9];
end sub
... logs as ...
25/01/2013 09:08:09: | Joining/Keeping |
25/01/2013 09:08:09: 0055 Call HiddenLog
25/01/2013 09:08:09: 0056 Call HiddenLog
25/01/2013 09:08:09: 0057 Call HiddenLog
25/01/2013 09:08:09: 0059 MoreData:
flipside
Thanks it works as expected. I would prefer a flag to activate / deactivate but at least it's a good workaround.
Thanks