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}Amper Variable usage in heading when value is _FOC_NULL

Read-Only Read-Only Topic
Go
Search
Notify
Tools
{SOLVED}Amper Variable usage in heading when value is _FOC_NULL
 Login/Join
 
Guru
posted
Okay there has to be a way to do this, but I am at a loss. I have two amper variables (&Ethnicity and &Gender) I am using an html launch page with comboboxes to make the selections. When 'all' is selected for either parameter the value becomes _FOC_NULL. I am using the amper variables in the heading of my report and it really looks like crap with _FOC_NULL in it. I would like to have it say something a bit more pleasant like "All Genders", but no matter what I try I can not get rid of the _FOC_NULL. Below is the code I have tried. Any help would be appreciated.

I just tried gender first, to see if it would work.
ON TABLE SUBHEAD
"Registered"
IF &Gender EQ _FOC_NULL THEN GOTO ALL_SELECTED;
"ÐNICITY , &Gender "
-GOTO MORE_CODE;
-ALL_SELECTED
"All Genders"
-MORE_CODE
"Students for &TERM_DESC "
FOOTING
"Page:<TABPAGENO of<TABLASTPAGE <+0> <+0> <+0> <+0>&DATEtrMDYY"


I also tried using a variable instead of the amper variable. It didn't work either.

DEFINE
GENDERAMP/A15V
IF &Gender EQ _FOC_NULL THEN "All Genders" ELSE &Gender.

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


WebFOCUS Server 8.1.05
Windows 2008 Server
WebFOCUS AppStudio 8.1.05
Windows 7 Professional
IE 11 and Chrome Version 43.0.2357.124 m.
Mostly HTML, PDF, Excel, and AHTML
 
Posts: 272 | Location: Kalamazoo, Michigan | Registered: September 30, 2010Report This Post
Expert
posted Hide Post
quote:
IF &Gender EQ _FOC_NULL THEN GOTO ALL_SELECTED;


You need a DASH, and, probaly quotes; it is Dialogue Manager code:

-IF &Gender EQ '_FOC_NULL' GOTO ALL_SELECTED;

hth

RANT: GREAT! FOC_NONE replaced with _FOC_NULL. Another peachy feature! Well, I hope IBI has enough consultant $$$'s to send THEIR consultants out and change ALL the code w/FOC_NONE!

Another marvelous feature; and they wonder why COGNOS is becoming the way to go...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Guru
posted Hide Post
OOPS- I did have the dash and the quotes. It still didn't work. I checked my code again and they are there, but doesn't work. Dev Studio doesn't like something, it won't even let me out of the source tab.


WebFOCUS Server 8.1.05
Windows 2008 Server
WebFOCUS AppStudio 8.1.05
Windows 7 Professional
IE 11 and Chrome Version 43.0.2357.124 m.
Mostly HTML, PDF, Excel, and AHTML
 
Posts: 272 | Location: Kalamazoo, Michigan | Registered: September 30, 2010Report This Post
Expert
posted Hide Post
Try .EVAL:

-IF '&Gender.EVAL' EQ '_FOC_NULL' GOTO ALL_SELECTED;

Also, at the top of the FEX add and save:

-? &G
-EXIT

Then execute the HTML form, and execute. This will give you all & variables beginning with &G...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Guru
posted Hide Post
Still won't let me out of the source.....

-? &G
-EXIT
TABLE FILE PEOPLE_DIM
PRINT     
BY 'PEOPLE_DIM.PEOPLE_DIM.LCLastName' NOPRINT
BY 'PEOPLE_DIM.PEOPLE_DIM.FIRST_NAME' NOPRINT
BY 'PEOPLE_DIM.PEOPLE_DIM.FULL_NAME' AS 'Student Name'
BY 'PEOPLE_DIM.PEOPLE_DIM.VNUM' AS 'Valley,Number'
BY 'PEOPLE_DIM.PEOPLE_DIM.PhoneOUT' AS 'Phone'
BY 'PEOPLE_DIM.PEOPLE_DIM.DEGREE_SOUGHT_DESC' AS 'Major'
BY 'J10.STUDENT_SEMESTER_GPA_FACT.HoursEarnedOut' AS 'Semester,Hrs Earned'
BY 'J10.STUDENT_SEMESTER_GPA_FACT.SemesterGPAOut' AS 'Semester,GPA'
BY 'J0.STUDENT_OVERALL_GPA_FACT.OverallGPAOut' AS 'Overall,GPA'
BY TOTAL COMPUTE MYCNTR/I5C = IF PEOPLE_DIM.PEOPLE_DIM.PIDM EQ LAST PEOPLE_DIM.PEOPLE_DIM.PIDM THEN MYCNTR + 0 ELSE MYCNTR + 1; NOPRINT
ON TABLE SUBHEAD
"Registered"
-IF &Gender.EVAL EQ '_FOC_NULL' GOTO ALL_SELECTED;
"ÐNICITY , &Gender "
-GOTO MORE_CODE;
-ALL_SELECTED
"All Genders"
-MORE_CODE
"Students for &TERM_DESC "
FOOTING
"Page:<TABPAGENO of<TABLASTPAGE <+0> <+0> <+0> <+0>&DATEtrMDYY"
ON TABLE SUBFOOT
" <+0> "
" <+0> "
"Total Students:<TOT.MYCNTR"
" "
"Parameters Choosen:<+0> "
"Gender: &Gender"
"Ethnicity: ÐNICITY"
"Term:<+0>&TERM_DESC"
"Output: &WFFMT"
" "
"&FOCFEXNAME <+0> <+0> <+0> <+0> <+0> <+0>End of Report"
" "
" "
" "
WHERE PEOPLE_DIM.PEOPLE_DIM.GenderLCase EQ '&Gender.(FIND PEOPLE_DIM.PEOPLE_DIM.GENDER,PEOPLE_DIM.PEOPLE_DIM.GENDER IN people_dim).Gender.';
WHERE PEOPLE_DIM.PEOPLE_DIM.ETHNICITY EQ 'ÐNICITY.(FIND ETHNICITY,PEOPLE_DIM.PEOPLE_DIM.ETHNICITY IN people_dim).ETHNICITY.';
WHERE J7.STUDENT_REGISTRATION_FACT.ACTIVE_FLAG EQ 1;
WHERE PEOPLE_DIM.PEOPLE_DIM.DEAD_IND EQ 'N';
WHERE J11.TERM_DIM.TERM_DESC EQ '&TERM_DESC.(FIND TERM_DIM.TERM_DIM.TERM_DESC,TERM_DIM.TERM_DIM.TERM_DESC IN term_dim).Term.';
ON TABLE SET PAGE-NUM OFF 
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT &WFFMT.(<HTML,HTML>,<PDF,PDF>,<Excel 2000,EXL2K>,<HTML Active Report,AHTML>).Select type of display output.
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = endeflt,



WebFOCUS Server 8.1.05
Windows 2008 Server
WebFOCUS AppStudio 8.1.05
Windows 7 Professional
IE 11 and Chrome Version 43.0.2357.124 m.
Mostly HTML, PDF, Excel, and AHTML
 
Posts: 272 | Location: Kalamazoo, Michigan | Registered: September 30, 2010Report This Post
Expert
posted Hide Post
Do Cntl+A, Cntl+C and copy the code into a Notepad txt document; keep it open. Then just close out Dev Studio.
Go back into Dev Studio, open the FEX, Cntl+A and hit the Delete button. Then copy the Notepad code back into the Fex and save...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Guru
posted Hide Post
I just noticed I didn't have the quotes around the EVAL, so I added them and it still doesn't work.

-IF '&Gender.EVAL' EQ '_FOC_NULL' GOTO ALL_SELECTED;


WebFOCUS Server 8.1.05
Windows 2008 Server
WebFOCUS AppStudio 8.1.05
Windows 7 Professional
IE 11 and Chrome Version 43.0.2357.124 m.
Mostly HTML, PDF, Excel, and AHTML
 
Posts: 272 | Location: Kalamazoo, Michigan | Registered: September 30, 2010Report This Post
Guru
posted Hide Post
Okay, I did that. Same thing..I'm stuck in source.


WebFOCUS Server 8.1.05
Windows 2008 Server
WebFOCUS AppStudio 8.1.05
Windows 7 Professional
IE 11 and Chrome Version 43.0.2357.124 m.
Mostly HTML, PDF, Excel, and AHTML
 
Posts: 272 | Location: Kalamazoo, Michigan | Registered: September 30, 2010Report This Post
Expert
posted Hide Post
OK, you are using AutoPrompt, not a HTML page.
I don't know what you mean, "I'm stuck in source".

The reason may be this:

WHERE PEOPLE_DIM.PEOPLE_DIM.ETHNICITY EQ 'ÐNICITY.(FIND ETHNICITY,PEOPLE_DIM.PEOPLE_DIM.ETHNICITY IN people_dim).ETHNICITY.';

Your &E is missing with this strange character...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Guru
posted Hide Post
That is strange. I don't see the strange character. Mine says &Ethnicity.

This is the code for the FEX that is used by the html launch page. I am testing in the FEX. What I mean by "stuck in source" is when I am adjusting the code manually(not in the GUI) using the source tab at the bottom, after I make the changes I am held captive in this tab. I can not get back to the report tab(the GUI). It's telling me it doesn't like something(I just wish it would tell me what the something is!). The only way out is to close the screen, then I lose the code I added.


WebFOCUS Server 8.1.05
Windows 2008 Server
WebFOCUS AppStudio 8.1.05
Windows 7 Professional
IE 11 and Chrome Version 43.0.2357.124 m.
Mostly HTML, PDF, Excel, and AHTML
 
Posts: 272 | Location: Kalamazoo, Michigan | Registered: September 30, 2010Report This Post
Expert
posted Hide Post
Edit the code in text, right-click the fex and select text editor...

Yes, the GUI does not like most Dialogue Manager code. If you utilize this type of coding, it will not open in the GUI anymore, only in the Text Editor...

You are PROMPTing for the selected values via the code in your fex; that is called AutoPrompting, as it says when the browser page opens...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Guru
posted Hide Post
What about something like this?

-*SET INP1
-*SELECT COUNTRY
-* 0 ALL
-* 1 ENGLAND
-* 2 FRANCE
-* 3 ITALY
-* 4 JAPAN
-* 5 W GERMANY
-SET &INP1 = 1;
-*SET INP2
-*SELECT CAR
-* 0  ALL
-* 1  ALFA ROMEO 
-* 2  AUDI 
-* 3  BMW 
-* 4  DATSUN 
-* 5  JAGUAR 
-* 6  JENSEN 
-* 7  MASERATI 
-* 8  PEUGEOT 
-* 9  TOYOTA 
-* 10 TRIUMPH 
-SET &INP2 = 0;
-SET &WHCNTRY = DECODE &INP1(0 '-*'
-                            1 'WHERE COUNTRY EQ ''ENGLAND'''
-                            2 'WHERE COUNTRY EQ ''FRANCE'''
-                            3 'WHERE COUNTRY EQ ''ITALY'''
-                            4 'WHERE COUNTRY EQ ''JAPAN'''
-                            5 'WHERE COUNTRY EQ ''W GERMANY''');
-SET &COUNTRY = DECODE &INP1(0 'CNTRYHD/A20 = ''ALL COUNTRIES'';'
-                         ELSE 'CNTRYHD/A20 = COUNTRY;');
-SET &WHCAR   = DECODE &INP2(0  '-*'
-                            1  'WHERE CAR EQ ''ALFA ROMEO'''
-                            2  'WHERE CAR EQ ''AUDI'''
-                            3  'WHERE CAR EQ ''BMW'''
-                            4  'WHERE CAR EQ ''DATSUN'''
-                            5  'WHERE CAR EQ ''JAGUAR'''
-                            6  'WHERE CAR EQ ''JENSEN'''
-                            7  'WHERE CAR EQ ''MASERATI'''
-                            8  'WHERE CAR EQ ''PEUGEOT'''
-                            9  'WHERE CAR EQ ''TOYOTA'''
-                            10 'WHERE CAR EQ ''TRIUMPH''');
-SET &CAR     = DECODE &INP2(0 'CARHD/A20 = ''ALL CARS'';'
-                         ELSE 'CARHD/A20 = CAR;');
-*
DEFINE FILE CAR
&COUNTRY.EVAL
&CAR.EVAL
END
-*
TABLE FILE CAR
HEADING CENTER
"COUNTRY = <CNTRYHD"
"CAR     = <CARHD"
PRINT 
      COUNTRY
      CAR
      MODEL
      BODYTYPE
      SEATS
      DEALER_COST
      RETAIL_COST
      SALES 
BY COUNTRY NOPRINT
BY CAR NOPRINT
&WHCNTRY.EVAL
&WHCAR.EVAL
END
-EXIT


Glenda

In FOCUS Since 1990
Production 8.2 Windows
 
Posts: 301 | Location: Galveston, Texas | Registered: July 07, 2004Report This Post
Guru
posted Hide Post
Tom, Thank you for your help. I edited it in the text editor(which is what I thought I was doing by going into the source tab) and IT WORKS!!

Glenda, Thank you for the code. I will have to look that over.


WebFOCUS Server 8.1.05
Windows 2008 Server
WebFOCUS AppStudio 8.1.05
Windows 7 Professional
IE 11 and Chrome Version 43.0.2357.124 m.
Mostly HTML, PDF, Excel, and AHTML
 
Posts: 272 | Location: Kalamazoo, Michigan | Registered: September 30, 2010Report This Post
Expert
posted Hide Post
MAdams,

Your Welcome. Edit your 1st Post and Place {Solved} in the Heading.

FYI, I don't use the GUI, and, when I am directed to just use the AutoPrompt, I use -PROMPT. May want to read up on that...

Glenda, she needs to PROMPT for her values to be selected. -SET will not work.


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Guru
posted Hide Post
Thank you Tom. I am still learning as I go and always appreciate the advise and help.


WebFOCUS Server 8.1.05
Windows 2008 Server
WebFOCUS AppStudio 8.1.05
Windows 7 Professional
IE 11 and Chrome Version 43.0.2357.124 m.
Mostly HTML, PDF, Excel, and AHTML
 
Posts: 272 | Location: Kalamazoo, Michigan | Registered: September 30, 2010Report 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}Amper Variable usage in heading when value is _FOC_NULL

Copyright © 1996-2020 Information Builders