Stream Files (STMF)

pts.
Tags:
AS/400
We have three Stream files that I need to copy into standard ISeries database files used in our ERP system. I found the 'CPYFRMSTMF' command, but this cmd seems to allow copies only to other Stream type files with directories.(QSYS.LIB) Does anyone know how to copy a stream file into an actual database file? Thanks!

Answer Wiki

Thanks. We'll let you know when a new response is added.

You need to specify your target database file in IFS notation thus:

/QSYS.LIB/TGTLIB.LIB/TGTFIL.FILE/TGTMBR.MBR

Where TGTLIB, TGTFILE and TGTMBR are the names of the library, file and member that you want to copy the stream file data to. The target file must already exist.

You will also get all kinds of other parameter options to control the code page conversion, end of line character and tab conversion.

HTH

Paul

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • JPLamontre
    You can have a better result is uses CPYFRMIMPF : if is able to populate a DB2 file with columns, particularly, it is able to apply default values to null columns, a common state in text files that is rarely described in common 400 files.
    0 pointsBadges:
    report
  • TomLiotta
    Note that although the CPFRMSTMF TOMBR() is a 'database' file, it must be "either a source physical file or a program-described physical file." An externally-described database file is not allowed. As such, there isn't much reason to do the copy. Any input from it by program can come from the streamfile almost as easy as from the program-described file. Further, issues such as line-wrap and CCSIDs might be under much better control by reading the streamfile. Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following