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
 

 

Problem running REXX in production - need CONSOLE access

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
siebertr

New User


Joined: 25 Aug 2010
Posts: 7
Location: Brazil, Sao Paulo, Hortolandia

PostPosted: Thu Sep 02, 2010 6:08 pm    Post subject: Problem running REXX in production - need CONSOLE access
Reply with quote

Hi,

i am trying to run the REXX code below in the mainframe. I have an user ID that has access to the console, so when i run it under my user ID it works perfectly. However, when i try to use a scheduling tool to submit this job, a different user ID is used. In this case, a surrogate user ID is used to submit the job by the scheduling tool.

When submitted by the scheduling tool, the process fails. The code is described below:

Code:
/*REXX*/
/*******************************************************/
/*         START CANCEL COMMAND STEM COUNTER           */
/*******************************************************/
O=0                                                     
/*******************************************************/
/*         ALLOC CONSOLE                               */
/*******************************************************/
ADDRESS TSO   'CONSPROF SOLDISPLAY(NO)'                 
ADDRESS TSO   'CONSOLE  ACTIVATE'                       
/*******************************************************/
/*   ISSUE CONSOLE COMMAND TO GET CONTENTION INFO      */
/*******************************************************/
ADDRESS CONSOLE 'D GRS,RES=(SYSDSN,SYSS.XSP.ISPTLIB)'   
/*******************************************************/
/*   STORE RESULTS ON STEM LINE.                       */
/*******************************************************/
DO FOREVER                                               
FC = GETMSG('LINE.','SOL',,,10)                         
IF FC = 0 THEN LEAVE                                     
END                                                     
/*******************************************************/
/*         DEALLOC CONSOLE                             */
/*******************************************************/
ADDRESS TSO   'CONSOLE  DEACTIVATE'                     
/*******************************************************/
/*   FORMAT USER ID&SYSID INFORMATION                  */
/*******************************************************/
DO I=1 TO LINE.0                                         
 IF INDEX(LINE.I,"OWN")>60 THEN                         
  DO                                                     
  PARSE VAR LINE.I JNK1 2 SYSID 6 JNK2 12 UID 17 JNK2   
  O=O+1                                                 
  SYSID.O = SYSID                                       
  UID.O  = UID                                           
  END                                                   
 ELSE                                                   
  IF LINE.I = 0 THEN LEAVE                               
  ELSE NOP                                               
END                                                     
/*******************************************************/
/*   FORMAT CANCEL. STEM FOR CANCEL COMMANDS           */
/*******************************************************/
DO I=1 TO O                                             
CANCEL.I = "RO "||SYSID.I||",C U="||UID.I               
END                                                     
/*******************************************************/
/*         ALLOC CONSOLE                               */
/*******************************************************/
ADDRESS TSO   'CONSPROF SOLDISPLAY(NO)'                 
ADDRESS TSO   'CONSOLE  ACTIVATE'                       
/*******************************************************/
/*   ISSUE CONSOLE COMMAND TO CANCEL USERS             */
/*******************************************************/
DO I=1 TO O                                             
ADDRESS CONSOLE CANCEL.I                                 
END                                                     
/*******************************************************/
/*         DEALLOC CONSOLE                             */
/*******************************************************/
ADDRESS TSO   'CONSOLE  DEACTIVATE'                     


I was able to grant CONSOLE to this surrogate user ID. Before this, i was getting the following error message:

IKJ56644I NO VALID TSO USERID, DEFAULT USER ATTRIBUTES USED
ACF0C038 ACF2 LOGONID ATTRIBUTES HAVE REPLACED DEFAULT USER ATTRIBUTES
READY
%PCYCONT2
THE CONSPROF COMMAND HAS TERMINATED.+
USER DOES NOT HAVE CONSOLE COMMAND AUTHORITY.
THE CONSOLE COMMAND HAS TERMINATED.+
USER DOES NOT HAVE CONSOLE COMMAND AUTHORITY.
8 *-* ADDRESS CONSOLE 'D GRS,RES=(SYSDSN,SYSS.XSP.ISPTLIB)'
+++ RC(-3) +++
GETMSG PROCESSING HAS TERMINATED. A CONSOLE SESSION IS NOT ACTIVE.
...
GETMSG PROCESSING HAS TERMINATED. A CONSOLE SESSION IS NOT ACTIVE.


After setting CONSOLE to this surrogate user ID, the error was different:

IKJ56644I NO VALID TSO USERID, DEFAULT USER ATTRIBUTES USED
ACF0C038 ACF2 LOGONID ATTRIBUTES HAVE REPLACED DEFAULT USER ATTRIBUTES
READY
%PCYCONT2
THE CONSOLE COMMAND HAS TERMINATED.+
AN ERROR OCCURRED DURING CONSOLE INITIALIZATION. THE MCSOPER RETURN CODE WAS X'00000010' AND THE REASON CODE WAS X'00000008'.
16 *-* ADDRESS CONSOLE 'D GRS,RES=(SYSDSN,SYSS.XSP.ISPTLIB)'
+++ RC(-3) +++
GETMSG PROCESSING HAS TERMINATED. A CONSOLE SESSION IS NOT ACTIVE.
...
GETMSG PROCESSING HAS TERMINATED. A CONSOLE SESSION IS NOT ACTIVE.


Can somebody help me on how to make this job run in production by a scheduling tool? Since CONSOLE was granted to the surrogate ID, i am not sure anymore on how to solve this issue. I understand that using the surrogate ID to run this job is not able to issue the console commands, so since the CONSOLE is not activated, the GETMSG function will keep getting the same message forever. Thanks.
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Thu Sep 02, 2010 6:14 pm    Post subject: Reply to: Problem running REXX in production - need CONSOLE
Reply with quote

Quote:
IKJ56644I NO VALID TSO USERID, DEFAULT USER ATTRIBUTES USED


does the surrogate userid have a TSO segment ???
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Fri Sep 03, 2010 9:16 pm    Post subject: Reply to: Problem running REXX in production - need CONSOLE
Reply with quote

Is that your entire rexx program? (%PCYCONT2). I ask because you are getting message ids prior to it, but not during. And I do not see where you turn it off.

It would help some to know the message id for this:
Quote:
AN ERROR OCCURRED DURING CONSOLE INITIALIZATION. THE MCSOPER RETURN CODE WAS X'00000010' AND THE REASON CODE WAS X'00000008'.
Back to top
View user's profile Send private message
Kjeld

Active User


Joined: 15 Dec 2009
Posts: 365
Location: Denmark

PostPosted: Sat Sep 04, 2010 4:18 am    Post subject:
Reply with quote

Quote:
USER DOES NOT HAVE CONSOLE COMMAND AUTHORITY.

You obviously lack RACF authorisation to issue console (z/OS) commands for your your userid
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 1 Mon Jan 02, 2017 11:16 am
No new posts SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm


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