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

Invoking CA7 from REXX.


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

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Thu Jul 15, 2010 3:53 pm
Reply with quote

Hi,

I am trying to execute CA7 from REXX, and the CA7 manual gives a sample REXX code for CA7 interface - CA7REXX,

Code:
/* REXX */                                                       
parse UPPER arg command                                           
rslt = cal2x2wa()                                                 
                                                                 
/* ca7_node = 'xxxxxxxx' */                                       
/* ca7_ssct = 'CA71'     */                                       
/* ca7_debug = 'N;  '    */                                       
                                                                 
address CA7 LQ,JOB=XXX*  /* <---- a test command that I added   */                                         
say 'rc =' rc                                                     
x = queued()                                                     
say 'queued() =' x                                               
do i = 1 to x                                                     
/*  Note that the parse function allows for mixed case     */     
  parse pull line                                                 
  line2 = substr(line,2)    /* strip carriage control char */     
  say line2                                                       
end                                                               
                                                                 
return   


Upon executing this, there was an error,

Code:
      3 +++ rslt = cal2x2wa()                             
 IRX0043I Error running CA7REXX, line 3: Routine not found
 ***             



I tried commenting out rslt = cal2x2wa() part and executed it again, the error was,
Code:

     9 +++ address CA7 LQ,JOB=XXX*                           
IRX0037I Error running CA7REXX, line 9: Unexpected "," or ")"
***     



Tried changing the statement from address CA7 LQ,JOB=XXX* to address CA7 LQ, the error in this time was


Code:
      9 *-* address CA7 LQ
        +++ RC(-3) +++     
 rc = -3                   
 queued() = 0             
 ***   


Could you please let me know how to resolve this error?
Thanks.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Tue Jul 20, 2010 11:31 am
Reply with quote

Hi,
Any thoughts on this please. Im stuck.

Regards,
Back to top
View user's profile Send private message
technut

New User


Joined: 27 Dec 2007
Posts: 73
Location: India

PostPosted: Tue Jul 20, 2010 12:14 pm
Reply with quote

Well, I am not sure whether this can be done. I tried doing this couple of yrs back but did not have the patience to research more..

Probably you can go thru the below link and see if it helps,

www.ibmmainframes.com/viewtopic.php?t=27118&highlight=

All the best and do let us know if you could find something..
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: Tue Jul 20, 2010 5:46 pm
Reply with quote

cal2x2wa is a load module in the CAILIB. Your first problem is that you do not have CAILIB concatenated to your TSO STEPLIB. This requires your site support group to assist you in changing.

I suspect -- but do not know for sure -- that the LQ,JOB=XXX* needs to have quote marks around it.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Fri Jul 23, 2010 2:46 pm
Reply with quote

Hi,
Thanks for your response,

I logged onto CA7 through ISPF option at our shop and did a split screen mode, & did a TSO ISRDDN and it shows that the CAILIB is allocated to my ISPF profile thing, then on the split screen mode I ran the REXX, but still I get the same error icon_sad.gif as above

Quoting the LQ statement too did not help.

Regards,
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Jul 23, 2010 3:19 pm
Reply with quote

Try doing the TSO ISRDDN from the screen that gives you the error.

It may be the same was as ALTLIB works, only valid for the screen that the ALTLIB command was entered from.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Wed Aug 11, 2010 4:18 pm
Reply with quote

Hi,
Thanks for your time replying.
I have had some progress with this requirement & I am a little positive that the below code will work and invoke CA7 in batch,
but im running into security issues now,

Code:
/*REXX*/                                                 
  ADDRESS TSO                                           
"ALLOC FI(SYSPRINT) NEW SPACE(1,1) CYLINDERS RELEASE"   
"ALLOC FI(UCC7CMDS) DA('"******.COMMDS"') SHR"   
"ALLOC FI(BATCHIN) DS('"******.BATCHI#1"') SHR" 
"ALLOC FI(BATCHOUT) DS('"*******.BATCHO#1"') SHR"
"ALLOC DD(SYSIN)    NEW"                                 
QUEUE '/LOGON USERID,PASSWORD'                         
QUEUE '/UID,R=SYSTEM'                                     
QUEUE 'LCTLG,DSN=SOME.DSN.DATA'         
QUEUE '/LOGOFF'                                         
"EXECIO" QUEUED() "DISKW SYSIN (FINIS)"                 
"CALL '*****.****.CAILOAD(SASSBSTR)'"           
"EXECIO * DISKR SYSPRINT (STEM RESULT. FINIS)"           
"FREE DD(SYSIN SYSPRINT UCC7CMDS BATCHIN BATCHOUT)"     
   DO I = 1 TO RESULT.0                                 
   SAY 'RESULT ' RESULT.I                               
   END                                                   
EXIT                                                     


on executing this, I get an error message for the dataset ******.COMMDS,

Code:
INSUFFICIENT ACCESS AUTHORITY
ACCESS INTENT(UPDATE )  ACCESS ALLOWED(READ   )


The error message says that im allowed read access and I specified as "SHR" on the alloc statement,
but still somehow the program is trying for Update access. Is this really a security issue or I coded something incorrectly so that
the program is not taking the SHR parameter. Please let me know. Thanks.
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 Aug 11, 2010 5:21 pm
Reply with quote

CA-7 may need write access to its communication data set no matter what you specify for the DISP. You need to contact your site support group about this data set and access to it.

And when you see in ICH408I message, you have a security issue -- always.
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