Focal Point
DSTRUN Questions

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/5961039422

April 24, 2007, 11:52 AM
Darin Lee
DSTRUN Questions
I'm trying to run a scheduled RC job by using DSTRUN and have a couple of questions. I've used the example in the documentation. At first I was getting an error 189, then for whatever reason it stopped. Now I get no error messages but also no report.
1. The example says the procedure is on a Windows box. Is DSTRUN supported on other platforms? Can I run a job in RC on a linux platform from a WF server on Z/OS (Unix System Services)?
2. The 'webhost' parameters is described as the WF Reporting Server with the default port number 80. That port (80) is the default port number of a webserver, not a WF Reporting Server. What is supposed to be used for that parm?
3. For the userid/mypass parm, is that supposed to be a valid MR user id or a valid WF Server id or both?
4. Can someone post an example of a procedure where they call DSTRUN and give a little better explanation of the parms than the documentation does?


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
April 24, 2007, 12:23 PM
RichH
Hi Darin,
It's been awhile since I have used it, but hes an example...

-SET &VAR1 = 'CTYPARM=' | 'FRANCE';
-SET &LEN = &VAR1.LENGTH;
FILEDEF SUBLOG DISK C:ibi\srv71\wfs\catalog\sublog.ftm
-RUN
-SET &ECHO=ALL;
-SET &SUBERR = DSTRUN(
- 'rj11254',7, (Reporting Server id)
- 'XXXXXX',6, (Reporting Server pwd)
- 'SERVERNAME',10, (Reporting Server host name)
- 'S12227uli307',12, (Schedule id)
- 'myjob1',6, (Job Description)
- 5, (Priority level)
- 'admin1',6, (The id that owns the schedule)
- &VAR1, &LEN, (Parm string - parameter and value)
- ' ',0, (Web server id/password if security on)
- 0, (Method used to secure sockets from TCP/IP)
- 'I4'); (Format of return code)
- INCLUDE DSTRUNER
- WRITE SUBLOG &SUBERR
- EXIT
Yes. It can run on another platform.
If this doesn't help, post your code.

Regards,
Rich


WebFOCUS 8202 Win 2012
Test - WebFOCUS 8203 on Win 2012
April 24, 2007, 01:11 PM
Darin Lee
So how does this actually get to Report Caster? If I'm only giving the SERVERNAME, how does this know where ReportCaster is? I've taken Rich's example and inserted my values with no result. In fact, I changed uersname, password, and server host name to invalid values, but I don't get any error message. It's like it's not doing anything at all.

Here's the config: RC is on Linux box (IBIREPORTS). There is also a WF Server on that box(IBIREPO) but it isn't involved in anything (as far as I know). The client, web server, and appserver (WebSphere) are also on Linux. The scheduled task runs a server procedure on a USS WF Server (ADPROD). I am executing the DM Code from that ADPROD server.

-SET &ECHO=ALL;
FILEDEF SUBLOG DISK /u/ibi/prod7/srv71/wfs/catalog/sublog.ftm
-RUN
-SET &SUBERR = DSTRUN(
- 'usernam',7,   (valid for ADPROD WF Server)
- 'userpas',7,
- 'IBIREPORTS',10,  
- 'S128g4mq0k05',12,
- 'carinst',7,
- 2,
- 'admin',5,
- 'COUNTRY=W GERMANY',17,
- ' ',0,
- 0,
- 'I4');
-IF &SUBERR EQ 0 GOTO EXIT;
-INCLUDE DSTRUNER
-WRITE SUBLOG &SUBERR
-EXIT


Any clues?


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
April 24, 2007, 01:41 PM
RichH
Hi Darin,
Is the default port 80 being used? If not you
will need to specify it for the hostname.
Rich


WebFOCUS 8202 Win 2012
Test - WebFOCUS 8203 on Win 2012
April 24, 2007, 01:56 PM
Prarie
I have this running. You really don't need all those fields...if you account for them with 0's.

-SET &SUBERR = DSTRUN(
- 'wav167',6,
- ' ',0,
- 'WEBFSAHQ01',10,
- 'S115imafn701',12,
- ' ',0,
- 5,
- 'ljrq9f',6,
- ' ',0,
- ' ',0,
- 0,
- 'I4');


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
Prarie,
Is WEBFSAHQ01 a machine name or a WF Server name (node)? Does everything (this fex, WF Server, RC) reside on the same Windows platform? I see you're not using the password variable - is security off?


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
WEBFSAHQ01 is Server Name. Yes it is all on the same platform. Security is not off...but I just found I didn't need to use the password, not sure why.


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
I have seen all the dialogue's back and orth for dstrun. So let me add my contribution here. I am runing on a Unix platform in wf5.36. I too get a zero rc from the job, yet no report. The zero return code simply means the parser requirements were met. to find the server name to use check 'the host' value in report caster portion of the admin console for accurate server name. Unix case sensitive (remember).


aix-533,websphere 5.1.1,apache-2.0,
wf 538(d), 537 (p),
==============
7.6.11 (t) aix 5312
websphere 6.1.19
apache 2.0
Darin,
Turn the reporting server traces on and see whats causing the problem.
Rich


WebFOCUS 8202 Win 2012
Test - WebFOCUS 8203 on Win 2012
So DSTRUN doesn't work for you either Ira? Or did you find some way to get it going?


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
Figured it out. The user id/pass that you use must be a valid MR user as well as a valid user on the WF Reporting Server platform. I tried using the MRE admin id with no luck, then I tried using a user id for the WF Reporting Server platform with no luck. When I added the WF Reporting server account as an MR user, it all worked. Maybe that should be clarified in the docs.

BTW: Rich, thanks for reminding me to use the traces. Don't know how many times I've posted that suggestion myself, but still need to be reminded sometimes. (It actually showed the "Authentication failed" message which appears that it should be displayed in a returning HTML page, but for whatever reason does not make it back to the browser.)


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
Running some diagnostics still at this point. We have reverse proxy in place and maybe the port number is not 80 [the default] for this. Still checking into it. Hope to have it resolved asap.

Ira


aix-533,websphere 5.1.1,apache-2.0,
wf 538(d), 537 (p),
==============
7.6.11 (t) aix 5312
websphere 6.1.19
apache 2.0
Check this out -
https://forums.informationbuilders.com/eve/forums/a/tpc/...381026691#9381026691


WF 8.1.05 Windows
Yup. Same answer - different question. I was getting no error message at all so I didn't know where to look until I found some naught little error message in the server traces.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
DSTRUN gave us a hard time because it calls DSTRUNNOW (servlet) and could not find it until the &PATH was set correctly



-SET &PATH = WebfocusClient: port Number/SecondaryPath/ibi_apps:SecondaryPath/rcaster';

-SET &DSched = '&SchedID.EVAL';
-SET &SchedLen = ARGLEN(&DSched.LENGTH,&DSched,'I4');

-SET &DUID = '&UserID.EVAL';
-SET &DLEN = 'A' || &DUID.LENGTH;
-SET &UserID = LOCASE(&DUID.LENGTH,&DUID, '&DLEN');
-SET &UIDLen = ARGLEN(&DUID.LENGTH,&DUID,'I4');

-SET &DPATH = '&PATH.EVAL';
-SET &PATHLen = ARGLEN(&DPATH.LENGTH,&DPATH,'I4');

-SET &SUBERR=DSTRUN(&UserID,7,
- '',0,
- &PATH,&PATHLen,
- &SchedID,&SchedLen,
- '',0,
- 5,
- &UserID,&UIDLen,
- '',0,
- &UserID,&UIDLen,
- '',0,
- 'I4');
-*GOTO theEND