Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Running a REXX pgm (accessing DB2) and passing some paramete
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    Post subject: Re: Running a REXX pgm (accessing DB2) and passing some para
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    Post subject:
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts REXX to get the all datasets name parasmalik20 CLIST & REXX 5 Tue Jul 18, 2017 9:10 pm
No new posts How system know which REXX to excute? jackzhang75 CLIST & REXX 14 Thu Jul 06, 2017 1:09 am
No new posts REXX - Dynamic file Creation d_sarlie CLIST & REXX 7 Tue Jun 27, 2017 7:30 pm
No new posts REXX WTO for console message bipinpeter CLIST & REXX 6 Tue Jun 27, 2017 3:56 pm
No new posts Convert CLIST to REXX cvnlynn CLIST & REXX 12 Tue Jun 27, 2017 2:06 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us