Page 2 of 3

Re: Need to retrieve the datasets from jcl using rexx

PostPosted: Sat Apr 23, 2011 8:48 am
by harsha vardhan reddy
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..:)

Re: Need to retrieve the datasets from jcl using rexx

PostPosted: Sun Apr 24, 2011 6:53 am
by harsha vardhan reddy
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

Re: Need to retrieve the datasets from jcl using rexx

PostPosted: Sun Apr 24, 2011 7:40 am
by steve-myers
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!

Re: Need to retrieve the datasets from jcl using rexx

PostPosted: Sun Apr 24, 2011 12:26 pm
by enrico-sorichetti
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

Re: Need to retrieve the datasets from jcl using rexx

PostPosted: Sun Apr 24, 2011 2:04 pm
by harsha vardhan reddy
Thanks a lot for your quick response & the link provided..:)

Re: Need to retrieve the datasets from jcl using rexx

PostPosted: Wed Apr 27, 2011 3:35 am
by harsha vardhan reddy
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.

Re: Need to retrieve the datasets from jcl using rexx

PostPosted: Wed Apr 27, 2011 4:46 am
by enrico-sorichetti
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!

Re: Need to retrieve the datasets from jcl using rexx

PostPosted: Wed Apr 27, 2011 5:46 am
by harsha vardhan reddy
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.

Re: Need to retrieve the datasets from jcl using rexx

PostPosted: Tue May 03, 2011 9:12 pm
by harsha vardhan reddy
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..

Re: Need to retrieve the datasets from jcl using rexx

PostPosted: Sun Jun 12, 2011 7:41 am
by harsha vardhan reddy
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--------------