
If we can determine how records are added to this flat file, we can give better suggestions.
How/when are records added to this flat file?
Throughout the day? Once a day?
Do the records in the flat file have a timestamp?
Can records in this file be changed or deleted?
Do the records need to be sent as soon as updatred in the flat file? or is once a day enough?

…i need to generate a flat file and send it to few of the mainframe servers…
Also, please define “flat file”. There are at least two very different ways that the term is used for AS/400s. And there is a third distinctly different type of “flat file” that is sometimes referenced on mainframes. Please describe what the final “flat file” object needs to look like on the mainframe servers.
Tom

Please let me know the possible ways to perform this task…
Let’s see…
- FTP
- DDM/DRDA
- /QNTC
- scp (or sftp)
- NSF
- Custom sockets
- Custom APPN/APPC
- (…probably other.)
…and provide the sample code(CL and RPG).
To do what?
Tom

@charlieBrowne :
Records will be added through out the day.
records have a time stamp
records can be updated,deleted.
one daily job i have to develop it will check for changed or added records and that records only we have to send.

Here is what I think of referring to a “flat” file.
CRTPF FILE(QGPL/FLAT) RCDLEN(80)
INSERT INTO QGPL.FLAT VALUES(’ABC’)
Gary

INSERT INTO QGPL.FLAT VALUES(’ABC’)
That is a potential start. However, note that the VALUES() clause needs to have enough values to include all fields from the original. So far, it seems as if there is at least one “data” field from a source file plus at least a timestamp. Because QGPL.FLAT is “flat”, it will only have a single column.
The VALUES() clause will need to ensure that all values are converted to character values and then concatenated into a single value.
But we don’t know anything about what a record in the ‘flat file’ should look like.
There is also a possibility that the ‘flat file’ needs to be a text streamfile, perhaps with specific field delimiters, record delimiters, CCSID, etc.
So far, we simply don’t know what must actually be done. We don’t know what the result must look like and we don’t know what the source looks like. Until we get more description of the process, it will all be guesswork.
Tom



















