Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED]variable master

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]variable master
 Login/Join
 
Member
posted
Good morning,


We have a question concerning master files with Excel files. We would like to know if it is possible that the same master file could read from different files with a variable that is set in the parameters of the report caster. I will show you with an example.

Excel files:
excel_file_1.xlsx
excel_file_2.xlsx
excel_file_3.xlsx

Master file:
excel_file_x.mas

The idea would be to use it as follows:
"
SET &file_number = "parameter from report caster";

SET &table_name = EXCEL_FILE || &file_number;

TABLE FILE &table_name
PRINT .....
"

Is there a way that we can do this? Or we have to create a separate master for each excel file. They will all contain the same columns with the same format.

Thank you in advance for your help!

Best regards,

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


WebFocus V8.2.03M
 
Posts: 12 | Registered: April 09, 2019Report This Post
Virtuoso
posted Hide Post
Guilaine

You can definately do this with a parameter in the master file. Here is an example of one.


FILENAME=JOIN_DEMO_CUSTOMER, SUFFIX=DIREXCEL,
DATASET=baseapp/&&DATASET1, $
VARIABLE NAME=&&DATASET1, $
SEGMENT=JOIN_DEMO_CUSTOMER, SEGTYPE=S0, $
FIELDNAME=ID_CUSTOMER, ALIAS='ID Customer', USAGE=I9, ACTUAL=A11V,
MISSING=ON,
TITLE='ID Customer', $
FIELDNAME=EMAIL___ADDRESS, ALIAS='Email Address', USAGE=A34V, ACTUAL=A34V,
MISSING=ON,
TITLE='Email Address', $
FIELDNAME=FIRST_NAME, ALIAS='First Name', USAGE=A9V, ACTUAL=A9V,
MISSING=ON,
TITLE='First Name', $
FIELDNAME=FULL_NAME, ALIAS='Full Name', USAGE=A21V, ACTUAL=A21V,
MISSING=ON,
TITLE='Full Name', $
FIELDNAME=LAST_NAME, ALIAS='Last Name', USAGE=A12V, ACTUAL=A12V,
MISSING=ON,
TITLE='Last Name', $
FIELDNAME=GENDER, ALIAS=Gender, USAGE=A1V, ACTUAL=A1V,
MISSING=ON,
TITLE='Gender', $
FIELDNAME=CUSTOMER_ADDRESS__LINE_1, ALIAS='Customer Address Line 1', USAGE=A46V, ACTUAL=A46V,
MISSING=ON,
TITLE='Customer Address Line 1',
GEOGRAPHIC_ROLE=ADDRESS_LINE, $
FIELDNAME=CUSTOMER_CITY, ALIAS='Customer City', USAGE=A20V, ACTUAL=A20V,
MISSING=ON,
TITLE='Customer City',
GEOGRAPHIC_ROLE=CITY, $
FIELDNAME=CUSTOMER_STATE____PROVINCE, ALIAS='Customer State Province', USAGE=A20V, ACTUAL=A20V,
MISSING=ON,
TITLE='Customer State Province',
GEOGRAPHIC_ROLE=STATE, $
FIELDNAME=CUSTOMER_POSTAL___CODE, ALIAS='Customer Postal Code', USAGE=A8V, ACTUAL=A8V,
MISSING=ON,
TITLE='Customer Postal Code',
GEOGRAPHIC_ROLE=POSTAL-CODE, $
FIELDNAME=CUSTOMER_COUNTRY, ALIAS='Customer Country', USAGE=A14V, ACTUAL=A14V,
MISSING=ON,
TITLE='Customer Country',
GEOGRAPHIC_ROLE=COUNTRY, $


Then in the reportcaster job set the value of DATASET1 to the appropriate Excel file.

Your TABLE FILE value will always be the same master file.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005Report This Post
Member
posted Hide Post
Hello,
I try with this code, but I have a error message .

In master :
FILENAME=REF_MAKE_PGI, SUFFIX=DIREXCEL,
DATASET='1w34_reporting_steloi/&&DATASET1', BV_NAMESPACE=OFF, $
VARIABLE NAME=&&DATASET1, $
SEGMENT=REF_MAKE_PGI, SEGTYPE=S0, $
FIELDNAME=LISTE_ARTICLE_PGI, ALIAS=Liste_article_PGI, USAGE=A18, ACTUAL=A18,
MISSING=ON,
TITLE='Liste_article_PGI', $
FOLDER=DIM_REF_MAKE_PGI, PARENT=.,
DV_ROLE=DIMENSION,
DESCRIPTION='Dimensions', $
FIELDNAME=LISTE_ARTICLE_PGI, BELONGS_TO_SEGMENT=REF_MAKE_PGI, $

In schedule in task/parameter :
(Name)DATASET1=(Value)'REF_MAKE_PGI00.xlsx'

when I run the schedule report :
error message :
Schedule ID: Sdf3e863dscd55s4823s8577sc406cd0937d0, Job Description: BOM REF MAKE PGIV2 , Schedule Full Path: IBFS:/WFC/Repository/hswltgqi/std_reports/requatesgo04/BOM_REF_MAKE_PGIV2.sch
Completed with errors/warnings
(FOC295) A VALUE IS MISSING FOR: &&DATASET1 Task error: IBFSException 6000: Error executing procedure BOM_REF_MAKE_PGIV2.fex No report to distribute.

Thank you in advance


WebFocus V8.2.03M
 
Posts: 12 | Registered: April 09, 2019Report This Post
Virtuoso
posted Hide Post
quote:
Then in the reportcaster job set the value of DATASET1 to the appropriate Excel file.

You need to set the variable as stated by Chuck
In your schedule go to Tasks then within a task under Parameters tab add &DATASET1 and its value.
Since the variable as been defined as a Global variable in the master file (with two ampersand : &&) you need to enter your variable name as : &DATASET1.
The second ampersand is added by the scheduler.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Member
posted Hide Post
Hello,

Thank you for your help. I could not make it work by creating the parameter with the "&" in the schedule like you proposed. It kept saying the following error message:
(FOC 295) A VALUE IS MISSING FOR: &DATASET1

I had to create a normal parameter in the schedule and use a set in the code (fex file):
-SET &&DATASET1 = &SCH_PARAM;

And then I gave the value REF_MAKE_PGI.xlsx to "SCH_PARAM" in the schedule.
Not sure if it is the best way, but it works.


WebFocus V8.2.03M
 
Posts: 12 | Registered: April 09, 2019Report This Post
Virtuoso
posted Hide Post
Honestly, I never define global variable in a schedule (two ampersand).
Normally GV are defined in a profile as per example since they are set for the whole system not only for a schedule/fex.

But since this is global variable that is defined in the .mas, the way you made it, is ok

Please update your first post then add [SOLVED] at the beginning of the subject


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED]variable master

Copyright © 1996-2020 Information Builders