Page 1 of 2

Accessing multiple TSO environments

PostPosted: Wed Mar 25, 2015 8:37 pm
by DonkeyKong
Is it possible to interact with a TSO environment that is different from the TSO environment that I am running the REXX program from? For instance to find a file.

Re: Accessing multiple TSO environments

PostPosted: Wed Mar 25, 2015 9:04 pm
by BillyBoyo
How do you mean "to find a file"? How would a file be related to another "TSO environment"? Do you mean another user-id's TSO session?

Re: Accessing multiple TSO environments

PostPosted: Wed Mar 25, 2015 9:08 pm
by DonkeyKong
Well, I don't understand how this all fits together super well but.... We have the TPX menu that has several different TSO environments: A,B,C,I. I would like to look up a file in TSOB from TSOC.

Re: Accessing multiple TSO environments

PostPosted: Wed Mar 25, 2015 9:32 pm
by dubois pierre
You can submit a job on another partition
/*XEQ nxnxn
/*JOBPARM SYSAFF=(PARTx)
and execute a clist

Re: Accessing multiple TSO environments

PostPosted: Wed Mar 25, 2015 9:35 pm
by BillyBoyo
That sounds like the TSO ids will have different RACF settings for different environments. You should check with your technical/security people about how to do what you want, after asking colleagues who may already know.

Re: Accessing multiple TSO environments

PostPosted: Wed Mar 25, 2015 9:45 pm
by DonkeyKong
dubois pierre wrote:You can submit a job on another partition
/*XEQ nxnxn
/*JOBPARM SYSAFF=(PARTx)
and execute a clist


dubois pierre - can you please explain this code a little bit as well as what you mean by 'partition'?

BillyBoyo - my colleagues are not so familiar with REXX and I have contacted others internally who I would have thought to be my best bets to know how to accomplish this.

Re: Accessing multiple TSO environments

PostPosted: Wed Mar 25, 2015 10:06 pm
by enrico-sorichetti
as long as You have the proper permissions You can access any dataset in Your MVS environment
the logon id does not make any difference as long as the security requirements are satisfied

Re: Accessing multiple TSO environments

PostPosted: Wed Mar 25, 2015 10:29 pm
by Pedro
There are a few possibilities:
A. the TSO system share the DASD volumes: Logon to one TSO system and see what data set names you have and what volumes they are on. Logon to another TSO system and see if the same data sets are on the same volume. Cha-ching! You can refer to the data sets by using ALLOC command with VOL parameter (better yet, try to get the data sets cataloged on all systems).

B. The TSO systems do not share the DASD volumes:
1. you can submit a batch job as Pierre suggests. The batch job would run your rexx program.
2. or you may be able to use FTP to the other TSO system and use DIR commands to display the list of data sets.

re: partitions
The z hardware is typically partitioned into multiple logical partitions. Each partition will have its own z/OS operating system image, with its own TSO system. But all partitions use the same hardware, so frequently you can get to the same DASD volumes from any system.

Re: Accessing multiple TSO environments

PostPosted: Thu Mar 26, 2015 1:13 am
by steve-myers
Unfortunately, Pedro is discussing one possible, though fairly common, environment. We do not know any details about your environment. You must determine the details of your environment from your support or possibly your colleagues.

Many z/OS shops run several z/OS images. These images may be multiplexed on one physical machine or several physical machines. These details are immaterial to you and to us.

There are several ways for these images to coexist.

  • Shared SPOOL
    In a shared SPOOL environment two or more images share a common SPOOL environment. Usually the systems in this environment share most of their disk systems, so all the systems can access most of the data sets. This environment usually shares the security environment, so your userid is effectively known to all the systems.

    You can direct a job to execute on a particular system in this environment by using the /*JOBPARM SYSAFF=system-ID JECL statement. There may be other methods you can use, too, though they depend on optional software. You must determine if there are other methods.
  • Network connected SPOOL
    With network connected SPOOL the JES systems communicate with each other using network connections. In this environment each system usually has its owns set of disk subsystems. The RACF environments may be in sync, but whether this is done I cannot say. You must determine this yourself. You use the /*XEQ, /*XMIT or /*ROUTE XEQ JECL statements to direct a job to execute on a different system.
You must determine how this relates to your TPX menu.

Good luck.

Re: Accessing multiple TSO environments

PostPosted: Thu Mar 26, 2015 1:21 am
by DonkeyKong
Hey thanks to everyone who posted up these great answers! Credit will go to Pierre as it was his post that solved my dilemma. Steve also posted up the correct answer and it was more thoroughly explained but I already had it. Anyway thank you so much again, here is the solution in context:

//xxxxxxxT JOB (X9999),'LOCATE FILES',CLASS=T,MSGCLASS=Y,                 
//     NOTIFY=&SYSUID,REGION=0M                                           
//***********************************************************************
//*                                                                       
/*XEQ PROD2                                                               
//REXXLIB  EXEC PGM=IEFBR14                                               
//REXXLIB  DD DSN=xxxxxxxx.REXX.EXEC,DISP=SHR                             
//*******************************************                             
//REXXCOPY EXEC PGM=IEBGENER                                             
//SYSPRINT DD SYSOUT=*                                                   
//SYSUT2   DD DSN=xxxxxxxx.REXX.EXEC(RXPGM),DISP=(SHR,PASS,KEEP)           
//SYSUT1   DD *                                                           
 /*REXX*/                                                                 
 GDG = "xxxx.xA1.xx15.xxxxxxxx.BKUP"                                     
 DSN = STRIP(GDG!!".G0000V00")               /* DEFAULT IF NOT EXIST  */ 
 X=OUTTRAP(LST.)                             /* LISTCAT GDG BASE      */ 
 " LISTC ENT('"GDG"') ALL"                                               
 X=OUTTRAP(OFF)                                                           
 DO A = 1 TO LST.0 BY 1                                                   
    SAY A                                                                 
    IF POS('NONVSAM',LST.A) = 4 THEN DO                                   
      DSN = SUBSTR(LST.A,POS('NONVSAM',LST.A)+13,44)     
      DO WHILE POS('CREATION',LST.A) = 0                 
         A = A + 1                                       
      END                                                 
      CRDT = SUBSTR(LST.A,POS('CREATION',LST.A)+17,8)     
      SAY DSN ' - ' CRDT                                 
      END                                                 
 END                                                     
 EXIT                                                     
/*                                                       
//********************************************           
//STEP0    EXEC PGM=IKJEFT01,PARM='RXPGM'                 
//SYSPROC  DD DSN=xxxxxxxx.REXX.EXEC,DISP=(SHR,PASS,KEEP) 
//SYSTSIN  DD DUMMY                                       
//SYSTSPRT DD SYSOUT=*                                   
//