> From: Jateen Patel
>
> >I want to write a java class (which would run on the AS/400) that would
> >accept a fileName, fileMemberName and pContents. The class should then
> >create a file with the fileName, if it does not already exist
> and then add
> >a member with name fileMemberName. Then it should write the String
> >pContents to the member just created. The length of pContents can be
> >different for different members in the same file.

AS/400 files are fixed-length.  You cannot have two members with different
record lengths in the same file.  You need to decide what your record length
will be for all members, and then if pContents is longer than that, you need
to write multiple records.

Use the create() method only once, to build the original file.  To add
members, use addPhysicalFileMember().

Joe


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.