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] Reading files from different libraries and writing out to 1 central file

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Reading files from different libraries and writing out to 1 central file
 Login/Join
 
Member
posted
I have been asked to write a program which reads files with same format from different branch files. (I beleive i've worked this bit out) What i need to do is write out information from each of these files to a separate central file in order to output all results across the branches to a single output

This is my 1st post and would be grateful for all help. I work better with examples but pointers are also good. Thank you in antisipation Susan

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


Webfocus 7.6.11
Platform: AS400 V5R4M0
Output: PDF, XML, Excel, HTML, AHTML
 
Posts: 6 | Location: Bristol UK | Registered: November 01, 2006Report This Post
Expert
posted Hide Post
You really should update your signature so we can tell what version of WebFOCUS/FOCUS you're using.

Are the branch files flat files or WebFOCUS databases or DBMS tables? One central file?

If these files have individual MASTERs, you can use the MORE command to concatenate them.

The USE command is very handy for FOCUS databases.

If they're flat files and you have only one Master, a loop of FILEDEFs for the input files and a FILEDEF (APPEND for the output would work.

If it's a mainframe batch job, you can concatenate them in the JCL.

We really need to know something about your environment.


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



Ditto with what Francis has said.

More info will be very useful.


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
I agree. More info would be useful. You might get away with MORE, or might have to move up to MATCH FILE or even MODIFY FILE. It's going to take you a while to master the latter ...


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
 
Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010Report This Post
Member
posted Hide Post
I believe i have updated my profile. I am currently testing the MORE command. It appears to be doing something but i do not seem to be able to interrogate the HOLD file, below is the code i am using
TABLE FILE BPLSD00BGAL
PRINT
SDNAME
BY SDCODE
ON TABLE SAVE AS SUPPLIER
MORE
FILE BPLSD00BIRM
MORE
FILE BPLSD00BMAN
MORE
FILE BPLSD00BPAC
MORE
FILE BPLSD00BRIS
MORE
FILE BPLSD00COAT
END

TABLE FILE SUPPLIER
PRINT
SDNAME
BY BRANCH
BY SDCODE
ON TABLE NOTOTAL
END


Below is the result i get

SET GRAPHSERVURL=http://172.16.1.214:80/ibi_apps/IBIGraphServlet
SET GRAPHENGINE=GRAPH53
TABLE FILE BPLSD00BGAL
PRINT
SDNAME
BY SDCODE
ON TABLE SAVE AS SUPPLIER
MORE
FILE BPLSD00BIRM
MORE
FILE BPLSD00BMAN
MORE
FILE BPLSD00BPAC
MORE
FILE BPLSD00BRIS
MORE
FILE BPLSD00COAT
END
TABLE FILE SUPPLIER
PRINT
SDNAME
BY BRANCH
BY SDCODE
ON TABLE NOTOTAL
END
0 NUMBER OF RECORDS IN TABLE= 7150 LINES= 7150
ALPHANUMERIC RECORD NAMED SUPPLIER
0 FIELDNAME ALIAS FORMAT LENGTH
SDCODE SDCODE A6 6
SDNAME SDNAME A40 40
TOTAL 46
0 NUMBER OF RECORDS IN TABLE= 0 LINES= 0


I hope you or anyone can assist me further


Regards

Susan


Webfocus 7.6.11
Platform: AS400 V5R4M0
Output: PDF, XML, Excel, HTML, AHTML
 
Posts: 6 | Location: Bristol UK | Registered: November 01, 2006Report This Post
Platinum Member
posted Hide Post
Hi,

You need to HOLD the file not SAVE ..
ON TABLE HOLD AS SUPPLIER
SAVE will not create a Master and you will not be able to query it in a TABLE request..

thanks
Sashanka


WF 7.7.03/Windows/HTML,PDF,EXL
POC/local Dev Studio 7.7.03 & 7.6.11
 
Posts: 103 | Registered: June 12, 2009Report This Post
Virtuoso
posted Hide Post
Could be that a SUPPLIER master file is already in place. If that's the case, you would have to point it to the right location though (using FILEDEF SUPPLIER DISK ...). From the output I suspect that's the problem.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Virtuoso
posted Hide Post
Hi Susan,
Welcome to the world of FOCUS!
Your code:
quote:

TABLE FILE BPLSD00BGAL
PRINT
SDNAME
BY SDCODE
ON TABLE SAVE AS SUPPLIER
MORE
FILE BPLSD00BIRM
MORE
FILE BPLSD00BMAN
MORE
FILE BPLSD00BPAC
MORE
FILE BPLSD00BRIS
MORE
FILE BPLSD00COAT
END
TABLE FILE SUPPLIER
PRINT
SDNAME
BY BRANCH
BY SDCODE
ON TABLE NOTOTAL
END  

has an inconsistency:
You are saving 2 fields SDNAME and SDCODE in your SUPPLIER file but then you want to display 3 fields: BRANCH, SDNAME and SDCODE.
Since FOCUS did not tell you that BRANCH is not a field of SUPPLIER, this means that GamP is correct: you have an existing MASTER named SUPPLIER which has at least these 3 fields.
Also, as has been said, use HOLD and not SAVE in order to create a SUPPLIER master also.
If you need BRANCH, then it must be also in your first TABLE request and appear in all the files that you are concatenating, either physically or by use of a DEFINE command.

I hope this is clear.


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 to everyone who posted a reply. I appreciate every input and have tried the suggestion and have resolved my problem.

Thank You all very much

Susan


Webfocus 7.6.11
Platform: AS400 V5R4M0
Output: PDF, XML, Excel, HTML, AHTML
 
Posts: 6 | Location: Bristol UK | Registered: November 01, 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] Reading files from different libraries and writing out to 1 central file

Copyright © 1996-2020 Information Builders