|
I'm at v5r1. However, when I needed a .csv without trailing blanks, I gave up on CPYTOIMPF early and decided to use the IFS APIs. It did take some time to learn them before I could use them. In the long run, the extra control over file contents they offer was worth it. Sorry, Roger Mackie -----Original Message----- From: Bill Hopkins [mailto:BHopkins@xxxxxxxxxxxxxxxxxxx] Sent: Thursday, September 25, 2003 10:45 To: RPG programming on the AS400 / iSeries Subject: Re: Trailing Blanks with CPYTOIMPF v5r1 Does anyone have this working on v5r1? Up to this point it seems all responses are from people on v5v2. I changed my PF to be Number 60 A VARLEN(15) and Name 60A VARLEN(40) and ran CPYTOIMPF twice. Both with *PCASCII and *DLM All fields were Eval %trim in RPGIV even literals that did not need it like 'Customer Number' First with STRDLM as " , it did as I thought and used all 60A including blanks because of " around both fields. Second with STRDLM as *NONE first field 'Customer Number' used all 60A (not what I wanted, still had trailing blanks) But second field 'Customer Name' used only the 40A like I wanted and expected (with no trailing blanks after 40A and *CR). *** Note1 Did check fields to see if they where blanks. Hex option in DBU and WRKF *** Note2 When run on files with more than two fields with all of the above same as listed here still only the last field gets handled correctly. All fields except last have trailing blanks to 60A and all have been %trim into VARLEN field. *** Note3 Also change not to have 'allocation length' on VARLEN in file. Results the same as first field Number but *CR was at end of last field/record with no blanks. Even better and what I expected but still fixed 60A with trailing blanks on all fields but last. :( This is where I have my question. Why only the last field of file not first or others? My thought is because it is the end of record and *CR took over. Thanks Bill Hopkins Question, Comments, or "Knocks in the Head" welcomed! _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
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.