Posted: Mon Dec 12, 2005 1:48 pm Post subject: Receive command in JCL
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.
Joined: 03 Dec 2002 Posts: 579 Topics: 1 Location: Iowa, USA
Posted: Mon Dec 12, 2005 5:21 pm Post subject:
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.
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
Posted: Mon Dec 12, 2005 10:55 pm Post subject:
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.
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
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
Posted: Tue Dec 13, 2005 5:59 pm Post subject:
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 a = 1 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)
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
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
Posted: Wed Dec 14, 2005 10:08 am Post subject:
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.
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