IB - Developer Center    Forums  Hop To Forum Categories  FOCUS/WebFOCUS    -SET before -RUN
Go
New
Search
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Gold member
Posted
I want to use -SET for prompting from a file (table) that contains date values, but before that, I want to update the date values that are in that file (table) by dropping and re-creating it using HOLD FORMAT FOCUS.

Unfortunately, WebFOCUS seems to try to do the -SET before the -RUN commands.

Is there any way around this?

Code:

-* Data_Monthly_Run
APP HOLD STD_COST
!if exist "E:\IBI\APPS\data\month_list_lines.foc" (DEL "E:\IBI\APPS\data\month_list_lines.foc" /Q)
-RUN
TABLE FILE MONTH_LISTS
PRINT MONTH_LIST_KEY
BY HIGHEST MONTH_LIST_LABEL
ON TABLE HOLD AS MONTH_LIST_LINES FORMAT FOCUS
END
-RUN
*
-SET &&THIS_SEL = &MONTH_LIST1.(FIND 'HIGHEST MONTH_LIST_LABEL' IN month_list_lines).Current_Period.;
-SET &&LAST_SEL = &MONTH_LIST2.(FIND 'HIGHEST MONTH_LIST_LABEL' IN month_list_lines).Previous_Period.;
-INCLUDE Run_Data_By_Month
-*
 
Posts: 83 | Location: Denver | Registered: July 20, 2005Reply With QuoteEdit or Delete MessageReport This Post
Platinum Member
Posted Hide Post
Can you reproduce this using the CAR file? Or some other standard IB file?

On what are you running this (Environment)?



Current Client: WebFOCUS 7.1.4 Client: Windows, Reporting Server: Unix, Data: Oracle, Teradata
Local Laptop: WebFOCUS 7.6.5 on Vista/Apache/Tomcat, Data: FOCUS, MS Access
 
Posts: 98 | Location: Live: Clemmons, NC, Work: HPHC, Wellesley, MA | Registered: February 23, 2005Reply With QuoteEdit or Delete MessageReport This Post
Expert
Posted Hide Post
Joan,

The syntax that you are using is for AutoPrompting when in the fex is preparsed to identify any undeclared variables and this process will identify &MONTH_LIST1 and MONTH_LIST2 as not having values and will build a launch page to prompt for these variable. This is action before any of the WF code is parsed so therefore your temporary hold file will not be available for populating your combo boxes in the autoprompt screen.

To achieve this you will need to ensure that your file is built before have e.g. it must exist before autoprompting screens are built. Try building it in overnight batch or have a synonym that will allow you to target just the data items that you will require.

Within your fex, it would appear that you wish to have a different display value to that passed by the HTML page as data. You cannot do this (I think) with amper autoprompting, so your options to do this will be limited.

Alternatively build your own launch page that will get your required data via a fex so that you can have different display values to data values.

T


Old FOCUS coders never die, they just become functionally stable. (Tony A Wink)

Current Client: WebFOCUS 7.6.2 Win XP SP2/IIS 6/Tomcat 5.5 - MRE / BID MS SQL / Oracle - DevStudio 7.6.6 7.1.6
Local: WebFOCUS 7.6.6 7.1.6 on Win XP SP2/Apache/Tomcat 5.5 - Self Service
 
Posts: 2860 | Location: England U.K. (Freelance) | Registered: April 08, 2004Reply With QuoteEdit or Delete MessageReport This Post
Gold member
Posted Hide Post
Thanks Tony and Doug.

I was afraid the answer would be like this.
Sigh.
Back to the drawing board.
 
Posts: 83 | Location: Denver | Registered: July 20, 2005Reply With QuoteEdit or Delete MessageReport This Post
Virtuoso
Posted Hide Post
This is not a personal dig on Joan so no offense is intended. I think that the AUTOPROMPT functionality in WF is WAY overused. It don't think it was ever intended to be used in any way other than to quickly populate undeclared variables for easy execution of a report. My rule of thumb is that if this report is for an end-user/group (meaning anyone other than the author or another advanced user) AUTOPROMPT functionality should not be used.

It's very easy to create an HTML launch page, even if you only use the PUBLISH feature and then minor modifications. It seems that many, many users are going to extreme lengths to make it so things will appear properly and function in some predetermined way once autopromting kicks in. With an HTML page, it always works the way you intended, always prompts for the parameters as you intended, and you have control over the process flow as you intended.

I'll get of my soapbox now. Thanks for listening Big Grin


Regards,

Darin



WF Server: 7.1.6 on Z/OS and Linux, ReportCaster, Self-Service, MRE, Java
Data: DB2, DB2/UDB, Adabas, SQL Server Output: HTML,PDF,Excel2K
WF Client: Linux w/WebSphere, Servlet, CGI
 
Posts: 1287 | Location: Salt Lake City, Utah | Registered: February 02, 2007Reply With QuoteEdit or Delete MessageReport This Post
Virtuoso
Posted Hide Post
I agree with you, Darin! Good One


Ginny
---------------------------------
Prod: WF 7.6.5 with 7.6.6 WFRS; AIX 5.2; WebSphere 6.1.0.15
Dev: WF 7.6.5 with 7.6.6 WFRS; AIX 5.3; WebSphere 6.1.0.15
Primarily self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable
 
Posts: 1521 | Location: BNSF: Fort Worth, TX | Registered: April 05, 2006Reply With QuoteEdit or Delete MessageReport This Post
Gold member
Posted Hide Post
Well, it's just frustrating. I guess without seeing what I'm doing, you won't know the whole story. I'm even having problems messing with the HTML. When I get time again, maybe I'll get it working.

It seems like in WF nothing works without trying several different avenues. I don't really have time for it.
 
Posts: 83 | Location: Denver | Registered: July 20, 2005Reply With QuoteEdit or Delete MessageReport This Post
Virtuoso
Posted Hide Post
Give Dennis or Peter a call in the Denver Branch office - they're pretty sharp with this stuff and will get you past your frustrations and hopefully a lot further.


Regards,

Darin



WF Server: 7.1.6 on Z/OS and Linux, ReportCaster, Self-Service, MRE, Java
Data: DB2, DB2/UDB, Adabas, SQL Server Output: HTML,PDF,Excel2K
WF Client: Linux w/WebSphere, Servlet, CGI
 
Posts: 1287 | Location: Salt Lake City, Utah | Registered: February 02, 2007Reply With QuoteEdit or Delete MessageReport This Post
 Previous Topic | Next Topic powered by eve community  
 

IB - Developer Center    Forums  Hop To Forum Categories  FOCUS/WebFOCUS    -SET before -RUN

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