Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] A Different Angle on Master Files Distinction
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] A Different Angle on Master Files Distinction
 Login/Join
 
Gold member
posted
I have read the recent thread on master files distinction but I have a related yet different set up issue in that I have two sets of master files with the same names except they are not production and development - they are both production containing two different countries data (one for U.S. and one for Australia). These are the same file (table) names on the AS/400 but separated by libraries so I have created master files for each with the same master file name but in separate app folders pointing to their respective AS/400 file (one to the U.S. version and one to the Australia version). Through MRE, I created a domain for the U.S. and one for Australia and am able to use a single fex that I have put in both domains which will work for both countries since I have one of the domains pointing to the U.S. app folder and the other pointing to the Australia app folder. This cuts down on program maintenance since I don't have to have two separate fex's and also resolves the security issue of preventing one country from seeing the other countries data. That all worked very well until we tried to schedule this report and I lose all of that capability since the scheduling apparently ignores the app folders that the domain points to and uses APP PATH.

Has anyone else faced this same environmental set up and/or does anyone have any suggestions as to how to handle this?

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


________________________________________________________________________________________
WebFOCUS 7.6.8 + Windows Server 2003 + DB2/400
 
Posts: 66 | Location: Nashville, TN, USA | Registered: January 16, 2008Reply With QuoteReport This Post
Guru
posted Hide Post
Hi JDroke,

Are the fields in the tables also the same?

Then you can make 1 application where you store your masterfiles. The accessfiles should then exclude CONNECTION= abc,

Then in your fex you put this set:
-SET &CONVAR = 'abc';
ENGINE (YOUR DATABASE ENGINE) DEFAULT_CONNECTION &CONVAR

This way you choose with a variable which dataconnection you want to use.


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 415 | Location: Europe | Registered: February 05, 2007Reply With QuoteReport This Post
Gold member
posted Hide Post
Thanks Frans for the reply. The fields in the tables are the same names.

I don't think that solution will work (or I don't understand connections) since tables are on the same AS/400 and are separated there by libraries (libraries are like databases in SQL if that helps any - there is only one connection to the AS/400). However, if I could do this same thing with the TABLENAME setting (which is where I differentiate between which file to use based on AS/400 library), that might work (but that would lead to a question about dynamic parameters in scheduling which I won't muddy the waters yet by asking it now). Can you do this with TABLENAME?

FYI - here is an example of the two access files...

-U.S. version
SEGNAME=CUSTMAST, TABLENAME=USLIB.CUSTOMERMAST, CONNECTION=elanpoloibi, KEYS=0, $

-Australia version
SEGNAME=CUSTMAST, TABLENAME=AULIB.CUSTOMERMAST, CONNECTION=elanpoloibi, KEYS=0, $

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


________________________________________________________________________________________
WebFOCUS 7.6.8 + Windows Server 2003 + DB2/400
 
Posts: 66 | Location: Nashville, TN, USA | Registered: January 16, 2008Reply With QuoteReport This Post
Guru
posted Hide Post
Ah I understand,

My suggestion would only work if you have this:

-U.S. version
SEGNAME=CUSTMAST, TABLENAME=CUSTOMERMAST, CONNECTION=USelanpoloibi, KEYS=0, $

-Australia version
SEGNAME=CUSTMAST, TABLENAME=CUSTOMERMAST, CONNECTION=AUelanpoloibi, KEYS=0, $


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 415 | Location: Europe | Registered: February 05, 2007Reply With QuoteReport This Post
Gold member
posted Hide Post
Can you set up multiple connections to the same machine? Does this cost extra? This was all set up when IBI installed the software here.


________________________________________________________________________________________
WebFOCUS 7.6.8 + Windows Server 2003 + DB2/400
 
Posts: 66 | Location: Nashville, TN, USA | Registered: January 16, 2008Reply With QuoteReport This Post
Guru
posted Hide Post
Yes, you can have multiple connections. You're charged by adapter type. Since you're using the same DB2 adapter, you won't be charged with any additional cost as long as it's the same adapter.

My previous reply was not complete, my suggestion works with this:


-U.S. version
in fex:
ENGINE SQL400 DEFAULT_CONNECTION USelanpoloibi

in accessfile:
SEGNAME=CUSTMAST, TABLENAME=CUSTOMERMAST, KEYS=0, $


-Australia version
in fex:
ENGINE SQL400 DEFAULT_CONNECTION AUelanpoloibi

in accessfile:
SEGNAME=CUSTMAST, TABLENAME=CUSTOMERMAST, KEYS=0, $


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 415 | Location: Europe | Registered: February 05, 2007Reply With QuoteReport This Post
Platinum Member
posted Hide Post
You should be able to put an APP PREPENDPATH command in your fex file that would point to the same path as the domain.

APP PREPENDPATH &INPATH

The path name can be a variable and passed in.


Webfocus 8.0.7 on Windows
 
Posts: 176 | Location: Ohio | Registered: October 26, 2006Reply With QuoteReport This Post
Gold member
posted Hide Post
Okay on the APP PATH with a variable but will I be able to schedule the fex which has dynamic multi-select variables - said differently will the correct master file be used when I schedule the fex and select the parameters?


________________________________________________________________________________________
WebFOCUS 7.6.8 + Windows Server 2003 + DB2/400
 
Posts: 66 | Location: Nashville, TN, USA | Registered: January 16, 2008Reply With QuoteReport This Post
Master
posted Hide Post
Hello JDroke,

If I understand you correctly, you have the same fex in different folders in MRE.

ie., Country -- Domain
US -- First app under that domain
AUS - Second app under that domain.

Both will have the fex but the contents are same.

Is it true?


WFConsultant

WF 8105M on Win7/Tomcat
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Reply With QuoteReport This Post
Gold member
posted Hide Post
I have the exact same fex in two different domains but each domain points to a different app folder which is where I have the master files. The master file names and fields are the same but they point to two different data sources.


________________________________________________________________________________________
WebFOCUS 7.6.8 + Windows Server 2003 + DB2/400
 
Posts: 66 | Location: Nashville, TN, USA | Registered: January 16, 2008Reply With QuoteReport This Post
Gold member
posted Hide Post
I put the APP PREPAEND PATH in the fex but it seems to be ignoring it. If I do a SHOWPATH it shows it there but the where statements are definitely using the old path when ran from Developer Studio (i.e. the Company selection is showing the companies from the domain path which is au_production instead of us_production)...


APP PREPENDPATH us_production
-SET &FromDateLY = EDIT(ATODBL(EDIT(&FromDate,'99$99$9999'), '8', 'D8.0')-1,'$99/99/9999');
-SET &ThruDateLY = EDIT(ATODBL(EDIT(&ThruDate,'99$99$9999'), '8', 'D8.0')-1,'$99/99/9999');
-SET &DateType = &DateType.(ENTRY DATE,START DATE).Date Type.;
-IF &DateType = 'ENTRY DATE' THEN GOTO EntryDate
- ELSE IF &DateType = 'START DATE' THEN GOTO StartDate;
-EntryDate
-DEFAULTH &DateField = 'ORDERDATE'
-DEFAULTH &DateTitle = 'Based On Entry Dates'
-GOTO GotDateField
-StartDate
-DEFAULTH &DateField = 'SHIPDATE'
-DEFAULTH &DateTitle = 'Based On Start Dates'
-GOTO GotDateField
-GotDateField
SET EMPTYREPORT = ON
SET ASNAMES = ON
TABLE FILE EISBOD
BY PCD AS 'PCD'
BY SLSNAME AS 'SLSNAME'
BY CUSTNAME AS 'CUSTNAME'
BY LOGOP AS 'LOGOP'
BY PAT AS 'PAT'
WHERE TOTSTDCST NE 0;
WHERE COMP EQ &Company.(FIND COCOMP IN EISCO).Company.;
WHERE PCD EQ &Pcd.(OR(FIND PCD IN EISBOD)).Division.;
WHERE SLSNAME EQ &Salesman.(OR(FIND SMNAME IN EISSM)).Salesman.;
WHERE ((&DateField GE '&FromDate.From Date.' AND &DateField LE '&ThruDate.Thru Date.') OR (&DateField GE '&FromDateLY.From Date LY.' AND &DateField LE '&ThruDateLY.Thru Date LY.'));
WHERE LF EQ &LF.(OR(FIND LF IN EISBOD)).LF.;
WHERE STSCD EQ &StsCd.(OR(FIND STSCD IN EISBOD)).Status Code.;
ON TABLE NOTOTAL
ON TABLE HOLD
ON TABLE SET OLAPPANE CONTROL
END


________________________________________________________________________________________
WebFOCUS 7.6.8 + Windows Server 2003 + DB2/400
 
Posts: 66 | Location: Nashville, TN, USA | Registered: January 16, 2008Reply With QuoteReport This Post
Guru
posted Hide Post
JDroke,

Have you thought of having one fex that is called from two different fexs that will point to the proper master file. This will allow you to maintain only one actual source code, yet allow you to set the proper master file.


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
 
Posts: 398 | Registered: February 04, 2008Reply With QuoteReport This Post
Gold member
posted Hide Post
quote:
Originally posted by RSquared:
JDroke,

Have you thought of having one fex that is called from two different fexs that will point to the proper master file. This will allow you to maintain only one actual source code, yet allow you to set the proper master file.


Well I thought of that or some form of MRNOEDIT but I'm just trying to get a variable path to work first - then everything would be easy from that point on.


________________________________________________________________________________________
WebFOCUS 7.6.8 + Windows Server 2003 + DB2/400
 
Posts: 66 | Location: Nashville, TN, USA | Registered: January 16, 2008Reply With QuoteReport This Post
Virtuoso
posted Hide Post
My opinion is that you are asking for trouble anytime you have to MFD's with the same name in your application path. In a previous life, we had something similar with multiple files all exactly the same but with different years. We created each with its own unique master file name and then used an &variable in the table name to specify which MFD should be used.

So you create TWO master files:EISBODUS and EISBODAUT. Then in your DEFINE/TABLE statements you TABLE FILE EISBOD&COUNTRY.EVAL

You could then have everything in the same domain as long as &COUNTRY is always populated via -SET/prompting/launch page.

OR you could still separate them into two domains and everything in the US domain always contains -DEFAULT &COUTRY=US and everything in the Australia domain always contains -DEFAULT &COUNTRY=AUT


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Reply With QuoteReport This Post
Virtuoso
posted Hide Post
And in setting up the schedules, you would also always need to populate the &COUNTRY variable in the advanced/parameters tab. But if you've separated the domains, the -DEFAULT value should work without anything additional in RC.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Reply With QuoteReport This Post
Virtuoso
posted Hide Post
quote:
I put the APP PREPAEND PATH in the fex but it seems to be ignoring it.


It's all a matter of timimg. The generation and execution of the autoprompt page to resolve these variables ...
&DateType.(ENTRY DATE,START DATE).Date Type.
&Company.(FIND COCOMP IN EISCO).Company.
&Pcd.(OR(FIND PCD IN EISBOD)).Division.
&Salesman.(OR(FIND SMNAME IN EISSM)).Salesman.
&FromDate.From Date.
&ThruDate.Thru Date.
&FromDateLY.From Date LY.
&ThruDateLY.Thru Date LY.
&LF.(OR(FIND LF IN EISBOD)).LF.
&StsCd.(OR(FIND STSCD IN EISBOD)).Status Code. 

...takes place before the
APP PREPENDPATH ...
statement is executed, so the default APP PATH governs all the "FIND ... IN tablename" operations.

In short, don't use Autopromt.
Construct a launch page, replacing the FINDs with list boxes populated by fexes that take the selected country as a parameter, and draw the choices from the appropriate country's datastore.


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Reply With QuoteReport This Post
Gold member
posted Hide Post
Thanks j.gross for that explanation. That helps a lot. I guess that we should get more education before proceeding because we had just been using the Report Painter and auto-prompting.


________________________________________________________________________________________
WebFOCUS 7.6.8 + Windows Server 2003 + DB2/400
 
Posts: 66 | Location: Nashville, TN, USA | Registered: January 16, 2008Reply With QuoteReport This Post
Virtuoso
posted Hide Post
You also should take a look at the security aspects.
In the master you can set access control for a certain field.
In your fex you can restrict users by a SET PASS statement.
This setup will give you one fex for many users where the restrictions are based upon their login username.
In reportcaster you can use the bursting facility to restrict the output or use an amper value.




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

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Reply With QuoteReport This Post
Gold member
posted Hide Post
Thanks everyone for your insight/direction.


________________________________________________________________________________________
WebFOCUS 7.6.8 + Windows Server 2003 + DB2/400
 
Posts: 66 | Location: Nashville, TN, USA | Registered: January 16, 2008Reply With QuoteReport This Post
Gold member
posted Hide Post
This issue was solved with consulting help from IBI. They have recommended using user profiles with the ReportCaster to get the necessary distinction between the master files.


________________________________________________________________________________________
WebFOCUS 7.6.8 + Windows Server 2003 + DB2/400
 
Posts: 66 | Location: Nashville, TN, USA | Registered: January 16, 2008Reply With QuoteReport This Post
Guru
posted Hide Post
quote:
-U.S. version
SEGNAME=CUSTMAST, TABLENAME=USLIB.CUSTOMERMAST, CONNECTION=elanpoloibi, KEYS=0, $

-Australia version
SEGNAME=CUSTMAST, TABLENAME=AULIB.CUSTOMERMAST, CONNECTION=elanpoloibi, KEYS=0, $


Since we have WF more than 2 years ago, I kept wondering if we can parameterized the TABLENAME=&LIB.CUSTOMERMAST in .acx file. How does any AS400 user handle files in multiple libraries(or environments)?

Hua


Developer Studio 7.6.11
AS400 - V5R4
HTML,PDF,XLS
 
Posts: 305 | Location: Winnipeg,MB | Registered: May 12, 2008Reply With QuoteReport This Post
Master
posted Hide Post
quote:
I kept wondering if we can parameterized the TABLENAME=&LIB.CUSTOMERMAST in .acx file.


I put in a NFR a few years ago for this and .mas files. I wanted to parameterize the DATASET attribute in the FILENAME clause in some .mas files.

I was told that with the way that .acx and .mas files are processed, it was not feasible to use & or && variables in .mas or .acx files.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 948 | Location: Oklahoma City | Registered: October 27, 2006Reply With QuoteReport This Post
Expert
posted Hide Post
I would use APP PREPENDPATH to ensure the correct APP folder is at the front of the APP PATH.


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Reply With QuoteReport This Post
Guru
posted Hide Post
Francis, using APP PREPENDPATH would have the timing problem for launching HTML pages as Jack explained, isn't it true?

jgelona, thanks for putting in a NFR. I guess not only AS400 users wanting to have the flexibilities. IBI told us to use one port for the test environment and another port for the live environment. This is not just the additional license, but another set of security measure we have to manage.

Right now, we only have one port for AS400. We want to run the fexes with test & live library lists concurrently(at user profile level?). Any sugguestions?

Thanks.


Hua


Developer Studio 7.6.11
AS400 - V5R4
HTML,PDF,XLS
 
Posts: 305 | Location: Winnipeg,MB | Registered: May 12, 2008Reply With QuoteReport This Post
Expert
posted Hide Post
Hua, I never use auto-prompt which I believe where the problem lies, so I have never encountered any issues with APP PREPENDPATH.


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Reply With QuoteReport This Post
Guru
posted Hide Post
Thanks Francis.

How do you organize the app folders? When creating synomyms, both acx & mas are created under the same folder. Can I have the following folders?
live_acx - all TABLENAME=LIVE.files
test_acx - all TABLENAME=TEST.files
db2_mas - all segments & field definitions
all_fex - all fexes

path running in live:
live_acx
db2_mas
all_fex

path running in test:
test_acx
db2_mas
all_fex

Paths are driven by parameter or user profile? Does this make sense?

Hua


Developer Studio 7.6.11
AS400 - V5R4
HTML,PDF,XLS
 
Posts: 305 | Location: Winnipeg,MB | Registered: May 12, 2008Reply With QuoteReport This Post
Master
posted Hide Post
Hua,

Currently, we have one environment as well. Our .mas files are in a app folder named masters. Our .acx files are in separate folders, i.e. prodacx, cloneacx, trainacx. prodacx is in the default application path. When doing development, training, etc., we just change the APP PATH in the program to point to the correct data base.
For example, here are .acx files for the same table in clone and production:
SEGNAME=TIVE_ELI, TABLENAME=KIDSPROD.TIVE_ELIG_DEPRIVE,
        KEYS=0,WRITE=NO,
        CONNECTION=10gCLONE,$

SEGNAME=TIVE_ELI, TABLENAME=KIDSPROD.TIVE_ELIG_DEPRIVE,
        KEYS=0,WRITE=NO,
        CONNECTION=KIDS,$


What I would prefer is to have one acx file that looks something like this:
SEGNAME=TIVE_ELI, TABLENAME=KIDSPROD.TIVE_ELIG_DEPRIVE,
        KEYS=0,WRITE=NO,
        CONNECTION=&&DATABASE,$


The 10gCLONE and KIDS connections are defined in edasprof. &&DATABASE would be defined there as well and would default to KIDS. But if I am testing a program, my program could just issue:
-SET &&DATABASE=10gCLONE;

instead of changing the APP PATH.

The one problem I have found with changing the path is that it does not work with .xfocus files. Unless I issue a specific path in a USE statement or use the DATASET attribute in the .mas, .xfocus files are not found even if they are in the path. At least this is how it works in 7.1.3.

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


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 948 | Location: Oklahoma City | Registered: October 27, 2006Reply With QuoteReport This Post
Expert
posted Hide Post
For the DB2 environments I work with, I have two app folders, one containing mas and acx for prod, and another containing mas and acx for UAT. I duplicate the acx as well as the mas, beacuse, believe it or not, the tables are slightly different in prod and UAT.

Your path scenarios makes sense.


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Reply With QuoteReport This Post
Guru
posted Hide Post
Thank you both for sharing your insights.


Hua


Developer Studio 7.6.11
AS400 - V5R4
HTML,PDF,XLS
 
Posts: 305 | Location: Winnipeg,MB | Registered: May 12, 2008Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] A Different Angle on Master Files Distinction

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.