• Subject: RE: cpytoxxx commands and comma delimited files
  • From: "Murphy, Guy" <murphy@xxxxxxxxxxxxxxxxx>
  • Date: Thu, 13 Apr 2000 11:15:24 -0500

Title: RE: cpytoxxx commands and comma delimited files

        One of the annoyances of the CPYTOIMPF command is that to get it to work properly you have create the ascii file beforehand with the proper code page.

        What I do is create the ascii file first using the CPYTOSTMF command with the code page parameter set to *PCASCII.  I usually copy some source file member to create the file.  It can be any source file since it's going to be overwritten.  Now when you use the CPYTOIMPF command using the MBROPT(*REPLACE) option, you should get the results you want.

 Guy Murphy - murphyfa@uiuc.edu
 FACTS system - University of Illinois
 217-333-8670
 http://www.heisercoaching.com
 


-----Original Message-----
From: Joel Fritz [mailto:JFritz@sharperimage.com]
Sent: Wednesday, April 12, 2000 3:52 PM
To: MIDRANGE-L@midrange. com (E-mail)
Subject: cpytoxxx commands and comma delimited files


I think this has probably been covered here recently, but a quick search of
the archives didn't turn up what I was looking for.  I'm trying to copy a
data base file to a comma delimited ascii text file

I was fooling with cpytoimpf and getting the traditional garbage character
result.  I looked in the CL manual and a few other places and decided to try
a two pronged approach.
 
First a cpytoimpf to a data base file with a single field long enough to
accomodate the fields and the necessary delimiters.  (I ran out of fingers
pretty quickly.)  Then a cpytostmf from the flat file to my ifs text file
using the translation features. 

It worked fine except for one little detail.  The copy to the flat file
resulted in a left justified numeric field which of course carried over to
the ifs text file.  (The numeric field in the test file was signed.)

Is this just the way it works, or is there something I can do that doesn't
involve actual programming?  The left justified numeric field in the comma
delimited flat file is not enclosed in quotes, just has trailing blanks.  I
have other file transfer options, so this isn't a matter of life and death.

Thanks in advance.


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.