Put the CR/LF at the end of the record yourself in the pgm that creates the
data. Then use *NOTEXT within the CPYTOPCD command.

BTW... The EBCDIC CR/LF hex values are x'0D' and x'25'

Ken Slaugh  (707) 795-1512 x118
Chouinard & Myhre, Inc.
AS/400 Professional Administrator/MSE
Client Access Specialist

                    "Joe Giusto II
                    \(E-mail\)"                To:     "Midrange-L \(E-mail\)"
                    <juicenetdps@crossw        <MIDRANGE-L@midrange.com>
                    inds.net>                  cc:
                    Sent by:                   Subject:     Creating Fixed 
Lenth PC format
                    midrange-l-admin@mi        (.txt) file

                    01/08/2002 11:18 AM
                    Please respond to

I have been asked to create an ASCII file with a fixed length format
containing CR/LF.
I created the physical file and extracted the records needed, then used
CPYTOPCD to get the file to a folder in QDLS.
The CR/LF is being created by the CPYTOPCD command, however, when the last
field is not filled, the CR/LF is put after the last non-blank character in
the field instead of after the end of the field length.  (i.e. 30 byte
is only being filled with 15 or less bytes, but the target system is
expecting the extra spaces before the CR/LF).

My question is how can I force the extra spaces at the end of the ASCII
record when the field is not full.

Joe Giusto II
Ritz Camera
Beltsville, MD
301-419-3209 x347
410-813-2812 x347

This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
or email: MIDRANGE-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.

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