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

Re: directory path for file



Pam,
I just reviewed the routines.  They are designed for files not reports.  The -f 
flag is probably your only option but in all honesty, I think this is struictly 
procedural.
Sam

>>> PLantzy@UAMAIL.ALBANY.EDU 10/24/00 20:22 PM >>>
I need a solution for both NT and UNIX.


-----Original Message-----
From: Sam Spritzer [mailto:sspritzer@GW.CTG.COM]
Sent: Tuesday, October 24, 2000 4:32 PM
To: SQR-USERS@LIST.IEX.NET
Subject: Re: directory path for file


Pam,
Before I send you the solution, are you on NT or UNIX?  My solution works on
NT only.
Sam

>>> PLantzy@UAMAIL.ALBANY.EDU 10/24/00 15:55 PM >>>
There are times when the $sqr-report does not contain the directory path.
It writes the file based on the -f flag or in the working directory.

Is there a way I can read the -f flag during execution or figure out the
working directory?




-----Original Message-----
From:   John Milardovic [mailto:milardj@SX.COM]
Sent:   Tuesday, October 24, 2000 3:35 PM
To:     SQR-USERS@LIST.IEX.NET
Subject:        Re: directory path for file

Just use the built in $sqr-report var and pull out the directory info:

For windows:
   let #pos = instr(edit($sqr-report,'R'),'\',1)
   let $dir = substr($sqr-report,1,length($sqr-report) - #pos)
   show $dir

For unix replace the '\' delimiter with '/'.

No idea if it will work for other platforms.

HTH
John Milardovic

> -----Original Message-----
> From: Pamela Lantzy [SMTP:PLantzy@UAMAIL.ALBANY.EDU]
> Sent: Tuesday, October 24, 2000 2:33 PM
> To:   SQR-USERS@list.iex.net
> Subject:      Re: directory path for file
>
> Sam,
>
> Could you share that with me?
>
> Thanks
> Pam
>  -----Original Message-----
> From:   Sam Spritzer [mailto:sspritzer@GW.CTG.COM]
> Sent:   Tuesday, October 24,2000 2:26 PM
> To:     SQR-USERS@LIST.IEX.NET
> Subject:        Re: directory path for file
>
> Pam,
> I am not sure if this is a valid alternative for you but I had a similiar
> situation so what I did was create a control.sqc that defined file
> directory.  This way, I knew where it has to go.
> Sam
>
> >>> PLantzy@UAMAIL.ALBANY.EDU 10/24/00 14:17 PM >>>
> Hi,
>
> Is there a way to determine what directory a file is being written to?
> As the report is bing written to a file I know the filename by the
> variable
> $sqr-report.  The report could be written to either the working directory
> or
> the directory specified in the -f flag.
>
> I need to have the location of the file as well as the filename.
>
> Any suggestions?
>
> Thanks Pam