z/OS TSO/E User's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


RECEIVE Command

z/OS TSO/E User's Guide
SA32-0971-00

You can use the RECEIVE command in a background job to receive a message or data set. However, if your installation uses security labels, there will be security constraints placed on the use of the RECEIVE command. These constraints are explained in Security Considerations for Sending and Receiving Data Sets. To use RECEIVE in the background, you must specify the RECEIVE command and the responses to any prompts that you would anticipate when using RECEIVE in the foreground. Supply the responses in the same order as they would appear in the foreground. The commands are executed as if PROFILE NOPROMPT was entered.

The data set or message that you receive will be prefixed by the user ID that you supply on the JOB statement. To use an alternate prefix as the data set name, include the following command at the beginning of the SYSTSIN data stream:
PROFILE PREFIX(prefix)

Be sure that any alternate prefix you use is a valid catalog alias.

Messages are written to the data set defined in the SYSTSPRT DD statement.

Figure 1 shows a batch job for receiving a data set in the background.

Figure 1. Receiving a Data Set in the Background
//JOBNAME  JOB     USER=USERID,PASSWORD=PASSWD
//STEP1    EXEC    PGM=IKJEFT01,REGION=512K
//SYSTSPRT DD      SYSOUT=A
//SYSTSIN  DD      *
  RECEIVE
  RESTORE
  **responses to anticipated prompts**
  r
/*

Figure 2 shows a batch job for receiving a message in the background.

Figure 2. Receiving a Message in the Background
//JOBNAME  JOB     USER=USERID,PASSWORD=PASSWD
//STEP1    EXEC    PGM=IKJEFT01,REGION=512K
//SYSTSPRT DD      SYSOUT=A
//SYSTSIN  DD      *
  RECEIVE
/*

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014