View previous topic :: View next topic
|
Author |
Message |
venuhunev
New User
Joined: 26 May 2007 Posts: 70 Location: chennai
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
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 |
|
|
venuhunev
New User
Joined: 26 May 2007 Posts: 70 Location: chennai
|
|
|
|
Can you give me a hint on how to do it. if possible a working code or logic. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2594 Location: Silicon Valley
|
|
|
|
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 |
|
|
venuhunev
New User
Joined: 26 May 2007 Posts: 70 Location: chennai
|
|
|
|
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 |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1315 Location: Vilnius, Lithuania
|
|
|
|
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 |
|
|
venuhunev
New User
Joined: 26 May 2007 Posts: 70 Location: chennai
|
|
|
|
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 |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1315 Location: Vilnius, Lithuania
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2594 Location: Silicon Valley
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2594 Location: Silicon Valley
|
|
|
|
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 |
|
|
venuhunev
New User
Joined: 26 May 2007 Posts: 70 Location: chennai
|
|
|
|
Thanks Pedro. |
|
Back to top |
|
|
Peter Nancollis
New User
Joined: 15 Mar 2011 Posts: 47 Location: UK
|
|
|
|
Never assume a prefix |
|
Back to top |
|
|
|