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
 

 

Connecting to CA7 thru REXX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
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    Post subject: Connecting to CA7 thru REXX
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Fri Jan 15, 2010 5:30 pm    Post subject: Reply to: Connecting to CA7 thru REXX
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    Post subject: Reply to: Connecting to CA7 thru REXX
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Fri Jan 15, 2010 5:56 pm    Post subject: Reply to: Connecting to CA7 thru REXX
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Fri Jan 15, 2010 6:10 pm    Post subject: Reply to: Connecting to CA7 thru REXX
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    Post subject: Reply to: Connecting to CA7 thru REXX
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    Post subject:
Reply with quote

This one will might help you further....
http://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    Post subject: Reply to: Connecting to CA7 thru REXX
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

Site Director


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

PostPosted: Fri Jan 15, 2010 10:33 pm    Post subject:
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    Post subject: Reply to: Connecting to CA7 thru REXX
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

Site Director


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

PostPosted: Fri Jan 15, 2010 11:20 pm    Post subject:
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    Post subject: Reply to: Connecting to CA7 thru REXX
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: 7913
Location: Bellevue, IA

PostPosted: Fri Jan 15, 2010 11:59 pm    Post subject:
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    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 What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
This topic is locked: you cannot edit posts or make replies. Need to code a Rexx PGM sundaram.naveen CLIST & REXX 18 Thu Oct 06, 2016 6:45 pm
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm


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