Need to retrieve the datasets from jcl using rexx



IBM's Command List programming language & Restructured Extended Executor

Re: Need to retrieve the datasets from jcl using rexx

Postby harsha vardhan reddy » Sat Apr 23, 2011 8:48 am

Thanks a lot for quick reply & the information provided.
Me to have encountered the same issues so thats the reason i have posted this query so that i can get some help.. There are many issues to be sorted out for this to be implemented. Any way i will speak to them and let u know future..Thanks in advance..:)
harsha vardhan reddy
 
Posts: 14
Joined: Fri Apr 22, 2011 7:34 am
Has thanked: 0 time
Been thanked: 0 time

Re: Need to retrieve the datasets from jcl using rexx

Postby harsha vardhan reddy » Sun Apr 24, 2011 6:53 am

Hi,

Can any one help me out in reading a Job using REXX.
I need to scan then entire job and retrieve the dd names & some other parameters..

Thanks in advance
harsha vardhan reddy
 
Posts: 14
Joined: Fri Apr 22, 2011 7:34 am
Has thanked: 0 time
Been thanked: 0 time

Re: Need to retrieve the datasets from jcl using rexx

Postby steve-myers » Sun Apr 24, 2011 7:40 am

I wonder if you've been reading these posts.
steve-myers wrote:Oh, you want code that will scan JCL. This is very difficult, more than you think...
CA Technologies (or whatever they're calling themselves this week) gets the big bucks for their JCL analyzer, as do vendors of competitive products for a reason, and it ain't because it's easy!
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: Need to retrieve the datasets from jcl using rexx

Postby enrico-sorichetti » Sun Apr 24, 2011 12:26 pm

here is the link to a working jcl scanner/parser/reformatter
http://ibmmainframes.com/about32494.html

as is now is working using open object rexx or regina rexx on a pc
the original was written as an edit macro
should be easy to review it to report it back to the tso environment
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 165 times

Re: Need to retrieve the datasets from jcl using rexx

Postby harsha vardhan reddy » Sun Apr 24, 2011 2:04 pm

Thanks a lot for your quick response & the link provided..:)
harsha vardhan reddy
 
Posts: 14
Joined: Fri Apr 22, 2011 7:34 am
Has thanked: 0 time
Been thanked: 0 time

Re: Need to retrieve the datasets from jcl using rexx

Postby harsha vardhan reddy » Wed Apr 27, 2011 3:35 am

Hi,

I need some help in retrieving a dataset names.
Am able to retrieve the dd names from a job. Now i want to retrieve the dataset names corresponding to a particular ddname that has already extracted.
harsha vardhan reddy
 
Posts: 14
Joined: Fri Apr 22, 2011 7:34 am
Has thanked: 0 time
Been thanked: 0 time

Re: Need to retrieve the datasets from jcl using rexx

Postby enrico-sorichetti » Wed Apr 27, 2011 4:46 am

the code snippet I provided can extract also the dataset names!
but naturally You did not care to read it and try to understand it!

also no reason to post the same question multiple times on different forums!
given that the object rexx help forum is not the right place to ask this kind of questions!
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 165 times

Re: Need to retrieve the datasets from jcl using rexx

Postby harsha vardhan reddy » Wed Apr 27, 2011 5:46 am

enrico-sorichetti wrote:the code snippet I provided can extract also the dataset names!
but naturally You did not care to read it and try to understand it!

also no reason to post the same question multiple times on different forums!
given that the object rexx help forum is not the right place to ask this kind of questions!


Hi enrico,

Thats not my intention to post in all forums. Am going through the code and trying to understand it.
Am just trying to work on my task taking one step at a time with the help of you guys.
harsha vardhan reddy
 
Posts: 14
Joined: Fri Apr 22, 2011 7:34 am
Has thanked: 0 time
Been thanked: 0 time

Re: Need to retrieve the datasets from jcl using rexx

Postby harsha vardhan reddy » Tue May 03, 2011 9:12 pm

Hi,
i can able to read the jcl from spool & i have copied it to a dataset..
Now i treated that jcl as input and read to retrieve the data sets..

so can any one help me how to proceed future..
harsha vardhan reddy
 
Posts: 14
Joined: Fri Apr 22, 2011 7:34 am
Has thanked: 0 time
Been thanked: 0 time

Re: Need to retrieve the datasets from jcl using rexx

Postby harsha vardhan reddy » Sun Jun 12, 2011 7:41 am

HI,

I need to retrieve the data from spool corresponding to ddname & step name..
When am trying to do it say "SYSIN" is my ddname & "TSCRACTH" is my step name..There are more than one SYSIN so the data i need is corresponding to TSCRACTH stepname, but it is getting retrieved from the first SYSIN only..

Here is the code i have tried..

/***************REXX**************/
ADDRESS TSO
"alloc f(isfin) tracks space(1) reu"            /* used by sdsf     */
"alloc f(isfout) new delete reu " ,             /* used by sdsf     */
"tracks space(100,100) lrecl(133) recfm(f,b,a) dsorg(ps)"
"alloc f(temp1) da('z198.SAMPLE.output1') shr"

/*SAY 'ENTER JOBID:'
  PULL ID
  jobid = strip(ID)

  JOBID = 'JOB02911'

  SAY 'ENTER JOBNAME:'
  PULL JNAME
  JOBNM = STRIP(JNAME) */

RC = ISFCALLS(ON)
ISFPREFIX = "TB796"
ADDRESS SDSF "ISFEXEC ST"
IF RC <> 0 THEN
DO
 SAY 'ERROR'
 EXIT 20
END
LOOP = ISFROWS
DO I = 1 TO LOOP
 COLVAL = VALUE(JOBID.I)
 IF COLVAL = 'JOB07050' THEN
 DO
  ADDRESS SDSF "ISFACT ST TOKEN('"TOKEN.I"') PARM(NP ?)"
  IF RC <> 0 THEN EXIT
  DO J = 1 TO STEPN.0
    IF STEPN.J = 'TSCRATCH' THEN
      IF DDNAME.J = 'SYSIN' THEN
        do

QUEUE "PRE" TB796
queue "st"
/*queue "filter jobid eq "jobid*/
QUEUE "FIND " COLVAL
queue "++?"                                 /* open output of job    */
queue "find" SYSIN
queue "++S"
say ' am after sysin '
queue "print file temp1"                /* print to temp dataset */
queue "print 1 999999"
queue "print close"
queue "end"
queue "exit"
"execio" queued()" diskw isfin (finis"     /* input to sdsf batch   */
address ispexec "select pgm(isfafd) parm('++25,80')"/* invoke sdsf */
  END
  END
 END
END
RC = ISFCALLS(OFF)
--------------X--------------
harsha vardhan reddy
 
Posts: 14
Joined: Fri Apr 22, 2011 7:34 am
Has thanked: 0 time
Been thanked: 0 time

PreviousNext

Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post