IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Changing the first qualifier in the DSN in REPRO command - r


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Atpsmp

New User


Joined: 23 Sep 2008
Posts: 14
Location: Chennai

PostPosted: Fri Mar 06, 2009 6:07 pm
Reply with quote

Hi all,

My requirement is to change the DSN in the REPRO.
There are two scenarios:

1)Repro infile(sfsd.ger.cxv) outfile(asd.fg.erty)
2)Repro infile(sfsd.ger.cxv),outfile(asd.fg.erty)
For the first scenario, i have coded like this

Code:

DO JL = 1 TO JOB_LINES.0                                             
 IF POS("REPRO",JOB_LINES.JL) > 0,                                   
                           & SUBSTR(JOB_LINES.JL,1,2) <> "//" THEN   
    DO                                                               
      DSN_REP = WORD(JOB_LINES.JL,1)                                 
      DSN_IP  = WORD(JOB_LINES.JL,2)                                 
      DSN_OP  = WORD(JOB_LINES.JL,3)                                 
      PARSE VAR DSN_OP PARAN "(" DSNAME1                             
      PARSE VAR DSNAME1 FIRST_QUAL "." REM_DN                       
      JOB_LINES.JLA = DSN_REP||" " ||DSN_IP                         
      JOB_LINES.JLB = PARAN||"("||QUAL||"."||REM_DN                 
      JOB_LINES.JL  = JOB_LINES.JLA||" "||JOB_LINES.JLB             
    END                                                             
                                                                     


I know that the second scenario also can be done in the same way.

Since there are two scenarios, we have to find out the scenario first, then we have to make appropriate changes such that first qualifier will be chaged.


But we are not sure, the JCL which type of scenario will be used..??!!!

Can anyone throw light on this??? icon_cry.gif icon_confused.gif
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Mar 06, 2009 6:59 pm
Reply with quote

No, your explanation is not very clear.

What is your REXX doing, is it building JCL to perform a REPRO or will it invoke IDCAMS dynamically to perform the REPRO.

If it is building JCL then I suggest the use of ISPF file tailoring services for a quick and easy to maintain method.

Also I suggest that you take a good read of the IDCAMS manual to get the correct syntax of the REPRO command as the example given above will not work.

Click HERE to read the IDCAMS manual.
Back to top
View user's profile Send private message
Atpsmp

New User


Joined: 23 Sep 2008
Posts: 14
Location: Chennai

PostPosted: Fri Mar 06, 2009 7:02 pm
Reply with quote

Hey hi..

AM just creating the TEST version of the JCL we provide.
There are many enhancements in this,
As a part of one requirement, the file names will be present in the REPRO , we have to change the first qulifier with the qualifier which the user gives in the panel...

The REPRO statements, can be of any type, separated by commas or space, like below:

Quote:

1)Repro infile(sfsd.ger.cxv) outfile(asd.fg.erty)
2)Repro infile(sfsd.ger.cxv),outfile(asd.fg.erty)


So i have to change the first qualifier....

Pls help me out
Back to top
View user's profile Send private message
Atpsmp

New User


Joined: 23 Sep 2008
Posts: 14
Location: Chennai

PostPosted: Fri Mar 06, 2009 7:07 pm
Reply with quote

Hi expat,
I had a chance to take a glance on the IDCAMS manual.
The repro format is :

Quote:

REPRO -
INFILE(INPUT) -
OUTDATASET(RPR.MYDATA)-
ERRORLIMIT(6)


Is this the general syntax??
Because in my client mainframe, i have seen the repro used as what i mentioned in the post as


Quote:

1)Repro infile(sfsd.ger.cxv) outfile(asd.fg.erty)
2)Repro infile(sfsd.ger.cxv),outfile(asd.fg.erty)
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Mar 06, 2009 7:15 pm
Reply with quote

expat wrote:
Also I suggest that you take a good read of the IDCAMS manual to get the correct syntax of the REPRO command as the example given above will not work.


Your requirement is not clear. Where does the information of the input dataset to be repro'd come from.

Where does the new HLQ to be used come from

And once again I ask, will the REXX build and submit a batch job or will it be actioned dynamically from the terminal.

Please, we do not ask questions because we have nothing better to do, it is to get useful information to help you with, so please answer the questions.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Sat Mar 07, 2009 2:18 am
Reply with quote

Quote:
So i have to change the first qualifier....

It is not clear why you want to change the qualifier. Perhaps you are using 'qualifier' in a different context that what I expect.
Back to top
View user's profile Send private message
Atpsmp

New User


Joined: 23 Sep 2008
Posts: 14
Location: Chennai

PostPosted: Wed Mar 11, 2009 6:02 pm
Reply with quote

Actually, i created a tool which onverts the production JCL to the test version.
In this process, in JCL's we will be having the REPRO command with all the file names(infile and outfile). But in some cases the DD names are present. So if in case the file names are present, we need to change...

So, the requirement is to change the first qualifier of those file names to complete the test version of JCL.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Mar 11, 2009 6:21 pm
Reply with quote

Would not an edit macro be an easier way to do this.

I wrote exactly the same thing ages ago, copies JCL and control cards from any enviroonment to any environment and made all changes at the same time conforming to environment standards.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Wed Mar 11, 2009 9:38 pm
Reply with quote

Try using PARSE to search for OUTFILE.

Code:

DO JL = 1 TO JOB_LINES.0                                             
 IF POS("REPRO",JOB_LINES.JL) > 0,                                   
                           & SUBSTR(JOB_LINES.JL,1,2) <> "//" THEN   
    DO                                                               
      PARSE VAR JOB_LINES.JL firstpart    'OUTFILE(' old_qual'.'    lastpart
      JOB_LINES.JL  =        firstpart || 'OUTFILE('|| qual ||'.'|| lastpart             
    END
Back to top
View user's profile Send private message
Atpsmp

New User


Joined: 23 Sep 2008
Posts: 14
Location: Chennai

PostPosted: Fri Mar 13, 2009 4:21 pm
Reply with quote

Hi Pedro,
I tried like searching REPRO and parsing eith the help of 'OUTFILE'
But they are using ODS and many other instead of OUTFILE.

One more thing si they are using like this also below in the input file:

Quote:

REPRO -
INFILE(INPUT) -
OUTFILE(RPR.MYDATA)-



It is present in the next two lines..

So we can't find out which option they are using (whether in one single line or more than one line) .. That's my concern reg this....
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Fri Mar 13, 2009 9:15 pm
Reply with quote

OUTFILE should be a DD statement, not a dataset name.

Perhaps you just want to change all occurrences of old_qualifier to new_qualifier.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Sun Mar 15, 2009 7:29 pm
Reply with quote

Hello Atpsmp,
Quote:
I had a chance to take a glance on the IDCAMS manual
That's a good thing, but sometimes it is not enough...

In the REPRO command, the input file can be defined by using:
INFILE(ddname) or INDATASET(datasetname)
IFILE and IDS are the only abbreviations allowed.
The output file can be specified as:
OUTFILE(ddname) or OUTDATASET(datasetname)
OFILE and ODS are the only abbreviations allowed.

These values do not have to be on the same line as the REPRO command.

I join Pedro in suggesting that you search for dataset qualifiers and replace them with new values.
Back to top
View user's profile Send private message
Atpsmp

New User


Joined: 23 Sep 2008
Posts: 14
Location: Chennai

PostPosted: Mon Mar 16, 2009 3:04 pm
Reply with quote

Thanks to everyone who all replied my post icon_wink.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
No new posts LTJ command CA Products 4
No new posts changing defaults in db2 admin - Unlo... DB2 0
Search our Forums:

Back to Top