Previous Topic: Return Codes from $USTSFTS

Next Topic: Using the ISPF Dialog Interface


Examples of Requests Using NMCMD

The following examples show how to use the NMCMD TSO command processor and the subcommands when requesting CA SOLVE:FTS services. Enter the commands at the TSO READY prompt or from an ISPF panel allowing entry of TSO commands. Responses returned to the terminal are shown in bold, and prompts are in italics.

Example 1

The following command connects to the region, NMTEST, requests an on-demand file transmission to region NMPROD, then disconnects and returns to TSO. Assuming the command is entered in ISPF, the termination displays the normal *** :

NMCMD  NMTEST CMD(‘FTSSEND
                   NAME(U03ISMEMO) DEST(NMPROD)
                   FRDSN(MEMO.TEXT(M324))
                   TODSN(U99NET.MEMO.TEXT(M324))’)

N42506 TRANSMISSION REQUEST U03ISMEMO ACCEPTED.
***

Note: You need not specify the input data set prefix if profiled from TSO to use a data set prefix. Only the required operands are shown in this example, all others assume the default values.

Example 2

In this example, NMCMD is invoked from TSO and two commands are issued before ending the session. The first command uses the MEMBERS operand to transmit three members from a PDS and rename two in the target data set. The second command copies an existing definition but directs the output to the data set specified:

READY
       NMCMD NMNY
  
NMREADY
       FTSSEND  NAME(X55) DEST(NMSANFRAN)
                FRDSN(USER.DATA)
                MEMBERS(TRANS1/BATCHX,TRANS2/BATCHY,CTLCARD)
                TODSN(PROD.BATCH.CARDS)
                FRDSP(SHR) UDATA(BAT123)
PFTS09 FTS REQUEST X55 DEFINED.  3 REQUESTS CHAINED FOR TRANSMISSION.
N42505 REQUEST FOR X55 QUEUED - LINK NOT ACTIVE
NMREADY
       FTSSEND  NAME(XA55PGM) COPY(XA55SFPGM)
                DEST(*) FRDSN(*)
                TODSN(XA55.TEST.LOAD)
                TOCMD(‘EXEC J55’)
N42505 REQUEST FOR XA55PGM QUEUED - LINK NOT ACTIVE
NMREADY
       END

READY

Example 3

In this example, TSO executes as a batch job and several commands input to the region NMSYD1:

//NMCMD    JOB   (accnt),.....
//*
//TSOBATCH EXEC  PGM=IKJEFT01
//SYSTSPRT DD    SYSOUT=A
//SYSTSIN  DD    *
NMCMD  NMSYD1  USER(BATCHUSR/PROD1)
FTSXMIT NAME(ATRANS12)
FTSXMIT NAME(SPRRUN)
FTSDEF NAME(NEWBATCH) DEST(NMSYD2) +
FRDSN(PROD.BATCHRUN) +
TODSN(PROD.COPY.DATA) +
CLASS(P) TODSP(NEW) TOVOL(PROD04) +
TOSPC(CYLS 5 2) TIMCO(Y) +
FRXMIT(REPORT1)
FTSDEF NAME(REPORT1) DEST(NMSYD2) + FRDSN(PROD.BATCHRUN.LIST) +
TODSN(‘SYSOUT’) SOCLS(H) SOHLD(Y) +
FRCMD(‘MSG OPER BATCH 1 TRANSMISSION COMPLETE’)
FTSXMIT NAME(NEWBATCH)
END
//

Example 4

This example shows how to input a list of commands to NMCMD in the foreground by using the READ subcommand of NMCMD.

Assume the following NMCMD subcommands are placed in member NMCOMMS in the PDS called TSO.CNTL:

FTSDEF  NAME(USER01X) DEST(NMLA) +
        FRDSN(TSO.DATA) TODSN(LA.STAGEIN) +
        UDATA(‘USER01 SYSA’) NOMSG
FTSXMIT NAME(USER01X) NOMSG
FTSXMIT NAME(USER01RUN) NOMSG

This series of commands can then be invoked in the following manner:

ALLOC DD(I) DSN(TSO.CNTL(NMCOMMS)) SHR
NMCMD NMNY INDD(I) CMD(READ)

These commands can be used from a TSO CLIST and because all of the subcommands contain the NOMSG option, no output to the terminal results. The procedure can check the return code from NMCMD before sending a message to the invoking user.