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

Concatenate only the 1,3,6 datasets from 6 datasets


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Raju.main

New User


Joined: 26 Apr 2007
Posts: 4
Location: noida

PostPosted: Wed May 02, 2007 6:21 pm
Reply with quote

// step1 dd dsn=name file name 1
// dd dsn = name2 filename 2
// dd dsn=name3 file name3
// dd dsn=name4 file name4
// dd dsn=name5 file name5
// dd dsn=name6 file name6


i have above jcl to concatenate the 6 datasets.....
But my requirement is have to concatenate only the 1,3,6 datasets only.....
for this one what can i do.....here condition dont make comment the jcl line....
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Wed May 02, 2007 6:26 pm
Reply with quote

Is this instream JCL or in a PROC ?
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Wed May 02, 2007 6:27 pm
Reply with quote

what's the problem here? Go ahead..
Back to top
View user's profile Send private message
Raju.main

New User


Joined: 26 Apr 2007
Posts: 4
Location: noida

PostPosted: Wed May 02, 2007 6:31 pm
Reply with quote

what is difference if it is instream and if it is PROC.....
Give clear idea on both cases
Back to top
View user's profile Send private message
Raju.main

New User


Joined: 26 Apr 2007
Posts: 4
Location: noida

PostPosted: Wed May 02, 2007 6:33 pm
Reply with quote

the problem here i dont want to concatenate datasets 2,4,5.......i want concatenate only 1,3,6.......
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Wed May 02, 2007 7:32 pm
Reply with quote

Yes, we know what you want to do, but the actions and code required for instream JCL will be different from the code required if in a proc.
Back to top
View user's profile Send private message
Raju.main

New User


Joined: 26 Apr 2007
Posts: 4
Location: noida

PostPosted: Fri May 04, 2007 8:30 am
Reply with quote

HI Expat,
Can you say that if it is instream Proc
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Fri May 04, 2007 12:03 pm
Reply with quote

What I mean is .................

Is the JCL that you execute in a PROC

//SOMETHNG EXEC PROCNAME

or is it instream as that you can see and edit lots and lots of JCL statements.
Back to top
View user's profile Send private message
rameshfoa

New User


Joined: 05 Apr 2007
Posts: 27
Location: chennai

PostPosted: Mon May 07, 2007 1:37 pm
Reply with quote

If it is in a external PROC then give the dummy override for 2,4,6 datasets...

ex:

0010 //s1 exec proc1
0020 //step1.dd2 dd dummy
0030 //step1.dd4 dd dummy

If it instream proc...then just comment the datasets..
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Mon May 07, 2007 2:02 pm
Reply with quote

rameshfoa
Code:

//s1 exec proc1
//step1.dd2 dd dummy
//step1.dd4 dd dummy

I think not. As soon as the first DD DUMMY is encountered the remainder of the files in the DD statement will ignored.

But as the OP has not been back and answered if this is a PROC or instream JCL, how can we give the correct assistence ?
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Mon May 07, 2007 2:05 pm
Reply with quote

Also, your JCL does not resemble the current problem as originally posted, because you are changing the allocation to seperate DD statements, whereas the OP has all of the datasets allocated to only one DD statement.
Back to top
View user's profile Send private message
rameshfoa

New User


Joined: 05 Apr 2007
Posts: 27
Location: chennai

PostPosted: Mon May 07, 2007 2:39 pm
Reply with quote

then it dhud be as follows...

0010 //s1 exec proc1
0020 //step1.dd1 dd dataset1
0030 // dd dummy
0030 // dd dataset3
0040 // dd dummy
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Mon May 07, 2007 2:53 pm
Reply with quote

Quote:
I think not. As soon as the first DD DUMMY is encountered the remainder of the files in the DD statement will ignored.

What I am telling yo is that when you use your code,
Code:

0010 //s1 exec proc1
0020 //step1.dd1 dd dataset1
0030 // dd dummy
0030 // dd dataset3
0040 // dd dummy

the desired output will not be achieved. Line 0030 contains DD DUMMY, so ALL other concatenations that follow within that DD staement will be ignored. Dataset3 will not be included in the concatenation.

Try it, and let us know what happens.
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: Mon May 07, 2007 9:58 pm
Reply with quote

Hello,

I'd suggest overriding all 6 DD statements - the first 3 with the 3 files you want to use as input and the last 3 as dummy. When the first dummy is encountered, the read should end, but overriding the last 3 with dummy will make it easier to understand if anyone looks at the run jcl after the job has been executed.
Back to top
View user's profile Send private message
sh_moni
Currently Banned

New User


Joined: 30 Apr 2007
Posts: 7
Location: pune

PostPosted: Tue May 08, 2007 7:54 pm
Reply with quote

hi expat,

Could you please give the answer for both the cases(Instream and Catalog Procs).

//s1 exec proc1
//step1.dd1 dd dataset1
//step1.dd3 dd dataset3
//step1.dd6 dd dataset6
// dd dummy

will this work in above case.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Tue May 08, 2007 8:06 pm
Reply with quote

Quote:
will this work in above case.

The answer is NO.

The reason is the same as I said for rameshfoa.

Here's the code from the OP

// step1 dd dsn=name file name 1
// dd dsn = name2 filename 2
// dd dsn=name3 file name3
// dd dsn=name4 file name4
// dd dsn=name5 file name5
// dd dsn=name6 file name6

To me it looks like it is instream JCL, and not in a PROC.

I would code

// step1 dd dsn=name1 file name 1
// dd dsn = name3 filename 3
// dd dsn=name6 file name6
// dd dummy
// dd dummy
// dd dummy

For a PROC it is virtually the same apart from coding stepname. infront of the DD name
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Merging 2 datasets into one DFSORT/ICETOOL 1
No new posts PL/I, VB Datasets and the RDW PL/I & Assembler 4
No new posts Concatenate 2 fields (usage national)... COBOL Programming 2
No new posts how to get list of all VSAM/non-VSAM ... JCL & VSAM 13
No new posts define 1 DCB parms for multiple outpu... JCL & VSAM 9
Search our Forums:

Back to Top