[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Reading Multiple Files and Renaming Input File
- Subject: Reading Multiple Files and Renaming Input File
- From: Aaron Chang <Aaron.Chang@ANU.EDU.AU>
- Date: Thu, 22 Jul 1999 09:03:30 +1000
Hi all
I'm new to SQR and have been asked to perform
the following task for an interface.
I've written an SQR to read information from a
flat file. However, the input file name will change daily - based on a prefix of
the program name and a time stamp (ie. NAME_CCYYMMDD_HHMMSS.dat). In addition
after reading the input files, the SQR program is required to rename the suffix
of the input file from 'dat' to 'pro'.
Because of the daily name change there is the
possibility that the SQR will need to read from multiple files with the prefix
'NAME_' to pick up the correct file and suffix 'dat' to ensure that the same
file is not read twice.
Does anyone know of a way to loop the SQR until
it has read all files prefixed by "NAME_" and suffixed by 'dat'. Also,
a way to rename the input file dynamically from the SQR program (ie. rename the
suffix of the input file from 'dat' to 'pro'). I've been told that there is a
way to execute DOS command from SQR to rename the input file but I'm unsure of
the syntax.
If anyone can help, it would be greatly
appreciated.
thanx
aaron