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

Explain SPLICE FROM(T1) TO(OUT12) ON(1,15,CH) WITH(22,2)


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jz1b0c

Active User


Joined: 25 Jan 2004
Posts: 160
Location: Toronto, Canada

PostPosted: Mon Feb 26, 2007 10:01 pm
Reply with quote

Hello there,

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)..
this gives an error

and also whats that WITH???
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon Feb 26, 2007 10:25 pm
Reply with quote

You can read complete details on the SPLICE operator of DFSORT's ICETOOL at:

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA20/6.13?DT=20060615185603

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:

www.ibm.com/servers/storage/support/software/sort/mvs/tricks/

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:

Use [URL] BBCode for External Links
Back to top
View user's profile Send private message
jz1b0c

Active User


Joined: 25 Jan 2004
Posts: 160
Location: Toronto, Canada

PostPosted: Fri Apr 20, 2007 2:37 am
Reply with quote

Frank,

I read the document, But some of the examples are not working...
even if I use them as it is..
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Fri Apr 20, 2007 4:18 am
Reply with quote

It might further your query to post the inputs and outputs that "are not working".....
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Apr 20, 2007 4:44 am
Reply with quote

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.
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 Apr 20, 2007 5:50 am
Reply with quote

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

Active User


Joined: 25 Jan 2004
Posts: 160
Location: Toronto, Canada

PostPosted: Fri Apr 20, 2007 9:02 pm
Reply with quote

I am used to write in SYNC sort, and suddenly all the SPLICE stuff is totally confusing.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Apr 20, 2007 10:21 pm
Reply with quote

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

ON(1,3,CH)
Back to top
View user's profile Send private message
jz1b0c

Active User


Joined: 25 Jan 2004
Posts: 160
Location: Toronto, Canada

PostPosted: Fri Apr 20, 2007 10:33 pm
Reply with quote

Definately frank, its totally worth the putting efforts to understand splice features of DFSORT.

I just worked on your example, its amazing.
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Join multiple records using splice DFSORT/ICETOOL 5
No new posts DB2 Statistics - Using EXPLAIN and qu... DB2 1
This topic is locked: you cannot edit posts or make replies. Splice JCL into one record for DD sta... SYNCSORT 2
This topic is locked: you cannot edit posts or make replies. Splice multiple records into single r... DFSORT/ICETOOL 9
No new posts Splice more than 50 occurances DFSORT/ICETOOL 1
Search our Forums:

Back to Top