View previous topic :: View next topic
|
Author |
Message |
Atpsmp
New User
Joined: 23 Sep 2008 Posts: 14 Location: Chennai
|
|
|
|
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??? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
Atpsmp
New User
Joined: 23 Sep 2008 Posts: 14 Location: Chennai
|
|
|
|
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 |
|
|
Atpsmp
New User
Joined: 23 Sep 2008 Posts: 14 Location: Chennai
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
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 |
|
|
Atpsmp
New User
Joined: 23 Sep 2008 Posts: 14 Location: Chennai
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
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 |
|
|
Atpsmp
New User
Joined: 23 Sep 2008 Posts: 14 Location: Chennai
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
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 |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
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 |
|
|
Atpsmp
New User
Joined: 23 Sep 2008 Posts: 14 Location: Chennai
|
|
|
|
Thanks to everyone who all replied my post |
|
Back to top |
|
|
|