IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How Run CA7 commands from REXX?


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Wed Sep 09, 2009 4:11 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Wed Sep 09, 2009 4:26 pm
Reply with quote

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
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Thu Sep 10, 2009 12:48 am
Reply with quote

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
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Sat Sep 12, 2009 3:12 pm
Reply with quote

Thanks Robert.. Above given code is working for me.. icon_smile.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Sat Sep 12, 2009 6:32 pm
Reply with quote

Glad to hear its working! icon_smile.gif
Back to top
View user's profile Send private message
vijayapriya

New User


Joined: 19 Aug 2009
Posts: 3
Location: Chennai

PostPosted: Sat Sep 19, 2009 1:37 pm
Reply with quote

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? icon_confused.gif

when i tried searching in google, I keep getting only the above sample code...
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 459
Location: Belgium

PostPosted: Sat Sep 19, 2009 2:11 pm
Reply with quote

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 icon_exclaim.gif icon_exclaim.gif
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Sun Sep 20, 2009 11:59 pm
Reply with quote

Tweety wrote:
above code works fine for me
I am surprised How you tested this with out any command??
Back to top
View user's profile Send private message
vijayapriya

New User


Joined: 19 Aug 2009
Posts: 3
Location: Chennai

PostPosted: Mon Sep 21, 2009 5:26 pm
Reply with quote

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
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Tue Sep 22, 2009 8:02 am
Reply with quote

Kindly post the output from CA7 by this command..
All the lines from queue
Back to top
View user's profile Send private message
vijayapriya

New User


Joined: 19 Aug 2009
Posts: 3
Location: Chennai

PostPosted: Tue Sep 22, 2009 11:19 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top