View previous topic :: View next topic
|
Author |
Message |
Sunilp_cse
New User
Joined: 02 Jul 2012 Posts: 7 Location: INDIA
|
|
|
|
We have a dd name such that it has two dsn names
If I would give a override for that dd name which dsn will override?
Example:
Code: |
Step010 exec pgm=xxxxxx,
DD1 dd DSN= s91965.shr.jcl,disp=shr,
dd DSN= s91965.srch.use, disp=shr
step020 exec pgm=yyyy |
other wise can i override any seperate override condition.
I have a such requirement in my post could you people please suggest on this ?
Code'd |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
At the top of the page is a link to "IBM Manuals". In the JCL Language Reference, read about overriding.
If you find something that is not clear, post what you found and your doubt. Someone will be able to clarify.
If the job executes a PROCedure, suggest you consider using symbolic parameter(s). |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
You can knock-up something and try it.
The JCL output shows what you've actually done.
Gets the first one every time.
Edit: Not much of a useful subject, I'll give it a new go... |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
You're lucky that you've got only two DSNs to deal with -- suggest you do a bit of experiment and play around with these DDs, once you read through the Manuals (as Dick says) and searched through the Forums. |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
You should really cut&paste actual code.
E.g., you have no //'s, a trailing comma and an embedded space.
Just suggesting a good practice to follow, even though your question here was clear. |
|
Back to top |
|
|
Ed Goodman
Active Member
Joined: 08 Jun 2011 Posts: 556 Location: USA
|
|
|
|
You'll never get it unless you try it. So do this - create a proc that has some concatenated datasets with one record each. Make the single record something easily identifiable, maybe "PROC 1", "PROC 2", "PROC 3". Use a good tool like DFSORT and have it just write out the results.
Then make some other files to use for overrides, and make them one record each, like "OVER 1", "OVER 2".
Then try overriding it with your JCL.
Be sure to do some where you want a single override to be the only data copied. Or where you want to override only the second file.
I can't remember it all, so I can't tell you how it works without doing it myself. |
|
Back to top |
|
|
srinivasulu.p
New User
Joined: 10 Jul 2012 Posts: 22 Location: india
|
|
|
|
which DSN u wnt to override actually |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
srinivasulu.p wrote: |
which DSN u wnt to override actually |
why don't you give him two examples?
1 for the first dsn
and then
1 for the second dsn. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
I have similar requirement for 37th DD.
Give me JCL.
Before topic is split, this is just a joke |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
though it is somewhat old (5 years) the rules have not changed
and the solution provided is still applicable.
How to override concatenated DSNs
BTW, it was the first hit when I googled
how to override concatenated dsns |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
OP seems to be disappeared. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
just 18 hours from the initial post
give the guy a bit of time to let his neuron take a nap |
|
Back to top |
|
|
Sunilp_cse
New User
Joined: 02 Jul 2012 Posts: 7 Location: INDIA
|
|
|
|
Thanks for all for giving great suggestions
I have coded concatenated dsns in In stream proc and tried to override that dd
here is find the example
//OVERR PROC
//STEP01 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD DSN=S91965.SPLIT.FILE,DISP=SHR
//SYSUT2 DD DSN=S91965.SPLIT.FILEA,DISP=SHR
// DD DSN=S91965.SPLIT.FILEC,DISP=SHR
// PEND
//STEP02 EXEC OVERR
//SYSPRINT DD SYSOUT=*
//STEP01.SYSUT2 DD DSN=S91965.SPLIT.FILEB,DISP=SH
//SYSIN DD DUMMY
Here is one problem file that DSn=s91965. Split.fileA is successfully override By fileB and dats in FILE successfully copied to FILEB But the data in SYSUT1 file is not copied to FILEC.Could U guys please look into this? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
review Your understanding of data management and JCL
1) YOU CANNOT CONCATENATE OUTPUT DATASETS
2) once You override a DD the original DD specification is lost |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
As far as I can make out of your probelm- possibly, you'd like to use two steps to copy the data to two different DSNs... I might be mistaken in understaing what you mean though... |
|
Back to top |
|
|
parsesource
New User
Joined: 06 Feb 2006 Posts: 97
|
|
|
|
other options to override, add etc.
Code: |
//ABCD PROC DSN1=xyz,DSN2=ert
//...
//CONC1 DD DISP=SHR,DSN=&DSN1.
// DD DISP=SHR,DSN=&DSN2.
//*
//STEP1 EXEC ABCD,DSN1=.. or DSN2=...
|
or add Datasets ahead of the other
Code: |
//ABCD PROC DSN1=xyz,DSN2=ert
//...
//CONC1 DDNAME=LIBS
//LIBS DD DISP=SHR,DSN=&DSN1.
// DD DISP=SHR,DSN=&DSN2.
//*
//STEP1 EXEC ABCD
//CONC1 DD DISP=SHR,DSN=xxx
// DD DISP=SHR,DSN=yyy
// DD DDNAME=LIBS
|
if the override does not contain ddname=libs then the whole concatenation is overriden
or use an empty file to allow adding a single lib before other libs
Code: |
//ABCD PROC DSN1=xyz,DSN2=ert
//...
//CONC1 DD DISP=SHR,DSN=A.EMPTY.FILE
// DD DISP=SHR,DSN=&DSN1.
// DD DISP=SHR,DSN=&DSN2.
//*
//STEP1 EXEC ABCD
//CONC1 DD DISP=SHR,DSN=xxx
|
IF you use DSN=NULLFILE override (or DD DUMMY) as first dataset of concatenation then the whole concatenation is dummied out
(i have not tested all of this) |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
If you want to create multiple copies of the same file, you can do this with your sort product (if your release supportes this). This would take only 1 pass of the input data - which might make a difference if the file is very large.
There would be 2 output DD statements and you could then override either. |
|
Back to top |
|
|
Sunilp_cse
New User
Joined: 02 Jul 2012 Posts: 7 Location: INDIA
|
|
|
|
ya I need to copy output into two datasets |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
then You will have to run two <steps> of whatever <single command> utility You choose
( IEBGENER )
or one step with two <commands> for the <multiple command> utility You choose
( IDCAMS , DFSORT )
DFSORT example very quick and very dirty
Code: |
000004 //ICE EXEC PGM=SORT
000005 //SYSOUT DD SYSOUT=*
000006 //SORTIN DD *
000007 LINE1
000008 LINE2
000009 LINE3
000010 LINE4
000011 LINE5
000012 //OUT1 DD SYSOUT=*,DCB=(RECFM=FB,LRECL=80)
000013 //OUT2 DD SYSOUT=*,DCB=(RECFM=FB,LRECL=80)
000014 //SYSIN DD *
000015 OPTION COPY
000016 OUTFIL FNAMES=OUT1
000017 OUTFIL FNAMES=OUT2 |
|
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Sunilp_cse - Please take some time and restate what you want to do? You initial question is about Override the concatenated-DSNs, however now you're talking about copy-data-from-input-to-multiple data-sets and this is no where close to "concatenation of DSNs" - because, per IBM, when data sets are concatenated, the application program treats them as if they were one logical data set. So what do you get by concatnating the "output" data-sets, to start with and why do you wnat to do that?
If you want to copy input (which migh be single Data-set or multiple) to multiple output data-sets, suggest you look, for example, at the documentation of SORT product at your shop and search for OUTFIL. This might/might-not fit for your situation. Or as said before, please restate what you want to do. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
nice recap, Anuj |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
sometimes I wonder ... what is that is not clear here
Quote: |
Location in the JCL
z/OS V1R11.0 MVS JCL Reference z/OS V1R10.0-V1R11.0
SA22-7597-13
Most DD statements define data sets to be used in a job step, in a cataloged procedure step, or in an in-stream procedure step; these appear after the EXEC statement for the step. Some DD statements define data sets for the job, for example, the JOBLIB DD statement; these appear after the JOB statement and before the first EXEC statement.
When Overriding or Adding to Procedures
Place DD statements that override, nullify, or add parameters immediately following the EXEC statement that calls the procedure. Place overriding and nullifying DD statements first, followed by all added DD statements. Last in the calling step are any DD * or DD DATA statements with their in-stream data.
To override more than one DD statement in a procedure, place the overriding DD statements in the same order as the overridden DD statements in the procedure.
Concatenating Data Sets
When data sets are concatenated, the application program can treat them as if they were one logical data set. In general, most of the logical attributes of the first DD statement apply to all of them. You can concatenate input data sets for the duration of a job step. Each of the concatenated data sets can reside on a different volume. For details on concatenating data sets, see z/OS DFSMS Using Data Sets. Note that you cannot concatenate output data sets.
|
unless the TS comes out with some better explanation the topic is going to locked and vaporized |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
I kept away from this thread, for a while but this thread seems to go no-where; though the subject title sounds pretty premitive. I realize that before I compiled the reply -- I deleted OPs double post, and called upon by someone and posted it later, however by then Enrico had already talked about OUTFIL...
But the question still remains, what exactly the OP wants? And if the latest query is a "new-queston", perhaps OP has to post a new thread altogether - too many loose ends to answer something useful...
And Thanks for the pointer to BPX1SLP, BPX4SLP in other thread; I think I'd need it soon. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
I totally agree with you enrico. |
|
Back to top |
|
|
|