MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SYSPROC, SYSUEXEC

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
deepeshk79
Beginner


Joined: 20 Jun 2003
Posts: 112
Topics: 48
Location: Bangalore

PostPosted: Sat Nov 08, 2003 6:41 am    Post subject: SYSPROC, SYSUEXEC Reply with quote

Hi All,

In a rexx pgm iam allocating my dataset to SYSPROC

Code:

ADDRESS TSO "ALLOC DATASET('MY PDS NAME') DD(SYSPROC)SHR REU" 
ADDRESS TSO "ALLOC DATASET('MY PDS NAME') DD(SYSUEXEC)SHR REU"
ADDRESS TSO "ALTLIB ACTIVATE USER (EXEC)"                       


After successfully executing my code, when i try to access some other utilities like Fileaid or Xped ....iam not able to access it. The only way i can use Fileaid, Xped is to logoff my session and login again.

I think the prob is with Allocation of my pds to SYSPROC. Can someone tell me how to de-allocate my pds from SYSPROC in the rexx pgm. I tried giving

Code:


ADDRESS TSO "DEALLOC DATASET('MY PDS NAME') DD(SYSPROC)SHR REU



at the end of rexx pgm...but it doesnt seem to work... Sad

Any thoughts

Deepesh
Back to top
View user's profile Send private message AIM Address
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Sat Nov 08, 2003 7:02 am    Post subject: Reply with quote

Don't you feel bad when you have to learn by burning your fingers? But, that is how it is.

When you asked for allocation, it did allocate the PDS to SYSPROC but, removed the other allocations too. aThe workaround is to use TSO CONCAT. But, I do not think it is universal.

The opposite of ALLOC is FREE.

But, once when you have done a ALLOC to SYSPROC and then do a FREE, I doubt, whether the earlier allocations would be re-instated.
_________________
ALL opinions are welcome.

Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
Back to top
View user's profile Send private message
deepeshk79
Beginner


Joined: 20 Jun 2003
Posts: 112
Topics: 48
Location: Bangalore

PostPosted: Sat Nov 08, 2003 7:25 am    Post subject: Reply with quote

Hi Cogito,

Can you tell me how we can do it thru TSO CONCAT??
I tried in this way

====================================
ADDRESS TSO "CONCAT SYSPROC DATASET('MY PDS NAME')"
====================================

But iam getting an error

====================================
COMMAND CONCAT NOT FOUND
5 *-* ADDRESS TSO "CONCAT SYSPROC DATASET('MY PDS NAME')"
+++ RC(-3) +++
====================================

Thanks
Deepesh
Back to top
View user's profile Send private message AIM Address
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Sat Nov 08, 2003 7:37 am    Post subject: Reply with quote

As I said, it is not universal. That is why it is giving the error.
_________________
ALL opinions are welcome.

Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
Back to top
View user's profile Send private message
deepeshk79
Beginner


Joined: 20 Jun 2003
Posts: 112
Topics: 48
Location: Bangalore

PostPosted: Sat Nov 08, 2003 7:52 am    Post subject: Reply with quote

So u mean to say no way out Sad ?????
Back to top
View user's profile Send private message AIM Address
RonB
Beginner


Joined: 02 Dec 2002
Posts: 93
Topics: 0
Location: Orlando, FL

PostPosted: Sat Nov 08, 2003 8:18 am    Post subject: Reply with quote

You concatenate a DDNAME to a DDNAME, not a DSNAME to a DDNAME. So try it like this:
Code:

ADDRESS TSO "ALLOC DATASET('MY PDS NAME') DD(MYPROC) SHR REU"
ADDRESS TSO "CONCAT (SYSPROC MYPROC)"


As far as I know, there is no way to De-CONCAT without undoing the original concatenation that went into forming SYSPROC, which ruins it usefulness. That's why it's important to only do the sysproc/myproc concatenation ONCE per TSO session.

Ron
_________________
A computer once beat me at chess, but it was no match for me at kick boxing.
Back to top
View user's profile Send private message
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Sat Nov 08, 2003 8:47 am    Post subject: Reply with quote

Ron,
Is CONCAT universal? It is working here and used to work at my former company. But, I remember reading somewhere that this is not universal.

I have never used CONCAT in a REXX EXEC. I have always used TSO CONCAT at the command line. There it prompts for a DD name and a DSN in this order. I did not know in a REXX EXEC, the CONCAT is to be used for two DD names rather than DSN to a DD name. Thanks for this info, Ron.
_________________
ALL opinions are welcome.

Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
Back to top
View user's profile Send private message
RonB
Beginner


Joined: 02 Dec 2002
Posts: 93
Topics: 0
Location: Orlando, FL

PostPosted: Sat Nov 08, 2003 2:03 pm    Post subject: Reply with quote

I haven't worked in very many shops, but have found CONCAT in all of them, so far. I DO tend to believe that it is NOT universal, however.
I've never tried TSO CONCAT at the command line. I've always coded my environmental stuff in a SETUP exec that I execute once each time I invoke TSO.

Ron
_________________
A computer once beat me at chess, but it was no match for me at kick boxing.
Back to top
View user's profile Send private message
coolman
Intermediate


Joined: 03 Jan 2003
Posts: 283
Topics: 27
Location: US

PostPosted: Mon Nov 10, 2003 5:46 am    Post subject: Reply with quote

Cogito,

Concat is not universal. It is a shop specific one.

Cheers,
Coolman.
________
herbal vaporizers


Last edited by coolman on Sat Feb 05, 2011 1:32 am; edited 1 time in total
Back to top
View user's profile Send private message
taltyman
JCL Forum Moderator
JCL Forum Moderator


Joined: 02 Dec 2002
Posts: 310
Topics: 8
Location: Texas

PostPosted: Mon Nov 10, 2003 10:37 am    Post subject: Reply with quote

Here's some code written by a colleague that I've lost track of.
Code:
/* REXX  */                                                       
/*                                                          */     
/* =====>>  LIMITED WARRANTY.                               */     
/*                                                          */     
/* =====>>  THIS EXEC IS TO BE USED AT YOUR OWN RISK        */     
/* =====>>  ORIGINAL CODE FROM ALAN ARNETT                  */     
/*                                                          */     
/* FORMAT:  REALLOC DDNAME DSNAME(DSNLIST)                  */     
/*                         {ADD|DROP} {FIRST|LAST}          */     
/*                                                          */     
/*          DDNAME - THE EXISTING DDNAME TO BE MODIFIED.    */     
/*          DSNAME - THE LIST OF DSNAMES TO ADD OR DROP.    */     
/*          ADD    - THE DSNAMES ARE TO BE ADDED.           */     
/*                   ADD IS THE DEFAULT IF DROP IS NOT      */     
/*                   SPECIFIED.                             */     
/*          DROP   - THE DSNAMES ARE TO BE REMOVED.         */     
/*          FIRST  - THE DSNAMES ARE TO BE ADDED BEFORE     */     
/*                   THE EXISTING ALLOCATED DATASETS.       */     
/*          LAST   - THE DSNAMES ARE TO BE ADDED BEHIND     */     
/*                   THE EXISTING ALLOCATED DATASETS.       */     
/*                   LAST IS THE DEFAULT IF FIRST IS NOT    */     
/*                   SPECIFIED.                             */     
/*                                                          */       
/*        - FIRST|LAST MEANS NOTHING FOR A DROP REQUEST     */       
/*          BUT NO ERROR IS GENERATED IF IT IS USED         */       
/*        - IF CONFLICTING OPTIONS ARE SPECIFIED, THE LAST  */       
/*          ONE IS USED.                                    */       
/*        - KEYWORDS MAY BE SPECIFIED IN ANY ORDER, ONLY    */       
/*          DDNAME IS POSITIONAL.                           */       
/*                                                          */       
ARG DDNAME ARGLIST                                                   
DSNCNT = WORDS(ARGLIST)                                             
IF DSNCNT = 0 | LENGTH(DDNAME) = 0 | LENGTH(DDNAME) > 8             
THEN SIGNAL PARM_ERROR                                               
CALL PARSE_ADD       /*  SET DEFAULTS   */                           
CALL PARSE_LAST                                                     
CALL PARSE_PARM                                                     
CALL PROCESS                                                         
EXIT                                                                 
PARM_ERROR:                                                         
SAY 'INVALID PARAMETER LIST'                                         
EXIT                                                                 
PROCESS:                                                             
     X = OUTTRAP("DS.")                                             
     "LISTA STA"                                                     
    X = OUTTRAP("OFF")                                             
    DO I = 1 TO DS.0 UNTIL (WORD(DS.I,1) == DDNAME)               
       END                                                         
    DSNLIST = ''                                                   
    IF I > DS.0 THEN DO                                           
       SAY 'DDNAME' DDNAME 'IS NOT CURRENTLY ALLOCATED'           
       END                                                         
    ELSE DO;                                                       
       DS.F = I - 1                                               
       DO I = DS.F + 3 TO DS.0,                                   
       UNTIL ((LEFT(DS.I,1) = ' ') & (LEFT(DS.I,4) \= ' '));       
            END;                                                   
       DS.L = I - 2                                               
       DO J = DS.F TO DS.L BY 2                                   
            IF POS(DS.J, NEWLIST) = 0                             
            THEN DSNLIST = DSNLIST "'"DS.J"'"                     
            END                                                   
       IF OPTION_ADD = 'Y'                                         
       THEN IF OPTION_POS = 'L'                                   
            THEN DSNLIST = DSNLIST NEWLIST                         
            ELSE DSNLIST = NEWLIST DSNLIST                         
       "ALLOC FI("DDNAME") DA("DSNLIST") SHR REUSE"               
       END;                                                       
     RETURN                                                         
PARSE_PARM:                                                         
     NEWLIST = ''                                                   
     DO WHILE LENGTH(ARGLIST) > 0                                   
          PARSE VAR ARGLIST OPTION ARGLIST                           
          IF DEBUG = 'Y' THEN SAY 'PARM='OPTION 'IS BEING PARSED'   
          SELECT                                                     
               WHEN ABBREV('DEBUG',OPTION, 2) THEN DEBUG = 'Y'       
               WHEN ABBREV('ADD',OPTION, 1)   THEN CALL PARSE_ADD   
               WHEN ABBREV('DROP',OPTION, 2)  THEN CALL PARSE_DROP   
               WHEN ABBREV('FIRST',OPTION, 1) THEN CALL PARSE_FIRST 
               WHEN ABBREV('LAST',OPTION, 1)  THEN CALL PARSE_LAST   
               WHEN LEFT(OPTION,3) = 'DSN' THEN CALL PARSE_DSN       
               OTHERWISE                                             
                    SIGNAL PARM_ERROR                               
               END                                                   
          END                                                       
     RETURN                                                         
PARSE_DSN:                                                           
     PARSE VAR OPTION OPT1 '(' DSNX                                 
     IF ABBREV('DSNAME', OPT1, 2) <> 1                               
     THEN SIGNAL PARM_ERROR                                         
     DO UNTIL DSNX = ')'                                             
          THEN DO                                       
               DSNX = LEFT(DSNX,LENGTH(DSNX)-1)         
               ARGLIST = ')' ARGLIST                     
               END                                       
          IF LEFT(DSNX,1) <> "'" & LEFT(DSNX,1) <> '"'   
          THEN DSNX = "'"SYSVAR(SYSPREF)"."DSNX"'"       
          IF DEBUG = 'Y' THEN SAY 'REBUILT DSNX='DSNX   
          IF POS(DSNX, NEWLIST) = 0                     
          THEN NEWLIST = NEWLIST DSNX                   
          PARSE VAR ARGLIST DSNX ARGLIST                 
          IF DEBUG = 'Y' THEN SAY 'PARSED DSNX='DSNX     
          END                                           
     IF DEBUG = 'Y' THEN SAY 'NEWLIST='NEWLIST           
     RETURN                                             
PARSE_ADD:            /*  DEFAULT  */                   
     IF DEBUG = 'Y' THEN SAY 'PARM=ADD HAS BEEN SET'     
     OPTION_ADD = 'Y'                                   
     RETURN                                             
PARSE_DROP:                                             
     IF DEBUG = 'Y' THEN SAY 'PARM=DROP HAS BEEN SET'   
     OPTION_ADD = 'N'                                   
     RETURN                                             
PARSE_LAST:           /*  DEFAULT  */                       
     IF DEBUG = 'Y' THEN SAY 'PARM=LAST HAS BEEN SET'       
     OPTION_POS = 'L'                                       
     RETURN                                                 
PARSE_FIRST:                                               
     IF DEBUG = 'Y' THEN SAY 'PARM=FIRST HAS BEEN SET'     
     OPTION_POS = 'F'                                       
     RETURN                                                 
Back to top
View user's profile Send private message
taltyman
JCL Forum Moderator
JCL Forum Moderator


Joined: 02 Dec 2002
Posts: 310
Topics: 8
Location: Texas

PostPosted: Mon Nov 10, 2003 3:48 pm    Post subject: Reply with quote

Here's a link to an IBM clist (could be converted to rexx).http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ikj4b820/12.14?DT=20020717155508
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump 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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group