View previous topic :: View next topic |
Author |
Message |
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12369 Topics: 75 Location: San Jose
|
Posted: Wed May 11, 2011 12:46 pm Post subject: Re: Retrieving the dataset names using REXX |
|
|
harsha vardhan reddy wrote: | Hi stefan,
The link which was provided by you is not any more available i think..
Yes stefan similar to that.. Not exactly for scanner but it needs to read the jcl as input file & could retrieve the datasets from that.. |
harsha vardhan reddy,
There is a dot at the end of the link. I edited the post and removed that and now the link works fine.
Check it now
Kolusu |
|
Back to top |
|
|
harsha vardhan reddy Beginner
Joined: 23 Apr 2011 Posts: 22 Topics: 3
|
Posted: Wed May 11, 2011 7:18 pm Post subject: Re: Retrieving the dataset names using REXX |
|
|
Hi kolusu,
Thanks a lot..
Now i can able to access that link |
|
Back to top |
|
|
papadi Supermod
Joined: 20 Oct 2009 Posts: 594 Topics: 1
|
Posted: Fri May 13, 2011 3:58 pm Post subject: |
|
|
"By making use of stem i can able to read the DSN parameters, now i need to check if that particular data set is input or output for that jcl.."
If a disp is OLD or SHR, how might you know if this is input or output (or both) . . .? _________________ All the best,
di |
|
Back to top |
|
|
misi01 Advanced
Joined: 02 Dec 2002 Posts: 626 Topics: 175 Location: Stockholm, Sweden
|
Posted: Sat May 14, 2011 1:27 am Post subject: |
|
|
Funny, I didn't have any problems following the links _________________ Michael |
|
Back to top |
|
|
harsha vardhan reddy Beginner
Joined: 23 Apr 2011 Posts: 22 Topics: 3
|
Posted: Sat May 14, 2011 7:49 pm Post subject: |
|
|
Hi,
The jcl which i used to retrieve the datasets includes scratch statements from that i can get the output datasets & i will check whether they are cataloged or not.. The only problem is with the input datasets.. |
|
Back to top |
|
|
harsha vardhan reddy Beginner
Joined: 23 Apr 2011 Posts: 22 Topics: 3
|
Posted: Fri Jun 03, 2011 10:47 pm Post subject: |
|
|
Hi,
Am able to retrieve the data sets which include input & out put.
I need small help in parsing a string..
LFTEST.R911V000.P2D1T.LF.LFFAPL.SLFBF
Say this is my input string. Now i need to parse this & get the count of the delimiter "."(period)
This should be done dynamically as the input parameter changes like
LF.STAGE.LOAD
LFTEST.R911V000.INT.LOAD
so need some help in parsing this data.. Please help me out..
Thanks in advance... |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12369 Topics: 75 Location: San Jose
|
Posted: Sat Jun 04, 2011 1:39 am Post subject: |
|
|
harsha vardhan reddy,
Code: |
/* REXX */
INSTR = 'LFTEST.R911.INT.STAGE.LOAD'
SAY 'NO: OF . ARE : ' WORDS(TRANSLATE(INSTR,' ','.')) - 1
EXIT
|
Kolusu |
|
Back to top |
|
|
harsha vardhan reddy Beginner
Joined: 23 Apr 2011 Posts: 22 Topics: 3
|
Posted: Mon Jun 06, 2011 11:42 am Post subject: |
|
|
Thanks a lot Kolusu..
Its working fine..My requirement is almost done.. |
|
Back to top |
|
|
harsha vardhan reddy Beginner
Joined: 23 Apr 2011 Posts: 22 Topics: 3
|
Posted: Tue Jun 07, 2011 11:17 am Post subject: |
|
|
Hi,
I need one more help from you guys..
I need to retrieve the data from spool from a particular job.
i have a step name say 'xyz' i need the data corresponding to that step name.
i can able to retrieve the data for jesjcl but not able to do for a particular step name..
Thanks in advance |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12369 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
harsha vardhan reddy Beginner
Joined: 23 Apr 2011 Posts: 22 Topics: 3
|
Posted: Wed Jun 08, 2011 11:21 pm Post subject: |
|
|
Hi,
Thanks for your quick responce..
I have a step name TSCRATCH in spool and the corresponding DDname is SYSIN. now i need to extract the data from it.
When am trying to do that i have one more ddname with same name SYSIN.It is retrieving tha data from the 1st SYSIN only..Can some one help me in this.. |
|
Back to top |
|
|
papadi Supermod
Joined: 20 Oct 2009 Posts: 594 Topics: 1
|
Posted: Thu Jun 09, 2011 11:14 am Post subject: |
|
|
Quote: | How about doing some leg work and searching instead of getting spoon fed every time? |
What have you tried? What happened?
di |
|
Back to top |
|
|
harsha vardhan reddy Beginner
Joined: 23 Apr 2011 Posts: 22 Topics: 3
|
Posted: Thu Jun 09, 2011 11:25 pm Post subject: |
|
|
HI,
I have tried with following code.. Code: |
/***************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--------------
|
when am trying to retrieve the data from stepname "TSCRATCH" with the dd name SYSIN it is gettting retrieved from the 1st SYSIN..But i need to retrieve the data corresponding to the TSCRATCH..
I know that by the code i have written it only retrieves it..
Am unable to proceed future..
Can some one help me on this..
Thanks in advance.. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12369 Topics: 75 Location: San Jose
|
Posted: Fri Jun 10, 2011 8:14 am Post subject: |
|
|
harsha vardhan reddy,
Change your ISFAFD queue cards to pick the entire job instead of just sysin. Once you get the entire output start parsing with in the rexx.
Kolusu |
|
Back to top |
|
|
harsha vardhan reddy Beginner
Joined: 23 Apr 2011 Posts: 22 Topics: 3
|
Posted: Fri Jun 10, 2011 10:47 am Post subject: |
|
|
i have tried that thing as well.. But the problem is that i need to write the input and output datasets to two different files.
How to differenciate between input & output datasets..
If i able to retrieve the data from SYSIN Tscratch directly i will get the output datasets..Then i will parse the entire job to get the input datasets comparing them with output ones.. |
|
Back to top |
|
|
|
|