View previous topic :: View next topic
|
Author |
Message |
Kranthi_Merigala
New User
Joined: 22 Mar 2010 Posts: 17 Location: Hartford
|
|
|
|
Hi,
I have used OUTTRAP function in my REXX routine.Its working fine when iam executing it directly.How ever when iam trying to execute the routine using a JCL i couldn't execte it iam getting the below error.
9 +++ A = OUTTRAP('MEM.')
IRX0043I Error running REXXRTN1, line 9: Routine not found
I have executed using IRXJCL and passing the member name in parm parameter.
I have mentioned in the REXX routine ADDRESS MVS..
Please let me know if we can use OUTTRAP in MVS environment
Thank You,
Kranthi |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Does your JCL have a DD pointing to the PDS containing 'MEM.'? |
|
Back to top |
|
|
Kranthi_Merigala
New User
Joined: 22 Mar 2010 Posts: 17 Location: Hartford
|
|
|
|
My JCL
JCL:
Code: |
//REXXSTEP EXEC PGM=IRXJCL,PARM='REXXRTN1'
//SYSEXEC DD DSN=GTS.G412.REXX.RTN,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=T
//SYSUDUMP DD SYSOUT=T
//SYSTSIN DD *
GGP0
/* |
Rexx routine
Code: |
/********************REXX**************/
ADDRESS MVS
SAY 'ENTER PGM NAME OR THE INITIAL LETTERS OF PGMS TO BE SEARCHED'
PARSE PULL D1
NUM = WORDLENGTH(D1,1)
PDS = GTS.CCD.G412.COBOL
ADDRESS TSO
A = OUTTRAP(MEM.)
"LISTDS '"PDS"' MEMBERS"
A = OUTTRAP('OFF')
Z = 1
DO I = 1 TO MEM.0
IF SUBSTR(MEM.I,1,NUM+2) = D1 THEN
DO
PDS1 = PDS || '(' || STRIP(MEM.I) || ')'
"ALLOC DA('"PDS1"') F(INDD) SHR REUSE"
"EXECIO * DISKR INDD (STEM VAR1. FINIS"
"FREE F(INDD)" |
|
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
Quote: |
line 9: Routine not found |
What is on line 9?
Better yet, what is on line 10? |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Pedro wrote: |
Better yet, what is on line 10? |
Sorry, but wrong question....buzzzzz....
Kranthi_Merigala wrote: |
9 +++ A = OUTTRAP('MEM.')
IRX0043I Error running REXXRTN1, line 9: Routine not found |
|
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
He is trying to trap the output from a TSO command in a non-TSO environment.
The command is in line 10.
Also, I question what is there because his trace does not match the program he posted. |
|
Back to top |
|
|
MBabu
Active User
Joined: 03 Aug 2008 Posts: 400 Location: Mumbai
|
|
|
|
Ikjeft01 is TSO. Use that instead of irxjcl. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Pedro wrote: |
He is trying to trap the output from a TSO command in a non-TSO environment. |
That might explain it....
Quote: |
The command is in line 10. |
Code: |
1 p-ADDRESS MVS
2 SAY 'ENTER PGM NAME OR THE INITIAL LETTERS OF PGMS TO BE SEARCHED'
3 PARSE PULL D1
4 NUM = WORDLENGTH(D1,1)
5 PDS = GTS.CCD.G412.COBOL
6 ADDRESS TSO
7 A = OUTTRAP(MEM.)
8 "LISTDS '"PDS"' MEMBERS"
9 A = OUTTRAP('OFF')
10 Z = 1 |
His line 9 or your line 10 or this line 7???????
Quote: |
Also, I question what is there because his trace does not match the program he posted. |
That might be why you can answer these questions more intelligently than I... you are a better man than I, Gunga Din...grin... |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
From the documentation:
You can use the OUTTRAP function only in REXX execs that run in the TSO/E address space.
Not to mention that LISTDS is a TSO command. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Quote: |
You can use the OUTTRAP function only in REXX execs that run in the TSO/E address space. |
Dang, you are good. I knew there was a reason we named you "Moderator Team Head"....grin..... |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
If I'm off the rail, please ignore.
I hacked this from an old archived file I had
Code: |
//ST01GEN EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT2 DD DSN=&&SYSPROC(REXXRTN1),
// DISP=(,PASS),
// UNIT=VIO,
// SPACE=(TRK,(1,1,1)),
// DCB=(RECFM=FB,LRECL=80)
//SYSUT1 DD *,DLM='$$'
/* REXX EXEC */
TRACE R
ARG PARMINFO
PARSE VAR PARMINFO D1
NUM = WORDLENGTH(D1,1)
PDS = GTS.CCD.G412.COBOL
X = OUTTRAP('MEM.')
"LISTDS '"PDS"' MEMBERS"
X = OUTTRAP('OFF')
DO I = 7 TO MEM.0
IF SUBSTR(MEM.I,1,NUM+2) = D1 THEN
DO
PDS1 = PDS || '(' || STRIP(MEM.I) || ')'
"ALLOC DA('"PDS1"') F(INDD) SHR REUSE"
"EXECIO * DISKR INDD (STEM VAR1. FINIS"
"FREE F(INDD)"
END
END
$$
//*
//**********************************************************************
//*
//ST02REXX EXEC PGM=IKJEFT01,DYNAMNBR=50,COND=(0,LT),
// PARM=('REXXRTN1 GGP0')
//SYSPROC DD DSN=&&SYSPROC,DISP=(OLD,DELETE)
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*,OUTLIM=999999
//SYSOUT DD SYSOUT=*
//SYSTSIN DD DUMMY
//*
|
Gerry |
|
Back to top |
|
|
Kranthi_Merigala
New User
Joined: 22 Mar 2010 Posts: 17 Location: Hartford
|
|
|
|
Thank you so much its working with IKJEFT01 and
ARG PARMINFO
PARSE VAR PARMINFO D1
So finally we can conclude OUTTRAP can be used while executing rexx thru JCL |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
I don't speak REXX much, but this was not so tricky to understand. (Though I may be wrong)
Kevin said, "You can use the OUTTRAP function only in REXX execs that run in the TSO/E address space. "
So you can not conlude this
Quote: |
So finally we can conclude OUTTRAP can be used while executing rexx thru JCL |
- JCL from Gerry executes IKJEFT01, TSO in batch, in other words - you're using OUTTRAP in TSO/E address space. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
as usual we face the usual language barrier and/or the usual JCL misunderstanding
execute by JCL means absolutely nothing
JCL is the operating system facility which setups things for program execution
technically speaking also a tso session is JCL started
interpreter/converter and all that |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
Quote: |
You can use the OUTTRAP function only in REXX execs that run in the TSO/E address space. |
BTW, this is clearly stated in the manual. It is not clear why the poster did not look there first. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Quote: |
It is not clear why the poster did not look there first. |
As with many "projects" - if all else fails, read the directions. . . |
|
Back to top |
|
|
MBabu
Active User
Joined: 03 Aug 2008 Posts: 400 Location: Mumbai
|
|
|
|
Not to hijack this thread (ok, sorry) but lets be straight about the fact that IBM documentation is not the easiest thing to wade through (and I've written my fair share of it).
I'm a big fan of BookManager for its searches since it was putting what you want at the top of the search results years before Google ever existed, but most manuals are very hard to read online because each page is a tiny sliver of the book, sometimes even just one sentence per page! And those pages that do have extensive information assume you already know everything else about terminology, system architecture, system components and configuration... everything there is to know except what is on that one page -- no links, no references. And now that BookManager seems to be giving way to Eclipse based 'infocenters' which have really, really bad search engines and slow, non-intuitive UIs, searching for information in IBM doc is getting harder and harder. I'm not surprised that people don't read the doc. I'm not proud of it, but I go to the manuals only as a last resort. I ask, I experiment, I hack code before I go to the books. Its just too painful. (If I have a hardcopy, it is the 1st place I go because most manuals work well in hardcopy format).
In this case, Google of 'outtrap' turns up the answer on the very first hit, but even that sentence is confusing: "The OUTTRAP function can be used only in REXX execs that run in the TSO/E address space." What, there is only one? |
|
Back to top |
|
|
|