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] specified label not found

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] specified label not found
 Login/Join
 
Member
posted
if you have a label like IBTRAD

ex.
if &LINES EQ 0 THEN GOTO IBTRAD


-IBTRAD

Question: should the last statement before the label -IBTRAD be an END or EXIT only?

My issue is trying to create a SQLSCRIPT that uses UNION when multiple items are selected

ex.
if &IBR = 'Y' then ' ' else goto IBTRAD; (when executed it gives the FOC305 error)
-IBDIR
select....
from...
where...

if &IBT = 'Y' then ' ' else goto IBTRANS;
-IBTRAD
union
select ....
from ...
where ...

This message has been edited. Last edited by: Kerry,
 
Posts: 2 | Location: Ryebrook, NY | Registered: October 15, 2008Report This Post
Member
posted Hide Post
quote:
if &IBT = 'Y' then ' ' else goto IBTRANS;


I think the if statements need to be replaced by something like this:
-if &IBR EQ 'Y' then ' ' else goto IBTRAD;
-if &IBT EQ 'Y' then ' ' else goto IBTRANS;
 
Posts: 4 | Location: Netherlands | Registered: August 09, 2005Report This Post
Expert
posted Hide Post
Why not just have -
-IF &IBR NE 'Y' THEN IBTRAD;
-IF &IBT NE 'Y' THEN IBTRANS;

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Member
posted Hide Post
the issue is not the goto...it is the LABEL NOT BEING FOUND... the &ibd, &ibtd, &ibtr and &ibr can be set to 'Y' when selected in a drop down
namely IBDIR (if selected, set &ibd to 'Y')
IBTRAD ( " &ibtd " )
IBTRANS ( " &ibtr " )
IBRESS ( " &ibr " )

if &ibd = 'Y' then ' ' else goto IBTRAD
-IBDIR
select....

-IBTRAD
if &ibtd = 'Y' then ' ' else goto IBTRANS
union
select ....

-IBTRANS
IF &ibtr = 'Y' then ' ' else goto IBRESS
union
select ...

-IBRESS
if &ibr = 'Y' then ' ' else goto NOMORE
union
select ...
-NOMORE
(script is not exactly correct, just pointing
the idea of using union in the select)

The goal is to create a single script (using UNION) to extract all selected type of records (IBTRAD, IBDIR...etc). Any other approach that
you can suggest?
 
Posts: 2 | Location: Ryebrook, NY | Registered: October 15, 2008Report This Post
Master
posted Hide Post
Have you tried what Tony suggested? Be sure you have the semicolon at the end. Also be sure it begins in position 1, no indentation. And in answer to your other question:

Question: should the last statement before the label -IBTRAD be an END or EXIT only?

Do you want the code following -IBTRAD to be executed? If not, then you want an -EXIT or a -GOTO before it, an END will not stop the execution.

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


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 2007Report This Post
Expert
posted Hide Post
And, as Michael said above, the dash in front of the IF. That should be -IF.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Master
posted Hide Post
-IF &IBD NE 'Y' THEN IBTRAD;
-IBDIR
select....

-IBTRAD
-IF &IBTD NE 'Y' THEN GOTO IBTRANS;
union
select ....

-IBTRANS
-IF &IBTR NE 'Y' THEN GOTO IBREST;
union 
select ...

-IBREST
-IF &IBR NE 'Y' THEN GOTO NOMORE;
union
select ...
-NOMORE
END
-RUN


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006Report This Post
Expert
posted Hide Post
As many have said..

Here is the syntax of the -IF command

-IF expression [THEN] GOTO label1[;] [ELSE GOTO label2[;]] [ELSE IF...[;]] 


The command -IF must end with a semicolon ( ; ) to signal that all logic has been specified. Continuation lines must begin with a hyphen (-) and lines must break between words.

This was taken directly from the documentation.

Awk7, from the way this was coded, I do beleive that you don't have a good understanding of the {Web}FOCUS language, I think it would be a good idea for you to get training or at lease have a good look at the manuals.

A link to search documentation is at the top of the page.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6349 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report 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] specified label not found

Copyright © 1996-2020 Information Builders