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 Mirco » Mon Jun 13, 2011 8:59 pm

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.
Mirco
 
Posts: 11
Joined: Thu Feb 11, 2010 7:13 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Need to retrieve the datasets from jcl using rexx

Postby harsha vardhan reddy » Tue Jun 14, 2011 5:53 am

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..
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 Jul 03, 2011 7:23 am

Hi Micro,

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

I have tried searching with the DSN but not succeeded..
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 dick scherrer » Sun Jul 03, 2011 7:59 am

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Need to retrieve the datasets from jcl using rexx

Postby dick scherrer » Sun Jul 03, 2011 8:03 am

Follow on.

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

d
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Previous

Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post