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 to execute CICS commands in REXX?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
nilaksh92

New User


Joined: 16 Mar 2015
Posts: 8
Location: Chennai

PostPosted: Mon Apr 27, 2015 9:45 am    Post subject: How to execute CICS commands in REXX?
Reply with quote

Hi everyone,

I have started learning REXX programming. I want to execute a CICS command in REXX like

"CICS ASKTIME ABSTIME(VAR)"

I have written a small code for this and on executing that code I am getting return code = -3.

/*REXX*/
ADDRESS CICS
ARG WS_TIME
"CICS ASKTIME ABSTIME(WS_TIME)"
IF RC<>0 THEN
SAY 'ERROR READING RC='RC
ELSE
DO
PARSE WS_TIME
SAY 'TIME IS: ' WS_TIME
END
EXIT


Please give me a solution to solve this issue.

Thanks in advance.
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Mon Apr 27, 2015 11:09 am    Post subject: Reply to: How to execute CICS commands in REXX?
Reply with quote

Quote:
have written a small code for this and on executing that code I am getting return code = -3.


running under TSO the CICS command environment is not available.

You should run the script while being connected to CICS
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1219
Location: Israel

PostPosted: Mon Apr 27, 2015 8:22 pm    Post subject:
Reply with quote

... or you could use the TIME function, native to rexx ...
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Mon Apr 27, 2015 9:43 pm    Post subject: Reply to: How to execute CICS commands in REXX?
Reply with quote

I have never used CICS, so can not help too much. But it is unlikely that you can just one day decide that you want to start playing with CICS. You likely will need some permissions given to do so.
Back to top
View user's profile Send private message
nilaksh92

New User


Joined: 16 Mar 2015
Posts: 8
Location: Chennai

PostPosted: Tue Apr 28, 2015 11:05 am    Post subject:
Reply with quote

Marso wrote:
... or you could use the TIME function, native to rexx ...



Yeah, I know their is a TIME() function in REXX but I want to execute some CICS commands in REXX.

But I am not able execute any single command of CICS in REXX.

Please help me to solve this issue.

Thanks in advance.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Tue Apr 28, 2015 12:04 pm    Post subject: Reply to: How to execute CICS commands in REXX?
Reply with quote

what is that You did not understand in my first reply ?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Tue Apr 28, 2015 5:46 pm    Post subject:
Reply with quote

Quote:
I want to execute some CICS commands in REXX.
Let's be clear -- if you want to do this, you MUST be running your REXX in a CICS region, or you must connect to a CICS region before you can run any CICS commands in REXX.
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Tue Apr 28, 2015 7:13 pm    Post subject: Reply to: How to execute CICS commands in REXX?
Reply with quote

Can you give details about how you are executing your rexx program?
Back to top
View user's profile Send private message
nilaksh92

New User


Joined: 16 Mar 2015
Posts: 8
Location: Chennai

PostPosted: Thu Apr 30, 2015 12:32 pm    Post subject:
Reply with quote

Hi Friends,

My code is working now.

/*REXX*/
ADDRESS REXXCICS
ARG WS
"CICS ASKTIME ABSTIME(WS)"
"CICS FORMATTIME ABSTIME(WS) DDMMYYYY(WS_DATE) TIME(WS_TIME)"
SAY WS_DATE
SAY WS_TIME
SAY "RC :"RC
EXIT


I wrote this program in CICS region.

Thanks to all for help.

One more query "Where I can see description of return codes of REXX for CICS environment"

I am getting rc=-521 and rc=-522 for two different programs.


Thanks in advance
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1715
Location: UK

PostPosted: Thu Apr 30, 2015 8:17 pm    Post subject:
Reply with quote

Please start a new topic for a new question.

The answer is, probably, one of the manuals for the language in use.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Thu Apr 30, 2015 10:59 pm    Post subject:
Reply with quote

The REXX for CICS Transaction Server 5.2 Reference manual has a chapter on return codes:
Quote:
-521
Command not supported
-522
Invalid command or keyword

Are you running your REXX in CICS? If not, how are you telling REXX which of the various CICS regions defined on your site to connect to?
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Fri May 01, 2015 11:28 am    Post subject:
Reply with quote

Quote:
I wrote this program in CICS region.
Back to top
View user's profile Send private message
nilaksh92

New User


Joined: 16 Mar 2015
Posts: 8
Location: Chennai

PostPosted: Mon May 04, 2015 10:58 am    Post subject:
Reply with quote

Robert Sample wrote:
The REXX for CICS Transaction Server 5.2 Reference manual has a chapter on return codes:
Quote:
-521
Command not supported
-522
Invalid command or keyword

Are you running your REXX in CICS? If not, how are you telling REXX which of the various CICS regions defined on your site to connect to?



I have written this program in CICS region still I am getting this error.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1715
Location: UK

PostPosted: Mon May 04, 2015 4:33 pm    Post subject:
Reply with quote

How about putting a trace into your program and check return codes? You give us absolutely no clue as to which 'command' is giving which return code. You do not even give the full error messages.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Tue May 05, 2015 12:07 pm    Post subject:
Reply with quote

I don't see your commands here :

http://www-01.ibm.com/support/knowledgecenter/SSGMCP_5.2.0/com.ibm.cics.rexx.doc/topics/commref.html
Back to top
View user's profile Send private message
nilaksh92

New User


Joined: 16 Mar 2015
Posts: 8
Location: Chennai

PostPosted: Tue May 05, 2015 12:51 pm    Post subject:
Reply with quote

Nic Clouston wrote:
How about putting a trace into your program and check return codes? You give us absolutely no clue as to which 'command' is giving which return code. You do not even give the full error messages.



PROGRAM

/*REXX*/
ADDRESS REXXCICS
'CICS CEDA INSTALL GROUP(DUDE)'
SAY "RC,"RC
EXIT


ERROR

3 *-* 'CICS CEDA INSTALL GROUP(DUDE)'
+++ RC(-522) +++
RC,-522

This is my program and output what I am getting on executing this program.

Thanks in advance.
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Tue May 05, 2015 6:16 pm    Post subject: Reply to: How to execute CICS commands in REXX?
Reply with quote

Can you give details about how you are executing your rexx program?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Tue May 05, 2015 7:35 pm    Post subject: Reply to: How to execute CICS commands in REXX?
Reply with quote

psychic day is tomorrow ...

today I can just give a wild guess

Code:
CICS CEDA INSTALL GROUP(DUDE)


do You have the authority to do that ?
Back to top
View user's profile Send private message
nilaksh92

New User


Joined: 16 Mar 2015
Posts: 8
Location: Chennai

PostPosted: Wed May 06, 2015 9:56 am    Post subject: Re: Reply to: How to execute CICS commands in REXX?
Reply with quote

enrico-sorichetti wrote:
psychic day is tomorrow ...

today I can just give a wild guess

Code:
CICS CEDA INSTALL GROUP(DUDE)


do You have the authority to do that ?


Yeah, I have authority to do the same.
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts CICS START AND CANCEL blayek CICS 1 Wed Dec 07, 2016 3:27 am
No new posts How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm


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