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.
Look up -READ and -WRITE you'll be making a flat file then reading it in record by record testing to see if field1 is the same as last field 1 if so, just write out field 2 thru whatever if not, then write out just field 1 and then write out a new line of field 2 thru whatever Lather, rinse, and repeat until &IORETURN NE 0 (which is endoffile) and btw, kudos for researching first. sounds like you looked up reasonable concepts... but this is the way to do it. if you need more help, come backThis message has been edited. Last edited by: susannah,
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
what do you mean by a feed file? is this meant to be used in an other program? maybe think of an other solution? reading this in, is always complicated, but if it is on one line it is not. otherways you might consider defining all the strings and print them. define file xxx field1= byfield; field2= detail1||','||detail2; end table file xxx print field1 as '' over field2 '' on table hold format wp end
I'm not sure if this can work, but since I'm not on the office I can't try this.
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006
Susannah - omigosh, i just went through an entire learning process here. can't find -rinse and -lather but found everything else LOL . It's working now, thanks a bunch.
Now, I got a not-so-important functionality that I was hoping to provide - I wanted to open up the file on notepad after the file is created. I tried -WINNT notepad file.txt and it didn't work because the server doesn't have it installed. Is there a way to issue a -WINNT command to run on the client?
I tried looking for -WINNT on the docs but there's not much info on it out there. Or maybe I wasn't looking at the right place.
You could try this command but it will only function when you are actually in a browser session on the actual reporting server itself. It will not work on a distant client because notepad will be trying to open on the reporting server not the end users machine.
It still tries to look for notepad from some server that doesn't have it. How can I launch notepad from the local machine?
I also tried doing a TABLE FILE on it with pchold format wp then defining wp extension to notepad in the local machine. Still wants to report onto a browser window.
Is your intention just to show the user the contents of the file that your process is creating?
If so then you could echo the output to the file by using -TYPE after your -WRITE coding. That way the method used would wash right over the heads of your Users so that they don't get into a lather about it!
In the example below I am saving data about personel in departments (using sample data in EMPLOYEE) and then reading it back in and outputing it to a text file as per your requirements. I am also utilising the -TYPE to echo the output to the browser window.
However, when you perform a SAVE or HOLD you normally get responses from WebFOCUS about the held file which you may not want your User to see. So I redirect the SYSPRINT (from Mainframe terminology) to a file in the EDATEMP directory that will eventually be discarded as the agent finishes. When I want to reinstate the SYSPRINT output I redirect it back to TERM (as in terminal) and the output resumes. If I do this at the correct point then I can control what the end user sees on their screen.
-SET &ECHO = OFF;
-DEFAULT &Last_Dept = ''
SET MESSAGE=OFF
APP FI SYSPRINT DISK sysprint.txt
APP FI MYFILE DISK baseapp/myfile.txt
TABLE FILE EMPLOYEE
PRINT FIRST_NAME
LAST_NAME
BY DEPARTMENT
ON TABLE SAVE AS TEMPEMP
END
-RUN
APP FI SYSPRINT TERM
-READ TEMPEMP &Dept.A10. &First.A10. &Last.A15.
-REPEAT :Loop WHILE &IORETURN EQ 0;
-IF &Last_Dept EQ &Dept THEN :Skip_Header;
-WRITE MYFILE &Dept
-TYPE &Dept
-:Skip_Header
-WRITE MYFILE &First &Last
-TYPE &First &Last
-SET &Last_Dept = &Dept;
-READ TEMPEMP &Dept.A10. &First.A10. &Last.A15.
-:Loop
Might not be exactly what you want but might give you some ideas.
If you want your Users to be able to edit the file then I would suggest HOLDing it and then using MAINTAIN.
TThis message has been edited. Last edited by: Tony A,
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, 2004