Focal Point
[SOLVED] ftp-ing with a hold

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

October 19, 2008, 05:08 PM
Mayor
[SOLVED] ftp-ing with a hold
Hello,

When I try to ftp this code below, It does not successfully ftp the data. I placed the unix code in an include file, but still does not properly ftp and the issue seems to be the hold? Any thoughts or suggestions?

-******************************************

SET HOLDMISS=ON
SET ALL=ON
SET COMPMISS=OFF

FILEDEF IHLD DISK /proj/ihld.ftm
TABLE FILE E_I_INDEX
PRINT
SITE AS 'Area'
I_NUMBER AS 'I Number'
I_TYPE AS 'Type'
P_C_NUMBER AS 'Prime'
TITLE AS 'I Title'
E_I.D_RATING AS 'D Rating'
E_C_ACCT.E_C_.C_ACCT AS 'E C Acct'
E_C_ACCT.E_C_.C_ACCT/A6 AS 'Project'
E_C_ACCT.E_C_.C_TYPE AS 'C Type'
WHERE D_NUMBER EQ '99'
WHERE C_STATUS NE 'T' OR 'D' OR 'C'
WHERE P_NUMBER NE 'TT' OR '#1' OR '#2' OR '#3'
ON TABLE SET STYLE *
ENDSTYLE
ON TABLE HOLD AS IHLD FORMAT DFIX DELIMITER .
END
-INCLUDE ftpihld
unix echo "open host.server1.com" > /proj/ftp.s
unix cat "/proj/id_pw_ftp.txt" >> /proj/master/ftp.s
unix echo " " >> /proj/ftp.s
unix echo "ascii" >> /proj/ftp.s
unix echo "put ihld.ftm 'E.C.TEST'" >> /proj/ftp.s
unix cat "quit" >> /proj/ftp.s
unix ftp -inv < /proj/ftp.s
-*unix rm -f /proj/ftp.s
END
-EXIT
1
0 NUMBER OF RECORDS IN TABLE= 2223 LINES= 2223
0
Connected to host.server1.com.
220-FTP I FTP at host.server1.COM, 16:50:28 on 2008-10-19.
220-Coordinator for assistance.
220 Connection will close if idle for more than 30 minutes.
Remote system type is MVS.
331 Send password please.
230 FTP is logged on. Working directory is "FTP.".
200 Representation type is Ascii NonPrint
ihld.ftm: No such file or directory <----where the execution fails and then exits out
221 Quit command received. Goodbye.
-******************************************

Thank you in advance!!

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



Production & Development: WebFocus 7.6.4
October 20, 2008, 08:58 AM
Jessica Bottone
After this runs and you get the error, did you look into the /proj/ihld.ftm to see if the file is there? If it is not, isolate out the code that creates ihld.ftm and figure out why that is not working. If it is there, have you tried putting a -RUN before your -INCLUDE?


Data Migrator 5.3, 7.1, 7.6
WebFOCUS 7.1, 7.6, 7.7
SQL Server, Oracle, DB2
Windows
October 20, 2008, 09:10 AM
Mayor
Yes, its in the directory, I dont think it needs a run because it does seems to loop through the include file...rather, when I commented out the FILEDEF HOLD DISK...it ftp-ed correctly...Any ideas why this is so?

Thanks



Production & Development: WebFocus 7.6.4
October 20, 2008, 10:29 AM
Francis Mariani
You definitely need a -RUN after the END statement of the TABLE request, otherwise all Dialogue Manager code gets executed before WebFOCUS code, like that -INCLUDE statement.

The ftp may work because it finds a previously created file.

The syntax for the FILEDEF statement may be wrong. If proj is an App folder, the first / shouldn't be there.

FILEDEF HAPPT2  DISK testfm/happt2.ftm

testfm is a folder in the WebFOCUS APPROOT directory

quote:

APPROOT - Location of the Application Namespace root directory on the Web server where WebFOCUS is installed. The default directory is installationdrive:\ibi\apps unless a different directory was specified during the installation of the WebFOCUS Client.


As a rule, I ALWAYS make it a habit to put a -RUN after every set of WebFOCUS statements.

This message has been edited. Last edited by: Francis Mariani,


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
October 20, 2008, 10:40 AM
Francis Mariani
Alternatively, the problem could be the PUT statement, I do not see navigation to the proj folder in the FTP commands.

Should
unix echo "put ihld.ftm 'E.C.TEST'" >> /proj/ftp.s
be
unix echo "put /proj/ihld.ftm 'E.C.TEST'" >> /proj/ftp.s



Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
October 20, 2008, 10:57 AM
Mayor
Yes Yes! you are right, I uncommented the FILEDEF HOLD DISK and inserted the path extension afer the word put and it was successful.

Thank you for clarifying that! Have a nice day



Production & Development: WebFocus 7.6.4
September 03, 2010, 02:19 PM
gajee
Any idea how to do this with secure ftp?


webfocus 7.6.4
Windows, HTML, PDF