Focal Point
[CASE-OPENED] FTP via Report Caster

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

November 23, 2011, 02:53 PM
Rick Man
[CASE-OPENED] FTP via Report Caster
Seems simple enough and there are many posts to help with this task; however, it ain't workin'.

I'm trying to FTP to another server a flat file and creating a dynamic file name.

I've found the posts that tell me to create a POSTP fex and a DYNAMIC fex and have done that.
They are in the RICKM APP

I can FTP to the server without the dynamic file name just fine.

Any help is appreciated.


But depending on what I use for my ON TABLE command, HOLD, PCHOLD, SAVE I get different results:
Message Code Message Text

BTP1010 Schedule Executed On Demand
BTP1020 Starting task: HR - New Rehire Employees Novell
BTP1020 Task type: MR Standard Report
BTP1020 Task domain: rickmanu/rickmanu.htm
BTP1020 Retrieving MR report: app/pe1009db_new_rehire_employees_ist
BTP1020 Connecting to server WFNT with execution id rptcaster
BTP1020 Executing focexec.
BTP1020 Executing post-rpc: POSTP
BTP1020 Task finished.
BTP1010 Dynamically creating distribution information
BTP1010 rickm/dynamic: Unable to retrieve data for the distribution list

Message Code Message Text

BTP1010 Schedule Executed On Demand
BTP1020 Starting task: HR - New Rehire Employees Novell
BTP1020 Task type: MR Standard Report
BTP1020 Task domain: rickmanu/rickmanu.htm
BTP1020 Retrieving MR report: app/pe1009db_new_rehire_employees_ist
BTP1020 Connecting to server WFNT with execution id rptcaster
BTP1020 Executing focexec.
BTP1020 No report to create.
BTP1020 ALPHANUMERIC RECORD NAMED RICK1
BTP1020 0 FIELDNAME ALIAS FORMAT LENGTH
BTP1020 RECORD A120 360
BTP1020 TOTAL 360
BTP1020 Task finished.
BTP1010 No report to distribute.

Here's the report that creates the file to be FTP'd

 
TABLE FILE SQLFILE
PRINT
RECORD
BY USERID NOPRINT
-*ON TABLE PCHOLD AS RICK1
-*ON TABLE SAVE AS RICK1
-*ON TABLE HOLD FORMAT COMT
ON TABLE NOTOTAL
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=LANDSCAPE,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
$
TYPE=TITLE,
     STYLE=BOLD,
     JUSTIFY=CENTER,
$
ENDSTYLE
END
 


Here's the POSTP.fex

  
-SET &MONTH = SUBSTR(8, &DATE, 1, 2, 2, A2);
-SET &DAY = SUBSTR(8, &DATE, 4, 5, 2, A2);
-SET &YEAR = SUBSTR(8, &DATE, 7, 8, 2, A2);
-*-SET &NAME = (&YEAR || &MONTH || &DAY || '-SONJ_REPORT.PDF');
-SET &NAME = 'EMP_' || (&YYMD);
 FILEDEF SONJ DISK D:\IBI\APPS\RICKM\SONJ
-RUN
-WRITE SONJ NOCLOSE &NAME
-CLOSE SONJ;


Here's the DYNAMIC.fex

 
TABLE FILE SONJ
PRINT FTP_FILENAME AS 'DEST'
ON TABLE PCHOLD
END
 


Here's the SONJ.MAS

 
FILE=SONJ, SUFFIX=FIX, DATASET='D:\IBI\APPS\RICKM\SONJ',$
 SEGNAME=SEG01, SEGTYPE=S2, $
 FIELD=FTP_FILENAME, ALIAS=FTP, USAGE=A40, ACTUAL=A40, $
 

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


Reporting Server 7.6.10
Dev. Studio 7.6.8
Windows NT
Excel, HTML, PDF
November 23, 2011, 03:54 PM
njsden
Shouldn't the creation of a dynamic distribution list be done in a Pre-Task as opposed to a Post-task? I would think that the distribution list should be readily available by when the report caster task is complete (which happens just before the Post) ... or am I mixing things here?



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
November 28, 2011, 09:32 AM
jgelona
If this is a job with one task, then njsden is correct. The distribution happens when the primary task is complete and before the running of the post processing task. You should be able to see this in the log file for the job.

I don't think this can work the way you have it.

First on the task setup, what did you put in the "Save Report As:" in the Report Distribution Information box? With the way you have it coded, that is the name of your report when it is created.

First thing I would do is get rid of the post processing fex, put that code in use your primary fex and create the report with the desired name and in the desired location.

Then I think your Dynamic name fex should work.

If it was me, I would just dynamically generate the ftp script when the fex was run (using -WRITE commands) and execute that at the end of the fex. Much less confusing.

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.
November 28, 2011, 10:35 AM
Rick Man
Thanks for the repsonse. I'll give it a try and let you know.


Reporting Server 7.6.10
Dev. Studio 7.6.8
Windows NT
Excel, HTML, PDF
December 05, 2011, 10:43 AM
Rick Man
This is the techique I was trying:
http://techsupport.information...om/sps/10962092.html

I've opened a case with IBI. I'll keep you updated.


Reporting Server 7.6.10
Dev. Studio 7.6.8
Windows NT
Excel, HTML, PDF
March 06, 2012, 01:54 PM
Rick Man
Case: 73392519 was opened and a NFR was created by IBI


Reporting Server 7.6.10
Dev. Studio 7.6.8
Windows NT
Excel, HTML, PDF