Focal Point
[CLOSED] Multiple Fex files having same hold file name.

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

January 12, 2011, 11:17 AM
pk
[CLOSED] Multiple Fex files having same hold file name.
I have 10 fex files as proc1......... to proc10.

Each file starts with a data pull from a table and holds the data in a file.

Name of the hold file is same across all 10 procedures.

Ex: Procedure1
 TABLE FILE <TABLE_NAME>
PRINT
<FIELD1>
<FIELD2>
BY FIELD<3>
WHERE <FIELD1> EQ 'A';
ON TABLE HOLD AS H_FILE1
END
-RUN
........OTHER COMPUTATIONS......  



Procedure2
TABLE FILE <TABLE_NAME>
PRINT
<FIELD1>
<FIELD2>
BY FIELD<3>
WHERE <FIELD1> EQ 'B';
ON TABLE HOLD AS H_FILE1
END
-RUN
........OTHER COMPUTATIONS......   


........ UPTO Procedure 10.

Later i set up each individual file to run parallely.
During this process few procedure were executed successfully and few errored out as "Description of the File Name H_FILE1 could not be found".

When i re-run the errored out procedures, execution was successfull.

Hence could you please let me know, setting up multiple file to run parallely with same hold file name(H_FILE1) overrides the H_FILE1?

Thanks in advance.

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


714
January 12, 2011, 12:03 PM
N.Selph
I am not sure how you are running these in parallel, but if it is in the same focexec, it will be in the same Server agent.
If they run in the same Server agent, they will use the same edatemp directory and over write each other.


(Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats)
January 12, 2011, 01:54 PM
T.Peters
If you use FILEDEF and append records, it wouldnt.

FILEDEF TEST DISK bi_source/H_FILE1.dat (APPEND


WebFOCUS: 7702
O/S : Windows
Data Migrator: 7702
January 12, 2011, 01:58 PM
Francis Mariani
With APPEND the data is not over-written, but the Master still is.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
January 12, 2011, 01:59 PM
pk
i run PROC1.fex - PROC10.fex files in deferred mode.


714
January 12, 2011, 03:39 PM
Dan Satchell
Even with the HOLD file allocated in APPEND mode, I think this is a risky approach because there may be file contention for writing the MASTER, or even writing to the HOLD file, if two or more jobs are trying to write output/master at exactly the same time. If you must run them in parallel, I would output each result set to a uniquely-named HOLD file and then use the MORE command, the USE command, or the system COPY command afterwards to merge them all together.


WebFOCUS 7.7.05
January 13, 2011, 09:13 AM
jgelona
I see no way of doing this reliably with HOLD files. You can get around the over-writting Master problem by using FILEDEF (APPEND with SAVE or SAVB, but you may still have problems.

If you must do this, in the 10 fexes, I'd do this:
ON TABLE HOLD AS H_FILE1 FORMAT FOCUS
ON TABLE HOLD AS H_FILE2 FORMAT FOCUS
ON TABLE HOLD AS H_FILE3 FORMAT FOCUS
...
ON TABLE HOLD AS H_FILE10 FORMAT FOCUS


Then in the fex that uses this data:
USE
  path/folder/HFILE_1.FOC AS HFILE_1
  path/folder/HFILE_2.FOC AS HFILE_1
  path/folder/HFILE_3.FOC AS HFILE_1
...
  path/folder/HFILE_10.FOC AS HFILE_1
END


Then you may have to consider the issues you can have with folder management. That is, if necessary, making sure that multiple users running the job don't step on each other and that for a given user all of their files are in a single location.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.