View previous topic :: View next topic
|
Author |
Message |
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
Hi,
I want to run some CA7 commands and output is to be processed further.
Can anybody help me on running CA7 commands in REXX?
With reference to Roberts comment
Robert wrote: |
From what I can tell in the CA documentation, you can invoke CA-7 from a REXX by using the CA7REXX sample code in CAICLIB. |
in this post I tried to find CA7REXX in my CAICLIB, but I couldn't find it. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
Did you consult with your site support group to find out which CAICLIB to use? Most sites have more than one, so finding the one with the CA7REXX member may take a bit of searching.
Code: |
/* REXX */
/*--------------------------------------------------------------*/
/* */
/* Sample CA-7 REXX to invoke CA-7 CCI REXX Interface to */
/* pass commands to CA-7 and receive back the output from those */
/* commands. */
/* */
/* Syntax : CA7REXX cmda...;cmdb...;cmdc */
/* */
/* Environment Variables : */
/* */
/* ca7_node = CCI Node where CA-7 resides (default= local node) */
/* ca7_ssct = sub-system name of CA-7 to communicate with */
/* (default= production CA-7 (prod)). To communicate */
/* with secondary copy of CA-7 specify 'test'. */
/* ca7_debug= 4 character string to pass to CA-7 Two-Way : */
/* char 1 : Y = debug trace (default=N) */
/* char 2 : command separator character (default=;) */
/* char 3 : --- reserved for future use --- */
/* char 4 : --- reserved for future use --- */
/* */
/* NOTE: If you execute this CLIST in a TSO/ISPF environment */
/* the default separator character (;) may conflict with */
/* the TSO/ISPF command separator. If so, override the */
/* default in the ca7_debug variable to a different */
/* character, such as a pound sign (#). */
/*--------------------------------------------------------------*/
parse UPPER arg command
rslt = cal2x2wa()
/* ca7_node = 'xxxxxxxx' */
/* ca7_ssct = 'prod' */
/* ca7_debug = 'N; ' */
address CA7 command
say 'rc =' rc
x = queued()
say 'queued() =' x
do i = 1 to x
pull line
line2 = SUBSTR(line,2) /* strip carriage control char */
say line2
end
return |
You need to work with your site support group for some of this -- we're not going to be able to tell you what your local site names are, for example. |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
I have searched all available CAICLIB's but couldn't find this one..
I dont have mainframe access now but I will test this one and let you know |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
Thanks Robert.. Above given code is working for me.. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
Glad to hear its working! |
|
Back to top |
|
|
vijayapriya
New User
Joined: 19 Aug 2009 Posts: 3 Location: Chennai
|
|
|
|
hi , . Even I have the same requirement like Sambhaji, the above code works fine for me, but I don't understand how do I give a simple ca7 command like
Ljob,job=***** in the REXX code to access CA7? I do get return code 0 for the above code but how do I insert the ca7 commands i need in REXX code?
when i tried searching in google, I keep getting only the above sample code... |
|
Back to top |
|
|
PeD
Active User
Joined: 26 Nov 2005 Posts: 459 Location: Belgium
|
|
|
|
Quote: |
how do I insert the ca7 commands i need in REXX code? |
and
Quote: |
parse UPPER arg command |
And in this sunny Saturday what is for you the purpose of field command except receiving valid CA7 command |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
Tweety wrote: |
above code works fine for me |
I am surprised How you tested this with out any command?? |
|
Back to top |
|
|
vijayapriya
New User
Joined: 19 Aug 2009 Posts: 3 Location: Chennai
|
|
|
|
I wrote a simple rexx code that calls CA7REXX (has the above sample code that is already posted.)
simple rexx code
/*rexx*/
call ca7rexx ljob,job=****,list=all
but i get return code of 8 when I call the CA7 REXX program. I gave the correct ca7_node, ca7_ssct.
please help me. |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
Kindly post the output from CA7 by this command..
All the lines from queue |
|
Back to top |
|
|
vijayapriya
New User
Joined: 19 Aug 2009 Posts: 3 Location: Chennai
|
|
|
|
am getting X=0 (zero) for result of queue(),
I did trace i in both the calling and called programs,
I did find a SUCCESS after executing this stmt rsult = cal2x2wa()
the next stmt ADDRESS CA7 Command " Ljob,job=****,List=all" - the arguments were correctly passed.
but i got SAY RC = 8
then
X= queued()
I got 0
Say queue () = X which is again 0
Do I= 1 to X
Pull Line 1 which is 1
LINE 2 is zero again.
Plz help me
which is wrong here? CA7 command or the ca7_node or SSCT??? i have given the correct details of ca7_node.
CAL2X2WAC() returns SUCCESS . |
|
Back to top |
|
|
|