Page 3 of 3

Re: Need to retrieve the datasets from jcl using rexx

PostPosted: Mon Jun 13, 2011 8:59 pm
by Mirco
First, find the JCL and load it into some array (stem) variable.

Then the simplest procedure would be:
- Take a line.
- Does it start with '//' and is the second word (use function Word) equal to 'DD'? Then it is a dd statement, go on. Else ignore this line.
- The text between '//' and 'DD', minus blanks, is the DDname.
- Search the line for a 'DSN=' string (function Pos). If found, the text behind it up to the first comma or space is the dataset name. Use Substr function and a loop to go through the line.

When this works:
- Handle line continuations.
- Handle symbols (&something) in the JCL.
- Etc.

Hope this helps.

Re: Need to retrieve the datasets from jcl using rexx

PostPosted: Tue Jun 14, 2011 5:53 am
by harsha vardhan reddy
Hi Micro,

I need to retrieve the data from spool. The output datasets will be in SYSIN ddname & SCRATCH or TSCRATCH stepname..
If we able to retrieve data corresponding to that then diectly we will get the output datasets..

If there is only one ddname then it is easy to extract the data and am able to do it, but when the case there are more than one ddname with the same name the data getting retrieved from the 1st dd only..

Re: Need to retrieve the datasets from jcl using rexx

PostPosted: Sun Jul 03, 2011 7:23 am
by harsha vardhan reddy
Hi Micro,

Can you provide any sample code for the procedure you have mentioned..

I have tried searching with the DSN but not succeeded..

Re: Need to retrieve the datasets from jcl using rexx

PostPosted: Sun Jul 03, 2011 7:59 am
by dick scherrer
Hello,

What have you tried? What happened? Is there any good reason that the best you could provide is "it didn work"?

Keep in mind that we may be able to help, but you need to actually do most/all of your work.

Re: Need to retrieve the datasets from jcl using rexx

PostPosted: Sun Jul 03, 2011 8:03 am
by dick scherrer
Follow on.

This topic is a duplicate of another forum and this one is being locked.

d