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
 

 

Read the member from file,use that in Bind JCL and submit

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
Aham

New User


Joined: 24 Oct 2007
Posts: 42
Location: chennai

PostPosted: Thu Dec 27, 2007 9:22 pm    Post subject: Read the member from file,use that in Bind JCL and submit
Reply with quote

I have a dataset FB 80 which has the COBOL members that need to binded to a DB2 region. I have a bind JCL where I have to change the member name alone and submit. I have to do this for a long list of programs. Is there a way I can do it using REXX ?
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Thu Dec 27, 2007 9:33 pm    Post subject: Reply to: Read the member from file,use that in Bind JCL an
Reply with quote

I don't see anything so far in your description that would indicate that you can't.
Back to top
View user's profile Send private message
Ganesh.Deokar

New User


Joined: 30 Sep 2005
Posts: 26
Location: Buffalo,NY

PostPosted: Fri Dec 28, 2007 12:58 am    Post subject: Reply to: Read the member from file,use that in Bind JCL an
Reply with quote

1) Create a list of all the members(programs) you want to bind and store them in a PS file or PDS member.
2) Write a small REXX program to read this file and write the member name into bind syntax. You can write multiple bind statements in a single step.

The code will be like this:

Code:
/*REXX*/
address tso                                                 
"alloc da('XXXX.XXX.bindjcl') fi(jcl) shr reuse"             
"execio * diskr jcl (stem write. finis"                     
write.1 ='//'jclname' JOB PRTY=03,'                         
write.2 ='//            REGION=8M,'                         
write.3 ='//            MSGCLASS=M,'                         
write.4 ='//            MSGLEVEL=(1,1)'                     
write.5 ='//*'                                               
write.6 ='//BINDPACK EXEC PGM=IKJEFT01,DYNAMNBR=20'         
write.7 ='//DBRMLIB   DD  DISP=SHR,DSN=your.dbrmlib'         
write.8 ='//SYSTSPRT  DD  SYSOUT=*'                         
write.9 ='//SYSTSIN   DD  *'                                 
w = 9                                                       
"alloc da('XXXXXX.XXXX.member.list') fi(input) shr reuse"   
"execio * diskr input (stem read. finis"                     
do i = 1 to read.0 by 1                                     
   member = word(read.i,1)                                   
   w = w + 1                                                         
   write.w = '  DSN SYSTEM(DSN)'                                     
   w = w + 1                                                         
   write.w = '  BIND PACKAGE(name) MEMBER('member') ISOLATION(CS) -'
   w = w + 1                                                         
   write.w = '  VALIDATE(BIND) RELEASE(COMMIT) CURRENTDATA(NO) -'   
   w = w + 1                                                         
   write.w = '  DEGREE(ANY) EXPLAIN(NO)'                             
end                                                                 
"execio * diskw jcl (stem write. finis"                   
Back to top
View user's profile Send private message
Aham

New User


Joined: 24 Oct 2007
Posts: 42
Location: chennai

PostPosted: Fri Dec 28, 2007 1:28 pm    Post subject: Reply to: Read the member from file,use that in Bind JCL
Reply with quote

Hi Ganesh.Deokar! I am extremely grateful to you! I checked this and it works fine. Though this is simple coding I am pretty new to rexx and I do not know much abouot this
Quote:
You can write multiple bind statements in a single step.


I do not know this earlier . Thanks for the info
Back to top
View user's profile Send private message
Aham

New User


Joined: 24 Oct 2007
Posts: 42
Location: chennai

PostPosted: Fri Dec 28, 2007 8:13 pm    Post subject: Reply to: Read the member from file,use that in Bind JCL
Reply with quote

Code:
say 'Enter the Library name to place the bind' 
pull bindjcl
"alloc da('bindjcl') fi(jcl) shr reuse"


If at all I want to accept the bind jcl name from the user Can I code something like above? Because I am getting RC 0 but JCL is not built. If the JCL name is hardcoded everything looks fine. Please advice.
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Fri Dec 28, 2007 8:57 pm    Post subject:
Reply with quote

I tried it with "trace all" and found that it was allocating a dataset called BINDJCL.
The following seems to work.
Code:
/* REXX TEST */                               
TRACE ALL                                     
SAY 'ENTER THE LIBRARY NAME TO PLACE THE BIND'
PULL BINDJCL                                 
"ALLOC DA('"||BINDJCL||"') FI(JCL) SHR REUSE"
Back to top
View user's profile Send private message
Aham

New User


Joined: 24 Oct 2007
Posts: 42
Location: chennai

PostPosted: Fri Dec 28, 2007 10:11 pm    Post subject: Reply to: Read the member from file,use that in Bind JCL
Reply with quote

Thank you Douglas
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm


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