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



If you're put'ing from a physical file on the AS400 to flat file on a pc or unix or whatever
1) OS400 sees that file as one record length
2) OS400 doesn't have any idea what the transaction formats are in that file
3) OS400 will translate the characters from EBCDIC to ASCII
4) OS400 will add a CR/LF at the end of what it thinks is the record, that is the record length of the physical file, same for all records. If you only have characters in the first 38 bytes, OS400 will pad the remaining with blanks to the end of the file record length and then and the CR/LF.

Here's one way to handle it:
Write a program to copy all the records to a stream file using the write function from C (you can use it in RPG as a subprocedure). Write x0d, x0a at the end of what you think is the correct record length. When you read a 38 character "record", for instance, write the first 38 and then write x0d x0a (or CR/LF). Then FTP the stream file from wherever you put it in the IFS.



-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Richard Reeve
Sent: Friday, September 12, 2008 1:37 PM
To: Midrange Systems Technical Discussion
Subject: Re: FTP question


 

What is it you have?
What is it you want?

I - Do you have:
  A - One PF, internally defined, different formats (think S/36 days).
  B - Multiple PF's
  C - Multiple PF's joined together with a Multiformat Logical file

             -unfortunately, A

II - What is it you want on the other end?
  A - One PF, however it should have
    1 - externally defined data - and still have multiple formats
    2 - One PF, but with no extra spaces on the shorter records
  B - Multiple PF's
           
               -A1

Instead of ftping a DB2 file, would it make more sense to convert the DB2 file into an IFS file and then send that?  And then the IFS file could either be a CSV file, or follow EDI standards as far as element and segment terminators and other layout items.  File might could even be an xml file.

               -the customer wants a flat file

Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx 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-Ups:
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.