View previous topic :: View next topic
|
Author |
Message |
thesumitk
Active User
Joined: 24 May 2013 Posts: 156 Location: INDIA
|
|
|
|
HI All,
I am runing below rexx code to connect the db2 thru rexx but getting the error message displayed below the code.
Code: |
address tso "subcom dsnrexx"
If rc <> 0 then do
address tso "alloc dd(sdsnload) da('sys7.d2pg.sdsnload') shr reu"
address tso "steplib sdsnload"
X = RXSUBCOM('ADD','DSNREXX','DSNREXX')
say rc
end
call check_prod_cycle
check_prod_cycle:
address tso "subcom dsnrexx"
"subcom dsnrexx"
RC(-3) +++
If rc <> 0
"1"
then
do
address tso "alloc dd(sdsnload) da('sys7.d2pg.sdsnload') shr reu"
"alloc dd(sdsnload) da('sys7.d2pg.sdsnload') shr reu"
RC(-3) +++
address tso "steplib sdsnload"
"steplib sdsnload"
RC(-3) +++
X = RXSUBCOM('ADD','DSNREXX','DSNREXX')
*-* X = RXSUBCOM('ADD','DSNREXX','DSNREXX')
+++ X = RXSUBCOM('ADD','DSNREXX','DSNREXX')
+++ call check_prod_cycle
3I Error running JCLREX, line 446: Routine not found |
When I am runing this code stand alone it is working fine but I am adding this as a function to my main program it is giving this error .. PLease help
Thanks |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
Show the JCL. |
|
Back to top |
|
|
thesumitk
Active User
Joined: 24 May 2013 Posts: 156 Location: INDIA
|
|
|
|
Code: |
//JS001 EXEC PGM=IRXJCL,REGION=0K,PARM='JCLREX'
//SYSEXEC DD DSN=EXEC,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD DUMMY,BLKSIZE=80
//IN DD DSN=D1,DISP=OLD
//DLTCNT DD DSN=D2,DISP=OLD
//SUBJ DD DSN=D3,DISP=OLD
//ERSUBJ1 DD DSN=D4,DISP=OLD
//ERSUBJ DD DSN=D5,DISP=OLD
//BCDTM DD DSN=D6,DISP=SHR
//OUT DD DSN=D7,DISP=SHR
//ERR DD DSN=D8,DISP=SHR
//SYSOUT DD SYSOUT=* |
|
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
As you are trying to execute TSO commands you need to be in TSO so you need to execute IKJEFT01 not IRXJCL. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
You are sending commands to the TSO environment, which does not exist (you're running the vanilla Rexx interpreter). Run your exec in background TSO instead. |
|
Back to top |
|
|
thesumitk
Active User
Joined: 24 May 2013 Posts: 156 Location: INDIA
|
|
|
|
Code: |
//JS001 EXEC PGM=IKJEFT01,REGION=0K,PARM='JCLREX |
below is the sysout
Code: |
COMMAND STEPLIB NOT FOUND
445 *-* address tso "steplib sdsnload"
+++ RC(-3) +++
446 +++ X = RXSUBCOM('ADD','DSNREXX','DSNREXX')
78 +++ call check_prod_cycle
Error running JCLREX, line 446: Routine not found |
|
|
Back to top |
|
|
thesumitk
Active User
Joined: 24 May 2013 Posts: 156 Location: INDIA
|
|
|
|
looks like Main problem is in below sysout
Code: |
442 *-* address tso "subcom dsnrexx"
>>> "subcom dsnrexx"
+++ RC(1) +++ |
|
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
thesumitk wrote: |
looks like Main problem is in below sysout
Code: |
442 *-* address tso "subcom dsnrexx"
>>> "subcom dsnrexx"
+++ RC(1) +++ |
|
Wrong; RC = 1 from SUBCOM merely tells you that the environment (DSNREXX in this case) does not exist. The real problem is that your environment does not have a (proprietary) STEPLIB command. Read up on the TSOLIB command and use it instead. |
|
Back to top |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 765 Location: Whitby, ON, Canada
|
|
|
|
If you are running in batch, then why not just use a //STEPLIB dd to point to sys7.d2pg.sdsnload ? |
|
Back to top |
|
|
thesumitk
Active User
Joined: 24 May 2013 Posts: 156 Location: INDIA
|
|
|
|
Ok..Thanks
I have used this in my onlne program and it is working fine .. Wil lwork with MVS team to check how to setteh env for runing DB2 thru rexx
Thanks for your help !! |
|
Back to top |
|
|
|