|
Here is an example clp at v4.5(may not be the latest way, but something I learned on the list) /* create url */ CHGVAR VAR(&URLW) VALUE('/xxx/yyyy/' *TCAT &CUST6 *TCAT + &TIME *TCAT 'W.csv') /* create file first (cpytostmf will set proper code page */ CPYTOSTMF + FROMMBR('/QSYS.LIB/BNCPGM.LIB/QTXTSRC.FILE/+ DEFAULT.MBR') TOSTMF(&URLW) + STMFOPT(*REPLACE) STMFCODPAG(*PCASCII) /* now copy data to stmf, converting to .csv */ CPYTOIMPF FROMFILE(&CUST6/WWRTN *FIRST) TOSTMF(&URLW) + MBROPT(*REPLACE) RCDDLM(*CRLF) + DTAFMT(*DLM) STRDLM('"') FLDDLM(',') hth jim ----- Original Message ----- From: "Alex A. Moore" <alexm@ELLISHOSIERY.COM> To: "Midrange Systems Technical Discussion" <midrange-l@midrange.com> Sent: Friday, January 17, 2003 11:30 AM Subject: RE: Double-click emailed AS400-created file and open up in Excel, automagically > .csv is normally associated with excel. Comma delimiter works fine, fields > with embedded ,s or quotes are surrounded by double quotes. > > Alex > > > > The archives mentions CPYTOIMPF can create a CSV file, and I see that > > you can specify the field delimiter, which defaults to a comma. I saw > > in the archives someone suggested using x'05' on this parameter to > > create a tab-delimited file, although there was confusion on whether it > > should be x'05' or x'09'. FWIW, we're on v4r5. Assuming that one of > > these creates the tab-delimited file, what file extension should we use > > in order to help Excel recognize it properly, without asking the user > > to specify "what kind of file is this?" factoids? > > > > TIA, Dan > > > > _______________________________________________ > This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list > To post a message email: MIDRANGE-L@midrange.com > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo.cgi/midrange-l > or email: MIDRANGE-L-request@midrange.com > Before posting, please take a moment to review the archives > at http://archive.midrange.com/midrange-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.