Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

where's my offline file?

Status
Not open for further replies.

PeterG5

Programmer
Apr 29, 2003
68
0
0
IE
simple program.....
FILEDEF OFFLINE DISK C:\OFFLINE.TXT
OFFLINE
TABLE FILE BLAH
PRINT *
END
ONLINE
FILEDEF OFFLINE PRINTER
I would expect this to put the report output in the file
OFFLINE.TXT What happens is that the report goes to the file, the file is printed and then erased. I want to keep the offline file for later interrogation. I've used this facility under VM/CMS but am I missing something in Webfocus 4.3.1 in W/2000? Many thanks for any help. Peter.
 
are you trying to hold it offline on a drive on the Reporting Server? Or, are you trying to hold it offline on your local PC?
 
Hi Tdigs,

I'm hoping to hold the file on my local pc but what's happening is in apparent conflict with the documentation and certainly at odds with my previous experience on the VM platform. Thanks for your interest and any assistance would be much appreciated. Regards, Peter.
 
Peter,

What you're doing should be fine. Just remember to CLOSE the OFFLINE file with OFFLINE CLOSE, before reallocating it, just like you'd do on VM.
 
Hi again Focwizard,
I've tried your suggestion but to no avail.....
the program reads.....
FILEDEF OFFLINE DISK C:\IBI\PGFTEMP\TEST.TXT
-RUN
OFFLINE
-RUN
TABLE FILE CONTYPES
PRINT *
IF RECORDLIMIT EQ 10
END
-RUN
OFFLINE CLOSE
-RUN
FILEDEF OFFLINE PRINTER
-RUN
ONLINE
-RUN
-EXIT
THIS IS THE CONSOLE OUTPUT.....
EX TEST
0 NUMBER OF RECORDS IN TABLE= 10 LINES= 10

0 OFFLINE...
I get the same result, i.e. a print message flicks on the screen, the report appears on the printer and there's no sign of the TEST.TXT file anywhere.....
Peter.
 
Peter,

I ran virtually your code (changed directory and filename), as follows:

FILEDEF OFFLINE DISK C:\WORK\TEST.TXT
-RUN
OFFLINE
-RUN
TABLE FILE CAR
PRINT COUNTRY
IF RECORDLIMIT EQ 10
END
-RUN
OFFLINE CLOSE
-RUN
FILEDEF OFFLINE PRINTER
-RUN
ONLINE
-RUN
-EXIT

When I went to the server, I found the file TEST.TXT in my c:\WORK directory, with the following:

1 PAGE 1


COUNTRY
-------
ENGLAND
JAPAN
ITALY
W GERMANY
FRANCE

So, it SHOULD work. Can you add a '? FILEDEF' just before the TABLE, to see what that shows?
 
Hi Focwizard,
I had done that previously and all looked OK.
Here it is.....

FILEDEF OFFLINE DISK C:\IBI\PGFTEMP\TEST.TXT
? FILEDEF
Lname Device Lrecl Recfm Append Expl Filename
=================================================
DB2LOG DISK 0 V Y Y C:\IBI\PGFTEMP\DB2FOCUS.LOG
CMSCAL DISK 32 V N Y C:\IBI\PGFTEMP\cmscal.ftm
HOLDMAST DISK 0 V N Y C:\IBI\PGFTEMP\holdmast.mas
OFFLINE DISK 0 V N Y C:\IBI\PGFTEMP\TEST.TXT
OFFLINE
TABLE FILE CAR
PRINT *
IF RECORDLIMIT EQ 10
END
(FOC757) WARNING. YOU REQUESTED PRINT * OR COUNT * FOR A MULTIPATH FILE
0 NUMBER OF RECORDS IN TABLE= 10 LINES= 10

0 OFFLINE...

same result as before....file prints and disappears.....
could it be some Windows setting which overrides offline and prints directly?
Peter.
 
I didn't get that far.
The console output shown was reflecting what I typed in - one line at a time. As soon as the table request finished, the file printed, before the 'offline close' was entered.
When I ran this sequence from a fex, including the 'offline close' statement, the result was the same, i.e.

FILEDEF OFFLINE DISK C:\IBI\PGFTEMP\TEST.TXT
-RUN
OFFLINE
-RUN
TABLE FILE CAR
PRINT COUNTRY
IF RECORDLIMIT EQ 10
END
-RUN
OFFLINE CLOSE
-RUN
FILEDEF OFFLINE PRINTER
-RUN
ONLINE
-RUN
-EXIT
 
Try issuing an OFFLINE CLOSE, BEFORE you issue the initial FILEDEF for OFFLINE (maybe it's already open).
 
FocWizard, you stated after you changed the path that "When I went to the server, I found the file TEST.TXT in my c:\WORK directory, with the following" ----

I may be wrong here, but you seem to be missing Peter's issue - he is trying to hold it locally NOT on the server. In your scenario, Focwizard, you redirected the held file to another drive on the Server, not your local client PC.

If I understand you correctly peter, then you are trying to save it locally - in which case, the only way I have found it to work is do a "ON TABLE PCHOLD FORMAT PDF(or whatever)" which will launch the report to your client, but then you will have to manually save the file to your PC through the save mechanisme of the adobe acrobat, or word, excel, etc. - I have yet to be able to do this in a batch scenario. However, Focwizard's scenario works well on the server side - and i'm willing to bet that if you look on your server those files are held somewhere on your server's C: drive, assuming you have write permissions there.

good luck.

Sorry if i'm interpreting your problem wrong.

 
1. Focwizard - I did issue the offline close before the filedef.....

2. Tdigs -Hi,

Thanks for your timely intervention.
Yes, I an trying to save the file to my local C:\ drive.
I'm not working in a server scenario and am running WebFocus431 on my own pc only. As with other issues, I've
now been able to devise a workaround. I hold the output as format wp, which has the same effect as holding a report offline and then I can stick several of these files together afterwards using the DOS copy command. The beauty of the old offline system, as I used to use it in VM, was that once you opened the offline file, it stayed open for all subsequent output - from any number of fex's - until the 'offline close' was issued later. This meant that you could, for example, run series of reports overnight and check just one file to see all the results. C'est la vie.
Thanks again. Peter.
 
Peter,

If HOLD FORMAT WP works, then use that (if it ain't broke, don't fix it). However, I'd like to know WHY OFFLINE isn't working for you, yet works for me. Since your server is on your local machine, and HOLD FORMAT WP works, OFFLINE should, as well.

Also, issue the 'OFFLINE CLOSE' AFTER your requests, to close the OFFLINE file, so it can be re-directed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top