× 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: data warehousing and CPYTOIMPF
  • From: Martin Rowe <martin@xxxxxxxxxx>
  • Date: Fri, 20 Jul 2001 19:27:24 +0100
  • Organization: Jamaro

On Friday 20 July 2001 18:23, saustad@deltadentalwi.com wrote:
> I know this isn't exactly related to RPG (the extract pgm is written
> RPG!), but I'm hoping I can get an answer from this list.  I tried on
> MIDRANGE-L, but we didn't get many responses.

You just got one from me - but I've included it below as it is an RPG 
solution :)

> We have a data warehousing project we are working on.  We'd like to
> take a physical file and copy it to the IFS as a pipe-delimited ("|"),
> variable-length, ASCII text file.  The alphanumeric fields should not
> contain the trailing blanks.  The numeric fields should not contain the
> leading zeroes.  The CPYTOIMPF cmd seems to work, except the "pipes"
> are showing up fixed in the same column on each record.  Is there a
> parameter we missing, or anything else?  We are on V4R5.  Any help
> would be greatly appreciated.  Thanks.

You can try my free CRTCSVDTA utility http://www.dbg400.net/crtcsv.html 
that should do what you want. By default the field separator is a comma 
but you can specify any value. You'll need to run a CPYTOSTMF afterwards 
as CRTCSVDTA (currently[1]) creates the data in flatfile format in a 
database file. One of the reasons for writing the tool was to get rid of 
the trailing blanks - I never found a method of getting CPYTOIMPF to work 
the way I wanted.

Regards, Martin
-- 
martin@dbg400.net / jamaro@firstlinux.net
http://www.dbg400.net  DBG/400 - DataBase Generation utilities 
Open Source test environment tools for the AS/400 / iSeries and 
miscellaneous database & spooled file management commands.
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.