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

Running a REXX pgm (accessing DB2) and passing some paramete


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Red Rabbit

New User


Joined: 06 Apr 2006
Posts: 5
Location: Kolkata

PostPosted: Thu May 11, 2006 3:13 pm
Reply with quote

We are facing a problem in executing a REXX program (accessing DB2) with parameter passing option through JCL.

Actually we have tried the below two methods to execute the REXX in batch



Through ISPSTART

Code:

//JSTY010  EXEC PGM=IKJEFT01,DYNAMNBR=999                   

//SYSPROC  DD   DSN=MYLIB.REXX.EXEC,DISP=SHR               

//ISPPLIB  DD   DSN=SYS1.SISPPENU,DISP=SHR                   

//ISPSLIB  DD   DSN=SYS1.SISPSENU,DISP=SHR                   

//ISPMLIB  DD   DSN=SYS1.SISPMENU,DISP=SHR                   

//ISPTLIB  DD   DSN=SYS1.SISPTENU,DISP=SHR                   

//ISPTABL  DD   DSN=&&ISPTABL,DISP=(,PASS),UNIT=VIO,         

//         SPACE=(CYL,(10,1,20))                             

//ISPPROF  DD   DSN=&&ISPPROF,DISP=(,PASS),UNIT=VIO,         

//         SPACE=(CYL,(1,1,10)),LRECL=80,RECFM=FB,BLKSIZE=0 

//ISPLOG   DD   SYSOUT=*,DCB=(RECFM=VA,LRECL=125,BLKSIZE=129)

//SYSTSPRT DD   SYSOUT=*                                     

//SYSTSIN  DD   *                                           

  ISPSTART CMD(PGMNAME 20061202)                           

/*                                                           



Here PGMNAME is REXX program and 20061202 is hardcode parameter



But here the problem is that it only takes hardcode parameter, but our need is to pass variable name as parameter.



Through Parm

Code:

//JS0020   EXEC PGM=IKJEFT1B,DYNAMNBR=20,                 

//           PARM='PGMNAME 20060405'                   

//*                                                       

//SYSPROC  DD DSN=MYLIB.REXX.EXEC,DISP=SHR             

//ISPPROF  DD UNIT=VIO,SPACE=(6160,(3,1,1)),             

//         DCB=(LRECL=80,BLKSIZE=0,RECFM=FB,DSORG=PO)     

//ISPPLIB  DD DSN=SYSTSO.MET.ISPPLIB,DISP=SHR             

//         DD DSN=SYS1.SISPPENU,DISP=SHR                 

//ISPMLIB  DD DSN=SYSTSO.MET.ISPMLIB,DISP=SHR             

//         DD DSN=SYS1.SISPMENU,DISP=SHR                 

//ISPSLIB  DD DSN=SYSTSO.MET.ISPPLIB,DISP=SHR             

//         DD DSN=SYS1.SISPPENU,DISP=SHR                 

//ISPTLIB  DD DSN=SYSTSO.MET.ISPPLIB,DISP=SHR             

//         DD DSN=SYS1.SISPPENU,DISP=SHR                 

//         DD DSN=SYSTSO.MET.ISPTLIB,DISP=SHR             

//         DD DSN=SYS1.SISPTENU,DISP=SHR                 

//ISPLLIB  DD DSN=MYLIB.DB2TEST.DSNLOAD.LIB00,DISP=SHR

//SYSOUT   DD SYSOUT=*                                   

//SYSTSPRT DD SYSOUT=*,                                   

//         DCB=(RECFM=FBA,LRECL=00133,BLKSIZE=0)           





Here the problem is different , after execution it shows the following error :


Quote:

20060405

17 +++ s_rc = rxsubcom('ADD','DSNREXX','DSNREXX')

IRX0043I Error running PGMNAME, line 17: Routine not found



Actually , I am using the rxsubcom to add DB2 environment in our REXX program. But if you see I had already mentioned the ISPLLIB where this

rxsubcom routine resides.



Could any one of you provide some help in this regard.
Back to top
View user's profile Send private message
jz1b0c

Active User


Joined: 25 Jan 2004
Posts: 160
Location: Toronto, Canada

PostPosted: Fri May 12, 2006 1:21 am
Reply with quote

Guys,

I am not sure what does your rexx contain,
so I have created my own rexx to run in batch mode accessing Db2
and this one is working fine...

Give a try..

//REXBAT EXEC PGM=IKJEFT01
//*
//SYSEXEC DD DSN=JZ1B0C.JZ1B0C.CLIST,DISP=SHR
//*
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSTSIN DD *
%DB2BATCH AA01
//*
//*
//*

attaching my rexx
Back to top
View user's profile Send private message
jz1b0c

Active User


Joined: 25 Jan 2004
Posts: 160
Location: Toronto, Canada

PostPosted: Fri May 12, 2006 1:22 am
Reply with quote

forgot to mention this is where my rexx is

JZ1B0C.JZ1B0C.CLIST(DB2BATCH)
Back to top
View user's profile Send private message
Red Rabbit

New User


Joined: 06 Apr 2006
Posts: 5
Location: Kolkata

PostPosted: Fri May 12, 2006 10:19 am
Reply with quote

I tried the same approach. However, I was getting the error message for RXSUBCOM:

Code:
IRX0043I Error running PGMNAME, line 17: Routine not found


Do I need to change any settings or need to install some DB2-REXX language support tool????
Back to top
View user's profile Send private message
jz1b0c

Active User


Joined: 25 Jan 2004
Posts: 160
Location: Toronto, Canada

PostPosted: Fri May 12, 2006 7:30 pm
Reply with quote

Why don't you attach your Rexx and JCL ? the ones that you are using.

That would help some one answering/understanding the problem.
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 -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
Search our Forums:

Back to Top