View previous topic :: View next topic
|
Author |
Message |
nilaksh92
New User
Joined: 16 Mar 2015 Posts: 8 Location: Chennai
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
... or you could use the TIME function, native to rexx ... |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
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 |
|
|
nilaksh92
New User
Joined: 16 Mar 2015 Posts: 8 Location: Chennai
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
what is that You did not understand in my first reply ? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Can you give details about how you are executing your rexx program? |
|
Back to top |
|
|
nilaksh92
New User
Joined: 16 Mar 2015 Posts: 8 Location: Chennai
|
|
|
|
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 |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Quote: |
I wrote this program in CICS region. |
|
|
Back to top |
|
|
nilaksh92
New User
Joined: 16 Mar 2015 Posts: 8 Location: Chennai
|
|
|
|
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 |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
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 |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
Back to top |
|
|
nilaksh92
New User
Joined: 16 Mar 2015 Posts: 8 Location: Chennai
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Can you give details about how you are executing your rexx program? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
nilaksh92
New User
Joined: 16 Mar 2015 Posts: 8 Location: Chennai
|
|
|
|
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 |
|
|
|