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

If step has concatenated DSNs, how to override?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
Sunilp_cse

New User


Joined: 02 Jul 2012
Posts: 7
Location: INDIA

PostPosted: Wed Aug 29, 2012 6:36 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Aug 29, 2012 6:47 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Aug 29, 2012 7:00 pm
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed Aug 29, 2012 7:03 pm
Reply with quote

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
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Wed Aug 29, 2012 7:07 pm
Reply with quote

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
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Wed Aug 29, 2012 8:52 pm
Reply with quote

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
View user's profile Send private message
srinivasulu.p

New User


Joined: 10 Jul 2012
Posts: 22
Location: india

PostPosted: Thu Aug 30, 2012 11:54 am
Reply with quote

which DSN u wnt to override actually
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Aug 30, 2012 12:11 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Aug 30, 2012 12:15 pm
Reply with quote

I have similar requirement for 37th DD.

Give me JCL.

Before topic is split, this is just a joke
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Aug 30, 2012 12:21 pm
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Aug 30, 2012 1:19 pm
Reply with quote

OP seems to be disappeared.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Aug 30, 2012 1:25 pm
Reply with quote

just 18 hours from the initial post
give the guy a bit of time to let his neuron take a nap icon_cool.gif
Back to top
View user's profile Send private message
Sunilp_cse

New User


Joined: 02 Jul 2012
Posts: 7
Location: INDIA

PostPosted: Fri Aug 31, 2012 10:30 am
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Aug 31, 2012 10:33 am
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Aug 31, 2012 3:43 pm
Reply with quote

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...icon_rolleyes.gif
Back to top
View user's profile Send private message
parsesource

New User


Joined: 06 Feb 2006
Posts: 97

PostPosted: Fri Aug 31, 2012 7:12 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Aug 31, 2012 7:14 pm
Reply with quote

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
View user's profile Send private message
Sunilp_cse

New User


Joined: 02 Jul 2012
Posts: 7
Location: INDIA

PostPosted: Mon Sep 03, 2012 2:43 pm
Reply with quote

ya I need to copy output into two datasets icon_rolleyes.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Sep 03, 2012 2:54 pm
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Sep 03, 2012 3:26 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Sep 03, 2012 3:32 pm
Reply with quote

nice recap, Anuj
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Sep 03, 2012 3:46 pm
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Sep 03, 2012 3:47 pm
Reply with quote

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... icon_redface.gif

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Sep 03, 2012 3:50 pm
Reply with quote

we are wasting time
see for example the topic
www.ibmmainframes.com/viewtopic.php?t=59235&highlight=
where the TS asked for something and then disappeared

the TS might fit better here
ibmmainframeforum.com/index.php
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Sep 03, 2012 4:27 pm
Reply with quote

I totally agree with you enrico.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts How to append a PS file into multiple... JCL & VSAM 3
No new posts convert file from VB to FB and use tr... DFSORT/ICETOOL 8
No new posts Forcing a step to run (even if abended) JCL & VSAM 8
No new posts step by step trace 4 ISPF dialog call... TSO/ISPF 17
Search our Forums:

Back to Top