[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

RE: [sqr-users] Using UNIX command thru SQR



First, use the  call system command from within SQR to issue the UNIX
command that will execute the ls -lts command.  Re-direct the output into a
text file on the file system.  Then from within SQR open the text file and
read the first 2 records which will contain the latest 2 files in the
directory.  You will probably have to parse the file since it will contain a
lot of extra information that you probably don't need. 


Paul Hoyte 
(248) 752-6970 Cell 
(586) 421-9640 Fax 
pa_hoyte@si-proservices.com (Email) 
www.sharidionne.com (Web Site) 


-----Original Message-----
From: sqr-users-bounces+pi_hoyte=si-proservices.com@sqrug.org
[mailto:sqr-users-bounces+pi_hoyte=si-proservices.com@sqrug.org] On Behalf
Of yamuna_pandiyan@freddiemac.com
Sent: Friday, March 25, 2005 3:50 PM
To: sqr-users@sqrug.org
Subject: [sqr-users] Using UNIX command thru SQR 



I am using a program which needs to compare the current data with the
previous data file. the data files are created with date and time stamp.
This program runs once a week, and has to compare the previous weeks data
file to monitor the data changes.

I want to read the most recent data file created in the data directory into
the SQR program.

I use the following command on the Unix box to sort the most recent file

  >  ls -lts <filename>

I need some help with the code to read the most recent file from the data
directory into the SQR program .


Thanks,
Yamuna
918-5127


_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users


_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users