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, MalindaThis message has been edited. Last edited by: Kerry,
WebFOCUS 7.6.11 Windows all output (Excel, HTML, PDF)
April 27, 2010, 10:15 AM
Dave
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
April 27, 2010, 10:19 AM
GamP
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
April 27, 2010, 10:42 AM
Malinda
Print file - my final output file 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)
April 27, 2010, 10:43 AM
Francis Mariani
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
April 27, 2010, 10:50 AM
Malinda
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)
April 27, 2010, 10:59 AM
Francis Mariani
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
April 27, 2010, 11:09 AM
Malinda
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)
April 27, 2010, 11:17 AM
njsden
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
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
.
.
Thanks, guys. I will try to MORE and see what I get
malinda
WebFOCUS 7.6.11 Windows all output (Excel, HTML, PDF)
April 27, 2010, 12:34 PM
PBrightwell
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
April 27, 2010, 01:51 PM
Malinda
I am actually trying to put 2 hold files together.
Malinda
WebFOCUS 7.6.11 Windows all output (Excel, HTML, PDF)
April 27, 2010, 02:52 PM
GamP
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.