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

Re: -F Flag question



Being somewhat curious myself, I thought I'd look this up in my SQR3 Workbench manual.

Multiple reports are created as declared in the DECLARE-REPORT section.  All reports will have the same filename, with file extensions being .LIS, ..L01, .L02, etc. in the order they are declared.  The filename will be the name of the SQR program unless -F is invoked to change that filename.

The report name cited in each DECLARE-REPORT is used internally to select the specific report, using USE-REPORT.  What I'm not sure about, but it seems to be the case, is that USE-REPORT causes subsequent output from PRINT statements to be appended to (as opposed to overwriting) existing file contents.  This would allow the programmer to have several reports open and switch output feeds to each as appropriate.

Reference command discussions on DECLARE-REPORT, USE-REPORT and the section "Writing Applications to Create Multiple Reports" (p.94 in the SQR3 book).

Ken, you wouldn't use multiple -F flags; each one issued would override the previous one.  Just declare the reports you need, understanding that all will have the same name with file extensions differing.  Check with Brian if you have further questions; he's experienced in doing this.

Parijat, the only way I know to rename a file would be in using the CALL...USING function, such as 
   Let $file1 = 'report.lis'
   Let $file2 = 'newname.txt'
   Let $cmd = ''cmd.exe \C rename ' || $file1 || ' ' || $file2
   CALL SYSTEM USING $cmd #dos_status
   show 'Renamed ' $file1 ' to ' $file2 ', status=' #dos_status

You're welcome,
Bob

>>> Parijat Sahai <parijatsahai@HOTMAIL.COM> 01/04 6:25 PM >>>
In my case, platform is Win95, Database SQL Server 6.5.

I'm also interested in the solution to Kara's question. I have another
query though. Is there a way to specify the name of output report
(multiple reports, in fact) file during run-time, in the program itself?
I wish to name my reports like YYYYMMDD.SUM, YYYYMMDD.DTL depending on a
date calculated in the program itself.

TIA,
Parijat.

>
>January 4, 1999 5:15 PM
>Platform: UNIX AIX
>Database: Oracle
>
>Question:  I know that I can override the name that SQR or the program
>assigns to a report file by specifying the -F flag, but what if the
report
>produces multiple outputs?  Would I use multiple -F flags with the name
for
>each output file specified?  If so, do I put them in sequential order?
>
>Thanks.
>


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com