Focal Point
XECUTE A REPORT CASTER FROM AN AS400 CL PROCEDURE AND HTTPS SERVER

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

July 16, 2010, 09:59 AM
Cati - France
XECUTE A REPORT CASTER FROM AN AS400 CL PROCEDURE AND HTTPS SERVER
Hello,

I need to run a report caster from an AS400 procedure which prepares a statistic file needed in the fex being run in report caster.

I guess I have to use DSTRUN but I could not find any example in the forum.

If anyone has already done it, please post the syntax to use in the CL to do that.

Thanks a lot for your help.
Catherine

This message has been edited. Last edited by: Cati - France,


7.7.02 (Html, Excel, Ahtml, Pdf,Graph,.....)
OS400 V5R3, V5R4
Windows 2000/2003/2007/2010
July 19, 2010, 05:34 AM
Qalqili
Hi Cati

i searched for DSTRUN , i find the below result, i am not professional in AS400 but may be the guys post that descussion will help you.

DSTRUN



Regards


WF 7.7.0.3HF3 / WinXP- WF-Client & Apache / DevStd 7.7.0.3HF3 win XP.
July 19, 2010, 09:55 AM
bobjackson
Hi

I think you need to do this in 2 stages

1. We get our AS400 to run a QSHELL to start an EDASTART on the Reporting Server

sh /wf7_prd/ibi/srv717/wfs/bin/edastart -x "EX /wf7_prd/ibi/apps/qshfex/WF_Misc_Daily_Emails.fex"

2. Then on the Reporting Server FEX has the DSTRUN command to run the ReportCaster job

Our fex has all of the DSTRUN parameters in memory variables; hopefully someone will give you a better example

-SET &SUBERR= DSTRUN(
- &username,&userlen,
- ' ',0,
- &SERVERNEW,&SERVERLEN,
- ' ',0,
- &SCHEDULENAME,&SCHEDULELEN,
- 5,
- &username,7,
- ' ',0,
- &serveruser/&serverpass,&serveruserlen,
- 'I4');

-IF &SUBERR EQ 0 THEN GOTO RUN_OK1;
-INCLUDE DSTRUNER
-WRITE SUBLOG &SUBERR
-RUN_OK1

-* Parameters for DSTRUN

-* 1 Reporting server userid , length
-* 2 Password, length
-* 3 Webserver:Port, length
-* 4 Schedule or, length
-* 5 Job Name, length
-* 6 Priorty
-* 7 Report Caster Schedule Owner, length
-* 8 Report Caster Owner Password, length
-* 9 Webserver Authentication, length
-* 10 Return Code Format

Bob


WebFocus 7.6.11
IBM iSeries
July 19, 2010, 11:54 AM
Darin Lee
Take a look at my presentation on triggering Report Caster reporting. It's not AS400 specific, but describes the technique used (much similar to what bobjackson has posted. Hopefully that can give you some help.


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
July 22, 2010, 08:23 AM
Cati - France
Hi All,

Thanks for the answers.
I will try the Bob solution with running a QSH command in the CL procedure and let you kown if it works.

Bye
Catherine


7.7.02 (Html, Excel, Ahtml, Pdf,Graph,.....)
OS400 V5R3, V5R4
Windows 2000/2003/2007/2010
July 30, 2010, 05:29 AM
Cati - France
Hi,

I created the CL with the QSH command to execute the EDASTART
PGM
QSH CMD('sh +
/home/iadmin/ibi/srv76/wfs/bin/edastart +
-x "EX /home/iadmin/ibi/apps/save_cati/launch_caster_job.fex"')
ENDPGM
==> It's OK

I created my planning in the caster ==> It's OK

Then I created the fex "launch_caster_job" to execute the planning
  
-SET &ECHO=ALL;
-SET &ID = 'S158h814p401' ;
-SET &SUBERR = DSTRUN(
- 'xxxxxx',6,
- 'xxxxxx',6,
- 'www.xxxxxxx.com:9080',24,
- '&ID.EVAL',12,
- ' ',0,
- 3,
- 'xxxxxx',6,
- ' ',0,
- 'xxxxxx/xxxxxx',13,
- 'I4');

-IF &SUBERR EQ 0 GOTO EXIT;
APP FI SUBLOG DISK baseapp/sublog.txt
-RUN
-INCLUDE DSTRUNER
-WRITE SUBLOG &SUBERR
-EXIT



I get the error 9 = HTTP READ ERROR
Our server is secured so we are in HTTPS mode.
How do I do to tell it to the system ?
Thanks for help.
Catherine


7.7.02 (Html, Excel, Ahtml, Pdf,Graph,.....)
OS400 V5R3, V5R4
Windows 2000/2003/2007/2010