View previous topic :: View next topic
|
Author |
Message |
Raju.main
New User
Joined: 26 Apr 2007 Posts: 4 Location: noida
|
|
|
|
// 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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Is this instream JCL or in a PROC ? |
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
what's the problem here? Go ahead.. |
|
Back to top |
|
|
Raju.main
New User
Joined: 26 Apr 2007 Posts: 4 Location: noida
|
|
|
|
what is difference if it is instream and if it is PROC.....
Give clear idea on both cases |
|
Back to top |
|
|
Raju.main
New User
Joined: 26 Apr 2007 Posts: 4 Location: noida
|
|
|
|
the problem here i dont want to concatenate datasets 2,4,5.......i want concatenate only 1,3,6....... |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
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 |
|
|
Raju.main
New User
Joined: 26 Apr 2007 Posts: 4 Location: noida
|
|
|
|
HI Expat,
Can you say that if it is instream Proc |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
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 |
|
|
rameshfoa
New User
Joined: 05 Apr 2007 Posts: 27 Location: chennai
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
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 |
|
|
rameshfoa
New User
Joined: 05 Apr 2007 Posts: 27 Location: chennai
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
sh_moni Currently Banned New User
Joined: 30 Apr 2007 Posts: 7 Location: pune
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
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 |
|
|
|