Sérgio,
You have to use AXRCMD API to issue z/OS commands, and AXRWTO to WTO.
Here are some samples used in our sysprog Lpar:
/* */
/* Verifica os Subsistemas Ativos */
/* */
Sysid = MVSVAR('SYSNAME')
WtoResult=AXRWTO('*** Retirando Subsistemas *** - 'Sysid)
CMDResult=AXRCMD('D OPDATA','OUTPUTVAR.',5);
If CMDResult = 0 Then
DO
DO C = 2 TO OUTPUTVAR.0
Subsys = WORD(Outputvar.c,1)
Asid = WORD(Outputvar.c,2)
System = WORD(Outputvar.c,3)
If System = Sysid Then
DO
Select
When Substr(Asid,1,2) = 'DB' Then CMDResult=AXRCMD(Subsys'
STOP DB2 MODE(FORCE)')
When Substr(Asid,1,4) = 'RACF' Then
CMDResult=AXRCMD(Subsys'STOP')
When Substr(Asid,1,2) = 'MQ' Then CMDResult=AXRCMD('S
MQRDR,M=STOPMQ3')
Otherwise Nop
End
End
END;
End
Atenciosamente / Regards / Saludos
Ituriel do Nascimento Neto
BANCO BRADESCO S.A.
4254 / DPCD Engenharia de Software
Sistemas Operacionais Mainframes
Tel: +55 11 4197-2021 R: 22021
Fax: +55 11 4197-2814
-----Mensagem original-----
De: IBM Mainframe Discussion List [mailto:[email protected]] Em nome de
Sérgio Lima Costa
Enviada em: segunda-feira, 11 de julho de 2011 14:04
Para: [email protected]
Assunto: RES: Console COMMAND
Hello Alan, and all others.
Thanks very much for your help.
Run fine, very good.
But, for give VTAM commands under ZOS, need insert ADDRESS VTAM ?
Look below please:
Under Z/VM :
3 *-* "set secuser vtam *"
>>> "set secuser vtam *"
4 *-* "cp sleep 2 sec"
>>> "cp sleep 2 sec"
5 *-* 'CP SEND VTAM VTAM d net,pending'
>>> "CP SEND VTAM VTAM d net,pending"
6 *-* "cp sleep 2 sec"
>>> "cp sleep 2 sec"
VTAM : Ready;
VTAM : IST097I DISPLAY ACCEPTED
VTAM : IST350I DISPLAY TYPE = PENDING
VTAM : IST159I THE FOLLOWING NODES ARE IN A PENDING STATE
VTAM : IST080I CICSDDS1 PNFY1 CDRKCA PACDR
VTAM : IST314I END
7 *-* "set secuser vtam off"
>>> "set secuser vtam off"
/**/
trace r
"set secuser vtam *"
"cp sleep 2 sec"
'CP SEND VTAM VTAM d net,pending'
"cp sleep 2 sec"
"set secuser vtam off"
And here under ZOS 1.12
BROWSE SYS1.SAXREXEC(TESTE)
Command ===>
********************************
/* rexx */
trace r
address tso
'd net,pending'
3 *-* address tso
4 *-* 'd net,pending'
>>> "d net,pending"
***
IKJ56500I COMMAND D NOT FOUND
+++ RC(-3) +++
***
Do you know, what We need do for VTAM commands run ok?
Thanks again, and Best Regards.
Sergio
-----Mensagem original-----
De: IBM Mainframe Discussion List [mailto:[email protected]] Em nome de
Starr, Alan
Enviada em: sexta-feira, 8 de julho de 2011 15:03
Para: [email protected]
Assunto: Re: Console COMMAND
Sergio,
If I understand your requirements correctly, I believe that System REXX may
fulfill them.
System REXX members may be invoked (by the AXR address space) from any console
by specifying _rexxname (or F AXR,rexxname)
> _ is the command designator defined in PARMLIB member AXRnn
> rexxname is a member name in SYS1.SAXREXEC (or another dataset specified via
> PARMLIB member AXRnn)
You can use the AXRCMD function (described in chapter 31 of the Authorized
Assembler Programming Guide) to submit MVS operator commands.
Cheers,
Alan
-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of
Sérgio Lima Costa
Sent: Friday, July 08, 2011 10:54 AM
To: [email protected]
Subject: Console COMMAND
Hello List,
We are migrating our environment from Z/VM , and Z/VSE to Z/OS.
We have here a lot of EXEC's that is used from VM OPERATOR to display,
activate, deactivate lines from VTAM.
We need now, transfer this EXEC's for run under TSO .
What We need, is execute this comands by operators unde Master console of ZOS.
Is possible execute this there?
Need write a PROC with a name ? , then the operator give the S XXXXX , where
XXXXX is the name o four PROC / REXX .
Sergio Lima Costa
________________________________
"Atenção: Esta mensagem foi enviada para uso exclusivo do(s) destinatários(s)
acima identificado(s), podendo conter informações e/ou documentos
confidencias/privilegiados e seu sigilo é protegido por lei. Caso você tenha
recebido por engano, por favor, informe o remetente e apague-a de seu sistema.
Notificamos que é proibido por lei a sua retenção, disseminação, distribuição,
cópia ou uso sem expressa autorização do remetente. Opiniões pessoais do
remetente não refletem, necessariamente, o ponto de vista da companhia, o qual
é divulgado somente por pessoas autorizadas."
"Warning: This message was sent for exclusive use of the addressees above
identified, possibly containing information and or privileged/confidential
documents whose content is protected by law.
In case you have mistakenly received it, please notify the sender and delete it
from your system.
Be noticed that the law forbids the retention, dissemination, distribution,
copy or use without express authorization from the sender. Personal opinions of
the sender do not necessarily reflect the company's point of view, which is
only divulged by authorized personnel."
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to
[email protected] with the message: GET IBM-MAIN INFO Search the archives at
http://bama.ua.edu/archives/ibm-main.html
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
"Atenção: Esta mensagem foi enviada para uso exclusivo do(s) destinatários(s)
acima identificado(s),
podendo conter informações e/ou documentos confidencias/privilegiados e seu
sigilo é protegido por
lei. Caso você tenha recebido por engano, por favor, informe o remetente e
apague-a de seu sistema.
Notificamos que é proibido por lei a sua retenção, disseminação, distribuição,
cópia ou uso sem
expressa autorização do remetente. Opiniões pessoais do remetente não refletem,
necessariamente,
o ponto de vista da companhia, o qual é divulgado somente por pessoas
autorizadas."
"Warning: This message was sent for exclusive use of the addressees above
identified, possibly
containing information and or privileged/confidential documents whose content
is protected by law.
In case you have mistakenly received it, please notify the sender and delete it
from your system.
Be noticed that the law forbids the retention, dissemination, distribution,
copy or use without
express authorization from the sender. Personal opinions of the sender do not
necessarily reflect
the company's point of view, which is only divulged by authorized personnel."
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
AVISO LEGAL <br>...Esta mensagem é destinada exclusivamente para a(s) pessoa(s)
a quem é dirigida, podendo conter informação confidencial e/ou legalmente
privilegiada. Se você não for destinatário desta mensagem, desde já fica
notificado de abster-se a divulgar, copiar, distribuir, examinar ou, de
qualquer forma, utilizar a informação contida nesta mensagem, por ser ilegal.
Caso você tenha recebido esta mensagem por engano, pedimos que nos retorne este
E-Mail, promovendo, desde logo, a eliminação do seu conteúdo em sua base de
dados, registros ou sistema de controle. Fica desprovida de eficácia e validade
a mensagem que contiver vínculos obrigacionais, expedida por quem não detenha
poderes de representação.
LEGAL ADVICE<br>...This message is exclusively destined for the people to whom
it is directed, and it can bear private and/or legally exceptional information.
If you are not addressee of this message, since now you are advised to not
release, copy, distribute, check or, otherwise, use the information contained
in this message, because it is illegal. If you received this message by
mistake, we ask you to return this email, making possible, as soon as possible,
the elimination of its contents of your database, registrations or controls
system. The message that bears any mandatory links, issued by someone who has
no representation powers, shall be null or void.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html