Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you export CMS CLINT results to a file? 1

Status
Not open for further replies.

Daurkin

Programmer
Oct 29, 2002
28
US
After reading some very helpful postings about "clint" and getting a telnet session to the CMS server. I'm at the point that I can refresh data on the screen and just let it keep cycling repeatedly. I'm trying to find what others are using to get that data from the CMS server to my Windows 2000 webserver.

Looking at the additional commands you can give to clint, I didn't see anything that looks like it exports to a file. And if it did, how could it be automated to update my webserver?
 
I use a Visual Basic telnet control I purchased from Dart ( for this purpose. I have a VB program that "scrapes" the telnet buffer.
 
you can find another way in the last response in the "CMS GURU needed" forum ...

mcccxi.
 
Folks,
Just been looking at these threads so as to get clint running on a regular interval.

The way that I approached it was to use crontab to execute a shell script that did the following;

1) Calculate the time and date the report should be run for.
2) Run clint and piping the results to a text file
for example;

/cms/toolsbin/clint -u USER <<-EOL >>myoutputfile.txt
do menu 0 &quot;Custom Reports:Historical:mycustomreport&quot;
set menu 2 &quot;$reportDate&quot;
set menu 3 &quot;$reportTime&quot;
&quot;run&quot;
EOL

3) Then as I needed this on a Windows box, I just had the shell script FTP this to a directory as follows:

for fileToSend in `ls *.txt`
do
ftp -n myserver <<-EOL >> ftp.log
user &quot;ftpusername&quot; &quot;ftppassword&quot;
prompt
verbose
put &quot;$fileToSend&quot;
bye
EOL
done

Obviously there is more stuff here about getting the right date and time and the like but none of that is any big drama as well as writing the custom report and getting the field numbers correct.

If you want some additional help getting this sort of thing done, email me rupert @ ihug . co . nz

Cheers
Rupert
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top