Question

  Asked: Mar 27 2008   8:55 PM GMT
  Asked by: Oldtonew


Copy DDS defined file to .txt file


iSeries, IFS, CPYTOIMPF, DDS

I am trying to copy a large, 1.4 mil records, 535 byte records, from an old DDS defined file on the iSeries to a .txt file. I have used FTP and CPYTOIMPF using every combination of setting I can think of. Every time it translates the packed numeric fields correctly but creates garbage for the alpha fields. I would like to put this file in the IFS but sending straight to a pC would be OK also. Does anyone have any suggestions that I could try to resolve this dilema?

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



Hi,

Sounds like a problem in the CCSID. Take a look at your joblog when you run the CPYTOIMPF and see if you get any warning message about CCSID.

IF all else fails, you could try using query to create a file without the packed fields and FTPing it to the PC.

Regards,

Martin Gilbert.
  • 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

GAC  |   Mar 28 2008  3:47PM GMT

Hi there,

You could user several options:

1) Try using iSeries Access to download the file to text.
2) Try using the Client Access Data Transfer Add In to MS Excel
3) You could convert the data to text before sending it to the IFS:
Create a file with a unique field with the size of the record you are trying to convert and then concatenate character fields with casted-to-text-non-character fields into this new file and then try your original solution or one of the suggestions we give you here.

Good luck!

Gerardo

 

IT-DAN  |   Mar 28 2008  4:25PM GMT

You can use Data Transfer from the iSeries (part of IBM client access). before you start the transfer click on file, properties and under the conversion tab make sure you check the “Convert CCSID 65535″ box.

Regards,

 

AnchorS  |   Mar 28 2008  6:12PM GMT

Hi:

I’ve found you need to use different commands depending on the ccsid and/or file type (internal or extrenally defined). Try the cpytostmf (copy to stream file). This solved my most recent issue.

 

Oldtonew  |   Mar 28 2008  8:18PM GMT

Thank you for the response. There is nothing in the job log of any kind about the CPYTOIMP, error or otherwise. I tried using QRY400 and got the same results. I tried importing into Excel even though I knew it wouldn’t all fit and I tried importing into Access 2003. All attempts returned the same results. I think I will give them the DDS version of the file and let them worry about it.

 

GAC  |   Mar 31 2008  3:40PM GMT

It might be also that you have non displayable charaters in those text fields, try displaying their contents in hexadecimal format to see if in the places where a blank is displayed there is other code than X:40, maybe the problem is in the source.