|
Here is the CL used to create a file and send it to another server. The output file is created as TAB delimited file in IFS and then FTP'd across to a FTP Server. Excel automatically recognize the TAB file and puts each field in a column. Hope this helps. /********************************************************************** PGM DCL VAR(&TOFN) TYPE(*CHAR) LEN(30) + VALUE('/Qopensys/audit/audt.TAB') DCL VAR(&RUNDAT) TYPE(*CHAR) LEN(6) DCL VAR(&DMFILN) TYPE(*CHAR) LEN(10) DCL VAR(&ERROR) TYPE(*CHAR) LEN(1) DCL VAR(&JOBN) TYPE(*CHAR) LEN(10) DCL VAR(&JOBU) TYPE(*CHAR) LEN(10) DCL VAR(&JOB#) TYPE(*CHAR) LEN(6) /* Create file AUDT on PRODUCTION LIBRARY CALL PGM(DSOAUDT10R) PARM(&ERROR) IF COND(&ERROR *NE 'Y') THEN(DO) /* copy file from Production Library to IFS file Define on line 2 */ CPYTOIMPF FROMFILE(*LIBL/AUDT) TOSTMF(&TOFN) + MBROPT(*REPLACE) RCDDLM(*CRLF) + DTAFMT(*DLM) STRDLM(*NONE) FLDDLM(X'05') /* Override FTP input data such as userID/PWD and put commands */ OVRDBF FILE(INPUT) TOFILE(*LIBL/QFTPSRC) MBR(DSAUDT) /* FTP file to remote system. */ STRTCPFTP RMTSYS(*INTNETADR) INTNETADR('150.17.10.50') /* Delete IFS file */ DEL OBJLNK(&TOFN) Good Luck Giri Gopal -----Original Message----- From: rpg400-l-admin@midrange.com [mailto:rpg400-l-admin@midrange.com]On Behalf Of Sunitha Duraivelan Sent: Friday, July 26, 2002 4:08 AM To: rpg400-l@midrange.com Subject: Copy to Excel Spreadsheet -- [ Picked text/plain from multipart/alternative ] Hi all, I am looking to automate the process of downloading a query/400 outfile to an Excel spreadsheet. I am not sure if we can schedule the client access 'Data transfer from AS/400' option to do the job automatically. I am looking for a CL command to do this. Can anyone help me please. Thanks, Sunitha. --------------------------------- Do You Yahoo!? Yahoo! Health - Feel better, live better _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l or email: RPG400-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.