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.
Hello. I have a reportcaster job that is intended to run a .fex which creates and attaches a PDF report to an email and sends to me.
The .fex requires two variables &FMONTH and &FYEAR to run. Those values are supplied by user inputs on an .HTML page
I am trying to use the form action command to run DSTRUNNOW from that same .HTML page through a button.
However I cannot figure out how to pass those two variables successfully to the RC job in order to create and email the report to me. this is the code I'm using to call DSTRUNNOW in my .fex
-HTMLFORM BEGIN
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<BODY onload="document.submit1.submit()">
<FORM name="submit1" ACTION="/ibi_apps/servlet/DSTRUNNOW" METHOD="POST" ENCTYPE="application/x-www-form-urlencoded">
<input type="hidden" name="IBIB_scheduleid" value="S99654d41s8339s4a88s867bs9aa287d58395">
<input type="hidden" name="IBIB_user" value="manglum">
<input type="hidden" name="IBIB_parm_FMONTH" value=&FMONTH>
<input type="hidden" name="IBIB_parm_FYEAR" value=&FYEAR>
</FORM>
</BODY>
</HTML>
I have also tried issueing the request through the hyperlink of the form button as shown below
Originally posted by jgelona: Did you trying logging on to IBI's site and doing a search on DSTRUNNOW. Just saying.
Yes. That's how I discovered that DSTRUNNOW even existed.
Also, spending the time to actually type out a response that tells someone to "read the manual" utterly defeats the purpose of a user forum...LOL "just saying" :-)
I went back and added the code I'm currently using as context to aid in the discussion.
The example of usage shown in the IBI documentation assumes that you already know the value of the parameter you are trying to pass to report caster and you "hard code" it into the RC request.
But in my case the USER is inputing this variable via a text input box from the .HTML page.This message has been edited. Last edited by: manglum,
What is being fed to your fex? What are the values of &FMONTH and &FYEAR? It says it does not like the format of &YEAR. You might say something is a number, but everything in Dialogue Manager is text. For example if &FYEAR is 2017 maybe it is really ' 2017'. If you issue a -SET &EHCO=ALL; what does that look like?
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, 2006
Within the scope of -HTMLFORM BEGIN/END, you should use the Bang IBI syntax for embedding the value of a dialog-manager variable, whether in the value="..." phrase or elsewhere.
Depending on the release (and perhaps the phase of the moon), & is treated literally in that context -- as reflected in the message:
FORMAT: &FYEAR
BTP1020 INCOMPLETE REQUEST STATEMENT
BTP1020 THE FORMAT OF THE TEST VALUE IS INCONSISTENT WITH FIELD
This message has been edited. Last edited by: j.gross,
- Jack Gross WF through 8.1.05
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
Originally posted by jgelona: What is being fed to your fex? What are the values of &FMONTH and &FYEAR? It says it does not like the format of &YEAR. You might say something is a number, but everything in Dialogue Manager is text. For example if &FYEAR is 2017 maybe it is really ' 2017'. If you issue a -SET &EHCO=ALL; what does that look like?
The two variables &FMONTH and &FYEAR are the only two variables being passed to the .fex that the report caster job is running.
The values for &FMONTH would be integers 1 to 12 The values for &YEAR would be theoretically any 4 digit year
Originally posted by j.gross: Within the scope of -HTMLFORM BEGIN/END, you should use the Bang IBI syntax for embedding the value of a dialog-manager variable, whether in the value="..." phrase or elsewhere.
Depending on the release (and perhaps the phase of the moon), & is treated literally in that context -- as reflected in the message:
FORMAT: &FYEAR
BTP1020 INCOMPLETE REQUEST STATEMENT
BTP1020 THE FORMAT OF THE TEST VALUE IS INCONSISTENT WITH FIELD
Thanks for pointing me in the direction of that syntax. I changed my reference to the following:
for further reference, this is the entire .fex that calls the HTML form at the end which calls the report caster job.
-*-DEFAULTH ®ION =87;
-*-DEFAULTH &STORE_GROUP ='TSS';
-*-DEFAULTH &FMONTH = 5;
-*-DEFAULTH &FYEAR = 2017;
-*-DEFAULTH &DISTRIBUTE='VIEW';
-*-SET &ECHO=ALL;
APP HOLD ebrreports_reg
APP HOLDDATA ebrreports_reg
APP HOLDMETA ebrreports_reg
-IF &STORE_GROUP EQ 'TSS' GOTO TSS ELSE
-IF &STORE_GROUP EQ 'HSAP' GOTO HSAP ELSE
-IF &STORE_GROUP EQ 'NEXT20' GOTO NEXT20 ELSE
-IF &STORE_GROUP EQ 'SASSCORE' GOTO SASSCORE ELSE
-IF &STORE_GROUP EQ 'WPGAP' GOTO WPGAP;
-TSS
DEFINE FILE EBRRPT_RPT_SAS_STORE_SCORECARD_GROUPINGS_TBL
A_STORE/A11 = EDIT(STORE);
END
TABLE FILE EBRRPT_RPT_SAS_STORE_SCORECARD_GROUPINGS_TBL
PRINT A_STORE AS 'STOREGROUP'
WHERE ( ACTIVETSS EQ 'TSS') AND ( REGION EQ ®ION);
ON TABLE SET ASNAMES ON
ON TABLE HOLD AS STOREGROUPING FORMAT ALPHA
END
-IF &LINES EQ 0 GOTO NO_RECORDS ELSE GOTO ENDFEX;
-HSAP
DEFINE FILE EBRRPT_RPT_SAS_STORE_SCORECARD_GROUPINGS_TBL
A_STORE/A11 = EDIT(STORE);
END
TABLE FILE EBRRPT_RPT_SAS_STORE_SCORECARD_GROUPINGS_TBL
PRINT A_STORE AS 'STOREGROUP'
WHERE ( HSAP EQ 'HSAP') AND ( REGION EQ ®ION);
ON TABLE SET ASNAMES ON
ON TABLE HOLD AS STOREGROUPING FORMAT ALPHA
END
-IF &LINES EQ 0 GOTO NO_RECORDS ELSE GOTO ENDFEX;
-NEXT20
DEFINE FILE EBRRPT_RPT_SAS_STORE_SCORECARD_GROUPINGS_TBL
A_STORE/A11 = EDIT(STORE);
END
TABLE FILE EBRRPT_RPT_SAS_STORE_SCORECARD_GROUPINGS_TBL
PRINT A_STORE AS 'STOREGROUP'
WHERE ( NEXT20SHRINK EQ 'Next20') AND ( REGION EQ ®ION);
ON TABLE SET ASNAMES ON
ON TABLE HOLD AS STOREGROUPING FORMAT ALPHA
END
-IF &LINES EQ 0 GOTO NO_RECORDS ELSE GOTO ENDFEX;
-SASSCORE
DEFINE FILE EBRRPT_RPT_SAS_STORE_SCORECARD_GROUPINGS_TBL
A_STORE/A11 = EDIT(STORE);
END
TABLE FILE EBRRPT_RPT_SAS_STORE_SCORECARD_GROUPINGS_TBL
PRINT A_STORE AS 'STOREGROUP'
WHERE ( RANK_CYCLE_TOTAL_SCORE NE 0) AND ( REGION EQ ®ION);
ON TABLE SET ASNAMES ON
ON TABLE HOLD AS STOREGROUPING FORMAT ALPHA
END
-IF &LINES EQ 0 GOTO NO_RECORDS ELSE GOTO ENDFEX;
-WPGAP
DEFINE FILE EBRRPT_RPT_SAS_STORE_SCORECARD_GROUPINGS_TBL
A_STORE/A11 = EDIT(STORE);
END
TABLE FILE EBRRPT_RPT_SAS_STORE_SCORECARD_GROUPINGS_TBL
PRINT A_STORE AS 'STOREGROUP'
WHERE ( RANK_CYCLE_WOP_GAP NE 0) AND ( REGION EQ ®ION);
ON TABLE SET ASNAMES ON
ON TABLE HOLD AS STOREGROUPING FORMAT ALPHA
END
-IF &LINES EQ 0 GOTO NO_RECORDS ELSE GOTO ENDFEX;
-*-----------------------------------------------------------------------------------------------------------------------
-NO_RECORDS
-HTMLFORM BEGIN
<TITLE>NO STORES IN THIS GROUP</TITLE>
<TABLE BORDER=1><TR><TD>
Your Region (#®ION) doesnt have any stores in the selected group (&STORE_GROUP)
</TD></TR>
</TABLE>
-HTMLFORM END
-EXIT
-*-----------------------------------------------------------------------------------------------------------------------
-ENDFEX
-RUN
-IF &DISTRIBUTE EQ 'VIEW' GOTO VIEW_REPORT ELSE GOTO EMAIL_REPORT;
-VIEW_REPORT
-INCLUDE IBFS:/WFC/Repository/b6gh4fd9/std_reports/reportsdevel/SAS_30_STORE_GROUPS/si_sas_30_store_dashboard.fex
-EMAIL_REPORT
-HTMLFORM BEGIN
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<BODY onload="document.submit1.submit()">
<FORM name="submit1" ACTION="/ibi_apps/servlet/DSTRUNNOW" METHOD="POST" ENCTYPE="application/x-www-form-urlencoded">
<input type="hidden" name="IBIB_scheduleid" value="S99654d41s8339s4a88s867bs9aa287d58395">
<input type="hidden" name="IBIB_user" value="manglum">
<input type="hidden" name="IBIB_parm_FMONTH" value=!IBI.AMP.FMONTH;>
<input type="hidden" name="IBIB_parm_FYEAR" value=!IBI.AMP.FYEAR;>
</FORM>
</BODY>
</HTML>
This message has been edited. Last edited by: manglum,
Also, I just noticed that im getting a slightly different error now in the log file since switching to using the !IBI_AMP references...
ReportCaster Log Report Schedule ID: S99654d41s8339s4a88s867bs9aa287d58395, Job Description: SAS 3.0 Store Group Distribution
Process: Jdd0d4886j3250j40bcj879fj009d83eede18
Schedule ID: S99654d41s8339s4a88s867bs9aa287d58395
Start Time: 2017-07-21 10:50:19
End Time: 2017-07-21 10:50:20
Message Code Message Text
BTP1010 Schedule Executed On Demand at gvllc617a.dolgen.net:8200
BTP1010 Job placed in the waiting queue at 2017-07-21 10:50:19.965-0500 (1,500,652,219,965)
BTP1010 Job started running at 2017-07-21 10:50:19.965-0500 (1,500,652,219,965)
BTP1010 Job remained in waiting queue for 0.0 seconds
BTP1020 Starting task: Task 1
BTP1020 Task type: WebFOCUS Report
BTP1020 Task domain: b6gh4fd9/
BTP1020 Retrieving WebFOCUS Report: IBFS:/WFC/Repository/b6gh4fd9/std_reports/reportsdevel/SAS_30_STORE_GROUPS/si_sas_30_store_dashboard.fex
BTP1020 Connecting to server EDASERVE with execution id manglum at 2017-07-21 10:50:20.130-0500 (1,500,652,220,130)
BTP1020 Connection to the Reporting Server EDASERVE established at 2017-07-21 10:50:20.250-0500 (1,500,652,220,250)
BTP1020 The time to establish a connection to the Reporting Server EDASERVE was 0.12 seconds
BTP1020 Executing focexec.
BTP1020 Connection to the Reporting Server EDASERVE closed at 2017-07-21 10:50:20.300-0500 (1,500,652,220,300)
BTP1020 Job ran on the Reporting Server EDASERVE for 0.05 seconds
BTP1020 Task error: A VALUE IS MISSING FOR: &FMONTH
BTP1010 No report to distribute.
BTP1010 Job finished at 2017-07-21 10:50:20.312-0500 (1,500,652,220,312)
BTP1010 Job time on distribution server after the report completed was 0.0 seconds
BTP1010 Total running time was 0.347 seconds
BTP1010 Total elapsed time (including the queue time) was 0.347 seconds
This message has been edited. Last edited by: manglum,
It would seem the issue now is the fact that I am trying to pass TWO parameters to report caster (FMONTH and FYEAR). I don't think it likes how I'm using IBI_parm twice in separate lines.
Is there a way to pass both parameters in one command... something like:
The error message appears to be generated by the report fex that RC invokes (si_sas_30_store_dashboard.fex or something it Includes), as it is executed by EDASERVE. The doc says "You can pass an unlimited number of values to a scheduled job.", so there should be no problem passing two parms.
The question is why your two values are not being passed on by RC, setting &FYEAR to the value given for IBIB_parm_FYEAR and similarly for &FMONTH.
You might try temporarily adding
-SET &ECHO=ALL; -? &
at the top of the report fex, to see what &vars it receives and how far it gets before it chokes. The output should show up in a log.
-Jack
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
After seeking technical help, it turns out that the webfocus documentation on DISTRUNNOW and DISTSCHED is incorrect with regards to the IBIB_param parameter.
The correct syntax is IBI_parmYOURVARIABLE=XXX, not IBIB_parm_YOURVARIABLE=XXX.