Question

  Asked: Dec 18 2007   3:28 PM GMT
  Asked by: Shelties


creating a .csv from iseries file


CPYTOIMPF, iSeries

I've asked this question before and was told to change the parm in CPYTOIMPF to STMFCODPAG(819). The date in the .csv file is garble.

CPYTOIMPF FROMFILE(qtemp/&FILE_NAME) +
TOSTMF('/ILS/payops/*tcat &file_name *tcat '.csv') (*REPLACE) +
STMFCODPAG(819) RCDDLM(*CRLF) +
DTAFMT(*DLM) STRDLM(*NONE)

What else can I try. Thanks. Lou

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0



I recently created a .csv with dates. Here is an example of the command.

CPYTOIMPF FROMFILE(MYLIB/DATEFILE) TOSTMF('//Apps/DateFile.csv') MBROPT(*REPLACE) STMFCODPAG(*PCASCII) RCDDLM(*CRLF)

In NoteBook, the dates looked just fine (*ISO). When I opened it in Excel, they were converted to *USA format.

Also, if the file already exists, just use the code page of the existing file. The copy command will convert it for you.

CPYTOIMPF FROMFILE(MYLIB/MYFILE) TOSTMF('//Apps/MyFile.csv') MBROPT(*REPLACE) STMFCODPAG(*STMF) RCDDLM(*CRLF)
  • AddThis Social Bookmark Button

Browse more Questions and Answers on AS/400.

Looking for relevant AS/400 Whitepapers? Visit the Search400.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register

BrentSheets  |   Dec 18 2007  6:20PM GMT

Shelties, you asked a similar question just 4 days ago and another member responded. Now you start a separate question as a follow up. This makes it harder for people to answer you. In the future, please simply update your original question by adding to the discussion of your original question — so that all dialog continues more seamlessly under one question. Thanks for you cooperation.