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     [Case Opened] Using REST to replace DSTRUN

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[Case Opened] Using REST to replace DSTRUN
 Login/Join
 
Master
posted
I have fex that I use to update the next run date/time of a schedule in BOTSIT. This was developed as a replacement for DSTRUN. IBI does not really approve of this method but it is what I had to do to replace DSTRUN when it quit working with WebFOCUS 8's security model. Anyway, we now have a license for RESTful Web Services and I have developed a fex to run Report Caster jobs using REST. Just one annoying issue that I need help with. When it runs, REST return a job id in a browser window. When I use it in a fully batch environment, I get a separate email with this job id and I don't want. Here's my fex:

-* rest_rc_submit.fex
-HTMLFORM BEGIN
<HTML>
<BODY
<FORM>
<a id='rcsubmit' href='http://host:port/ibi_apps/rs/ibfs/WFC/Repository/ReportCaster/My_Content/!IBI.AMP.RCJOBNM;?IBIRS_action=run'</a>
<FORM>
<SCRIPT type='text/javascript'>
   window.onload = document.getElementById("rcsubmit").click();
</SCRIPT>
</BODY>
</HTML>
-HTMLFORM END


For my purpose, the only parameter is going to be RCJOBNM. So the question is how can I completely suppress the window with the jobid that is returned or redirect the jobid to a file? Also, if there is another way to do this in a fex, I'm open to suggestions. Most of this is from the WebFOCUS RESTful Web Services Developer’s Guide, pages 204-205.

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


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006Report This Post
Platinum Member
posted Hide Post
Hi, I set up something based on using a rest connection and creating master files. We kick off the process from a caster schedule that as a post process calls our rest fex.

The fex

-*I actually pass this in from a alert schedule that is used to start the process
-SET &SCHEDID ='S1234567890'
TABLE FILE RF_WF_REPOSOBJ
PRINT
COMPUTE THISONE/A1200= PRT_PATH ||'/'|| OBJNAME;
WHERE EXT_ID EQ &SCHEDID.QUOTEDSTRING
ON TABLE HOLD AS RUNME FORMAT ALPHA
END
-RUN
-*RUNSCHED is a REST master file
TABLE FILE RUNSCHED
PRINT
RUNSCHED.M6ILO.IBIRS_PATH AS 'Schedule Path'
RUNSCHED.M6ILO.__RESPONSE AS 'Job Id'
HEADING
"Running a Schedule"
IF IBIRS_PATH IS (RUNME)
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = endeflt,
$
TYPE=REPORT,
COLUMN=N2,
WRAP=6.000000,
$
ENDSTYLE
END


Webfocus 8.0.7 on Windows
 
Posts: 176 | Location: Ohio | Registered: October 26, 2006Report This Post
Master
posted Hide Post
CLH, I'll look into this, however, this appears to generate HTML output that goes somewhere, I don't want any output from telling RC to run the job. Thanks.

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


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006Report This Post
Virtuoso
posted Hide Post
What do you mean by "batch" mode? How are you running the schedules?


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Master
posted Hide Post
dhagen, by batch I mean a series of jobs submitted by report caster.

For example, I have a job that is scheduled in Report Caster to run Mon-Fri, however on Monday I want to run additional reports, say exception reports that get emailed to supervisors (today it sent reports to 145 supervisors). What I have is a post processing fex that checks to see if it is Monday and if it is, it tells Report Caster to submit the second job. What I get using the rest_rc_submit.fex above, is another HTML output from the post processing fex with nothing more than the job id. I want to completely suppress that HTML output or redirect it to a file. I have dozens of jobs that work like this and the command is working exactly as documented so it is not a bug, I just want to send that HTML page into some black hole so I don't get a lot of worthless email. For example, if I could redirect the page to a file in the edatemp folder, it won't get emailed and it will be deleted when the fex ends.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006Report This Post
Virtuoso
posted Hide Post
Dumb question: Why not just schedule it to run on Mondays and forget about the post process?


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Master
posted Hide Post
Because when Job 2 runs, it needs to run as soon possible after job 1 completes.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 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     [Case Opened] Using REST to replace DSTRUN

Copyright © 1996-2020 Information Builders