REXX query

IBM's Command List programming language & Restructured Extended Executor
kbkanade
Posts: 5
Joined: Wed Nov 14, 2018 3:07 pm
Skillset: Cobol JCL VSAM DB2
Referer: Google

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.

User avatar
prino
Posts: 641
Joined: Wed Mar 11, 2009 12:22 am
Skillset: PL/I - CICS - DB2 - IDMS - REXX - JCL, most in excess of three decades
Referer: Google
Location: Vilnius, Lithuania
Contact:

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

kbkanade
Posts: 5
Joined: Wed Nov 14, 2018 3:07 pm
Skillset: Cobol JCL VSAM DB2
Referer: Google

Re: REXX query

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

Thanks but I am new to REXX just learning from last month.

expat
Posts: 459
Joined: Sat Jun 09, 2007 3:21 pm

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

User avatar
Pedro
Posts: 686
Joined: Thu Jul 31, 2008 9:59 pm
Skillset: ISPF
Referer: google
Location: Silicon Valley

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

willy jensen
Posts: 474
Joined: Thu Mar 10, 2016 5:03 pm
Skillset: assembler rexx zOS ispf racf smf
Referer: saw it in the experts foprum thought I could help here

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:

Code: Select all

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.


  • Similar Topics
    Replies
    Views
    Last post