Focal Point
[SOLVED] (FOC340) DIALOGUE MANAGER -WRITE FILE NOT ALLOCATED OR FILEDEF'ED: -WRITE

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4977074196

August 14, 2019, 11:34 AM
iBeny
[SOLVED] (FOC340) DIALOGUE MANAGER -WRITE FILE NOT ALLOCATED OR FILEDEF'ED: -WRITE
Hi All,

I have recently set up WF8105 where the code is being migrated from 8008 which is not working.
Question is directed to Francis since this piece was written by him Big Grin

Below is an Echo of the piece of code,
-DEFAULTH &P_APPLICATION_ID = 'FOC_NONE';
-DEFAULTH &P_PAGE_ID = 'performance';
-SET &P_PAGE_ID = TRUNCATE(custom2);
-SET &OUTAPP = '\\' || dviappvmwebf001 || '\ibi\apps\DD';
-*-SET &P_TRACE = 'SQL_ON';
-*-SET &P_TRACE = 'OFF';
-*-SET &I_DEF_BUS_DTE = 'N';
-*-SET &I_DEF_FUNC = 'N';
-*-INCLUDE common/common_settings.fex
SET HOLDLIST=PRINTONLY
-RUN
APP MAP outapp \\dviappvmwebf001\ibi\apps\DD
-RUN
FILEDEF HFILE DISK outapp/portal_links_custom2.htm
-RUN
-* Set up HTML header area -------------------------------------------------------------------------
-WRITE HFILE < !DOCTYPE html>
0 ERROR AT OR NEAR LINE 100 IN PROCEDURE util_rpt_herbi_links_create_page
(FOC340) DIALOGUE MANAGER -WRITE FILE NOT ALLOCATED OR FILEDEF'ED: -WRITE HFILE < !DOCTYPE html>

It seems like the Filedef is not working and not letting me -WRITE to the .htm file i am trying to write to.

I checked the folder permissions and even the anonymous user has full control over the folder 'DD' under ibi\apps.

Can you please advise what permissions should i check or is it a result of 'Code Tightening'.

Any ideas to use here, i tried fildef'ing a text file and write to it, gives the same error.

This message has been edited. Last edited by: iBeny,


Webfocus 8105,8808,7703,7611, EXL2K,HTML,PDF,COMT,AHTML Info Assist+ , Reportcaster
August 14, 2019, 11:46 AM
Tony A
Try
FILEDEF HFILE DISK \\dviappvmwebf001\ibi\apps\DD\portal_links_custom2.htm


The syntax that you are using would have been for the older (now deprecated) syntax of APP FI.

For FILEDEF you need to use the full path - link to documentation

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 
August 14, 2019, 03:46 PM
iBeny
quote:
FILEDEF HFILE DISK \\dviappvmwebf001\ibi\apps\DD\portal_links_custom2.htm


Still The same, I did try with the complete UNC Path before i tried this.

-DEFAULTH &P_APPLICATION_ID = 'FOC_NONE';
-DEFAULTH &P_PAGE_ID = 'performance';
-SET &P_PAGE_ID = TRUNCATE(custom2);
-SET &OUTAPP = '\\' || dviappvmwebf001 || '\ibi\apps\DD';
-*-SET &P_TRACE = 'SQL_ON';
-*-SET &P_TRACE = 'OFF';
-*-SET &I_DEF_BUS_DTE = 'N';
-*-SET &I_DEF_FUNC = 'N';
-*-INCLUDE common/common_settings.fex
SET HOLDLIST=PRINTONLY
-RUN
-*APP MAP outapp &OUTAPP
-*-RUN
-*FILEDEF HFILE DISK outapp/portal_links_&P_PAGE_ID...htm
FILEDEF HFILE DISK \\dviappvmwebf001\ibi\apps\DD\custom2.htm
-RUN
-* Set up HTML header area -------------------------------------------------------------------------
-WRITE HFILE < !DOCTYPE html>
0 ERROR AT OR NEAR LINE 101 IN PROCEDURE util_rpt_herbi_links_create_page
(FOC340) DIALOGUE MANAGER -WRITE FILE NOT ALLOCATED OR FILEDEF'ED: -WRITE HFILE < !DOCTYPE html>


Webfocus 8105,8808,7703,7611, EXL2K,HTML,PDF,COMT,AHTML Info Assist+ , Reportcaster
August 14, 2019, 04:35 PM
Waz
quote:
I checked the folder permissions and even the anonymous user has full control over the folder 'DD' under ibi\apps


Did you verify that the user running on the reporting server has access?

Can you do a directory listing or list the contents of the file ?

APP QUERY OUTAPP

Check FILEDEF with ? FILEDEF


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

August 15, 2019, 10:26 AM
iBeny
Hi Waz,

User running on Reporting server means the user logon used to start the WebFOCUS Server 81 service under (Services)?


Webfocus 8105,8808,7703,7611, EXL2K,HTML,PDF,COMT,AHTML Info Assist+ , Reportcaster
August 15, 2019, 11:11 AM
Fernando
quote:
FILEDEF HFILE DISK \\dviappvmwebf001\ibi\apps\DD\custom2.htm


If I remember correctly DD was a share and dviappvmwebf001 was changed to dviappvmwebf02. My suggestion would be to try writing to an area that you absolutely know exists and have permissions to.

Fernando


Prod WF 8.1.04, QA WF 8.2.03, Dev WF 8.2.03
August 15, 2019, 01:41 PM
iBeny
APP QUERY is returning me the list of files, including the file i am trying to WRITE, Seems like some issue with FILEDEF.

Any Thoughts?

APP QUERY returned:
11/07/2019 13.21.54 2653 F portal_links_custom.htm
11/07/2019 13.21.54 6708 F portal_links_custom1.htm
11/07/2019 13.21.54 4757 F portal_links_custom1_hrb3.htm
11/07/2019 13.21.54 6261 F portal_links_custom2.htm


Webfocus 8105,8808,7703,7611, EXL2K,HTML,PDF,COMT,AHTML Info Assist+ , Reportcaster
August 15, 2019, 02:07 PM
iBeny
? FILEDEF returns below, which is the file i want to write on.

Makes me wonder why am i not able to write on the file.

Lname Device Lrecl Recfm Append Filename
============================================================
HFILE DISK 0 V \\dviappvmwebf001\ibi\apps\DD\
portal_links_custom2.htm


Webfocus 8105,8808,7703,7611, EXL2K,HTML,PDF,COMT,AHTML Info Assist+ , Reportcaster
August 15, 2019, 02:32 PM
iBeny
It seems like the Webfocus server was running using local system account which was not letting the program write the allocated FILEDEF'ed html.
I was able to write it when i restarted the server with Admin Service accounts.


Webfocus 8105,8808,7703,7611, EXL2K,HTML,PDF,COMT,AHTML Info Assist+ , Reportcaster