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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
DSTRUN RC=9
 Login/Join
 
Gold member
posted
I'm just starting to experiment with calling DSTRUN from a fex. The goal is to be able to change the Subject Line in an e-mail before distribution (like using '%BURST').

The code looks like this:

-SET &CALLRC = DSTRUN(
- 'xxxxxxx',7,
- 'zzzzzzzzz',9,
- 'IWAY764D:8200',13,
- 'S13bdjpsak0b',12,
- ' ',0,
- 3,
- 'xxxxxxx',7,
- 'zzzzzzzzz',9,
- 'xxxxxxx/zzzzzzzzz',17,
- 'I4');

The result is CALLRC = 9, which translates into "HTTP Read Error" -- which means what?

I've searched Focal Point to no avail, although it sounds like I'm not the first to do this.

Any guidance is appreciated.


WF 7.6.6, FOCUS 7.6.4, IBM MVS/TSO, Windows 2003 Server, DB2, MSSQL
 
Posts: 65 | Location: Chicago, IL | Registered: July 26, 2007Report This Post
Guru
posted Hide Post
Hi,

Did you check in MRE if user xxxxxxx has rights to schedule job's in reportcaster?

How is the setup of you environment? Any clustered machine's?


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 454 | Location: Europe | Registered: February 05, 2007Report This Post
Virtuoso
posted Hide Post
I found you do not really need the user and password..but Have not run this since 7.1.6 , so don't know if that is still true in a later release -

-SET &SUBERR = DSTRUN(
- 'max167',6,
- ' ',0,
- 'WEBFS00001',10,
- 'S117054jof05',12,
- ' ',0,
- 5,
- 'ljrjjf',6,
- ' ',0,
- ' ',0,
- 0,
- 'I4');


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Gold member
posted Hide Post
Guys,
Thanks for the response. I have admin rights in both MRE and ReportCaster, and have tried various combinations of userid/password to no avail. Not sure if we are clustered or not (big WF shop).

The original goal is to be able to manipulate the e-mail subject line. I've put togehter a workaround that I'm going to recommend.

Passing Variables to an E-mail Subject Line
The example uses the CAR file to generate a PDF report.

DEFINE FILE CAR
SUBJECT_LINE/A60 = 'My Car Report for ' | COUNTRY || (' on ' | '&YYMD' ) ;
END

TABLE FILE CAR
" <.SUBJECT_LINE"
PRINT MODEL
BY SUBJECT_LINE NOPRINT PAGE-BREAK
BY COUNTRY
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=HEADING, LINE=1, COLOR=WHITE, $
ENDSTYLE
END


1. Begin with DEFINE for SUBJECT_LINE which includes the actual burst value
– in this case COUNTRY – plus any other values you want to include in
the e-mail subject line. In the example we are passing the current date,
but this can be any text/data values available to the report.
2. Include the SUBJECT_LINE in the heading of the report.
3. Insert a BY SUBJECT_LINE NOPRINT PAGE-BREAK in the report.
4. In the Stylesheet section make the color for SUBJECT_LINE the same as the
background color, thereby making it invisible on the page.

In ReportCaster be sure to define ‘%BURST’ in the E-MAIL Subject Line.

Considerations
Here’s the hook: the burst value defined in your distribution list must match the SUBJECT_LINE in the report! So, if you going to use this method you’ll have to dynamically generate the distribution list file…but that’s another subject.

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


WF 7.6.6, FOCUS 7.6.4, IBM MVS/TSO, Windows 2003 Server, DB2, MSSQL
 
Posts: 65 | Location: Chicago, IL | Registered: July 26, 2007Report This Post
Platinum Member
posted Hide Post
The variable text in the Subject line of the RCaster e-mail (on the Distribution tab) is represented with '&var' (that's an amber-variable enclosed in aprostrophies). The names of these enquoted &vars must match the names of parameters passed into the schedule (and *.fex) as given on the schedule's Task's tab, Advanced button.

I've found experimentally that the value of the &vars pasted into the Subject line is the value given in the Task tab, Advanced button. Any use of -SET &var= inside the *.fex seems to be ignored.

Give these &vars a value from the external DSTRUN function by using Dialogue Manager to construct a single string containing all the parameters you want to pass in keyword=value format and place it into the proper pair of DSTRUN parameters. For example, if your Subject line contains "Customer: '&CUST', Order: '&ORD'"
then you need to use:
-SET &PARMSTRING = 'CUST=' || &CUSTOMR || ',ORD=' || &ORDERNR
 ;  
(if customer name and order number are variables from your database, then you'll have to use the conventional process of outputting them to a HOLD file and reading them back into the *.fex as &vars with -READ, then use those &vars to costruct the -SET shown above.)

In the DSTRUN, you would include:
 ,'&PARMSTRING',&PARMSTRING.LENGTH.,


As to the error '9', check the commas, aprostrophies, etc, VERY carefully. Also make sure the Userid's are all correct. I had to use the credentials from RCaster installation as the first ones (the servers), and those of a production user for job owner's.


WIN/2K running WF 7.6.4
Development via DevStudio 7.6.4, MRE, TextEditor.
Data is Oracle, MS-SQL.
 
Posts: 154 | Location: NY | Registered: October 27, 2005Report This Post
Gold member
posted Hide Post
Prarie,
Thanks for the tip on removing userid/pswd from the DSTRUN command. Thought I'd done this already but went through it with fresh eyes this morning and it worked like a charm.

-SET &CALLRC = DSTRUN(
- 'xxxxxxx',7,
- 'yyyyyyyyy',9,
- 'CORPAPPD06',10,
- 'S13bdjpsak0b',12,
- ' ',0,
- 3,
- 'xxxxxxxx',7,
- '',0,
- '',0,
- 'I4');


WF 7.6.6, FOCUS 7.6.4, IBM MVS/TSO, Windows 2003 Server, DB2, MSSQL
 
Posts: 65 | Location: Chicago, IL | Registered: July 26, 2007Report This Post
Virtuoso
posted Hide Post
Great!


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders