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
 

 

How Run CA7 commands from REXX?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
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    Post subject: How Run CA7 commands from REXX?
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: 7997
Location: Bellevue, IA

PostPosted: Wed Sep 09, 2009 4:26 pm    Post subject:
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    Post subject:
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    Post subject:
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: 7997
Location: Bellevue, IA

PostPosted: Sat Sep 12, 2009 6:32 pm    Post subject:
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    Post subject: accessing ca7 command from REXX
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: 456
Location: Belgium

PostPosted: Sat Sep 19, 2009 2:11 pm    Post subject:
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    Post subject:
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    Post subject: using CA7 commands from REXx
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    Post subject:
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    Post subject: accessing ca7 from REXX
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    IBMMAINFRAMES.com Support Forums -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm
No new posts Execute TSO ACF commands from COBOL-I... supreethi.srid TSO/ISPF 0 Tue Feb 21, 2017 5:19 pm
No new posts REXX compiled via RXTCOMP sergeyken CLIST & REXX 7 Tue Feb 07, 2017 9:41 pm
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


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