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

Active module not Found (DSNREXX & DSNTZANB)....


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sakrat

Active User


Joined: 05 Feb 2014
Posts: 164
Location: India

PostPosted: Fri Jun 05, 2015 4:07 pm
Reply with quote

Hi,

I am trying to connect REXX with DB2.This is my first code of working with DB2 in REXX. The error below says the module is not found where i checked in library and came to know that it is in library "***GRP.SDSNLOAD" . I tried to include in the REXX code as below but getting error.

Code:


/*REXX*/
TRACE(?)
SUBSYS="***"
QUERY="SELECT * FROM ***.TABNAME"
ADDRESS ISPEXEC "LIBDEF ISPLLIB DATASET ID('****GRP.SDSNLOAD')"
ADDRESS TSO "SUBCOM DSNREXX"
  IF RC THEN
     S_RC=RXSUBCOM('ADD','DSNREXX','DSNREXX')
ADDRESS DSNREXX "CONNECT" SUBSYS
  IF SQLCODE <> 0 THEN COUTPUT SQLCA
ADDRESS DSNREXX "EXECSQL DECLARE C1 CURSOR FOR S1"
  IF SQLCODE <> 0 THEN CALL SQLCA
ADDRESS DSNREXX "EXECSQL PREPARE S1 FROM :QUERY"
  IF SQLCODE <> 0 THEN CALL SQLCA
ADDRESS DSNREXX "EXECSQL DESCRIBE S1 INTO :OUTPUT"
  IF SQLCODE <> 0 THEN CALL SQLCA
 ADDRESS DSNREXX "EXECSQL OPEN C1"
   IF SQLCODE <> 0 THEN CALL SQLCA
 DO UNTIL (SQLCODE <> 0)
    ADDRESS DSNREXX "EXECSQL FETCH C1 USING DESCRIPTOR :OUTPUT"
    IF SQLCODE = 0 THEN
       DO
          SAY "  > COLUMN NUMBER: " I
          SAY "    COLUMN NAME:   " OUTPUT.I.SQLNAME
          SAY "    COLUMN TYPE:   " OUTPUT.I.SQLTYPE
          SAY "    COLUMN VALUE:  " OUTPUT.I.SQLDATA
       END
 END


I get error as below :

Code:

 CSV003I REQUESTED MODULE DSNTZANB NOT FOUND
 CSV028I ABEND806-04  JOBNAME=*****   STEPNAME=LOGON
 IRX0250E System abend code 806, reason code 00000004.
 IRX0255E Abend in host command CONNECT or address environment routine DSNREXX.
IEA995I SYMPTOM DUMP OUTPUT
SYSTEM COMPLETION CODE=806  REASON CODE=00000004
 TIME=06.35.37  SEQ=62430  CPU=0000  ASID=0074
 PSW AT TIME OF ERROR  070C1000   81555CD8  ILC 2  INTC 0D
   NO ACTIVE MODULE FOUND
   NAME=UNKNOWN
   DATA AT PSW  01555CD2 - 8400181E  0A0D18FB  180C181D
   GR 0: 00001F00   1: 84806000
      2: 00000000   3: 00000000
      4: 00000000   5: 008FD410
      6: 000000FF   7: 00000000
      8: 7F5ED168   9: 01556200
      A: 00000000   B: 00000000
      C: 00000000   D: 7F5ED168
      E: 84806000   F: 00000004
 END OF SYMPTOM DUMP
     9 *-* ADDRESS DSNREXX "CONNECT" SUBSYS
       +++ RC(-2054) +++
IRX0100I +++ Interactive trace.  TRACE OFF to end debug, ENTER to continue. +++


I read some threads of this forum about this and saw that ISPEXEC cannot be used in ***GRP.SDSNLOAD....

Can someone please help me in understanding what the actual problem as still i am not clear and help me to connect to DB2 through REXX.


Thanks,
sakrat
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Fri Jun 05, 2015 6:04 pm
Reply with quote

LIBDEF is used for ISPF service calls. SELECT CMD(mycmd) or SELECT PGM(myprog) will find your module in the LIBDEF, but it is not part of the normal z/OS search order.

I think you can do either of these:
1. add "***GRP.SDSNLOAD" to your STEPLIB concatenation of your logon proc. Most people are not authorize to do this.

2. Use TSOLIB command to add "***GRP.SDSNLOAD" to the search order. Do this before starting ISPF

3. Add "***GRP.SDSNLOAD" to the ISPLLIB concatenation before starting ISPF.
Back to top
View user's profile Send private message
sakrat

Active User


Joined: 05 Feb 2014
Posts: 164
Location: India

PostPosted: Fri Jun 05, 2015 6:20 pm
Reply with quote

Pedro wrote:

3. Add "***GRP.SDSNLOAD" to the ISPLLIB concatenation before starting ISPF.


Add to the ISPLLIB means how do I do it. Sorry I couldnt get this point.....
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Fri Jun 05, 2015 6:28 pm
Reply with quote

Pedro wrote:

3. Add "***GRP.SDSNLOAD" to the ISPLLIB concatenation before starting ISPF.

This is the option that we use in our shop. The funny thing is, most of my DSNREXX applications had been needlessly LIBDEFing SDSNLOAD for many years. I had this reinforced when one of our test DB2 subsystems was upgraded to V11 and all of my apps started breaking on -805 sqlcodes. No amount of LIBDEFing could get me out of it; I had to change the ISPLLIB concatenation in our logon proc. icon_redface.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Fri Jun 05, 2015 6:31 pm
Reply with quote

or speak to Your support to find out if the steplib command is available
one can be downloaded and installed from the cbttape,
ASK YOUR SUPPORT

if used well it is one of the most useful tools around
Back to top
View user's profile Send private message
sakrat

Active User


Joined: 05 Feb 2014
Posts: 164
Location: India

PostPosted: Sat Jun 06, 2015 7:38 pm
Reply with quote

enrico-sorichetti wrote:
or speak to Your support to find out if the steplib command is available
one can be downloaded and installed from the cbttape,
ASK YOUR SUPPORT

if used well it is one of the most useful tools around


Is there no other way other than communicating with the support team.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Sat Jun 06, 2015 8:56 pm
Reply with quote

Quote:
Is there no other way other than communicating with the support team.
We don't make such suggestions without thought. When you are told to work with your site support group, it is because there is a lot of z/OS that is customized at each site so what works for one site will utterly fail at another site. And you are asking about data that is specific TO YOUR SITE -- and nowhere else. So unless you talk to your site support group and get information specific to your site, you cannot proceed.
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Tue Jun 09, 2015 6:16 am
Reply with quote

Quote:
Add to the ISPLLIB means how do I do it. Sorry I couldnt get this point.....


There are several file types associated with ISPF. For example, when your program says to display a panel, ISPF searches for it in the panel library concatenation, ISPPLIB. Likewise, when ISPF is searching for load modules it searches in the load module concatenation, ISPLLIB.

Concatenations are just data sets allocated to a particular file name.

I think what you want to do is add your DB2 data set to whatever is already allocated to ISPLLIB. Ask your support if you have the CONCAT or CONCATD command.
Back to top
View user's profile Send private message
sakrat

Active User


Joined: 05 Feb 2014
Posts: 164
Location: India

PostPosted: Tue Jun 09, 2015 3:35 pm
Reply with quote

Pedro wrote:
Quote:
Add to the ISPLLIB means how do I do it. Sorry I couldnt get this point.....


There are several file types associated with ISPF. For example, when your program says to display a panel, ISPF searches for it in the panel library concatenation, ISPPLIB. Likewise, when ISPF is searching for load modules it searches in the load module concatenation, ISPLLIB.

Concatenations are just data sets allocated to a particular file name.

I think what you want to do is add your DB2 data set to whatever is already allocated to ISPLLIB. Ask your support if you have the CONCAT or CONCATD command.


Thanks, I found the solution and have got doubt on another line ,

When using FETCH we specify the field names after FETCH INTO but what is i want to fetch the entire table ways based on the table name the user mentions....?

Can you give some idea on it...?
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Tue Jun 09, 2015 9:13 pm
Reply with quote

Regarding DB2 stuff, I think you will get better answers by asking in the DB2 forum.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Wed Jun 10, 2015 7:41 pm
Reply with quote

sakrat wrote:
When using FETCH we specify the field names after FETCH INTO but what is i want to fetch the entire table ways based on the table name the user mentions....?

What is "the entire table ways" ?
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2454
Location: Hampshire, UK

PostPosted: Wed Jun 10, 2015 11:12 pm
Reply with quote

Don't know about DB2 but with Rexx on the PC using RexxSQL to access an SQLite database simply do a SELECT without a WHERE and fetch rows until rowcount is 0.


OK - a few hours later I have found an old m/f Rexx program that processes a cursor: SELECT followed by FETCH followed by a loop processing the returned rowand FETCH the next row until FETCH gives non-zero return code.
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Thu Jun 11, 2015 5:51 pm
Reply with quote

sakrat wrote:

Thanks, I found the solution and have got doubt on another line ,

When using FETCH we specify the field names after FETCH INTO but what is i want to fetch the entire table ways based on the table name the user mentions....?

Can you give some idea on it...?

If the name of the table is not known to the program because it is supplied by the user, then you will have to deal with the SQLDA.
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Mark Previous & next lines when a... DFSORT/ICETOOL 9
No new posts Inserting into table while open selec... DB2 1
No new posts How I Found a Bug in a FORTRAN Compiler All Other Mainframe Topics 4
No new posts A directory in the pathname was not f... ABENDS & Debugging 0
No new posts I need a 4 lines block where substrin... DFSORT/ICETOOL 12
Search our Forums:

Back to Top