MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Receive command in JCL

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
Selvakumar
Beginner


Joined: 26 May 2004
Posts: 16
Topics: 6

PostPosted: Mon Dec 12, 2005 1:48 pm    Post subject: Receive command in JCL Reply with quote

Hi,

I tried giving RECEIVE command in JCL to receive the files that are transmitted from other node.

But the JCL is not receiving the file.

Error thrown are,

Code:
INMR901I Dataset USERCOPY.XMIT from ID on Node                 
INMR906A Enter restore parameters or 'DELETE' or 'END' +                       
INMR908A The input file attributes are: DSORG=SEQUENTIAL, RECFM=FB, BLKSIZE=3120, LRECL=80, File size=5759K bytes +INMR909A You may enter DSNAME, SPACE, UNIT, VOL, OLD/NEW, or RESTORE/COPY/DELETETE/END
INMR800I The RECEIVE command failed. The PUTGET service routine issued return code 16.


JCL is

Code:
//STEP300 EXEC PGM=IEBGENER                                                     
//SYSUT1 DD *                                                                   
 /* REXX */                                                                     
ADDRESS TSO                                                                     
"RECEIVE"                                                                       
//SYSUT2 DD DISP=(NEW,PASS),DSN=&&REXXO(TEMP1),                                 
//          SPACE=(TRK,(1,1,2),RLSE),                                           
//          DCB=(LRECL=80,BLKSIZE=0,DSORG=PO,RECFM=FB)                         
//SYSPRINT DD DUMMY                                                             
//SYSIN    DD DUMMY                                                             
//*                                                                             
//STEP400 EXEC PGM=IKJEFT01                                                     
//SYSEXEC DD DISP=(OLD,DELETE),DSN=&&REXXO                                     
//SYSTSPRT DD SYSOUT=*                                                         
//SYSTSIN DD *                                                                 
%TEMP1                                                                         
/*                                                                             



How can i pass the control parameters through JCL.
_________________
Thanks,
Zelwaa

-what matters most is how u c urself!!!
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Bill Dennis
Advanced


Joined: 03 Dec 2002
Posts: 579
Topics: 1
Location: Iowa, USA

PostPosted: Mon Dec 12, 2005 5:21 pm    Post subject: Reply with quote

When RECEIVE is executed in foreground TSO I think you need an <enter> key response to the options. Maybe this is what's missing? Try adding another line with some value, like

DSNAME('desired.file.name')
_________________
Regards,
Bill Dennis

Disclaimer: My comments on this foorum are my own and do not represent the opinions or suggestions of any other person or business entity.
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Mon Dec 12, 2005 10:55 pm    Post subject: Reply with quote

In Rexx you need to queue the response. Something like:
Code:
Queue "DA('ZELWAA.FOO.BAR')"         
If 'OK'=sysdsn(('ZELWAA.FOO.BAR') Then   
  Queue 'R'                 
"RECEIVE"


This implies that you know the name of the data set being received. You could queue a blank line to take the default, or maybe use outtrap to save the messages, queue an "END", get the name of the data set from the messages and then re-issue the RECEIVE with the right parameters.
Code:
/* rexx - receive a data set off the JES spool with automatic replace*/
Do queued() ; Pull ; End
Call outtrap "stem."
Call prompt 'ON'
Queue "END"
"RECEIVE"
Call outtrap "off"
Say stem.0
Parse Var stem.1 ds dsname .
If ds = 'Dataset' Then
  Do
    Say "Receiving '"dsname"'"
    Queue "DA('"dsname"')"
    If "OK" = sysdsn("'"dsname"'") Then
      Queue "R"
    "RECEIVE"
  End
Do queued() ; Pull ; End


Normally, I use XMIT w/ OUTDA() and a target name that includes the original name, then use FTP to send the intermediate file and then use the name if the intermediate file to reconstitute the original in the target system, but the method used above would work for FTP'd XMIT files too, so someday I'll rewrite my tools to use this method.
Back to top
View user's profile Send private message Visit poster's website
Selvakumar
Beginner


Joined: 26 May 2004
Posts: 16
Topics: 6

PostPosted: Tue Dec 13, 2005 5:08 am    Post subject: Reply with quote

Quote:
In Rexx you need to queue the response.


Even after giving the response in queue, the same error message is thrown.
It is not identifying the details available in queue, when executing Receive command.
With that, one more error is also displayed in spool.

Code:
IKJ56621I INVALID COMMAND NAME SYNTAX 


The details given in Queue is executing after Receive command failed.
Is anything i have to change from default options?
_________________
Thanks,
Zelwaa

-what matters most is how u c urself!!!
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Tue Dec 13, 2005 5:54 pm    Post subject: Reply with quote

Removed accidental duplicate post

Last edited by semigeezer on Tue Dec 13, 2005 6:01 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Tue Dec 13, 2005 5:59 pm    Post subject: Reply with quote

Try adding the makebuf and dropbuf. This works for me even without those, but with them, it looks like this (and also works for me)

       //USER1M   JOB 'USER1',CLASS=A,NOTIFY=USER1,REGION=0M,MSGCLASS=H
       //*-------------------------------------------------------------------*
       //GENER0   EXEC PGM=IEBGENER
       //SYSUT1   DD DATA,DLM=99
       /* rexx - receive a data set off the JES spool with automatic replace*/
       Do queued() ; Pull End
       Call outtrap "stem."
       Call prompt 'ON'
       Queue "END"
       "RECEIVE"
       Call outtrap "off"
       Do to stem.0
         Say a'    'stem.a
       End
       Parse Var stem.1 ds dsname .
       If ds 'Dataset' Then
         Do
          'MAKEBUF'
           Say "Receiving '"dsname"'"
           Queue "DA('"dsname"')"
           If "OK" sysdsn("'"dsname"'"Then
             Queue "R"
           "RECEIVE"
          'DROPBUF'
         End
       Do queued() ; Pull End
       99
       //SYSUT2   DD DISP=(NEW,PASS),DSN=&&CLIST0(TEMPNAME),
       //            SPACE=(TRK,(1,1,2),RLSE),UNIT=SYSALLDA,
       //            DCB=(LRECL=80,BLKSIZE=0,DSORG=PO,RECFM=FB)
       //SYSPRINT DD DUMMY
       //SYSIN    DD DUMMY
       //*-------------------------------------------------------------------*
       //RECEIVE EXEC PGM=IKJEFT01,DYNAMNBR=128
       //SYSTSPRT DD SYSOUT=*
       //SYSTSIN  DD *
        PROFILE PREFIX(USER1)
        %TEMPNAME
       //SYSPROC  DD DSN=&&CLIST0,DISP=(OLD,DELETE)
       
Back to top
View user's profile Send private message Visit poster's website
Selvakumar
Beginner


Joined: 26 May 2004
Posts: 16
Topics: 6

PostPosted: Wed Dec 14, 2005 3:34 am    Post subject: Reply with quote

Quote:

Try adding the makebuf and dropbuf.

It is not working in my machine. Not sure why.

Output in the Spool:
Code:
READY                                                                           
 PROFILE PREFIX(H1279A8)                                                       
READY                                                                           
 %TEMPNAME                                                                     
1    INMR901I Dataset H1279A8.NEWXMIT from H1279A8 on NYMF1                     
2    INMR906A Enter restore parameters or 'DELETE' or 'END' +                   
3    INMR908A The input file attributes are: DSORG=PARTITIONED, RECFM=FB, BLKSIZ
4    INMR909A You may enter DSNAME, SPACE, UNIT, VOL, OLD/NEW, or RESTORE/COPY/D
READY                                                                           
END                                                                             

_________________
Thanks,
Zelwaa

-what matters most is how u c urself!!!
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Wed Dec 14, 2005 10:08 am    Post subject: Reply with quote

Ahh. You have tso's PROFILE MSGID on. Add the word NOMSG to the PROFILE command. The reason this is occuring is that the program is checking the 1st line's 1st word for "Dataset" and it is seeing INMR901I, so either turn off the message id display or change the program to check for the 2nd word and use the 3rd word as the name. Have a look at the program and you'll see what I'm refering to.
Back to top
View user's profile Send private message Visit poster's website
Selvakumar
Beginner


Joined: 26 May 2004
Posts: 16
Topics: 6

PostPosted: Wed Dec 14, 2005 10:42 am    Post subject: Reply with quote

I didnt noticed that. Thanks semiqeezer. It is working.

I used the 3rd word as the name.

I have one more question.
Could you tell me how to NOMSG in my PROFILE?
_________________
Thanks,
Zelwaa

-what matters most is how u c urself!!!
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12377
Topics: 75
Location: San Jose

PostPosted: Wed Dec 14, 2005 1:46 pm    Post subject: Reply with quote

Quote:

I have one more question.
Could you tell me how to NOMSG in my PROFILE?


Just type

Code:

TSO PROF NOMSG


at the command prompt and press enter

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group