August 21, 2007, 04:38 PM
ShawnS-READ or TABLE FILE... MRE focexec ??
Is there a way to use dialog manager to read a focexec located in the MRE environment?
I'd even be happy to use a table file request, save, then read.
I've tried many methods using variations of the FILEDEF command to no avail.
Thanks
| In Focus since 1993. WebFOCUS 7.7.03 Win 2003 |
August 21, 2007, 04:49 PM
ShawnSI need to perform some administrative functions based on what reporting objects are being used as well as trying to use a focexec as a data file. I cannot use a file on a data server.
On mainframe FOCUS this was easy. Not so easy these day.
wf 767 running on w2k3 srvr
August 21, 2007, 05:04 PM
FrankDutchsearch for MRE extract, that might give you some answers.
we are developing this to build the administration.
Reading a fex as a datasource?
Do you want to extract the fex coding and analyse the use of tables, fields, defines etc?
That is something we want to do also, but until now only in our heads....
|
Frank |
| prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7 |
August 21, 2007, 06:00 PM
Francis Mariani-*-- MRE Program to read a fex ---
-SET &ECHO=ALL;
-? &
-DEFAULT &PGM_TO_READ = 'fmtest5';
-SET &DIR_SEP = IF &FOCMODE EQ 'WINNT' THEN '\' ELSE '/';'
-*-- Determine MRE Domain and Folder ---
-SET &MRE_DOMAIN = GETTOK(&IBIMR_domain, &IBIMR_domain.LENGTH, 1, '&DIR_SEP', 8, 'A8');
-*-SET &MRE_FOLDER = SUBSTR(&IBIMR_folder.LENGTH, &IBIMR_folder, 2, &IBIMR_folder.LENGTH, &IBIMR_folder.LENGTH - 1, 'A&IBIMR_folder.LENGTH');
-*-- Allocate FEX file ---
-SET &FEX_FILE = &MR_BASE_DIR || &DIR_SEP || &MRE_DOMAIN || &DIR_SEP || 'app' || &DIR_SEP || &PGM_TO_READ || '.fex';
FILEDEF FEX DISK &FEX_FILE
-RUN
-*-- Read the FEX via TABLE ---
TABLE FILE FEX
PRINT *
END
-RUN
Master (must be in the App Path):
FILE=FEX DATA, SUFFIX=FIX, $
SEGNAME=SEG01, SEGTYPE=S0, $
FIELD=FEX_LINE, ALIAS=E01, USAGE=A255, ACTUAL=A255, $
If you want to -READ the fex than you don't need the Master
Required Custom Configuration variables (Add these lines via WF Administration Console > Configuration > Custom Settings):
<set> IBIMR_domain (pass)
<set> IBIMR_folder (pass)
<set> MR_BASE_DIR (pass)
If you know the domain then you don't need to add these custom variables.
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
August 22, 2007, 09:05 AM
StefaansJust a suggestion, in future why not generate the necessary code on the fly. We do this all the time. Have a look at my presentation from Las Vegas "Focus the cornacopia". You may find some ideas. Regards Steve Simon
WebFOCUS 7.7.01 Windows, TSO 7.0
August 22, 2007, 02:11 PM
ShawnSStill not working.
Our MRE is sitting on a 2k3 server and our reporting server is UNIX on the mainframe.
I expect this is the problem.
wf 767 running on w2k3 srvr
August 22, 2007, 03:01 PM
GizmoTry putting -MRNOEDIT BEGIN at the begining of the fex and -MRNOEDIT END at the end of the fex.
MRE tries to resolve all dialog manager before sending to the server. Adding the above tags should send the dialog manger commands with the entire focexec.
Windows: WF 7.6.2: SQL Server 2008 R2 August 22, 2007, 03:51 PM
Francis Marianiquote:
Still not working.
What's not working?
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
August 22, 2007, 04:04 PM
ShawnSStill cannot read the MRE focexec.
Here is the following echo'd result:
FILEDEF FEX DISK D:/ibi/WebFOCUS71/basedir/TestDomain/app/datnotfe.fex
-RUN
-READ FEX &LNE1.A10.
-RUN
(FOC295) A VALUE IS MISSING FOR: &LNE1
I can assure you the file exists with some simple text inside.
wf 767 running on w2k3 srvr
August 22, 2007, 04:32 PM
Francis MarianiYour directory separator may be wrong. For Windows it's '\'.
Can the file be accessed correctly with "D:/ibi/WebFOCUS71/basedir/TestDomain/app/datnotfe.fex", outside of WebFOCUS?
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
August 22, 2007, 05:07 PM
ShawnSFrancis - the separator is fine. Besides the MR_BASE_DIR contains the forward slash, so if I switch the slash for the rest of the string it'll conflict.
If I dump the address into IE when logged into the web server windows box the fex pops right up.
I addressed this in a case, so I'll follow up if a solution is found.
wf 767 running on w2k3 srvr
August 22, 2007, 07:18 PM
Francis MarianiShawn, are you running the fex via MRE or as an App fex?
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
August 23, 2007, 08:48 AM
ShawnSFex is being executed from MRE through Dev Studio and not from the app directory.
wf 767 running on w2k3 srvr
August 23, 2007, 09:55 AM
Francis MarianiShawn, that *may* be the reason why it's not working. I find that you sometimes get unexpected results when running a fex from DevStudio. Sometimes in MRE, if you run the fex from the text editor, certain MRE variables are not available (e.g. MRE Folder, MRE Domain), while they are available if you run them from the domain list. So, please try running the fex from MRE.
Cheers,
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
August 23, 2007, 10:37 AM
ShawnSRunning from MRE provided the same result as from Dev Studio.
wf 767 running on w2k3 srvr
August 23, 2007, 10:54 AM
Francis MarianiThat's too bad. I can't see why this wouldn't work.
Out of curiosity, have you tried FILEDEF some other flat file from your D drive and done a -READ on it?
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
August 23, 2007, 11:53 AM
ShawnSI got this to work "sort-of".
We have an additional reporting server on a windows box which is the same one that the web server resides. If I switch the properties of the fex to point to that reporting server and execute this from MRE it works. I wanted this to work using the unix reporting server, but I can work with this. What I find especially odd is the format of the address...conflicjting slashes.
D:/ibi/WebFOCUS71/basedir\MyDomain\app\datnotfe.fex
It doesn't work any other way.
Thanks for everyone's help and time.
wf 767 running on w2k3 srvr
August 23, 2007, 12:27 PM
hammo1jRemember that all FILEDEF items are relative to the REPORTING server directory structure.
If your client and server are on the same box this is never a problem but if your client is on another box then.
Either
MAP Z: \\CLIENT\C$ permenantly (at logon) on your server and FILEDEF Z:\...
Or
FILEDEF \\CLIENT\C$\...
or do the unix equivalents.
Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
August 23, 2007, 12:32 PM
Francis MarianiGood point John.
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