Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a complex app which does the qvd creation. This app generates qvds that will be used to load other apps. The script has numerous pre-calculations so that the qvd will have precalculated dimensions and these can be used in other apps.
The biggest challenge is we are on an oudated HW and has to live with that for some time.
The qvd creation take 12-18 hrs .
What I am trying to do is create a custom status report(txt) and keep apending it.
Is there any way to create/update an existing file using the QVW load script?
ex.
2012-12-10 08:00:00 AM: Load process started
2012-12-10 08:01:00 AM: Order QVD creation started
2012-12-10 08:30:00 AM: Order QVD creation completed
2012-12-10 08:40:00 AM: YTD BIN calc started
2012-12-10 10:40:00 AM: YTD BIN calc finished
2012-12-10 10:45:00 AM: Wrote YTD BIN table to QVD
.
.
.
.
.
and so on
Thanks,
Aji Paul.
Hi Aji,
Yes, it does indeed need the log file. There is no other option in QlikView to write a custom logfile.
Hope that helps.
Miguel
P.S.: Well, that's not actually true. You do can store whatever you want in a custom ("log") file by using the autogenerated load, it seems quite cumbersome to me, but anyway:
Customers:
LOAD *
FROM Customers;
Log:
LOAD Time,
Action
FROM PersonalLogFile.txt (txt);
CONCATENATE (Log) LOAD Timestamp(Now()) AS Time,
'Customers table loaded' AS Action
AUTOGENERATE 1;
STORE Log INTO PersonalLogFile.txt (txt);
DROP TABLE Log;
Invoices:
LOAD *
FROM Invoices;
Log:
LOAD Time,
Action
FROM PersonalLogFile.txt (txt);
CONCATENATE (Log) LOAD Timestamp(Now()) AS Time,
'Invoices table loaded' AS Action
AUTOGENERATE 1;
STORE Log INTO PersonalLogFile.txt (txt);
DROP TABLE Log;
// and so on
Is the log file that's created when you check the Generate Logfile option on the General tab of the properties screen insufficient?
store * from tabella into share\file.txt(txt,delimiter';')
Thanks Gysbert!
Not really I need a specific custom file. I will be use this to report status and eventually wanted to use it for automated system monitoring & performance tuning
Marco,
Thanks for the reply
I am not looking to store the table , rather write custom log file after each user defined step is completed
Thanks,
Aji paul
Hi,
Then use the TRACE keyword in the script after each instruction. That will write in the script whatever you want, for example:
IF vDate > Today() THEN
TRACE Timestamp(Now()) & 'Entered IF';
ELSE
TRACE Timestamp(Now()) & 'ELSE';
END IF
LOAD *
FROM Customers;
TRACE Timestamp(Now()) & 'Customers loaded';
You can use any function or variable along with the TRACE keyword.
Hope that helps.
Miguel
Thanks Miguel!
But TRACE writes to the log file , right?
Hi Aji,
Yes, it does indeed need the log file. There is no other option in QlikView to write a custom logfile.
Hope that helps.
Miguel
P.S.: Well, that's not actually true. You do can store whatever you want in a custom ("log") file by using the autogenerated load, it seems quite cumbersome to me, but anyway:
Customers:
LOAD *
FROM Customers;
Log:
LOAD Time,
Action
FROM PersonalLogFile.txt (txt);
CONCATENATE (Log) LOAD Timestamp(Now()) AS Time,
'Customers table loaded' AS Action
AUTOGENERATE 1;
STORE Log INTO PersonalLogFile.txt (txt);
DROP TABLE Log;
Invoices:
LOAD *
FROM Invoices;
Log:
LOAD Time,
Action
FROM PersonalLogFile.txt (txt);
CONCATENATE (Log) LOAD Timestamp(Now()) AS Time,
'Invoices table loaded' AS Action
AUTOGENERATE 1;
STORE Log INTO PersonalLogFile.txt (txt);
DROP TABLE Log;
// and so on
Thanks Miguel,
So I think the options I have are
Thanks,
Aji Paul.
Sorry Aji Paul,
I was editing the post while you were replying to it. Check the ammended post.
Yes, you can prepend those lines then use a QVW to read only lines that match that CUSTOM_LOG stamp. And likely VBScript, although my skills go no further...
Miguel