REXX query



IBM's Command List programming language & Restructured Extended Executor

REXX query

Postby kbkanade » Thu Nov 15, 2018 10:30 am

Hi Experts,
I need some help for REXX on below topics. Can i get some high level logic for below on how we can do this.
1. By giving “DB2 Tables”as an input, REXX should show all Cobol programs using that DB2 table.
2. By giving JCL name as input, REXX should show all the programs executed by that JCL.
kbkanade
 
Posts: 5
Joined: Wed Nov 14, 2018 3:07 pm
Has thanked: 0 time
Been thanked: 0 time

Re: REXX query

Postby prino » Thu Nov 15, 2018 12:26 pm

You should find another job.
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 635
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 28 times

Re: REXX query

Postby kbkanade » Thu Nov 15, 2018 12:33 pm

Thanks but I am new to REXX just learning from last month.
kbkanade
 
Posts: 5
Joined: Wed Nov 14, 2018 3:07 pm
Has thanked: 0 time
Been thanked: 0 time

Re: REXX query

Postby expat » Thu Nov 15, 2018 12:42 pm

Click HERE to see if this helps you find what you need.

Once you know what to do, then you can try and code it in REXX
expat
 
Posts: 459
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 8 times

Re: REXX query

Postby Pedro » Fri Nov 16, 2018 12:49 am

I recommend using the SRCHFOR utility of ISPF to search for text in a PDS. It will write a file that shows which members refer to the text.

You need to figure out how to build and submit the job from rexx.
Pedro Vera
User avatar
Pedro
 
Posts: 684
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Re: REXX query

Postby willy jensen » Fri Nov 16, 2018 3:19 pm

Something of a mouthfull for a newbie.
I dont know much about DB2 tables, so I will comment on item 2 " By giving JCL name as input, REXX should show all the programs executed by that JCL"
Reading a JCL, if stored in a PDS, is trivial. The traditional method is using TSO commands ALLOCATE and FREE, and REXX command EXECIO.
Alternatively you can use the TSO PRINT command as follows:
zz=outtrap('lst.')                                
 "print indataset('datasetname') char"  
 zz=outtrap('off')                                  
 do n=2 to lst.0 by 2                              
   say lst.n                                      
 end

Then it is up you you to scan the result and extract the program names. Hint, lookup REXX commands POS and SUBSTR. Though of course some of the steps in the JCL could be procedures.
willy jensen
 
Posts: 455
Joined: Thu Mar 10, 2016 5:03 pm
Has thanked: 0 time
Been thanked: 69 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post