Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

If step has concatenated DSNs, how to override?
Goto page 1, 2  Next
 
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: If step has concatenated DSNs, how to override?
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

Site Director


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

PostPosted: Wed Aug 29, 2012 6:47 pm    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7241

PostPosted: Wed Aug 29, 2012 7:00 pm    Post subject: Reply to: IF STEP HAS TWO OVERRIDES
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

Senior Member


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

PostPosted: Wed Aug 29, 2012 7:03 pm    Post subject:
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

Active Member


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

PostPosted: Wed Aug 29, 2012 7:07 pm    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7241

PostPosted: Thu Aug 30, 2012 12:15 pm    Post subject: Reply to: If step has concatenated DSNs, how to override?
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    Post subject: Reply to: If step has concatenated DSNs, how to override?
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

Senior Member


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

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

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Thu Aug 30, 2012 1:25 pm    Post subject: Reply to: If step has concatenated DSNs, how to override?
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Fri Aug 31, 2012 10:33 am    Post subject: Reply to: If step has concatenated DSNs, how to override?
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

Senior Member


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

PostPosted: Fri Aug 31, 2012 3:43 pm    Post subject:
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    Post subject: Reply to: If step has concatenated DSNs, how to override?
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

Site Director


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

PostPosted: Fri Aug 31, 2012 7:14 pm    Post subject:
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    Post subject: Reply to: If step has concatenated DSNs, how to override?
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Mon Sep 03, 2012 2:54 pm    Post subject: Reply to: If step has concatenated DSNs, how to override?
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

Senior Member


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

PostPosted: Mon Sep 03, 2012 3:26 pm    Post subject: Reply to: If step has concatenated DSNs, how to override?
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
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting multiple VB files to FB fi... Viswanath Reddy JCL & VSAM 6 Mon Aug 08, 2016 11:49 pm
This topic is locked: you cannot edit posts or make replies. JCL MULTIPLE STEP EXECUTION QUERY Susanta JCL & VSAM 18 Sat Jul 30, 2016 1:17 pm
No new posts Compiler option for override the exte... muralikrishnan_new COBOL Programming 9 Fri Jul 08, 2016 12:09 pm
No new posts Single step utility for compare and u... ramprakashn JCL & VSAM 5 Fri Apr 29, 2016 3:43 pm
No new posts Compilation Error in Translation Step. amitc23 CICS 4 Tue Mar 01, 2016 12:24 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us