View previous topic :: View next topic
|
Author |
Message |
Priyanka Pyne
New User
Joined: 09 Feb 2008 Posts: 95 Location: India
|
|
|
|
Hi,
I want to connect to DB2 to query on a table directly through REXX. Below is how it was coded:
Code: |
INITPROC:
ADDRESS ISPEXEC
"LIBDEF ISPPLIB DATASET ID('DB2T.DBDC.DSNLOAD')"
SAY 'RC ' RC
ADDRESS TSO "SUBCOM DSNREXX"
SAY 'RC ' RC
IF RC > 0 THEN
DO
S_RC=RXSUBCOM('ADD','DSNREXX','DSNREXX')
END |
error thrown
Code: |
173 *-* S_RC=RXSUBCOM('ADD','DSNREXX','DSNREXX')
>L> "ADD"
>L> "DSNREXX"
>L> "DSNREXX"
173 +++ S_RC=RXSUBCOM('ADD','DSNREXX','DSNREXX')
35 +++ CALL INITPROC
Error running REXCALDB, line 173: Routine not found |
I have verified that RXSUBCOM exists in load library DB2T.DBDC.DSNLOAD
Please suggest some solution |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Suggest that you try using ISPLLIB rather than ISPPLIB for the load library allocation |
|
Back to top |
|
|
Priyanka Pyne
New User
Joined: 09 Feb 2008 Posts: 95 Location: India
|
|
|
|
Tried that. Not working |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
I expected it not to work
see here why
ibmmainframes.com/viewtopic.php?t=60341&highlight=libdef+directed
the message You received is quite strange
You should have received something like
Code: |
IRX0250E System abend code 806, reason code 00000004.
IRX0253E Abend in external function RXSUBCOM.
3 +++ zzzz = RXSUBCOM("ADD","DSNREXX","DSNREXX")
IRX0040I Error running ZSNIPPT, line 3: Incorrect call to routine
|
|
|
Back to top |
|
|
Priyanka Pyne
New User
Joined: 09 Feb 2008 Posts: 95 Location: India
|
|
|
|
Thanks for the reply. I was discussing the same with few of my teammember they also tolde the same kind of thing. I guess i need to talk to my support team. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Try using the TSOLIB command when you first logon.
Quote: |
Tried that. Not working |
It is not clear why you would then try putting a load library into the panel concatenation and showing us that version. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
seems that the TS changed the LIBDEF to ISPLLIB
anyway the behavior i still murky ...
a quick and dirty test showed that
REXX will not know about modules in a LIBDEF ISPLLIB
but DOES know about modules in the ISPLLIB concatenation
ISPF will find things because IT KNOWS about active LIBDEFs and can use a directed load
REXX will simply use the standard search hierarchy
most probably at ISPF startup ISPLLIB is considered as a TASKLIB so it becomes part of the standard search for everybody
for these issues DEFINITELY the shop support intervention is required
TSOLIB need to be issued in a raw tso environment
but usually most shops do not let people do that |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
Priyanka Pyne wrote: |
Thanks for the reply. I was discussing the same with few of my teammember they also tolde the same kind of thing. I guess i need to talk to my support team. |
Talk to them about dynamic STEPLIB tools for TSO. |
|
Back to top |
|
|
chaoj
Active User
Joined: 03 Jun 2010 Posts: 103 Location: Dalian
|
|
|
|
Priyanka Pyne wrote: |
Hi,
I want to connect to DB2 to query on a table directly through REXX. Below is how it was coded:
Code: |
INITPROC:
ADDRESS ISPEXEC
"LIBDEF ISPPLIB DATASET ID('DB2T.DBDC.DSNLOAD')"
SAY 'RC ' RC
ADDRESS TSO "SUBCOM DSNREXX"
SAY 'RC ' RC
IF RC > 0 THEN
DO
S_RC=RXSUBCOM('ADD','DSNREXX','DSNREXX')
END |
error thrown
Code: |
173 *-* S_RC=RXSUBCOM('ADD','DSNREXX','DSNREXX')
>L> "ADD"
>L> "DSNREXX"
>L> "DSNREXX"
173 +++ S_RC=RXSUBCOM('ADD','DSNREXX','DSNREXX')
35 +++ CALL INITPROC
Error running REXCALDB, line 173: Routine not found |
I have verified that RXSUBCOM exists in load library DB2T.DBDC.DSNLOAD
Please suggest some solution |
I also encountered this before , it was because the logon procedure , if your logon procedure does not allocate the corresponding LIB , you could not run RXSUBCOM , you'd better change your logon proc |
|
Back to top |
|
|
|