× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


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

Title: RE: cpytoxxx commands and comma delimited files
    Left justified seems to be the way CPYTOIMPF works.  I don't see any overrides. 
    I can't remember how I stumbled upon the CPYTOSTMF trick.  I think I called IBM about CPYTOIMPF and they told me that the ascii file has to have the right code page beforehand.  On the V4R3 version of the command, IBM put a *TAB option for the field delimiter parameter so you could have tab delimited files.  You had to type an ampersand (&) into the parameter first to expand it from its 3 character length so you could type in *TAB.  However, the *TAB option didn't work.  It would always give an error.  I discovered though that you can still create a tab delimited file.  You have to use the hex value , X'05', for the tab character.

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: Thursday, April 13, 2000 12:55 PM
To: 'MIDRANGE-L@midrange.com'
Subject: RE: cpytoxxx commands and comma delimited files

Thanks, that is the solution to the garbage character problem.  Makes me very happy.  It may have been covered on the list before, but I didn't see anything like it  in the documentation for the command.
 
Is left justified, padded with blanks the way CPYTOIMPF handles numeric fields in comma delimited form?  Since my post yesterday, I tried it with both packed and zoned fields with the same result.
-----Original Message-----
From: Murphy, Guy [mailto:murphy@uif.uillinois.edu]
Sent: Thursday, April 13, 2000 9:15 AM
To: 'MIDRANGE-L@midrange.com'
Subject: 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
 


 


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.