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     [CLOSED] Copy/Append of hold files

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Copy/Append of hold files
 Login/Join
 
Platinum Member
posted
In mainframe focus, you can create several hold files and then do a copy hold1.ftm to print file and append hold2.ftm to the same print file. How do I do that with WebFocus?

Thanks,
Malinda

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


WebFOCUS 7.6.11
Windows
all output (Excel, HTML, PDF)
 
Posts: 149 | Registered: April 15, 2010Report This Post
Master
posted Hide Post
Not really an answer to that, but a possible 'workaround'.

If the contents of the holdfiles are the same you could use MORE to make the two holdfiles into one. And then copy to print file.


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Virtuoso
posted Hide Post
Don't know exactly what you mean with 'print file'. That is not really a concept very well known on windows machines.
But appending to a hold file can be done by means of the filedef statement:
FILEDEF ddname DISK filename.ftm (APPEND
will do the trick. Be sure you point the filedef to the right logical (ddname) and physical filename.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Platinum Member
posted Hide Post
Print file - my final output file Smiler That is just our wordage from mainframe.

Dave - the contents are pretty much the same, am using the same/similar columns. Where would I put this in my code?

GamP - using FileDef, where would this go in the code, after both hold files are created? And if so, ddname would be my first hold file?

malinda


WebFOCUS 7.6.11
Windows
all output (Excel, HTML, PDF)
 
Posts: 149 | Registered: April 15, 2010Report This Post
Expert
posted Hide Post
Malinda,

Let us know what you would like to do - there are several options:


  • MORE to merge concatenated data sources
  • FILEDEF... (APPEND to append records to the end of the file
  • USE command to concatenate multiple FOCUS data sources


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
Platinum Member
posted Hide Post
I guess I don't know which is my best options. I have already created my 2 hold files. Hold 1 contains the stu id, site id, and the role. hold 2 contains the instructor id, site id and role.

I can do a join on my hold files and create my final file that way but was wondering of a better way or recommendations since my training and knowledge is fairly limited.

I would say probably either MORE or FILEDEF?

Malinda


WebFOCUS 7.6.11
Windows
all output (Excel, HTML, PDF)
 
Posts: 149 | Registered: April 15, 2010Report This Post
Expert
posted Hide Post
If the number of columns, format and names of columns are exactly the same in the two HOLD files, MORE is the best choice. FILEDEF would also work.

But since you have different data in the two files, JOIN or MATCH are the two possibilities.

This does not seem to be the scenario you described in your opening post - "In mainframe focus, you can create several hold files and then do a copy hold1.ftm to print file and append hold2.ftm to the same print file"


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
Platinum Member
posted Hide Post
I can easily make the student id and instructor id columns have the same names, this would then make it so I could use the more.

Where does the MORE command fit it my code?

Malinda


WebFOCUS 7.6.11
Windows
all output (Excel, HTML, PDF)
 
Posts: 149 | Registered: April 15, 2010Report This Post
Virtuoso
posted Hide Post
From documentation:

{TABLE|MATCH}  FILE file1 
   main request 
MORE
FILE file2 
  subrequest 
MORE
FILE file3 
  subrequest 
MORE
   .
   .
   .
{END|RUN}


So you could do:

TABLE FILE STUDENTS
PRINT NAME
BY ID
MORE 
FILE TEACHERS
END



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Expert
posted Hide Post
MORE has a couple of restrictions so definitely look at the documentation but here is a pseudo-code example:
TABLE FILE HOLD1
PRINT whatever
BY otherstuff
ON TABLE HOLD AS xxxxxxx FORMAT yyyyyyyy
MORE
FILE HOLD2
END

This assumes the column names in both files are the same. If not, use a DEFINE or AS name when generating the file to homogenize the names.

The output options always go in the first request.

The only thing that can go in the subreqeusts is a WHERE or IF statement.


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
Virtuoso
posted Hide Post
quote:
I guess I don't know which is my best options. I have already created my 2 hold files. Hold 1 contains the stu id, site id, and the role. hold 2 contains the instructor id, site id and role.


The approach you use depends on what you what to achieve with your report.

If you just want a list of "people" at school with no relationship among them then concatenating the sources would help (via MORE or FILEDEF). You would get something like:

ID  NAME               ROLE
--- ---------------    ---------
100 FOX, MEGAN         STUDENT
110 ROBERTS, JULIA     STUDENT
120 WINSLET, KATE      STUDENT
.
.
500 CAMERON, JAMES     TEACHER
510 SPIELBERG, STEVEN  TEACHER
.
.


Now, if what you need is a list of Students grouped by Teacher, then concatenation is *not* going to help. You'll need to JOIN both structures and then do the report so you could get:

TEACHER_ID  TEACHER_NAME       STUDENT_ID  STUDENT_NAME
----------  ------------------ ----------- --------------
500         CAMERON, JAMES     110         ROBERTS, JULIA
                               120         WINSLET, KATE
                               .
                               .
510         SPIELBERG, STEVEN  100         FOX, MEGAN
                               .
                               .



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Platinum Member
posted Hide Post
Thanks, guys. I will try to MORE and see what I get Smiler

malinda


WebFOCUS 7.6.11
Windows
all output (Excel, HTML, PDF)
 
Posts: 149 | Registered: April 15, 2010Report This Post
Master
posted Hide Post
quote:
Print file - my final output file


Are you wanting to put two data files together or two reports together?


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
Platinum Member
posted Hide Post
I am actually trying to put 2 hold files together.

Malinda


WebFOCUS 7.6.11
Windows
all output (Excel, HTML, PDF)
 
Posts: 149 | Registered: April 15, 2010Report This Post
Virtuoso
posted Hide Post
It depends a bit on what the ultimate purpose of the concatenated file is.

If you trying to put together two identically layed out reports from different sources:
FILEDEF RESULT DISK RESULT.FTM (APPEND
TABLE FILE ONE
PRINT ....
ON TABLE HOLD AS RESULT
END
TABLE FILE TWO
PRINT ...
ON TABLE HOLD AS RESULT
END

This will put the result from both requests in the same file.
You can further process the final file with the result master file, which is created by the second request.

Hope this helps ...


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report 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     [CLOSED] Copy/Append of hold files

Copyright © 1996-2020 Information Builders