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] Getting error like CONTROL LINE NOT RECOGNIZED IN FOCEXEC

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Getting error like CONTROL LINE NOT RECOGNIZED IN FOCEXEC
 Login/Join
 
Member
posted
This getting an error while running my report.
The error throws like this: CONTROL LINE NOT RECOGNIZED IN FOCEXEC: -REPEAT FCLTY_INFO FOR I FROM 1 TO &MAXFCTY;.

Below are my pieces of code:
quote:
CONTROL LINE NOT RECOGNIZED IN FOCEXEC: -REPEAT FCLTY_INFO FOR I FROM 1 TO &MAXFCTY;

This message has been edited. Last edited by: FP Mod Chuck,


Apps Studio 8.1.0.5
Windows 7
 
Posts: 29 | Registered: March 02, 2016Report This Post
Virtuoso
posted Hide Post
Must be :
-REPEAT FCLTY_INFO FOR &I FROM 1 TO &MAXFCTY;

....your code...

-FCLTY_INFO


Note the end loop tag : -FCLTY_INFO

AND the variable : &I


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
Virtuoso
posted Hide Post
What's your code?

One thing I notice is that you appear to be using a constant I for a variable.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Member
posted Hide Post
Below is my code
quote:
-SET &FAC_ID = ' ';
-SET &FCTYLIST = ' ';
-SET &FCTYLIST1 = ' ';

-REPEAT FCLTY_INFO FOR &I FROM 1 TO &MAXFCTY;
-READFILE FCTYLIST

-SET &FAC_ID = TRUNCATE(&FAC_ID);
-SET &FCTYLIST = IF &I EQ 1 THEN &FAC_ID ELSE IF &I LT 3000 THEN &FCTYLIST|| ','|| &FAC_ID ELSE &FCTYLIST

-************
-FCLTY_INFO
-************
"Some SQL statement conditions"


Apps Studio 8.1.0.5
Windows 7
 
Posts: 29 | Registered: March 02, 2016Report This Post
Virtuoso
posted Hide Post
You seem to be missing a ; at the end of code line 7.
Does &MAXFCTY have a value?


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Member
posted Hide Post
Hi Danny,

That was typo error. Semi colon is there. &MAXFCTY having value.


Apps Studio 8.1.0.5
Windows 7
 
Posts: 29 | Registered: March 02, 2016Report This Post
Virtuoso
posted Hide Post
This worked for me:
  
-SET &FAC_ID = ' ';
-SET &FCTYLIST = ' ';
-SET &FCTYLIST1 = ' ';

DEFINE FILE CAR
FAC_ID/I5=SALES;
FCTYLIST/A30=MODEL;
END
TABLE FILE CAR
PRINT FAC_ID FCTYLIST
ON TABLE HOLD AS FCTYLIST
END
-RUN
-SET &MAXFCTY = &LINES;
-REPEAT FCLTY_INFO FOR &I FROM 1 TO &MAXFCTY;
-READFILE FCTYLIST

-SET &FAC_ID = TRUNCATE(&FAC_ID);
-SET &FCTYLIST = IF &I EQ 1 THEN &FAC_ID ELSE IF &I LT 3000 THEN &FCTYLIST || ','|| &FAC_ID ELSE &FCTYLIST;
-TYPE &FAC_ID : &FCTYLIST
-************
-FCLTY_INFO


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Virtuoso
posted Hide Post
This will probably not solve your problem, but it's a waste of cycles to keep looping through the file past that 3000 line limit you seem to impose.

Suggestion:
-SET &MAXFCTY = MIN(&MAXFCTY, 3000);
-REPEAT ...
-SET &FCTYLIST = IF &I EQ 1 THEN &FAC_ID ELSE &FCTYLIST|| ','|| &FAC_ID;


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Member
posted Hide Post
Hemin,

Please try the below code. I just added the sample code using CAR master file. I didn't get any error when I execute it.

-SET &FAC_ID = '';
-SET &FCTYLIST = '';
-SET &FCTYLIST1 = '';
-SET &SEATS = '';
-SET &CAR = '';


TABLE FILE CAR
SUM
SEATS
BY CAR
ON TABLE HOLD AS FCTYLIST
END
-RUN

-SET &MAXFCTY = &LINES;

-REPEAT FCLTY_INFO FOR &I FROM 1 TO &MAXFCTY;
-READFILE FCTYLIST

-SET &FAC_ID = TRUNCATE(&SEATS);
-SET &FCTYLIST = IF &I EQ 1 THEN &FAC_ID ELSE IF &I LT 3000 THEN &CAR|| ','|| &FAC_ID ELSE &CAR;
-TYPE FCTYLIST &FCTYLIST

-************
-FCLTY_INFO
-************
"Some SQL statement conditions"


WebFOCUS 8.6
Windows, All Outputs
 
Posts: 9 | Registered: September 25, 2014Report This Post
Member
posted Hide Post
Hi guys,

Problem got solved. Value for 'I' was not passed correctly.


Apps Studio 8.1.0.5
Windows 7
 
Posts: 29 | Registered: March 02, 2016Report 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] Getting error like CONTROL LINE NOT RECOGNIZED IN FOCEXEC

Copyright © 1996-2020 Information Builders