TAA Tools
CPYFRMSTM2      COPY FROM STREAM FILE 2                TAAIFUH

The Copy  From  Stream File  2 command  is a  front end  to the  system
CPYFRMSTMF  command.   CPYFRMSTM2  uses a  normal object  prompt  for a
file  and member to  allow a simple copy  from an IFS  stream file to a
data base member or  save file.  Only  a member of a program  described
physical file, a  member of a source physical file, or  a save file may
be copied to.

Error  messages   are  significantly  better  than  those  provided  by
CPYFRMSTMF when  the object is  not found  or a  non-supported file  is
named.

A typical command would be:

             CPYFRMSTM2   FROMSTMF(ABC.MBR) TOFILE(QCLSRC)
                            MBR(ABC)

The ABC.MBR  object in  the user's  home directory  would be copied  to
the  ABC member of the  QCLSRC file.   If the member did  not exist, it
would be  added.    If  the member  does  exist,  the  MBROPT(*REPLACE)
function must be used.

A  save file  is  also supported,  but  the save  file  must exist  and
TOMBR(*NONE) and MBROPT(*REPLACE) must be specified.

             CPYFRMSTM2   FROMSTMF(SAVF1.SAVF) TOFILE(SAVF1)
                            TOMBR(*NONE) MBROPT(*REPLACE)

CPYFRMSTM2 escape messages you can monitor for
----------------------------------------------

      TAA9894    The file type is not supported.
      TAA9895    Object exists and MBROPT(*NONE) was specified.
      TAA9896    Not authorized for *R to object.

Escape messages from based on functions will be re-sent.


CPYFRMSTM2 Command parameters                         *CMD
-----------------------------

   FROMSTMF      The  name of  the stream file  to be  copied.   If the
                 stream  file has an extension  such as '.mbr', it must
                 be specified.

   TOFILE        The qualified name of  the file to be copied to.   The
                 library value  defaults to *LIBL.   A specific library
                 or *CURLIB may also be used.

                 The  file must be  a program  described physical file,
                 a source physical file, or a save file.

   TOMBR         The member to  be copied to.   *FIRST is the  default.
                 A specific member or *LAST may be specified.

                 If  a source  member is  copied,  the source  sequence
                 sequence numbers  are added and the  change date field
                 will be 000000.

                 If copying to  a save file,  *NONE must be  specified.

   MBROPT        The member  option.   *NONE is  the default.   If  the
                 member does  not exist, it is created  and the records
                 added.   *ADD  or *REPLACE may  be used.   *ADD is not
                 valid when  copying  to a  save file.    The value  is
                 passed thru to the CPYFRMSTMF command.

   CVTDTA        The data conversion option defaults to *DFT.

                 If  *DFT is used,  and 1)  if copying  to a  data base
                 file,  the value  assigned is  *AUTO or 2)  if copying
                 to a save file, the value assigned is *NONE.

                 *AUTO, *TBL, or  *NONE may  be specified.   The  value
                 is passed thru to the CPYFRMSTMF command.

   STMFCCSID     *STMF is the  default meaning to use the  CCSID of the
                 stream file.

                 The value is ignored if copying to a save file.

                 The  special values *PCASCII or  *STDASCII may be used
                 or a value between 1 and  65533.  The value is  passed
                 thru to the CPYFRMSTMF command.

   DBFCCSID      *FILE is the default  meaning to use the CCSID  of the
                 data base  file.  The  value is ignored  if copying to
                 a save file.

                 A  value between  1 and 65533  may be  specified.  The
                 value is passed thru to the CPYFRMSTMF command.

   TBL           The path  name to  be used  to convert  data from  the
                 stream file  to the data base member.   This parameter
                 is only valid if CVTDTA(*TBL) is specified.

                 The value is ignored if copying to a save file.

                 The  value is passed  thru to  the CPYFRMSTMF command.

   ENDLINFMT     Specifies  the  end-of-line  character  to   recognize
                 when copying the  stream file.  *CRLF  is the default.
                 *LF, *CR, *LFCR, or *FIXED may be entered.

                 The value is ignored if copying to a save file.

                 The  value is passed  thru to  the CPYFRMSTMF command.

   TABEXPN       A  *YES/*NO   parameter  for   whether  embedded   tab
                 characters are  expanded to  blanks up  to next  eight
                 character tab position.

                 *YES is the default.

                 *NO  may be specified  to copy  the tab  characters to
                 the data base member.

                 This  parameter  is  ignored when  copying  to  a save
                 file.

   STMFCODPAG    The code page to  be used when determining the  stream
                 file  CCSID.   *STMF is  the default  meaning  no code
                 page processing is performed.

                 *PCASCII  or  *STDASCII  may  be  entered  or  a value
                 between 1 and 32767.

                 The value is ignored if copying to a save file.

                 The value  is passed  thru to  the CPYFRMSTMF  command
                 which has  a special note  in the help  text regarding
                 the use of STMFCODPAG with STMFCCSID.


Restrictions
------------

Only  a member  of a  program described  physical file,  a member  of a
source physical file, or a save file may be copied to.

Prerequisites
-------------

The following TAA Tools must be on your system:

     CHKIFSE         Check IFS entry
     CHKDBFMBR       Check data base file member
     RMVMSGKEY       Remove message key
     RSNLSTMSG       Resend last message
     RTVDBFA         Retrieve data base file attributes
     RTVMSGKEY       Retrieve message key
     SNDCOMPMSG      Send completion message
     SNDESCINF       Send escape information
     SNDESCMSG       Send escape message
     SNDJLGMSG       Send job log message

Implementation
--------------

None, the tool is ready to use.

Objects used by the tool
------------------------

   Object        Type    Attribute      Src member    Src file
   ------        ----    ---------      ----------    ----------

   CPYFRMSTM2    *CMD                   TAAIFUH       QATTCMD
   TAAIFUHC      *PGM       CLP         TAAIFUHC      QATTCL
					

Added to TAA Productivity tools April 15, 2012


Home Page Up to Top