[SOLVED] Default Directory when you go into WebFOCUS
Just want to know how you can avoid the message "The system cannot find the file specified" when you go into WebFOCUS, change directory from the default:- D:\ibi\srv81\wfs\edatemp\ts00001 To : D:\DEV\daltoni\temp (say) Then do a report that creates an OFFLINE.FTM file and attempt to copy it as follows:-
-SET &ECHO=ALL; -RUN DIR -RUN
CD / -RUN CD D:\daltoni\temp -RUN
DIR -RUN
OFFLINE TABLE FILE CAR PRINT CAR END OFFLINE CLOSE -RUN
COPY OFFLINE.FTM D:\daltoni\temp -RUN -EXIT
How do you revert to the original D:\ibi\srv81\edatemp\ts00001 directory ?
By the way here's the echo output…… -RUN DIR -RUN Volume in drive D has no label. Volume Serial Number is 00D6-BFDC Directory of D:\ibi\srv81\wfs\edatemp\ts000001 16/04/2019 16:28 . 16/04/2019 16:28 .. 16/04/2019 16:27 0 stderr.log 16/04/2019 16:27 0 stdout.log 16/04/2019 16:28 0 sysh_4960.tmp 3 File(s) 0 bytes 2 Dir(s) 70,688,927,744 bytes free CD / -RUN D:\ CD D:\DEV\daltoni\temp -RUN D:\DEV\daltoni\temp DIR -RUN Volume in drive D has no label. Volume Serial Number is 00D6-BFDC Directory of D:\DEV\daltoni\temp 16/04/2019 16:10 . 16/04/2019 16:10 .. 0 File(s) 0 bytes 2 Dir(s) 70,688,927,744 bytes free SET TEMPERASE=OFF OFFLINE TABLE FILE CAR PRINT CAR END OFFLINE CLOSE -RUN 0 NUMBER OF RECORDS IN TABLE= 10 LINES= 10 0 OFFLINE... COPY OFFLINE.FTM D:\DEV\daltoni\temp <== this copy statement expects OFFLINE.FTM to be in D:\DEV\daltoni\temp -RUN The system cannot find the file specified. <== the file is actually in D:\ibi\srv81\wfs\edatemp\ts000001 -EXITThis message has been edited. Last edited by: FP Mod Chuck,
_______________________ *** WebFOCUS 8.1.05M ***
April 16, 2019, 02:09 PM
BabakNYC
Could you explain the use case that requires all of this?
WebFOCUS 8206, Unix, Windows
April 17, 2019, 08:32 AM
Ian Dalton
The reason I need to do this is that one of our older applications uses OFFLINE, followed by a report, then OFFLINE CLOSE followed by a COPY of the OFFLINE.FTM file to somewhere safe. The OFFLINE.FTM file is held temporarily in \ibi\srv81\wfs\edatemp\ts00001 (or similar). If however you introduce DOS CD statements to alter the current directory prior to running the report to something else, the OFLINE.FTM file still goes to the \ibi\srv81\wfs\edatemp\ts00001 directory, but the COPY statement fails because the the new active directory has been changed. It also points to the new directory for the duration of the session. I hope this explains things.
_______________________ *** WebFOCUS 8.1.05M ***
April 17, 2019, 09:26 AM
Tony A
quote:
OFFLINE
Hi Ian,
As mentioned to you, using OFFLINE is archaic (most recent members will probably say "what?") and should now be changed to use more "modern" forms of coding.
Try using ON TABLE HOLD AS …… FORMAT …. to use direct control over your output. Even using FILEDEF as required.
Continuing to use OFFLINE will only lead to issues later "down the line".
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
April 17, 2019, 09:34 AM
Ian Dalton
Thanks Tony - realise OFFLINE is 'archiac' but we are stuck with it short of changing all reports programs (100+) to a 'newer' approach.
_______________________ *** WebFOCUS 8.1.05M ***
April 17, 2019, 10:36 AM
Tony A
… then I would suggest using a capture of the EDATEMP location into a variable and using that to prefix the file that you want to copy.
Capturing this value has been covered a few times, but is essentially -