× 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.



Do you have support with IBM?  Open up an issue with them.

Or, upgrade to V5R2.

Rob Berendt
-- 
"They that can give up essential liberty to obtain a little temporary 
safety deserve neither liberty nor safety." 
Benjamin Franklin 




"Bill Hopkins" <BHopkins@xxxxxxxxxxxxxxxxxxx> 
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
09/25/2003 10:44 AM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
cc

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 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.