I responded off-list to Lizette, but wanted to share this bit of rexx with the
list again.
Lizette,
I must have missed your question on this last week. No need to mess with
CONSOLE access via TSO. Use SDSF ISFSLASH facility instead. Here is some
REXX I stole from somewhere, and augmented to run in batch. Put it in a
dataset and give it a try. Runs with the same SAF authority you have with
SDSF. Returns all of the OS responses to the commands as well.
//OPERCMD EXEC PGM=IKJEFT1B,PARM='%OPERCMDB',REGION=32M
//SYSEXEC DD DSN=your.sysexec.lib,DISP=SHR
//SYSIN DD *
F BPXOINIT,SHUTDOWN=FORKINIT
SET CEE=DJ
SET SLIP=D3
TRACE CT,ON,COMP=SYSRSM,PARM=CTRSMDEJ
/*
//SYSTSIN DD DUMMY
//SYSTSPRT DD DUMMY
/* REXX */
/* this REXX exec will issue operator commands via SDSF REXX interface
security is based on the person using the command. this exec is to be
used for batch only */
'EXECIO * DISKR SYSIN (STEM mycmd. FINIS'
if rc > 0 then do
say 'Return code from OPEN was' rc
say 'Aborting...'
exit
end
/* Allocate results output file */
Call BPXWDYN "alloc rtddn(ddnm) sysout"
/* Process all input commands */
Do c=1 to mycmd.0
oper_command.0 = 1
oper_command.1 = mycmd.c
Call Main_process
End
/* Free results output file */
Call BPXWDYN "free fi(ddnm)"
Return 0
Main_process:
/* process all data from SYSIN */
rc=isfcalls('ON')
Address SDSF ISFSLASH "("oper_command.") (WAIT)"
l_cnt = 0
If datatype(isfulog.0) = "NUM" Then Do
If isfulog.0 <> 0 Then Do
l_cnt = l_cnt + 1
l.l_cnt = substr(isfulog.1,1,43)
Do ix=1 to isfulog.0
ll = length(isfulog.ix)
if ll <> 0 Then
qdata = substr(isfulog.ix,44,ll-43)
else
qdata = isfulog.ix
l_cnt = l_cnt + 1
l.l_cnt = qdata
End
End
Else Do
l_cnt = l_cnt + 1
l.l_cnt = "No command response available"
End
End
Else Do
l_cnt = l_cnt + 1
l.l_cnt = "Error in command reponse"
End
rc=isfcalls("OFF")
If (l_cnt = 0) Then Do
l_cnt = l_cnt + 1
l.l_cnt = ' /* no data produced */'
End
l.0 = l_cnt
Address MVS "ExecIO "l_cnt" DiskW "ddnm" (Finis Stem l.)"
l_cnt = 0
Return
_________________________________________________________________
Dave Jousma
Mainframe Engineering, Assistant Vice President
[email protected]
1830 East Paris, Grand Rapids, MIĀ 49546 MD RSCB2H
p 616.653.8429
f 616.653.2717
-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of
Elardus Engelbrecht
Sent: Wednesday, March 20, 2019 3:38 AM
To: [email protected]
Subject: Re: How to grant access to CONSPROF
**CAUTION EXTERNAL EMAIL**
**DO NOT open attachments or click on links from unknown senders or unexpected
emails**
Lizette Koehler wrote:
>I am trying to run a batch REXX that issues CONSPROF or CONSOLE commands.
>I have set up everything in IKJTSO00 for CONSOLE, I have updated the
>RACF TSOAUTH for the ID issuing the commands The process will VARY
>OFFLINE and VARY ONLINE Dasd volumes
>Yet I am still getting
>IKJ55353I THE CONSPROF COMMAND HAS TERMINATED.+ IKJ55353I USER USER001
>DOES NOT HAVE CONSOLE COMMAND AUTHORITY.
>Any other places to check?
You have gotten good replies, but I would like that you please check out this
URL:
https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.3.0/com.ibm.zos.v2r3.ieag300/iea3g3140.htm
Above describe how to setup everything (in RACF) to use Consoles:
Class OPERCMDS. Profile - MVS.MCSOPER.<console>.
Class TSOAUTH. Profile - CONSOLE.
Please also review this ancient APAR II08610.
Unless you have a weird exit which Walter described.
Groete / Greetings
Elardus Engelbrecht
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to
[email protected] with the message: INFO IBM-MAIN **CAUTION EXTERNAL
EMAIL**
**DO NOT open attachments or click on links from unknown senders or unexpected
emails**
This e-mail transmission contains information that is confidential and may be
privileged. It is intended only for the addressee(s) named above. If you
receive this e-mail in error, please do not read, copy or disseminate it in any
manner. If you are not the intended recipient, any disclosure, copying,
distribution or use of the contents of this information is prohibited. Please
reply to the message immediately by informing the sender that the message was
misdirected. After replying, please erase it from your computer system. Your
assistance in correcting this error is appreciated.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN