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.
Is it possible to get the result of a remote sql query to output in excel/pdf format?
I've been trying the following program but it seems that it is ignoring the SQLOUT and PCHOLD and just displaying the result of the SELECT statement.
-*Remote FOCUS mainframe
REMOTE DEST=MVS436
-MRNOEDIT BEGIN
-REMOTE BEGIN
SET SQLENGINE=DB2
SQL DB2
SELECT * FROM DSN.AMNAPPRV
FETCH FIRST 5 ROWS ONLY;
END
-RUN
TABLE FILE SQLOUT
PRINT *
ON TABLE PCHOLD
END
-RUN
-REMOTE END
-MRNOEDIT END
TABLE FILE HOLD
PRINT *
ON TABLE PCHOLD FORMAT EXL2K
END
This message has been edited. Last edited by: Mighty Max,
REMOTE DEST=MVS436
-MRNOEDIT BEGIN
-REMOTE BEGIN
SET SQLENGINE=DB2
SQL
SELECT * FROM DSN.AMNAPPRV
FETCH FIRST 5 ROWS ONLY;
TABLEF
ON TABLE HOLD
END
-RUN
-REMOTE END
-MRNOEDIT END
TABLE FILE HOLD
PRINT *
ON TABLE PCHOLD FORMAT EXL2K
END
WebFOCUS 7.7.05
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007
HOLDING...
NUMBER OF RECORDS IN TABLE= 5 LINES= 5
(FOC205) THE DESCRIPTION CANNOT BE FOUND FOR FILE NAMED: HOLD
BYPASSING TO END OF COMMAND
So it looked like the hold was working but webfocus could not find the master for the hold file. Did some tinkering to the code and got it to work. Here is the code.
REMOTE DEST=MVS436
-MRNOEDIT BEGIN
-REMOTE BEGIN
SET SQLENGINE=DB2
SQL
SELECT * FROM DSN.AMNAPPRV
FETCH FIRST 5 ROWS ONLY;
TABLEF
ON TABLE HOLD
END
-RUN
TABLE FILE HOLD
PRINT *
ON TABLE PCHOLD
END
-RUN
-REMOTE END
-MRNOEDIT END
TABLE FILE HOLD
PRINT *
ON TABLE PCHOLD FORMAT EXL2K
END
-EXIT
Thanks for the help. I would have been completely lost without it.
I'm glad you got it working. You might also try changing the ON TABLE HOLD to ON TABLE PCHOLD (as in your initial post) to see if you can eliminate the second TABLE request.
REMOTE DEST=MVS436
-MRNOEDIT BEGIN
-REMOTE BEGIN
SET SQLENGINE=DB2
SQL
SELECT * FROM DSN.AMNAPPRV
FETCH FIRST 5 ROWS ONLY;
TABLEF
ON TABLE PCHOLD
END
-RUN
-REMOTE END
-MRNOEDIT END
TABLE FILE HOLD
PRINT *
ON TABLE PCHOLD FORMAT EXL2K
END
WebFOCUS 7.7.05
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007