What you've shown is part of a larger set of control statements. You can read about a similar example in the "Create files with matching and non-matching records" Smart DFSORT Trick at:
You can specify multiple ON fields like this: ON(1,1,CH) ON(2,1,CH)
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Quote:
I read the document, But some of the examples are not working...
even if I use them as it is..
All of the examples work with DFSORT as written with the current level of DFSORT and the shipped installation defaults. I know because I tested them all. So if they aren't working for you, it could be because you're not using DFSORT, or you don't have needed PTFs installed, or your site changed the defaults, or some other reason.
Do you expect me to read your mind to know which examples are not working for you and why, without you supplying any clue as to what those examples are or what results you're getting? I need details in order to be able to help you.
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
Hello Masade,
For starters, i'd suggest you verify whether you are using DFSORT or Syncsort. Many of the DFSORT techniques will not work with Syncsort. Some will, but with different control statements.
If you post the output of any of your sort runs, it will show which sort product you are using.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Quote:
I am used to write in SYNC sort, and suddenly all the SPLICE stuff is totally confusing.
ICETOOL is an extension of the functions available with DFSORT and Syncsort. The ICETOOL functions are flexible and powerful, but it takes some effort to understand how to use them. Read through the documentation on SPLICE carefully - there are lots of examples - play around with it a bit and see what output you get for various combinations. It's worth the effort to learn how to use it.
Quote:
Could I ask someone to please explain
SPLICE FROM(T1) TO(OUT12) ON(1,15,CH) WITH(22,2)
each of the parameters...
I would like to give multiple condition ON(1,1,ch,2,2,ch)..
FROM(T1) - T1 is the ddname of the input data set
TO(OUT12) - OUT12 is the ddname of the output data set
ON(1,15,CH) - base and overlay records which have matching positions 1-15 will be spliced
WITH(22,2) - records are spliced by overlaying positions 22-23 of the base (first) record with positions 22-23 from the second (overlay) record
To specify multiple conditions, you use multiple ON fields:
ON(1,1,CH) ON(2,2,CH)
Of course, since these fields are contiguous, you can actually specify them with one ON field