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

Connecting to CA7 thru REXX


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

New User


Joined: 21 Mar 2007
Posts: 9
Location: United states

PostPosted: Fri Jan 15, 2010 5:26 pm
Reply with quote

Hi All,

I have a requirement to connect to CA7 through REXX and check the status of the job. if it's flagging late which can be checked thru LQ,JOB=XXXXXXXX we need to page a group.

Here is the Rexx code I used:

Code:

/* REXX */                                                     
PARSE UPPER ARG 'LQ,JOB=XXXXXXXX'                   
RSLT = CAL2X2WA()                                             
/* CA7_NODE = 'XXXXXXXX'*/                                     
/* CA7_SSCT = 'TEST' */                                       
/* CA7_DEBUG = 'Y;  ' */                                       
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                                                         


The o/p I am getting is:
Code:

RC = 8       
QUEUED() = 0 


Can someone please help me with this?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Jan 15, 2010 5:30 pm
Reply with quote

I wonder why people keep hiding things
Quote:
Code:
ADDRESS CA7 COMMAND                                           
SAY 'RC =' RC


the snippet does... nothing

Address CA7 is a proper REXX construct
the simple <thing> COMMAND as coded does not mean anything

the return code 8 is certainly caused by some improper command passed to the ca7 Address environment

edited to add some more consideration
Code:
PARSE UPPER ARG 'LQ,JOB=XXXXXXXX'

what is the reason for the strange parse statement...
I tested it, strange enough it does not produce any error, but as expected it does not produce any useful result
please show evidence if it is not so

also up to the point where You issue the Address CA7 You do nothing related to the CA7 command You want to issue
Back to top
View user's profile Send private message
prerna_gupta11

New User


Joined: 21 Mar 2007
Posts: 9
Location: United states

PostPosted: Fri Jan 15, 2010 5:51 pm
Reply with quote

Thanks for the quick reply. Can you please help me with the correct command that needs to be used here?

Code:

ADDRESS CA7 Command


LQ,JOB=XXXXXXXX

here XXXXXXX is the job name i had given
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Jan 15, 2010 5:56 pm
Reply with quote

I can only reply on the general syntax of the Address <thing>

Address <some_environment> <some string>
means simply that the <some string> thing after having been processed by rexx for the proper variable substituton
is passed to the specified <some_environment> CA7 in this case for further processing

the <some string> content is relevant/depends only to/from the <some_environment> conventions

why not read/understand/meditate on the proper CA7 manuals???

in this case You might try something along the line of

Address CA7 "LQ,JOB=XXXXXXXX"
but it would be wiser to follow my advice about the manuals

also reading the rexx manulas would be mora than helpful...
from what You posted, no offence meant, Your skills look a bit inadequate
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Jan 15, 2010 6:10 pm
Reply with quote

another concern

why reinvent the wheel, investigate the ca7 monitoring facilities, and it' s eMail capabilities

a much better way of spending time and resources!

as expected You will reply that You do not have the permissions to control/customize CA7 monitoring icon_cool.gif
Back to top
View user's profile Send private message
prerna_gupta11

New User


Joined: 21 Mar 2007
Posts: 9
Location: United states

PostPosted: Fri Jan 15, 2010 7:15 pm
Reply with quote

Thanks!! Completely agree that I am ignorant in Rexx . Pretty new to it...will take your suggestion and read the manual icon_biggrin.gif
Back to top
View user's profile Send private message
Escapa

Senior Member


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

PostPosted: Fri Jan 15, 2010 9:59 pm
Reply with quote

This one will might help you further....
ibmmainframes.com/viewtopic.php?t=43711&highlight=ca7+rexx
Back to top
View user's profile Send private message
prerna_gupta11

New User


Joined: 21 Mar 2007
Posts: 9
Location: United states

PostPosted: Fri Jan 15, 2010 10:19 pm
Reply with quote

Hi Sambhaji,

I took the code from the below link only but unfortunately its not working icon_sad.gif I am not sure what is missing here as I am new to Rexx.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Jan 15, 2010 10:33 pm
Reply with quote

Hello,

Quote:
its not working
Posting this is a complete waste of everyone's time icon_sad.gif

If you want to tell us it didn't work, you also need to post what problem occurred. . . Was there an abend? Some error return code? Some unexpected result?

Quote:
I am new to Rexx.
No matter. . . You still need to properly present your question/problem.

Suggest you spend some time learning the basics before trying to meet this requirement. We can help with technical questions/problems, but the forum cannot teach you. That will be your mission.
Back to top
View user's profile Send private message
prerna_gupta11

New User


Joined: 21 Mar 2007
Posts: 9
Location: United states

PostPosted: Fri Jan 15, 2010 10:43 pm
Reply with quote

There was no abend. After executing the utility it gave me the below message:

Code:

RC = 8       
QUEUED() = 0 



That's all I have and I had already posted this. I will keep trying it until I get it straight. Thanks.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Jan 15, 2010 11:20 pm
Reply with quote

Hello,

Quote:
I took the code from the below link only but unfortunately its not working
So, was your original post about the same code as in this link or are there 2 sets of code? Possibly, i misunderstood what you posted, but it looked like there was your original code and then the code at the link. . .

If there are 2 sets of code, do they both have the same problem (no, i didn't chase thru the "other" code to check)?

Did you run a trace? If not, do so - there are multiple forum topics that talk about running a trace of your rexx code.
Back to top
View user's profile Send private message
prerna_gupta11

New User


Joined: 21 Mar 2007
Posts: 9
Location: United states

PostPosted: Fri Jan 15, 2010 11:29 pm
Reply with quote

Thanks D!! Both the codes (in my post and link) are same and have the same problem and retrun the above output without any abend.

Code:

ADDRESS CA7 Command


I am not very sure of the above code as I didnt find ADDRESS CA7 as any of the environments which can be passed unlike TSO, ISPEXEC
etc.

I will try running the trace to get more details.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Fri Jan 15, 2010 11:59 pm
Reply with quote

Have you confirmed with your site support group the values for ca7_node and ca7_ssct? These are modifiable at each site and may not be the values you think they are, and you may be required to specify them to get access to CA-7. You may also want to confirm that the CA Common Communications Interface is turned on at your site -- although I suspect the 8 RC indicates that you are communicating with it.
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