IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Automatics Receive


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
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
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: 8797
Location: Welsh Wales

PostPosted: Mon Mar 07, 2011 4:36 pm
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
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: 8797
Location: Welsh Wales

PostPosted: Mon Mar 07, 2011 5:46 pm
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

Moderator Emeritus


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

PostPosted: Mon Mar 07, 2011 8:20 pm
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

Global Moderator


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

PostPosted: Mon Mar 07, 2011 8:54 pm
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
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

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Sat Apr 30, 2011 1:09 pm
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
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

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Sat Apr 30, 2011 3:39 pm
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

Global Moderator


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

PostPosted: Sat Apr 30, 2011 7:48 pm
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

Global Moderator


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

PostPosted: Sat Apr 30, 2011 9:39 pm
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts interactive cics program using CICS s... CICS 5
No new posts FSET not working on my receive CICS 3
No new posts Need help with 002-030 ABEND in TSO R... TSO/ISPF 1
No new posts Receive a file using PCOMM macro IBM Tools 0
No new posts ADSO Store Procedure to receive mutip... IDMS/ADSO 2
Search our Forums:

Back to Top