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.
REXX query
- 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
You should find another job.
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
robert.ah.prins @ the.17+Gb.Google thingy
Re: REXX query
Thanks but I am new to REXX just learning from last month.
Re: REXX query
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
Once you know what to do, then you can try and code it in REXX
- Pedro
- Posts: 686
- Joined: Thu Jul 31, 2008 9:59 pm
- Skillset: ISPF
- Referer: google
- Location: Silicon Valley
Re: REXX query
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.
You need to figure out how to build and submit the job from rexx.
Pedro Vera
-
- 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
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:
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.
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
-
- 7
- 11554
-
by AusZosGuy
View the latest post
Fri Sep 10, 2021 6:40 pm
-
- 0
- 2568
-
by JIMDOOEY
View the latest post
Tue Mar 01, 2022 8:48 am
-
- 1
- 2491
-
by enrico-sorichetti
View the latest post
Fri Apr 02, 2021 6:56 pm
-
- 12
- 2991
-
by sergeyken
View the latest post
Mon Sep 25, 2023 3:33 am
-
- 5
- 2708
-
by Pedro
View the latest post
Sat Feb 06, 2021 4:56 am