[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: directories
We put the file name into a variable. It seems to
work fine here.
Here's the code.
Also, you may want to check your write permissions in
the directory you are trying to access.
let $NTpath = 's:\fs700\cscReports\
let $filename1 = rtrim( $NTpath, ' ')||'p'
||$RptGrp || $CustID || '.'|| $out_yy || $out_mm ||
$out_dd ||'s.txt'
open $filename1 as 1 for-writing record=132:vary
status=#filestat1
show 'open file' $RptFilename1
if #filestat1 <> 0
show 'Error opening file: ' $filename1
show 'Status = ' #filestat1
end-if
-Cathlin DeRosa
---Randle Boyd wrote:
>
> Hello,
>
> We have SQR (and Maximo) and our SQRs and SQTs on a
server that we'll
> call server 1. We would like to use a flat file
that is on another
> server, that we'll call server 2. We would like to
use the flat file
> from server 2 as input for an SQT on server 1, then
have the resulting
> .LIS and .SPF files created on server 2. By the
way, we're using WIN
> NT, and SQR v3.0, and all the servers are mapped as
local drives.
>
> Anyway, I cannot get the open command to open a
file that is not in the
> same directory as the .SQRs/.SQTs. The OPEN
command works fine when I
> first move the flat file to the same directory as
the SQRs/SQTs. Here
> is the command I am using:
>
> open
'r:\powerbuilder\prod\maint\pilotworkorder\data\wrkorder.txt'
as 10
> for-reading record=6
>
> then I check the status. This version returned '-1'.
>
> Thinking that the long path names may be to blame,
I used sqrmate to
> browse and get the 8.3 file names. So, I tried this:
> open
'r:\power~1\prod\maint\pilotwo~1\data\wrkorder.txt'
as 10
> for-reading record=6
>
> This time I got an error - SQR 3501 'Didn't find
end of literal'. I
> suppose that SQR does not like the '~' character?
>
> I am having similar problems with the exists()
function, and when
> attempting to place the .LIS and .SPF files into a
different directory
> using the -F flag on the command line.
>
> Can anyone tell me what I may be doing wrong?
>
> TIA,
> Randle
> Ruan Transportation
> (515)245-2493
>
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com