Focal Point
[Solved][Case opened] NOCLOSE: different behavior in WF 8.2

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

May 29, 2017, 07:57 AM
Danny-SRL
[Solved][Case opened] NOCLOSE: different behavior in WF 8.2
The NOCLOSE option on a -WRITE dialog manager command used keep the file open until either a -CLOSE command was encountered or the session terminated.
However, in 8.2, it is at the end of the procedure in which the -WRITE is used that the file is closed.
See the following example:

wt.fex
  
-*WT
FILEDEF WT DISK WT.FEX
-RUN
EX WT1
-RUN
EX WT2
-RUN
-CLOSE WT
-RUN
!TYPE WT.FEX

wt1.fex
  
-* WT1
-WRITE WT NOCLOSE WT1

wt2.fex
  
-* WT2
-WRITE WT NOCLOSE WT2


The output in 8.2 is
WT2

In 8.1 it was
WT1
WT2

This message has been edited. Last edited by: Danny-SRL,


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

May 30, 2017, 08:36 AM
BabakNYC
According to a 7.x to 8.x compatibility case I saw in the support site:

The FILEDEF must have the parameter (APPEND, to allow all the info to be
appended to the file.

FILEDEF DIAT_FILE DISK C:\test.txt (APPEND

Not sure if this might be applicable to you since this is an 8.1 to 8.2 issue.


WebFOCUS 8206, Unix, Windows
May 30, 2017, 08:55 AM
jgelona
Try using -INCLUDE instead of EX. They are not processed the same way.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
May 31, 2017, 12:58 PM
Danny-SRL
Babak,
Not necessary with NOCLOSE.
The whole idea with NOCLOSE is just that: the file stays open!

John,
Changing to -INCLUDE is not an option: customers have been using EX.

A case has been opened.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

June 01, 2017, 10:12 AM
jgelona
Danny, I think the problem is you are a victim of code tightening. When using the EX procname, procname must be a fully executable procedure and in your example it isn't, now if you add a FILEDEF for WT to WT1 and WT2, it will probably work. On the otherhand, -INCLUDE will work just fine. I believe the EX command will get it own agent and therefore knows nothing about the WT ddname.

From the manual

One procedure calls another procedure using:
◾The command -INCLUDE, which incorporates a whole or partial procedure and executes immediately when encountered. (A partial procedure might contain header text, or code to include at run time based on a test in the calling procedure.)


◾The command EXEC. The command is stacked and executed when the appropriate Dialogue Manager command is encountered. The called procedure must be fully executable.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
June 04, 2017, 02:41 PM
Danny-SRL
John,
Using your logic, WF should refuse to write to WT in both wt1 and wt2 focexecs.
It should say that a FILEDEF is missing, which it doesn't.
So, IMHO, this is not a case of "code tightening", rather one of a PITN.
And customers fuming...


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

July 10, 2017, 03:59 AM
Danny-SRL
FYI
In 82M Gen Number 1095, this has been taken care of:
170529018
DMH: NEW - NOCLOSE with - WRITE not kept between ex fexs
A procedure calls several procedures using EX fex where each
procedure issues a -WRITE NOCLOSE to the same ddname. Only the
last -WRITE is showing in the file rather than all the values
from the previous -WRITEs.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF