MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Retrieving the dataset names using REXX
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12367
Topics: 75
Location: San Jose

PostPosted: Wed May 11, 2011 12:46 pm    Post subject: Re: Retrieving the dataset names using REXX Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
harsha vardhan reddy
Beginner


Joined: 23 Apr 2011
Posts: 22
Topics: 3

PostPosted: Wed May 11, 2011 7:18 pm    Post subject: Re: Retrieving the dataset names using REXX Reply with quote

Hi kolusu,

Thanks a lot..Smile

Now i can able to access that link
Back to top
View user's profile Send private message
papadi
Supermod


Joined: 20 Oct 2009
Posts: 594
Topics: 1

PostPosted: Fri May 13, 2011 3:58 pm    Post subject: Reply with quote

"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
View user's profile Send private message
misi01
Advanced


Joined: 02 Dec 2002
Posts: 618
Topics: 172
Location: Stockholm, Sweden

PostPosted: Sat May 14, 2011 1:27 am    Post subject: Reply with quote

Funny, I didn't have any problems following the links
_________________
Michael
Back to top
View user's profile Send private message Send e-mail
harsha vardhan reddy
Beginner


Joined: 23 Apr 2011
Posts: 22
Topics: 3

PostPosted: Sat May 14, 2011 7:49 pm    Post subject: Reply with quote

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
View user's profile Send private message
harsha vardhan reddy
Beginner


Joined: 23 Apr 2011
Posts: 22
Topics: 3

PostPosted: Fri Jun 03, 2011 10:47 pm    Post subject: Reply with quote

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...Smile
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12367
Topics: 75
Location: San Jose

PostPosted: Sat Jun 04, 2011 1:39 am    Post subject: Reply with quote

harsha vardhan reddy,

Code:

/* REXX */                                               
INSTR  = 'LFTEST.R911.INT.STAGE.LOAD'                     
SAY 'NO: OF . ARE : ' WORDS(TRANSLATE(INSTR,' ','.')) - 1
EXIT


Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
harsha vardhan reddy
Beginner


Joined: 23 Apr 2011
Posts: 22
Topics: 3

PostPosted: Mon Jun 06, 2011 11:42 am    Post subject: Reply with quote

Thanks a lot Kolusu..

Its working fine..My requirement is almost done..
Back to top
View user's profile Send private message
harsha vardhan reddy
Beginner


Joined: 23 Apr 2011
Posts: 22
Topics: 3

PostPosted: Tue Jun 07, 2011 11:17 am    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12367
Topics: 75
Location: San Jose

PostPosted: Tue Jun 07, 2011 11:45 am    Post subject: Reply with quote

harsha vardhan reddy,

How about doing some leg work and searching instead of getting spoon fed every time?

A simple search for SDSF in "TSO and ISPF" forum produced the following

http://www.mvsforums.com/helpboards/viewtopic.php?t=3073&highlight=sdsf

http://www.mvsforums.com/helpboards/viewtopic.php?p=26539#26539

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
harsha vardhan reddy
Beginner


Joined: 23 Apr 2011
Posts: 22
Topics: 3

PostPosted: Wed Jun 08, 2011 11:21 pm    Post subject: Reply with quote

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
View user's profile Send private message
papadi
Supermod


Joined: 20 Oct 2009
Posts: 594
Topics: 1

PostPosted: Thu Jun 09, 2011 11:14 am    Post subject: Reply with quote

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
View user's profile Send private message
harsha vardhan reddy
Beginner


Joined: 23 Apr 2011
Posts: 22
Topics: 3

PostPosted: Thu Jun 09, 2011 11:25 pm    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12367
Topics: 75
Location: San Jose

PostPosted: Fri Jun 10, 2011 8:14 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
harsha vardhan reddy
Beginner


Joined: 23 Apr 2011
Posts: 22
Topics: 3

PostPosted: Fri Jun 10, 2011 10:47 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group