Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Automatics Receive

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
venuhunev

New User


Joined: 26 May 2007
Posts: 70
Location: chennai

PostPosted: Mon Mar 07, 2011 4:08 pm    Post subject: Automatics Receive
Reply with quote

Hi,

Is it possible to have a job to execute the TSO RECEIVE command when files are sent from one MVS system to another MVS system ?

When files are sent from one MVS system to another MVS system, if i run a job, all the xmitted files should get saved in the same name as it was transmitted.

It can either be thru JCL or REXX. Is it possible ? if yes, how ?

Thanks.
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Mar 07, 2011 4:36 pm    Post subject:
Reply with quote

Yes it is possible.

Unfortunately I am working in a server environment rather than mainframe and do not have access to my archive libraries.

However, I achieved this by testing and trying things modelled on exactly what you do in foreground, so you should be able to do the same.
Back to top
View user's profile Send private message
venuhunev

New User


Joined: 26 May 2007
Posts: 70
Location: chennai

PostPosted: Mon Mar 07, 2011 5:35 pm    Post subject:
Reply with quote

Can you give me a hint on how to do it. if possible a working code or logic.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Mar 07, 2011 5:46 pm    Post subject:
Reply with quote

As I stated previously - I currently do not have access to my archive files because I am not working in a mainframe environment.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Mar 07, 2011 8:20 pm    Post subject:
Reply with quote

Hello,

Can you do what you want from the terminal? I would think that you can. . .

So follow this:
Quote:
I achieved this by testing and trying things modelled on exactly what you do in foreground

If you have problems, post what you tried and what went wrong - someone should be able to help.
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Mon Mar 07, 2011 8:54 pm    Post subject: Reply to: Automatics Receive
Reply with quote

Easiest:

From the sending system, use XMIT OUTDSN(some.ds), then submit a job to receive the dataset.

(from memory)
Code:

/*ROUTE  XEQ=MVS9
//step1 EXEC PGM=IKJEFT01
//SYSTSPRT DD  sysout=*
//SYSTSIN   DD  *
  RECEIVE INDD(myrecv)
  DATASET(my.pds)
/*
//myrecv    DD *
(output dataset from XMIT command)
Back to top
View user's profile Send private message
venuhunev

New User


Joined: 26 May 2007
Posts: 70
Location: chennai

PostPosted: Sat Apr 30, 2011 11:57 am    Post subject:
Reply with quote

Hi,

Sorry for starting this topic after some long time.
Thanks Pedro for the JCL.

I tried this.
Code:
//STEP1    EXEC  PGM=IKJEFT01     
//SYSPRINT    DD SYSOUT=*         
//SYSTSPRT    DD SYSOUT=*         
//SYSTSIN     DD *               
    RECEIVE                       
    RESTORE                       
/*           

This would receive the dataset and store it.

If i transmit a dataset HLQ1.DATASET1 from Userid1 to userid2,
when i receive it in userid 2, it get stored as USERID2.DATASET1.

Considering USERID2 has RACF to HLQ1 datasets, is it possible to receive the dataset as same as the sending name ?
Back to top
View user's profile Send private message
prino

Active Member


Joined: 07 Feb 2009
Posts: 982
Location: Oostende, Belgium

PostPosted: Sat Apr 30, 2011 1:09 pm    Post subject:
Reply with quote

I have code that can, slightly modified, do this while in ISPF. Look for QH in File #769 on the CBT Tape site.
Back to top
View user's profile Send private message
venuhunev

New User


Joined: 26 May 2007
Posts: 70
Location: chennai

PostPosted: Sat Apr 30, 2011 2:10 pm    Post subject: Reply to: Automatics Receive
Reply with quote

Hi Prino,

Thanks for the reply. I could not see the file properly. It would be great if you can provide the file in readable format.
Back to top
View user's profile Send private message
prino

Active Member


Joined: 07 Feb 2009
Posts: 982
Location: Oostende, Belgium

PostPosted: Sat Apr 30, 2011 3:39 pm    Post subject: Re: Reply to: Automatics Receive
Reply with quote

venuhunev wrote:
Thanks for the reply. I could not see the file properly. It would be great if you can provide the file in readable format.

And obviously you could not be bothered to have a further look at the CBT Tape site... Try this or this.
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Sat Apr 30, 2011 7:48 pm    Post subject: Reply to: Automatics Receive
Reply with quote

You can call it whatever you want to call it! In general, if you use an unquoted dataset name in TSO, it appends your prefix. If you use quotes, it uses the explicitly specified name.

So, in this example, use quotes around the name on the receive.
Code:
/*ROUTE  XEQ=MVS9
//step1 EXEC PGM=IKJEFT01
//SYSTSPRT DD  sysout=*
//SYSTSIN   DD  *
  RECEIVE INDD(myrecv)
  DATASET('original.pds')
/*
//myrecv    DD *
(output dataset from XMIT command)


I am not sure if you understood or are following my suggestion of XMIT to OUTDSN and then submitting a job that includes the OUTDSN. I prefer this method because there might be timing problem of when you XMIT a dataset and when the job executes, what if there are other datasets already xmitted to that userid? etc...
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Sat Apr 30, 2011 9:39 pm    Post subject: Reply to: Automatics Receive
Reply with quote

FYI, the help for RECEIVE has this:
Quote:

DATASET:

THE DATASET NAME WILL DEFAULT TO THE NAME OF
THE TRANSMITTED DATA SET (THE SENDER'S PREFIX
WILL BE REPLACED WITH YOUR PREFIX). ...
Back to top
View user's profile Send private message
venuhunev

New User


Joined: 26 May 2007
Posts: 70
Location: chennai

PostPosted: Sun May 01, 2011 8:56 am    Post subject:
Reply with quote

Thanks Pedro.
Back to top
View user's profile Send private message
Peter Nancollis

New User


Joined: 15 Mar 2011
Posts: 47
Location: UK

PostPosted: Mon May 02, 2011 4:34 am    Post subject:
Reply with quote

Never assume a prefix
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts ADSO Store Procedure to receive mutip... yogi.47eie IDMS/ADSO 2 Fri Aug 21, 2015 7:14 pm
No new posts TSO RECEIVE - Get All Datasets/Messag... mrgnndhmk TSO/ISPF 4 Sat Mar 15, 2014 11:21 am
No new posts DID ANYONE RECEIVE THE OFFER LETTER F... anupam das Mainframe Jobs 0 Thu Feb 13, 2014 12:55 pm
No new posts why CICS COMMAND "RECEIVE" ... harish5002 CICS 9 Thu Feb 23, 2012 12:24 pm
No new posts receive/send files from z/OS to AIX u... Mike 1304 DB2 8 Fri Dec 23, 2011 8:23 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us