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]IN FILE statement

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]IN FILE statement
 Login/Join
 
Guru
posted
I'm using the IN FILE statement in the following dialogue manager -IF statement but I'm getting the error message "INPUT FILE NOT ALLOCATED." I have an APP HOLD foldername statement in the fex also. I need to compare the value passed in the &FILENO parameter to the fileno in the BESTCUST file. Thanks.

-IF &FILENO IN FILE BESTCUST GOTO SECTION1 ELSE GOTO SECTION2;



WF 8009
Windows 7

This message has been edited. Last edited by: Michele Brooks,


WF 8205, Windows 10
Oracle DBMS
EXL07/PDF Output
 
Posts: 244 | Registered: August 27, 2012Report This Post
Virtuoso
posted Hide Post
Hi Michele

You will need to put a FILEDEF command in to allocate the BESTCUST file. An example is below.

FILEDEF BESTCUST DISK baseapp/bestcust.ftm


Hope that helps


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
Guru
posted Hide Post
I do have the following filedef in the fex.


FILEDEF BESTCUST DISK "E:/ibi/apps/prod_workarea_ar/bestcust.ftm"


WF 8205, Windows 10
Oracle DBMS
EXL07/PDF Output
 
Posts: 244 | Registered: August 27, 2012Report This Post
Virtuoso
posted Hide Post
Hi Michele

Try putting a -RUN after the FILEDEF

Regards


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
Expert
posted Hide Post
You cannot use IN FILE in a Dialogue Manager IF statement to test for values in a file - an IF statement will not read a file.

You will have to -READ or -READFILE each row into variables, then test the variables.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Guru
posted Hide Post
Thanks so much Chuck, the -RUN worked. The fex is going to the correct label.

Francis, the -IF worked. I'm reading a parameter value that is being passed via a -DEFAULT and seeing if the value is in the .ftm file that may or may not have the parameter value.

I'll close the post.


WF 8205, Windows 10
Oracle DBMS
EXL07/PDF Output
 
Posts: 244 | Registered: August 27, 2012Report This Post
Expert
posted Hide Post
Either I have completely forgotten that IN FILE works or I never knew!

Michelle, thanks for (re)educating me!

This message has been edited. Last edited by: Francis Mariani,


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Guru
posted Hide Post
Try this and let me know if it works.
 
-SET &ECHO = ALL;


-DEFAULT &TYPECAR = 'DATSUN';

APP HOLD prod_workarea_ar

FILEDEF CARFILE DISK "E:/ibi/apps/prod_workarea_ar/carfile.ftm"
-RUN

TABLE FILE CAR
PRINT CAR
WHERE CAR EQ 'DATSUN' OR 'JENSEN' OR 'JAGUAR'
ON TABLE HOLD AS CARFILE FORMAT ALPHA
END

-IF &TYPECAR IN FILE CARFILE GOTO TYPE_SPECIFIC ELSE GOTO TYPE_ALLCARS;

-TYPE_SPECIFIC
TABLE FILE CAR
"&TYPECAR Cars"
""
""
PRINT *
WHERE CAR EQ '&TYPECAR'
END
-GOTO ENDRPT
-TYPE_ALLCARS
TABLE FILE CAR
"All Cars"
""
""
PRINT *
WHERE CAR NE '&TYPECAR'
END
-GOTO ENDRPT
-ENDRPT
-EXIT

 


WF 8205, Windows 10
Oracle DBMS
EXL07/PDF Output
 
Posts: 244 | Registered: August 27, 2012Report This Post
Expert
posted Hide Post
Michelle, thanks - I did test with the CAR file and yes, it works Smiler


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
Wow, Another hidden gem undiscovered.

But is it documented ?

Quick delete your posts before someone else finds out

Cool


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: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Master
posted Hide Post
Yep, it is in the Developing Reporting Applications manual in the 'Supplying Variable Values in an Expression' section.

The example in the manual shows it used in a -SET command:
-SET &VAR1 = 'ABC ';
-SET &VAR2 = &VAR1 IN FILE FILE1; 


So that you could then test on &VAR2:
-IF &VAR2 EQ 0 THEN GOTO SECTION1 ELSE GOTO SECTION2; 

I haven't had to use it yet, but it is good to know for possible future use. :-)
 
Posts: 822 | Registered: April 23, 2003Report This Post
Expert
posted Hide Post
If Waz didn't know, then I don't feel so foolish!


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report 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]IN FILE statement

Copyright © 1996-2020 Information Builders