Re: Save txt flatfile as member in a file

Richard Schoen <[email protected]>
Newsgroups gmane.comp.lang.as400.java
Message-ID <BN7PR08MB4836B17EA047AE580B2486F787780@BN7PR08MB4836.namprd08.prod.outlook.com>
Probably Record level access makes sense, however the table or member probably needs to be created with a CL command or other method unless RLA can do an ADDPFM.

Or he could SQL upload to a temp file and do a CPYF or call existing code. 

Or use FTP as he is now.

Or put file to the IFS with IFS classes and call CPYFRMIMPF or CPYFRMSTMF.

Probably at least 10 ways to do this.

Regards,
Richard Schoen 
Director of Document Management 
e. [email protected] 
p. 952.486.6802 
w. helpsystems.com 


-----Original Message-----
message: 4
date: Mon, 11 Jun 2018 08:02:29 -0500
from: David Gibbs <david-Zwy7GipZuJhWk0Htik3J/[email protected]>
subject: Re: Save txt flatfile as member in a file

On 6/10/2018 6:54 PM, Jack Woehr wrote:
> you could use the record file access classes.
> or you could use jdbc and sql

I would suggest record level access (RLA) ... since SQL (and therefore JDBC) doesn't deal with members well.

Check out https://ibm.co/2JMVmV1 for a basic example of using RLA

https://javadoc.midrange.com/jtopen/com/ibm/as400/access/AS400File.html is a good starting point for java classes.

david




-- 
This is the Java Programming on and around the IBM i (JAVA400-L) mailing list
To post a message email: JAVA400-L-Zwy7GipZuJhWk0Htik3J/[email protected]
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request-Zwy7GipZuJhWk0Htik3J/[email protected]
Before posting, please take a moment to review the archives
at https://archive.midrange.com/java400-l.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.