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] Two Excel Reports from One Procedure

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[Solved] Two Excel Reports from One Procedure
 Login/Join
 
Platinum Member
posted
Hi,

I have written a procedure, in which my output should be 2 excel sheets. But when i am running the procedure i am getting only the last report. What could be the reason and could any one suggest the solution for getting two excel output reports.

This message has been edited. Last edited by: Vinay Kumar,


WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
 
Posts: 135 | Registered: November 30, 2010Report This Post
Virtuoso
posted Hide Post
try this

*
-* example of how to use the EXL2K OPEN/CLOSE option in combination with BYTOC and the TITLETEXT
-*
-*[CAR:SUMMARY]
-*------------------------------->
TABLE FILE CAR
SUM CNT.CAR
BY COUNTRY
ON TABLE PCHOLD FORMAT EXL2K OPEN
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
     TITLETEXT='Summary',
$
END
-RUN
-*------------------------------->
-*
-*
-*[CAR:PER COUNTRY
-*------------------------------->
TABLE FILE CAR

PRINT CAR
BY COUNTRY

ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT EXL2K CLOSE
ON TABLE SET COMPOUND 'BYTOC 1'
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
END
-*--------------------------




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, 2006Report This Post
Platinum Member
posted Hide Post
Hi Frank,

The solution which you have provided would create 2 reports in one excel(different work books) sheet.

My requirement is to create two different excel sheets.


WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
 
Posts: 135 | Registered: November 30, 2010Report This Post
Virtuoso
posted Hide Post
true

try this

-* File exl2K_OUTPUT_TITLE_BYTOC.fex
-*
-* example of how to use the EXL2K OPEN/CLOSE option in combination with BYTOC and the TITLETEXT
-*
-*[CAR:SUMMARY]
-*------------------------------->
FILEDEF K0404FA1  DISK D:\ibi\apps\inboxftp\summary.xls
-*
TABLE FILE CAR
SUM CNT.CAR
BY COUNTRY
ON TABLE HOLD AS K0404FA1 FORMAT EXL2K 
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
     TITLETEXT='Summary',
$
END
-RUN
-*------------------------------->
-*
-*
FILEDEF K0404FA2  DISK D:\ibi\apps\inboxftp\details.xls
-*[CAR:PER COUNTRY
-*------------------------------->
TABLE FILE CAR

PRINT CAR
BY COUNTRY

ON TABLE NOTOTAL
ON TABLE HOLD AS K0404FA2 FORMAT EXL2K 
ON TABLE SET COMPOUND 'BYTOC 1'
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
END
-*------------------------------->


I added two filedefs
they both point to a writable directory on the server where the files now will be available




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, 2006Report This Post
Platinum Member
posted Hide Post
Frank,

I am getting the below error.

(FOC350) ERROR WRITING OUTPUT FILE: K0404FA1


WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
 
Posts: 135 | Registered: November 30, 2010Report This Post
Expert
posted Hide Post
Try this:

SET PAGE-NUM=OFF
-RUN

SET COMPOUND=OPEN
-RUN

TABLE FILE CAR
SUM SALES
BY COUNTRY
HEADING
"Sales Report"
" "

ON TABLE SET STYLE *
TYPE=REPORT, TITLETEXT='Sales', $
ENDSTYLE
ON TABLE PCHOLD FORMAT EXL2K
END
-RUN

SET COMPOUND=CLOSE
-RUN

TABLE FILE CAR
SUM DC
BY COUNTRY
HEADING
"Cost Report"
" "

ON TABLE SET STYLE *
TYPE=REPORT, TITLETEXT='Cost', $
ENDSTYLE
ON TABLE PCHOLD FORMAT EXL2K
END



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
Virtuoso
posted Hide Post
Does your FILEDEF point to an excisting directory?




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, 2006Report This Post
Virtuoso
posted Hide Post
Francis

Your solution does the same as I suggested in my first answer.
He wants 2 separated spreadsheets.




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, 2006Report This Post
Platinum Member
posted Hide Post
Thanks Frank! Your code worked! I gave my filedef path wrong!

Thanks Francis for your reply!

Does FILEDEF won't work on mainframe focus?


WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
 
Posts: 135 | Registered: November 30, 2010Report This Post
Platinum Member
posted Hide Post
If i have to write the same logic in mainframe focus. How could it be using FILEDEF?


WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
 
Posts: 135 | Registered: November 30, 2010Report This Post
Expert
posted Hide Post
Frank, sorry, I misunderstood! Yours is the correct answer. Vinay's code may not be pointing to a directory that the reporting server can write to.

I don't think you need the COMPOUND statement, this works, using the FILEDEFs to APP folders:

-* File multi_excel1.fex

FILEDEF REPORT1 DISK demo/report1.xls
-RUN

TABLE FILE CAR
SUM CNT.CAR
BY COUNTRY
ON TABLE HOLD AS REPORT1 FORMAT EXL2K
ON TABLE SET STYLE *
TITLETEXT='Summary', $
END
-RUN

FILEDEF REPORT2 DISK demo/report2.xls
-RUN

TABLE FILE CAR
PRINT CAR
BY COUNTRY
ON TABLE HOLD AS REPORT2 FORMAT EXL2K
ON TABLE SET STYLE *
TITLETEXT='Detail', $
END
-RUN


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
Ya Francis! I corrected it!

Could you please help me in writting the same logic in mainframe focus?

When i am using FILEDEF in mainframe focus, i am getting below error.

UNKNOWN FOCUS COMMAND FILEDEF


WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
 
Posts: 135 | Registered: November 30, 2010Report This Post
Expert
posted Hide Post
Use DYNAM ALLOC for the mainframe, or use FILEDEF as my previous example - if the output location is an App folder.


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
Francis, does FILEDEF works in mainframe focus?

I am getting an error when i am using FILEDEF!


WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
 
Posts: 135 | Registered: November 30, 2010Report This Post
Expert
posted Hide Post
Use DYNAM ALLOC on the mainframe. I don't know how you can create an Excel file on the mainframe though, so the technique discussed in this thread may not be possible...


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 have worked using DYNAM ALLOC. I was just wondering on how to use FILEDEF in mainframes!

Thanks for the reply Francis!


WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
 
Posts: 135 | Registered: November 30, 2010Report This Post
Expert
posted Hide Post
Vinay, could you please tell me how you managed to create an Excel spreadsheet on the mainframe? The Excel spreadsheet is saved in a file that is DYNAM ALLOCated, but how do you access this spreadsheet? Via FTP?


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
Francis,

The focus query would be the same as we write in webfocus, but the output (format excel) should be holded in a sequential file.

After writting writting the query, we would need to write a mail step in JCL using a mail PROC. There would be two sysin's, one for TO mail id and other for attachments. The attachments would be output sequential files.

When you submit the job, you would be getting an email in the format excel.

Let me know if you need more info!


WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
 
Posts: 135 | Registered: November 30, 2010Report 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] Two Excel Reports from One Procedure

Copyright © 1996-2020 Information Builders