Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Examples of the NCOPY command

&pagelevel(4)&pagelevel

This section provides sample applications of the NCOPY command.

Further examples are available on the openFT product volume; please consult your FT administrator.

  1. NCOPY command for openFT with mandatory operands only

    When the conditions in section “The shortest form of the command” apply, the NCOPY command can be entered only with the mandatory operands.

    In the following example the file DATA is to be transferred from the local computer to the partner computer HOST001.The command is entered in the recommended short form.

    NCOPY TO,HOST001,(DATA),*MSP(DATA,,(MICKEY,,1313,abc))

    The long form of this command is as follows:

    NCOPY TRANSFER-DIRECTION=TO,PARTNER=HOST001,

    LOCAL-PARAMETER=(FILE-NAME=DATA),

    REMOTE-PARAMETER=*MSP(FILE-NAME=DATA,

    TRANSFER-ADMISSION=(USER-IDENTIFICATION=MICKEY,ACCOUNT=1313,PASSWORD=abc))

  2. Transfer of a file with password protection cataloged under another user ID in the remote system.

    The file LIST is stored in computer HOST002 under the user ID SHIPPING and protected by the password C’XX’. The user ID SHIPPING has the account number SHIP002 and the password TOPSEC.The command is entered in the local z/OS system under the identifier CENTRAL.

    The example below shows both the short form and the long form of the command used to transfer the file LIST to the local system and store it there in the file LIST.ABC, which has not yet been created. If this file already exists, the LIST file should not be transferred.

    Recommended short form of the command:

    NCOPY FROM,HOST002,(LIST.ABC),*MSP(LIST,XX, -

              (SHIPPING,SHIP002,TOPSEC)),,NEW

    FTR0000 OPENFT: Request 31485389 accepted

    Long form of the command:

    NCOPY PARTNER=HOST002,TRANSFER-DIRECTION=FROM-PARTNER,

    LOCAL-PARAMETER=(FILE-NAME=LIST.ABC),

    REMOTE-PARAMETER=*MSP(FILE-NAME=LIST,PASSWORD=XX,

    TRANSFER-ADMISSION=(USER-IDENTIFICATION=SHIPPING,

    ACCOUNT=SHIP002,PASSWORD=TOPSEC)),

    WRITE-MODE=*NEW-FILE

    FTR0000 OPENFT: Request 16085132 accepted

  3. Collection of files A central office has to collect the monthly reports from its 5 branch offices on the first of every month. These monthly reports are edited ready for printing in each of the branch offices and contained in a file called REPORT.month and are each to be transferred into a file in the central location called REPORT.month.branch-office. The user IDs do not contain any passwords.

    The transfer of these files is carried out with the following CLIST procedure:

    PROC 1 MONTH

    /*       PLEASE ENTER LAST MONTH FOR MONTH!                         */

    NCOPY TRANS=FROM,PARTNER=BRANCH1, +

    LOC=(FILE-NAME=REPORT.&MONTH..BRANCH1, +

    SUCC='SEND ''REPORT.&MONTH..BRANCH1 RECEIVED'',USER(*)'), +

    REM=*MSP(FILE-NAME=REPORT.&MONTH,TRANS=(CENTRAL,CENTR01))

    NCOPY TRANS=FROM,PARTNER=BRANCH2, +

    LOC=(FILE-NAME=REPORT.&MONTH..BRANCH2, +

    SUCC='SEND ''REPORT.&MONTH..BRANCH2 RECEIVED'',USER(*)'), +

    REM=*MSP(FILE-NAME=REPORT.&MONTH,TRANS=(CENTRAL,CENTR01))

    NCOPY TRANS=FROM,PARTNER=BRANCH3,  +

    LOC=(FILE-NAME=REPORT.&MONTH..BRANCH3,  +

    SUCC='SEND ''REPORT.&MONTH..BRANCH3 RECEIVED'',USER(*)'), +

    REM=*MSP(FILE-NAME=REPORT.&MONTH,TRANS=(CENTRAL,CENTR01))

    NCOPY TRANS=FROM,PARTNER=BRANCH4, +

    LOC=(FILE-NAME=REPORT.&MONTH..BRANCH4, +

    SUCC='SEND ''REPORT.&MONTH..BRANCH4 RECEIVED'',USER(*)'), +

    REM=*MSP(FILE-NAME=REPORT.&MONTH,TRANS=(CENTRAL,CENTR01))

    NCOPY TRANS=FROM,PARTNER=BRANCH5, +

    LOC=(FILE-NAME=REPORT.&MONTH..BRANCH5, +

    SUCC='SEND ''REPORT.&MONTH..BRANCH5 RECEIVED'',USER(*)'), +

    REM=*MSP(FILE-NAME=REPORT.&MONTH,TRANS=(CENTRAL,CENTR01))

    END

    This CLIST procedure (name: MONTH.CLIST) is called as follows, taking the month of November as an example:

    EX MONTH 'NOVEMBER'

    FTR0000 OPENFT: Request 30436972 accepted

    FTR0000 OPENFT: Request 68185709 accepted

    FTR0000 OPENFT: Request 38825582 accepted

    FTR0000 OPENFT: Request 31485551 accepted

    FTR0000 OPENFT: Request 37777008 accepted

  4. Distribution of files

    A central office distributes guidelines to its five branch offices. This guidelines are subsequently printed at the receive system by a job which is contained in the member PRINT of the PO file JOB.

    To distribute the guidelines the central office uses the the following job:

    //CENTRAL  JOB

    //NCOPY    EXEC PGM=IKJEFT01

    //SYSPRINT DD   SYSOUT=*
    //SYSTSPRT DD   SYSOUT=*

    //SYSTSIN  DD   *

    NCOPY TRANS=TO,PARTNER=BRANCH1,                                      -
    LOC=(FILE-NAME=GUIDE.LINE),                                          -

    REM=*MSP(FILE-NAME=GUIDE.LINE,TRANS=(BRA1),                          -

    SUCC='ALLOC DSNAME(JOB(PRINT))')

    NCOPY TRANS=TO,PARTNER=BRANCH2,                                      -

    LOC=(FILE-NAME=GUIDE.LINE),                                          -

    REM=*MSP(FILE-NAME=GUIDE.LINE,TRANS=(BRA2),                          -
    SUCC='ALLOC DSNAME(JOB(PRINT))')

    NCOPY TRANS=TO,PARTNER=BRANCH3,                                      -

    LOC=(FILE-NAME=GUIDE.LINE),                                          -

    REM=*MSP(FILE-NAME=GUIDE.LINE,TRANS=(BRA3),                          -
    SUCC='ALLOC DSNAME(JOB(PRINT))')

    NCOPY TRANS=TO,PARTNER=BRANCH4,                                      -

    LOC=(FILE-NAME=GUIDE.LINE),                                          -
    REM=*MSP(FILE-NAME=GUIDE.LINE,TRANS=(BRA4),                          -

    SUCC='ALLOC DSNAME(JOB(PRINT))')

    NCOPY TRANS=TO,PARTNER=BRANCH5,                                      -
    LOC=(FILE-NAME=GUIDE.LINE),                                          -

    REM=*MSP(FILE-NAME=GUIDE.LINE,TRANS=(BRA5),                          -

    SUCC='ALLOC DSNAME(JOB(PRINT))')

    /*

    //

    This job is stored in the member GUIDEL of the PO file SHIPPING.CNTL, which is called up as follows under user ID CENTRAL:

    SUB SHIPPING(GUIDEL)

    JOB CENTRAL(JOB00136) SUBMITTED

  5. Chaining of files

    A central office collects SAM files (e.g. transaction files) from its 3 branch offices. The files are to be concatenated and are not to be processed until all the files to be collected have been transferred. The files have the name SAM.FILE in the example and are to be stored consecutively in the file SAM.ALL. The user IDs do not contain any passwords.

    The files are transferred using the following CLIST procedure (name: CHAIN.CLIST):

    PROC 0

    NCOPY TRANS=FROM,PARTNER=BRANCH1,WRITE=EXT,                          -

    REM=*MSP(FILE-NAME=SAM.FILE,PASS=BRA1,TRANS=(BRA1,,)),               -
    LOC=(FILE-NAME=SAM.ALL,                                              -

    SUCC='NCOPY TRANS=FROM,PARTNER=BRANCH2,WRITE=EXT,                    -

    REM=*MSP(FILE-NAME=SAM.FILE,PASS=BRA2,TRANS=(BRA2,,)),               -
    LOC=(FILE-NAME=SAM.ALL,                                              -

    SUCC=''NCOPY TRANS=FROM,PARTNER=BRANCH3,WRITE=EXT,                   -

    LOC=(FILE-NAME=SAM.ALL,                                              -
    REM=*MSP(FILE-NAME=SAM.FILE,PASS=BRA3,TRANS=(BRA3,,))'')')

    You call the procedure as follows:

    EX CHAIN

    FTR0000 OPENFT: Request 30436727 accepted

  6. File transfer between openFT (z/OS) and another FT system

    The file FILE is to be transferred to another system using openFT(z/OS). In the other system (SYS) the user ID BROOKLYN with the password 20000 is to be used. The file is to be given the name f/i/l/e in this system. The short form of the command is used:

    NCOPY TRANS=TO,PARTNER=SYS,LOC=(FILE-NAME=FILE),

    REM=*ANY(FILE-NAME='f/i/l/e',TRANS=('BROOKLYN','20000'))

    FTR0000 OPENFT: Request 15078927 accepted

    Note the comments in section “Entering FT commands”.

  7. File transfer to BS2000 systems

    The file FILEB is to be transferred from an z/OS computer to the BS2000 computer BS2. The file is protected in the local system by password ZZZZ. The user ID has the account number ZENTR01 and is protected by password HQ1. In the BS2000 computer the file is to be called FILE, is to be protected against overwriting with the password C'XXXX' and be stored under the user ID CENTRBS2 with the account number CENTRAL2 and password C'CEN2'. The command is entered in the short form.

    NCOPY TO,BS2,

    (FILE-NAME=FILEB,PASS=ZZZZ),

    *BS2000(FILE=FILE,PASS=C'XXXX',TRANS=(CENTRBS2,CENTRAL2,C'CEN2'))

    FTR0000 OPENFT: Request 56465400 accepted

  8. File transfer using openFT (Unix systems)

    The file mailbag is to be obtained from the Unix system ALFRED and transferred to the local z/OS system. The file is held by ALFRED under the user ID „flyte“ with a password of 144002 and is to be given the name NO.HURRY in the local system. An abbreviated command for this request is as follows:

    NCOPY FROM,ALFRED,(FILE-NAME=NO.HURRY),

    *ANY(FILE-NAME='mailbag',TRANS=('flyte',,'144 002'))

    FTR0000 OPENFT: Request 19458206 accepted

    Note the comments in section Differentiation between uppercase and lowercase letters (Entering FT commands).

    In this example, it is assumed that the file to be transferred is a text file (default value *CHAR for the parameter DATA-TYPE).

  9. File transfer with follow-up processing

    The following transfer job is requested by user USER0 in system SYS1:

    NCOPY TRANS=TO, +

       PARTNER=SYS2, +

       LOC=(FILE='TEST1.ABC', +
            TRANS=(USER1,ACC1,PASS1), +

            PROC=(USER3,ACC3,PASS3), +

            SUCC='//STEP     EXEC PGM=IEFBR14 CALL PROGRAM; +
                  //DELFILE  DD DSNAME=&FILX#########################+

    ############################,DISP=(OLD,DELETE,DELETE); +

                  //* PGRN=''MAC''''DONALD''', +
            FAIL='SEND ''job &TRID##### with USERID=&USID## not +

                  correct.'', USER(&OWID##); +

                  //* PGRN=''MAC''''DONALD'''), +
       REM=*MSP(FILE=FROM.USER1, +

                TRANS=(USER2,ACC2,PASS2), +

                PROC=(USER4,ACC4,PASS4), +
                SUCC='SEND ''FILE &FILX#############################+

    ######################## from &PNAM### received.'', USER(&USID##); +

                      //* PGRN=DONALD', +

                FAIL='SEND ''job &TRID##### from partner &PNAM### +
                      not correct.'', USER(&USID##); +

                      //* PGRN=DONALD')

    If the standard jobs are used, openFT creates the following jobs for follow-up processing (for help with the PGRN parameter:

    If the job is successful in the local system:

    //USER3N    JOB ACC3,
    //          'MAC''DONALD',

    //          MSGCLASS=X,

    //          CLASS=7,
    //          NOTIFY=USER3,

    //          USER=USER3,

    //          PASSWORD=PASS3,REGION=0M
    //          EXEC PGM=IKJEFT01

    //OPENFT    DD DSN=OPENFTQU.STD.CONN,

    //             DISP=(SHR,KEEP)

    //STEPLIB   DD DSN=OPENFTQU.OPENFT.NCLOAD,
    //             DISP=(SHR,KEEP)

    //SYSPRINT DD SYSOUT=*

    //SYSTSPRT DD SYSOUT=*

    //SYSTSIN  DD *

    //STEP EXEC PGM=IEFBR14

    //* CALL PROGRAM

    //DELFILE DD DSNAME='TEST1.ABC',DISP=(OLD,DELETE,DELETE)

    /*

    If the job is unsuccessful in the local system:

    //USER3N    JOB ACC3,
    //          'MAC''DONALD',

    //          MSGCLASS=X,

    //          CLASS=7,
    //          NOTIFY=USER3,

    //          USER=USER3,

    //          PASSWORD=PASS3,REGION=0M
    //          EXEC PGM=IKJEFT01

    //OPENFT    DD DSN=OPENFTQU.STD.CONN,

    //             DISP=(SHR,KEEP)
    //STEPLIB   DD DSN=OPENFTQU.OPENFT.NCLOAD,

    //             DISP=(SHR,KEEP)

    //SYSPRINT DD SYSOUT=*

    //SYSTSPRT DD SYSOUT=*

    //SYSTSIN  DD *

    SEND 'request 1234567890 with USERID=USER3 not correctt.', USER(USER0)

    /*

    If the job is successful in the remote system:

    //USER4N    JOB ACC4,

    //          'DONALD',

    //          MSGCLASS=X,
    //          CLASS=7,

    //          NOTIFY=USER4,

    //          USER=USER4,
    //          PASSWORD=PASS4,

    //          EXEC PGM=IKJEFT01,REGION=512K,DYNAMNBR=10

    //OPENFT    DD DSN=OPENFTQU.STD.CONN,
    //             DISP=(SHR,KEEP)

    //STEPLIB   DD DSN=OPENFTQU.OPENFT.NCLOAD,

    //             DISP=(SHR,KEEP)
    //SYSPRINT DD SYSOUT=*

    //SYSTSPRT DD SYSOUT=*

    //SYSTSIN  DD *
    SEND 'File FROM.USER1 received from SYS1 .', USER(USER4)

    /*

    If the job is unsuccessful in the remote system:

    //USER4N    JOB ACC4,

    //          'DONALD',
    //          MSGCLASS=X,

    //          CLASS=7,

    //          NOTIFY=USER4,
    //          USER=USER4,

    //          PASSWORD=PASS4,REGION=0M

    //          EXEC PGM=IKJEFT01
    //OPENFT    DD DSN=OPENFTQU.STD.CONN,

    //             DISP=(SHR,KEEP)

    //STEPLIB   DD DSN=OPENFTQU.OPENFT.NCLOAD,
    //             DISP=(SHR,KEEP)

    //SYSPRINT DD SYSOUT=*

    //SYSTSPRT DD SYSOUT=*

    //SYSTSIN  DD *

    SEND 'Request 0987654321 from partner SYS1 not correct.', USER(USER4)

    /*

  10. File transfer with follow-up processing (batch job)

    USER1 in system SYS1 sends an invoice to USER2 in system SYS2 with the following batch job. If the file transfer is successful, USER1 is to receive an acknowledgement automatically (via file transfer from SYS2 to SYS1).

    //TESTJOB   JOB

    //          EXEC PGM=IKJEFT01

    //SYSPRINT  DD SYSOUT=*
    //SYSTSPRT  DD SYSOUT=*

    //SYSTSIN   DD *

    NCOPY TRANS=TO, PARTNER=SYS2,                                            -
    LOC=(FILE=INVOICE,                                                      -

         TRANS=(USER1,ACC1,PASS1),                                           -

         LIST=*NONE),                                                        -
    REM=*MSP(FILE=INVOICE.SYS1,                                             -

             TRANS=(USER2,ACC2,PASS2),                                       -

             PROC=(USER4,ACC4,PASS4),                                        -
             SUCC='NCOPY TRANS=TO,PARTNER=&PNAM###,                          -

             LOC=(FILE=ACKNOWLEDGMENT,

                  TRANS=(&USID##,&ACCN##############,&PASS###)),-

    REM=*MSP(FILE=QUIT.SYS2,TRANS=(&USID##,&ACCN#########,&PASS###))'),-

    WRITE=*REPLACE

    /*

    //

    If the standard jobs are used, the openFT (z/OS) installed on the remote system (SYS2) creates the following job for follow-up processing:

    //USER4N    JOB ACC4,

    //USER4N    JOB ACC4,

    //          'DONALD',
    //          MSGCLASS=X,

    //          CLASS=7,

    //          NOTIFY=USER4,
    //          USER=USER4,

    //          PASSWORD=PASS4,REGION=0M

    //          EXEC PGM=IKJEFT01
    //OPENFT    DD DSN=OPENFTQU.STD.CONN,

    //             DISP=(SHR,KEEP)

    //STEPLIB   DD DSN=OPENFTQU.OPENFT.NCLOAD,
    //             DISP=(SHR,KEEP)

    //SYSPRINT DD SYSOUT=*

    //SYSTSPRT DD SYSOUT=*

    //SYSTSIN  DD *

    NCOPY TRANS=TO,PARTNER=SYS1,LOC=(FILE=ACKNOWLEDGMENT,

    TRANS=(USER4,ACC4,PASS4)),
    REM=*MSP(FILE=QUIT.SYS2,TRANS=(USER4,ACC4,PASS4))

    /*

  11. File transfer using FTAC

    The file TURNOVER is to be transferred to the computer JACKJOHN. On this computer openFT (z/OS) is installed along with FTAC functionality for enhanced data protection and access control. An FT profile is provided in the computer JACKJOHN for the file transfer request.

    In order to be able to work with this FT profile, the TRANSFER-ADMISSION ‘FORMYDEARSTEVEN’ must be specified as transfer admission for the computer JACKJOHN. Specifying this gives direct access to the FT profile in the computer JACKJOHN. This FT profile contains the predetermined name that the file is to receive in the computer JACKJOHN and the predetermined details concerning follow-up processing (SUCCESS-PROCESSING and FAILURE-PROCESSING) in this computer. The value *SAME is defined for the PROCESSING-ADMISSION.

    The file transfer request must therefore contain the value *NOT-SPECIFIED for the file name.
    This specification corresponds to the default value and can therefore be omitted.
    The specification *NONE that is required for SUCCESS-PROCESSING and FAILURE-PROCESSING in this example also corresponds to the default value and can therefore be omitted. The default value *SAME for PROCESSING-ADMISSION is accepted by FTAC even if it is prespecified in the admission profile and can therefore also be omitted.

    The long form of the command for the file transfer is thus as follows:

    NCOPY TRANSFER-DIRECTION=TO,                                       -
          PARTNER=JACKJOHN,                                            -

          LOCAL-PARAMETER=(FILE-NAME=SALES)                            -

          REMOTE-PARAMETER=*MSP(TRANSFER-ADMISSION='FORMYDEARSTEVEN')

    There is of course a short form:

    NCOPY TO,JACKJOHN,(SALES), -

    *MSP(TRANS-AD='FORMYDEARSTEVEN')

  12. Local file processing between two openFT (

    z/OS) systems

    A list of the names of files for the local ID is to be transferred to the remote file SFA-FILE.LOCAL.

    NCOPY                                                         -

       TRANSFER-DIRECTION=*TO-PARTNER, PARTNER=ZOSPART,           -

       LOCAL-PARAMETER=(FILE-NAME=                                -
       C‘|LISTCAT OFILE(SYSPRINT)‘,                               -

       TRANS-ADM=(USER=STEVEN,ACCOUNT=XXXX,PASS=TOPSEC)),         -

       REMOTE-PARAMETER=*MSP(FILE-NAME=SFA-FILE.LOCAL,            -
       TRANSFER-ADMISSION=PROFZOSPART)

       FTR0000 OPENFT: Request 197292 accepted

  13. Remote preprocessing between two openFT (

    z/OS) systems

    A list of the FT partner systems in the remote system is to be transferred to the local file INFO.ZOSPART.

    NCOPY                                                         -

       TRANSFER-DIRECTION=*FROM-PARTNER, PARTNER=ZOSPART,         -

       LOCAL-PARAMETER=(FILE=INFO.ZOSPART),                       -

       REMOTE-PARAMETER=*MSP(FILE=                                -
       C‘|FTSHWPTN OUT=*STDOUT‘,                                  -

       TRANSFER-ADMISSION=PROFZOSPART)

       FTR0000 OPENFT: Request 197294 accepted

  14. FTINFO command for remote preprocessing

    You want to determine what openFT version is installed on a remote computer.

    /TRANSFER-FILE                                                 -

    /   TRANSFER-DIRECTION=*FROM-PARTNER, PARTNER=UNKNOWN,         -

    /   LOCAL-PARAMETER=(FILE-NAME=FTINFO.UNKNOWN),                     -
    /   REMOTE-PARAMETER=*ANY(FILE-NAME=C‘|ftinfo -csv‘,                -

    /   TRANSFER-ADMISSION=C’PROFUNKNOWN’)

        FTR0000 OPENFT: Request 197296 accepted

    The file FTINFO.UNKNOWN then has the following content:

    CmdUiVer;CmdTiVer;OsType;UserId;IsFtAdm;IsFtacAdm;FtLang;CcsName;Home;Limi

    ted;IsAdmAdm;ProdVer;SrcVer;Inst;TimeOffset;FtScriptDir;NativeX25;SingleUs

    er;Crypt

    1210;0;"z/OS";"OPFTAAA";1;1;"en";"IBM1047";"OPFTAAA";*NO;0;"12.1A00";"355"

    ;"FT121";3600;"";*NO;*NO;*YES

    The output, in sequence of occurrence, has the following meaning:
    openFT V12.1 is installed on the remote system and the operating system is z/OS. FTINFO was issued under the user ID OPFTAAA which possesses both FT and FTAC administrator admissions (otherwise "0" instead of "1"). The openFT user interface in the remote system "speaks" English (otherwise "de" for German).