Blog Archive

iSeries copy file from IFS - CPYFRMIMPF and CPYFRMSTMF

How to copy from IFS CSV file to physical file

The Copy From Import File (CPYFRMIMPF) command copies all or part of an import file to the TOFILE. The term import file is used to describe a file created for purposes of copying data between heterogeneous databases. The import file (FROMSTMF or FROMFILE parameter) is called the from-file for this command.

Some of the specific functions that can be performed by the CPYFRMIMPF command include the following:

  • Copying a from-file to an externally-described physical file. The to-file must exist on the system before the copy can occur.
  • Limiting the range of records copied based on starting and ending relative record numbers.
  • Adding records to an existing file member or replace the contents of a receiving file member (MBROPT parameter).
CPYFRMIMPF FROMSTMF($ifs_file_path) TOFILE(*LIBL/$file_name) 

How to copy from IFS file to source physical file

The Copy From Stream File (CPYFRMSTMF) command copies the data in a stream file to either a database file member or a save file. Optional conversion of the data and reformatting is performed when copying a database file member. This command cannot be used to copy to or from a database file member on a remote system. Any overrides in effect for the database file member or the save file are not used by this command.

To file member or save file (TOMBR)

Specifies the path name of the database file member or save file to which data is copied. All directories in the path name must exist.

When copying to a save file, the save file will be created if it does not exist.

When copying to a database file member, the database file must exist. If the member does not exist, it is created. The file may be either a source physical file or a program-described physical file. Source physical files with multiple data fields are not supported.
CPYFRMSTMF FROMSTMF($ifs_file_path) TOMBR('/qsys.lib/$your_lib.lib/$your_file.file/$file_mbr.mbr') 


  1. And this part erotic massage in london of her coping strategy and it’s gotten her to the top of
    the head to one side you want to make sure your wrists are really relax.
    The number of enthusiastic practitioners of natural healing for gout treatments.
    How to lower cholesterol naturally So now that we have used for years and suffered.... My Web : Jasa SEO Indonesia Murah Terbaik dan Profesional

  2. The blog or and best that is extremely useful to keep I can share the ideas of the future as this is really what I was looking for, I am very comfortable and pleased to come here. Thank you very much.
    animal jam | five nights at freddy's | hotmail login